add share_time toggle — user-controlled time context, opt-out in settings

This commit is contained in:
2026-04-29 17:16:36 +00:00
parent 92565dce5c
commit ea77c434ce
4 changed files with 33 additions and 4 deletions
+19
View File
@@ -166,6 +166,9 @@ export default function SettingsPanel() {
<Row label="Show sources" desc="Display document sources under responses">
<Toggle on={settings.show_sources} onChange={v => updateSetting('show_sources', v)} />
</Row>
<Row label="Share time" desc="Send current time with each message so the assistant can reason about recency">
<Toggle on={settings.share_time ?? true} onChange={v => updateSetting('share_time', v)} />
</Row>
</Section>
{/* Memory */}
@@ -323,6 +326,9 @@ export default function SettingsPanel() {
<Section title="System">
<StatusRow label="Aaron AI service" value={status?.aaron_ai || 'unknown'} ok={status?.aaron_ai === 'running'} />
<StatusRow label="File watcher" value={status?.watcher || 'unknown'} ok={status?.watcher === 'running'} />
{status?.watcher_ingestion && (
<IngestionRow ingestion={status.watcher_ingestion} />
)}
<StatusRow label="Nextcloud files" value={`${(status?.file_count || 0).toLocaleString()} files`} ok={true} />
<StatusRow label="Model" value={status?.model || 'unknown'} ok={true} yellow />
</Section>
@@ -441,3 +447,16 @@ function StatusRow({ label, value, ok, yellow }: { label: string; value: string;
</div>
);
}
function IngestionRow({ ingestion }: { ingestion: { status: string; message: string; file_count: number } }) {
const color = ingestion.status === 'ingesting' ? '#c8821a' : ingestion.status === 'error' ? '#a32d2d' : '#888780';
const label = ingestion.status === 'ingesting'
? `Ingesting ${ingestion.file_count} file(s)...`
: ingestion.message || 'Idle';
return (
<div className="flex items-center gap-2 py-1 pl-4" style={{ borderBottom: '1px solid var(--border)' }}>
<span className="rounded-full flex-shrink-0" style={{ width: '6px', height: '6px', background: color }} />
<span className="text-xs flex-1" style={{ color: 'var(--text3)' }}>{label}</span>
</div>
);
}