mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
fix(web): hide empty assistant boxes for tool-call-only responses
Skip rendering assistant turn when agent.message has empty text (LLM responded with only tool calls, no message content). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3aa5a0c32d
commit
95e7165034
1 changed files with 4 additions and 2 deletions
|
|
@ -39,9 +39,11 @@ function turnsFromEvents(events: RawEvent[], stageId: string): TurnType[] {
|
|||
case "stage.prompt":
|
||||
turns.push({ kind: "system", content: e.properties?.text as string ?? e.text ?? "" });
|
||||
break;
|
||||
case "agent.message":
|
||||
turns.push({ kind: "assistant", content: e.properties?.text as string ?? e.text ?? "" });
|
||||
case "agent.message": {
|
||||
const msg = e.properties?.text as string ?? e.text ?? "";
|
||||
if (msg) turns.push({ kind: "assistant", content: msg });
|
||||
break;
|
||||
}
|
||||
case "agent.tool.started": {
|
||||
const callId = e.properties?.tool_call_id as string ?? e.tool_call_id ?? "";
|
||||
pendingTools.set(callId, {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue