feat(insight): add progress tracking for insight generation and display updates

This commit is contained in:
DragonnZhang 2026-02-09 11:22:26 +08:00
parent 20de2a001a
commit 0dc359405e
8 changed files with 188 additions and 19 deletions

View file

@ -181,10 +181,21 @@ export const useSlashCommandProcessor = (
type: 'summary',
summary: message.summary,
};
} else {
} else if (message.type === MessageType.INSIGHT_PROGRESS) {
historyItemContent = {
type: message.type,
text: message.content,
type: 'insight_progress',
progress: message.progress,
};
} else {
// At this point message should be of type { type: INFO|ERROR|USER, content: string }
// We cast to be sure or check existence of content
const msg = message as {
type: MessageType.INFO | MessageType.ERROR | MessageType.USER;
content: string;
};
historyItemContent = {
type: msg.type,
text: msg.content,
};
}
addItem(historyItemContent, message.timestamp.getTime());