Fix stray 'TOOL RESULT' role label in chat transcript UI (Vue)
Session from pi-web on Hugging Face by woxQAQ · MIT · condensed by Coders Talk
Click a segment to jump to that moment
6msession
0interventions
by library · 20h
GOAL
Investigate why a 'TOOL RESULT' role badge and redundant 'read result' text were rendering incorrectly in the chat transcript, and fix the display.
- +0Prompt · +0Why is there a 'tool result' role label showing, and why does the 'read' line render oddly?
- +0mAgent did · +0mTraced the rendering path across ChatTranscript.vue, transcript.ts, ws-rpc-adapter.ts and types.ts to find where the toolResult role and tool name get rendered as a standalone row with a badge and redundant 'result' text.
- +3mFail · +3mFirst edit attempt failed validation (missing newText properties on some edit entries).
- +4mAgent did · +4mReapplied the edit to ChatTranscript.vue, removing the 'TOOL RESULT' badge and redundant 'result' text for standalone tool result rows (+55/−95 lines).
- +4mAgent did · +4mContinued adjusting CSS classes for message rows/content to keep standalone tool result blocks visually consistent with regular tool blocks, fixing a malformed selector introduced along the way.
- +4mAgent did · +4mRan the web build (pnpm run build:web) successfully and diffed the changes to confirm the final state of ChatTranscript.vue.
- +5mAgent did · +5mVerified the tool-result merge logic in transcript.ts and the toolResult type definition in bridge/types.ts to confirm root cause understanding before finishing.
- +6mPrompt · +6mcommit
- +6mOutcome · +6mCommitted fix (d4f1bc5): 1 file changed, 3 insertions(+), 43 deletions(-); build passed.
VERDICT
Next time I'd ask directly for the root cause investigation across the transcript rendering pipeline instead of just reporting the visual bug, since the fix ended up touching several files (Vue component, transcript utils, bridge types). The edit tool's schema validation error was a minor hiccup but the agent fixed it itself on retry, so no real intervention was needed from me here - I just approved and asked to commit at the end.