🐛 fix linking to annotations
This commit is contained in:
@@ -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
Reference in New Issue
Block a user