feat(profile): Settings toggle for nightly journal closeout
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -582,6 +582,17 @@ function toggleProfileWorkDay(day: string) {
|
|||||||
profile.value.work_schedule = { ...profile.value.work_schedule, days }
|
profile.value.work_schedule = { ...profile.value.work_schedule, days }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function onToggleCloseout(enabled: boolean) {
|
||||||
|
journalConfig.value.closeout_enabled = enabled
|
||||||
|
try {
|
||||||
|
await saveJournalConfig(journalConfig.value)
|
||||||
|
toastStore.show(enabled ? 'Nightly closeout enabled' : 'Nightly closeout disabled')
|
||||||
|
} catch {
|
||||||
|
journalConfig.value.closeout_enabled = !enabled // revert UI on failure
|
||||||
|
toastStore.show('Failed to update closeout setting', 'error')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function runConsolidate() {
|
async function runConsolidate() {
|
||||||
consolidating.value = true
|
consolidating.value = true
|
||||||
try {
|
try {
|
||||||
@@ -600,6 +611,7 @@ const journalConfig = ref<JournalConfig>({
|
|||||||
prep_hour: 5,
|
prep_hour: 5,
|
||||||
prep_minute: 0,
|
prep_minute: 0,
|
||||||
day_rollover_hour: 4,
|
day_rollover_hour: 4,
|
||||||
|
closeout_enabled: true,
|
||||||
locations: { home: { label: 'Home', address: '' }, work: { label: 'Work', address: '' } },
|
locations: { home: { label: 'Home', address: '' }, work: { label: 'Work', address: '' } },
|
||||||
temp_unit: 'C',
|
temp_unit: 'C',
|
||||||
})
|
})
|
||||||
@@ -620,6 +632,7 @@ async function loadJournalConfig() {
|
|||||||
prep_hour: cfg.prep_hour ?? 5,
|
prep_hour: cfg.prep_hour ?? 5,
|
||||||
prep_minute: cfg.prep_minute ?? 0,
|
prep_minute: cfg.prep_minute ?? 0,
|
||||||
day_rollover_hour: cfg.day_rollover_hour ?? 4,
|
day_rollover_hour: cfg.day_rollover_hour ?? 4,
|
||||||
|
closeout_enabled: cfg.closeout_enabled ?? true,
|
||||||
morning_end_hour: cfg.morning_end_hour,
|
morning_end_hour: cfg.morning_end_hour,
|
||||||
midday_end_hour: cfg.midday_end_hour,
|
midday_end_hour: cfg.midday_end_hour,
|
||||||
locations: {
|
locations: {
|
||||||
@@ -1901,6 +1914,19 @@ function formatUserDate(iso: string): string {
|
|||||||
The assistant observes patterns from your journal and chat conversations and builds a summary over time. The summary is included in the journal's system prompt so the daily prep can reference what it knows about you.
|
The assistant observes patterns from your journal and chat conversations and builds a summary over time. The summary is included in the journal's system prompt so the daily prep can reference what it knows about you.
|
||||||
<span v-if="profile.observations_count > 0"> {{ profile.observations_count }} raw observation{{ profile.observations_count !== 1 ? 's' : '' }} stored.</span>
|
<span v-if="profile.observations_count > 0"> {{ profile.observations_count }} raw observation{{ profile.observations_count !== 1 ? 's' : '' }} stored.</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<label class="toggle-row" style="display:flex;align-items:center;gap:0.6rem;margin:0.5rem 0 0.75rem">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
:checked="journalConfig.closeout_enabled !== false"
|
||||||
|
@change="onToggleCloseout(($event.target as HTMLInputElement).checked)"
|
||||||
|
/>
|
||||||
|
<span>
|
||||||
|
<strong>Nightly closeout</strong>
|
||||||
|
<small style="display:block;color:var(--color-text-muted)">Extracts patterns from yesterday's journal at your day-rollover hour.</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<div v-if="profile.learned_summary" class="learned-summary">{{ profile.learned_summary }}</div>
|
<div v-if="profile.learned_summary" class="learned-summary">{{ profile.learned_summary }}</div>
|
||||||
<div v-else class="learned-empty">No learned summary yet. Observations accumulate from journal and chat conversations.</div>
|
<div v-else class="learned-empty">No learned summary yet. Observations accumulate from journal and chat conversations.</div>
|
||||||
<div class="actions" style="gap:0.5rem;flex-wrap:wrap">
|
<div class="actions" style="gap:0.5rem;flex-wrap:wrap">
|
||||||
|
|||||||
Reference in New Issue
Block a user