Implement generic AE_AITools component and integrate into Journals
- Created reusable AE_AITools.svelte in src/lib/ae_elements for system-wide AI features. - Refactored Journal Entry view to utilize the generic AI toolset. - Cleaned up redundant module-specific AI logic and modal code. - Standardized Svelte 5 patterns for AI summary results.
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
|
||||
import Comp_journal_entry_file_li from './ae_comp__journal_entry_obj_file_li.svelte';
|
||||
import Comp_hosted_files_download_button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte';
|
||||
import JournalEntry_AITools from './JournalEntry_AITools.svelte';
|
||||
import AE_AITools from '$lib/ae_elements/AE_AITools.svelte';
|
||||
|
||||
// *** Configuration
|
||||
let llm_api_token =
|
||||
@@ -1866,7 +1866,19 @@
|
||||
$lq__journal_entry_obj?.journal_entry_id
|
||||
] == 'current'}
|
||||
>
|
||||
<JournalEntry_AITools entry={tmp_entry_obj} onSave={update_journal_entry} {log_lvl} />
|
||||
<!-- Generic AI Toolset -->
|
||||
<div class="absolute top-2 right-2 z-10">
|
||||
<AE_AITools
|
||||
content={tmp_entry_obj.content}
|
||||
bind:summary={tmp_entry_obj.summary}
|
||||
onSave={update_journal_entry}
|
||||
token={$journals_loc?.llm__api_token}
|
||||
baseUrl={$journals_loc?.llm__api_base_url}
|
||||
model={$journals_loc?.llm__api_model}
|
||||
systemPrompt={$journals_loc?.entry?.llm__system_prompt}
|
||||
{log_lvl}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{#if !$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id]}
|
||||
{#if $lq__journal_obj?.cfg_json?.pref_viewer == 'codemirror'}
|
||||
|
||||
Reference in New Issue
Block a user