🐛 fix linking to annotations

This commit is contained in:
2026-03-01 15:45:56 +10:00
parent 0e584c5e03
commit 010b7302cc
3 changed files with 4 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ export function AnalysisToolbar(): JSX.Element {
appendToLastAssistantMessage, appendToLastAssistantMessage,
setAILoading, setAILoading,
setAIError, setAIError,
linkAnnotationsToMessage,
chatHistory, chatHistory,
projectWordCount, projectWordCount,
setProjectWordCount, setProjectWordCount,
@@ -99,6 +100,7 @@ export function AnalysisToolbar(): JSX.Element {
if (newAnnotations.length > 0) { if (newAnnotations.length > 0) {
const existing = useEditorStore.getState().annotations.filter((a) => a.type !== mode) const existing = useEditorStore.getState().annotations.filter((a) => a.type !== mode)
setAnnotations([...existing, ...newAnnotations]) setAnnotations([...existing, ...newAnnotations])
linkAnnotationsToMessage(lastMsg.id, newAnnotations.map(a => a.id))
} }
} }
} catch (err) { } catch (err) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long