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
+6 -6
View File
@@ -376,12 +376,12 @@ func (e *AgentEngine) executeLoop(
Type: event.EventAgentComplete,
SessionID: sessionID,
Data: event.AgentCompleteData{
FinalAnswer: state.FinalAnswer,
KnowledgeRefs: knowledgeRefsInterface,
AgentSteps: state.RoundSteps, // Include detailed execution steps for message storage
TotalSteps: len(state.RoundSteps),
TotalDuration: time.Since(startTime).Milliseconds(),
MessageID: messageID, // Include message ID for proper message update
FinalAnswer: state.FinalAnswer,
KnowledgeRefs: knowledgeRefsInterface,
AgentSteps: state.RoundSteps, // Include detailed execution steps for message storage
TotalSteps: len(state.RoundSteps),
TotalDurationMs: time.Since(startTime).Milliseconds(),
MessageID: messageID, // Include message ID for proper message update
},
})