custom feedback

This commit is contained in:
2026-02-27 21:48:16 +10:00
parent 00a44191df
commit 1116134e84
7 changed files with 69 additions and 17 deletions

View File

@@ -68,11 +68,14 @@ export function ChatPanel(): JSX.Element {
}
)
// After streaming, parse AI response for annotations
// After streaming, parse AI response for annotations.
// Attachment-driven messages are tagged 'custom' so they appear with a
// distinct visual treatment in the Feedback panel.
const currentHistory = useEditorStore.getState().chatHistory
const lastMsg = currentHistory[currentHistory.length - 1]
if (lastMsg?.role === 'assistant' && lastMsg.content.length > 0) {
const parsed = parseAnnotationsFromAIResponse(lastMsg.content, activeFileContent)
const overrideType = attachments.length > 0 ? 'custom' as const : undefined
const parsed = parseAnnotationsFromAIResponse(lastMsg.content, activeFileContent, overrideType)
if (parsed.length > 0) {
setAnnotations(parsed)
}