add share_time toggle — user-controlled time context, opt-out in settings
This commit is contained in:
@@ -8,7 +8,7 @@ import type { Message } from '@/lib/api';
|
||||
const MAX_RECORDING_SECONDS = 60;
|
||||
|
||||
export default function MessageInput() {
|
||||
const { currentId, setCurrentId, addMessage, setIsLoading, isLoading, setConversations } = useStore();
|
||||
const { currentId, setCurrentId, addMessage, setIsLoading, isLoading, setConversations, settings } = useStore();
|
||||
const [text, setText] = useState('');
|
||||
const [recording, setRecording] = useState(false);
|
||||
const [transcribing, setTranscribing] = useState(false);
|
||||
@@ -55,7 +55,7 @@ export default function MessageInput() {
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
const data = await api.sendMessage(message, convId);
|
||||
const data = await api.sendMessage(message, convId, settings.share_time ?? true);
|
||||
setCurrentId(data.conversation_id);
|
||||
addMessage({
|
||||
role: 'assistant',
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user