-
[OPIK-3738] [FE] Update TraceAIViewer SSE integration for tool calls and streaming (#4683)
发布于
2026-01-13 13:11:52 +00:00 - [FE] Update TraceAIViewer SSE integration for tool calls and streaming
- Add MESSAGE_TYPE enum with response, tool_call, tool_complete types
- Add ToolCall and ToolResponse types for type safety
- Update useTraceAnalyzerRunStreaming to handle new SSE event format
- Update TraceAIViewer to display:
- Multiple streaming text messages
- Tool calls with loading/completed status indicators
- 'Thinking' status when stream is active but idle
- Update TraceChatMessage to render tool call messages
- Remove obsolete 'status' field from message types
- Revision 4: Replace lodash get() with direct property access
Address PR review feedback from @aadereiko:
- Use payload.message_type instead of get(payload, 'message_type')
- Use payload.content instead of get(payload, 'content')
- Use payload.tool_call instead of get(payload, 'tool_call')
- Use payload.tool_response instead of get(payload, 'tool_response')
- Also updated error handling for consistency
- Removed unused 'get' import from lodash
下载附件