fix(journals): resolve AI tools ReferenceError and finalize modularization
- Corrected template usage to 'JournalEntry_AITools'. - Finalized Chunk 3: Modularized AI tools wrapper.
This commit is contained in:
34
src/routes/journals/JournalEntry_AITools.svelte
Normal file
34
src/routes/journals/JournalEntry_AITools.svelte
Normal file
@@ -0,0 +1,34 @@
|
||||
<script lang="ts">
|
||||
/**
|
||||
* JournalEntry_AITools.svelte
|
||||
* Journal-specific wrapper for the generic AE_AITools.
|
||||
* Handles layout/positioning and specific save behavior for journal entries.
|
||||
*/
|
||||
import AE_AITools from '$lib/ae_elements/AE_AITools.svelte';
|
||||
|
||||
interface Props {
|
||||
content: string;
|
||||
summary: string; // Bindable
|
||||
onSave: () => void;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
content,
|
||||
summary = $bindable(),
|
||||
onSave,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="journal-entry-ai-tools absolute top-2 right-2 z-10">
|
||||
<AE_AITools
|
||||
{content}
|
||||
bind:summary={summary}
|
||||
onSave={(newSummary) => {
|
||||
summary = newSummary;
|
||||
onSave();
|
||||
}}
|
||||
{log_lvl}
|
||||
/>
|
||||
</div>
|
||||
@@ -363,7 +363,7 @@
|
||||
class:bg-yellow-50={$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'}>
|
||||
|
||||
<div class="absolute top-2 right-2 z-10">
|
||||
<AE_AITools
|
||||
<JournalEntry_AITools
|
||||
content={tmp_entry_obj.content}
|
||||
bind:summary={tmp_entry_obj.summary}
|
||||
onSave={update_journal_entry}
|
||||
|
||||
Reference in New Issue
Block a user