Show AI tools only in edit mode; open existing summary without regenerating

- Hide AI tools panel when entry is not in edit mode
- Clicking AI button when a summary already exists opens it directly
  instead of triggering a new API call; Re-run still available in modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-05-08 17:22:16 -04:00
parent bdba092de0
commit 66c0be65c4
2 changed files with 19 additions and 9 deletions

View File

@@ -487,13 +487,15 @@ let modal_mode: 'append' | 'prepend' | 'auto' = $state('auto');
] == 'current'
? 'ring-primary-500/40 ring-2 ring-inset'
: ''}">
<AE_Comp_Journal_Entry_AiTools
content={typeof tmp_entry_obj.content === 'string'
? tmp_entry_obj.content
: ''}
bind:summary={tmp_entry_obj.summary}
on_save={() => update_journal_entry()}
{log_lvl} />
{#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] === 'current'}
<AE_Comp_Journal_Entry_AiTools
content={typeof tmp_entry_obj.content === 'string'
? tmp_entry_obj.content
: ''}
bind:summary={tmp_entry_obj.summary}
on_save={() => update_journal_entry()}
{log_lvl} />
{/if}
<AE_Comp_Journal_Entry_Editor
entry={$lq__journal_entry_obj}