feat: Integrate web search configuration and enhance input field functionality

- Added logic to load and manage web search configuration in the InputField component, ensuring proper handling of web search states.
- Implemented user notifications for unconfigured web search settings, guiding users to the appropriate settings page.
- Enhanced the AgentStreamDisplay component to improve tooltip content rendering for knowledge base citations.
- Updated event data structures to include total duration in milliseconds for better precision in agent completion events.
- Refactored citation handling to ensure inline citations are displayed correctly, improving user experience in content rendering.
This commit is contained in:
wizardchen
2025-11-12 01:18:12 +08:00
parent 14d0e663cc
commit a28c0f8b01
6 changed files with 288 additions and 183 deletions
+9 -9
View File
@@ -135,15 +135,15 @@ type AgentQueryData struct {
// AgentCompleteData represents agent completion event data
type AgentCompleteData struct {
SessionID string `json:"session_id"`
TotalSteps int `json:"total_steps"`
FinalAnswer string `json:"final_answer"`
KnowledgeRefs []interface{} `json:"knowledge_refs,omitempty"` // []*types.SearchResult
AgentSteps interface{} `json:"agent_steps,omitempty"` // []types.AgentStep - detailed execution steps
TotalDuration int64 `json:"total_duration_ms"`
MessageID string `json:"message_id,omitempty"` // Assistant message ID
RequestID string `json:"request_id,omitempty"`
Extra map[string]interface{} `json:"extra,omitempty"`
SessionID string `json:"session_id"`
TotalSteps int `json:"total_steps"`
FinalAnswer string `json:"final_answer"`
KnowledgeRefs []interface{} `json:"knowledge_refs,omitempty"` // []*types.SearchResult
AgentSteps interface{} `json:"agent_steps,omitempty"` // []types.AgentStep - detailed execution steps
TotalDurationMs int64 `json:"total_duration_ms"`
MessageID string `json:"message_id,omitempty"` // Assistant message ID
RequestID string `json:"request_id,omitempty"`
Extra map[string]interface{} `json:"extra,omitempty"`
}
// === Streaming Event Data Structures ===