import { BookmarkCheck, Pencil } from 'lucide-react'; import { useEffect, useState } from 'react'; import { useTranslation } from '../../i18n'; import { useSettingsStore } from '../../store/settingsStore'; import { Tooltip } from '../shared/Tooltip'; import AssistantMemoryDialog from './AssistantMemoryDialog'; import { useAssistantScope } from './assistantViewContext'; /** * A note the assistant kept in the trip notes on its own, as a quiet line in * its answer, with the notes a tap away to change or drop it. Kept while the * answer is written, the notes on this device are read again, so the dialog * never saves over the note with what it held before. */ export default function AssistantRemembered({ note, live }: { note: string; live: boolean }) { const { t } = useTranslation(); const scope = useAssistantScope(); const loadSettings = useSettingsStore((s) => s.loadSettings); const [editing, setEditing] = useState(false); useEffect(() => { if (live) void loadSettings(); }, [live, loadSettings]); const tripId = scope.kind === 'trip' ? scope.tripId : null; return (
); }