fix: minor UI enhancements.

This commit is contained in:
Xiaohan-Tian
2026-04-05 19:59:49 -07:00
parent 2cd976ff96
commit ee31ca087e
3 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -29,8 +29,9 @@ export const useStreamProcessor = (options: StreamProcessorOptions): StreamProce
setAbortController(controller);
// Track the current streaming message ID (mutable)
let currentStreamingId = createStreamingMessage().id;
onMessageAdd({ id: currentStreamingId, role: 'assistant', content: '', isStreaming: true, tokenCount: 0 } as ChatMessage);
const initialStreamingMsg = createStreamingMessage();
let currentStreamingId = initialStreamingMsg.id;
onMessageAdd(initialStreamingMsg);
try {
const agentCore = AgentCore.instance();
@@ -54,7 +55,7 @@ export const useStreamProcessor = (options: StreamProcessorOptions): StreamProce
onMessageUpdate(currentStreamingId, (msg) => ({
...msg,
content: `<span class="processing-wave">Processing...</span> ${tokenCount} tokens received. click here to abort.`,
content: `<span class="processing-wave">Thinking...</span>${tokenCount > 0 ? ` ${tokenCount} tokens received.` : ''} click here to abort.`,
tokenCount
}));
} else if (chunk.type === 'tool_call' && chunk.toolCall) {