Wire journal AI tools into entry view
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
* Handles layout/positioning and specific save behavior for journal entries.
|
* Handles layout/positioning and specific save behavior for journal entries.
|
||||||
*/
|
*/
|
||||||
import AE_AITools from '$lib/ae_elements/AE_AITools.svelte';
|
import AE_AITools from '$lib/ae_elements/AE_AITools.svelte';
|
||||||
|
import { journals_loc } from '$lib/ae_journals/ae_journals_stores';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
content: string;
|
content: string;
|
||||||
@@ -16,9 +17,16 @@ interface Props {
|
|||||||
let { content, summary = $bindable(), on_save, log_lvl = 0 }: Props = $props();
|
let { content, summary = $bindable(), on_save, log_lvl = 0 }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="journal-entry-ai-tools absolute top-2 right-2 z-10">
|
<div class="journal-entry-ai-tools inline-flex flex-wrap items-center justify-end gap-1">
|
||||||
<AE_AITools
|
<AE_AITools
|
||||||
{content}
|
{content}
|
||||||
|
model={$journals_loc.llm__api_model}
|
||||||
|
baseUrl={$journals_loc.llm__api_base_url}
|
||||||
|
token={$journals_loc.llm__api_token}
|
||||||
|
systemPrompt={$journals_loc.entry.llm__system_prompt}
|
||||||
|
maxTokens={$journals_loc.entry.llm__max_tokens}
|
||||||
|
temperature={$journals_loc.entry.llm__temperature}
|
||||||
|
buttonClass="btn btn-sm preset-tonal-primary shadow-md transition-all duration-150 hover:scale-105"
|
||||||
bind:summary
|
bind:summary
|
||||||
onSave={(newSummary) => {
|
onSave={(newSummary) => {
|
||||||
summary = newSummary;
|
summary = newSummary;
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ let modal_mode: 'append' | 'prepend' | 'auto' = $state('auto');
|
|||||||
] == 'current'
|
] == 'current'
|
||||||
? 'ring-primary-500/40 ring-2 ring-inset'
|
? 'ring-primary-500/40 ring-2 ring-inset'
|
||||||
: ''}">
|
: ''}">
|
||||||
<div class="absolute top-2 right-2 z-10">
|
<div class="flex justify-end px-1 pb-2">
|
||||||
<AE_Comp_Journal_Entry_AiTools
|
<AE_Comp_Journal_Entry_AiTools
|
||||||
content={tmp_entry_obj.content}
|
content={tmp_entry_obj.content}
|
||||||
bind:summary={tmp_entry_obj.summary}
|
bind:summary={tmp_entry_obj.summary}
|
||||||
|
|||||||
Reference in New Issue
Block a user