General clean up. Make things configurable. More AI stuff.

This commit is contained in:
Scott Idem
2025-09-12 16:20:50 -04:00
parent 0931b960b6
commit fd3105b4e1
6 changed files with 434 additions and 21 deletions

View File

@@ -12,12 +12,16 @@ import type { key_val } from '$lib/ae_stores';
let journals_local_data_struct: key_val = {
ver: '2024-08-20_19',
// Shared
name: 'Aether - Journals (SvelteKit 2.x Svelte 4.x)',
name: 'Aether - Journals (SvelteKit 2.x Svelte 5.x)',
title: `OSIT's Æ Journals`, // Æ
mode__edit: false,
mode__debug: false,
datetime_format: 'datetime_12_long',
time_format: 'time_12_short',
time_hours: 12, // 12 or 24
qry__enabled: 'enabled', // all, disabled, enabled
qry__hidden: 'not_hidden', // all, hidden, not_hidden
qry__limit: 20,
@@ -33,8 +37,22 @@ let journals_local_data_struct: key_val = {
entry_view_history_kv: {}, // Keyed by journal_entry_id for quick lookup.
entry_view_history_max: 15, // Maximum number of journal entries to keep in history.
// llm_api_base_url: 'https://ai.dgrzone.com/api',
// llm_api_model: 'dgrzone-deepseek-8b-quick',
llm__api_base_url: 'https://ai.dgrzone.com/api',
llm__api_model: 'dgrzone-deepseek-8b-quick',
llm__api_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYjI2MzdlLThiMjktNGM2Zi05MzVhLWFkYjU1MDkwMGU5MCJ9.4y5AStXZJAVnWRlgG3lVV0-xKIfMzqdNRuInGwT0ThQ',
llm__api_dangerous_browser: false, // This allows for use of localhost.
llm__stream: false, // Whether to use streaming or not. Not all APIs support this.
llm__timeout_ms: 60000, // 60 seconds
llm__max_retries: 3, // Number of times to retry a failed LLM API call.
llm__retry_delay_ms: 2000, // 2 seconds between retries.
llm__system_prompt: 'You are a helpful assistant that helps people find information.',
llm__max_tokens: 1024,
llm__temperature: 0.7,
llm__top_p: 1.0,
llm__n: 1,
llm__frequency_penalty: 0.0,
llm__presence_penalty: 0.0,
journal: {
edit: false,
@@ -54,7 +72,14 @@ let journals_local_data_struct: key_val = {
],
},
entry: {
ai__system_prompt: 'Summarize the following journal entry content in a concise manner, focusing on key points and insights.', // 'You are a helpful assistant that helps people find information.',
llm__system_prompt: 'Summarize the following journal entry content in a concise manner, focusing on key points and insights.',
llm__max_tokens: 512,
llm__temperature: 0.7,
llm__top_p: 1.0,
llm__n: 1,
llm__frequency_penalty: 0.0,
llm__presence_penalty: 0.0,
edit: false,
edit_kv: {},
},
@@ -79,6 +104,8 @@ let journals_session_data_struct: key_val = {
trigger__journal_id: null,
// trigger__journal_li: null,
show__modal__journals_config: false,
show__modal_edit__journal_obj: false,
show__modal_new__journal_obj: false,
show__modal_view__journal_id: null,

View File

@@ -74,6 +74,9 @@ export let iso_datetime_formatter = function iso_datetime_formatter(
// case 'datetime_12_no_seconds':
// datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A');
// break;
case 'datetime_us':
datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY hh:mm:ss A');
break;
case 'datetime_short':
datetime_string = dayjs(raw_datetime).format('MMM D, YY HH:mm');
break;
@@ -110,6 +113,9 @@ export let iso_datetime_formatter = function iso_datetime_formatter(
case 'date_iso':
datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD');
break;
case 'date_us':
datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY');
break;
case 'date_long_month_day':
datetime_string = dayjs(raw_datetime).format('MMMM D');
break;

View File

@@ -107,6 +107,8 @@ if (placeholder) { extensions.push(placeholderExt(placeholder)); }
if (show_line_numbers) {
// extensions.push(lineNumbers({ class: "line-numbers" }));
} else {
// extensions.push(gutter({ class: "hidden-gutter" }));
// extensions.push(lineNumbers(false));
// extensions.push(gutter(false));
// extensions.pop();
@@ -136,7 +138,7 @@ $: editor_extensions = [
basicSetup,
// gutter({class: "hidden-gutter"}),
// A line number gutter
// lineNumbers(false),
lineNumbers(false),
// A gutter with code folding markers
// foldGutter(false),
// lineWrapping(false),