feat: Enhance chat message handling and agent completion events

- Updated chat component to reset loading and reply states when switching sessions, improving user experience.
- Modified event handling to support agent completion events, ensuring accurate message state updates.
- Enhanced message reconstruction logic to handle completed messages and empty content scenarios effectively.
- Improved loading state management during message streaming, preventing unnecessary loading indicators for existing messages.
This commit is contained in:
wizardchen
2025-11-08 00:58:26 +08:00
parent 6d26c9f85d
commit 6e147be202
3 changed files with 101 additions and 5 deletions
+2
View File
@@ -58,6 +58,8 @@ const (
ResponseTypeSessionTitle ResponseType = "session_title"
// Agent query response type (query received and processing started)
ResponseTypeAgentQuery ResponseType = "agent_query"
// Complete response type (agent complete)
ResponseTypeComplete ResponseType = "complete"
)
// StreamResponse stream response