Skip to content
PidebugWeb1 file · +75 −54

Fix tool-result rendering in Vue chat transcript component

Session from pi-web on Hugging Face by woxQAQ · MIT · condensed by Coders Talk

5msession
2interventions
GOAL

Fix a rendering bug where tool results (especially standalone 'read result' entries) were displaying incorrectly in the chat transcript UI, misaligned or visually intrusive.

  1. Prompt · +0
    这里的渲染出现问题 (rendering issue here, with screenshot)
  2. Agent did · +0m
    Explored ChatTranscript.vue and toolBlock.ts, then edited tool result preview logic and read result rendering to use HighlightedCode, ran build:web successfully
  3. Agent did · +1m
    Reported fix: removed inline preview text, aligned standalone read results with HighlightedCode rendering, build passed
  4. Intervention · +2m
    Developer sent screenshots again saying '没修好呢' (still not fixed), twice in a row
    Why: The fix didn't address the actual visual issue I was pointing at
  5. Agent did · +3m
    Investigated transcript.ts merge logic for tool results, edited ChatTranscript.vue to remove the left-side 'Tool Result' meta column, rebuilt successfully
  6. Agent did · +3m
    Reported removing the left TOOL RESULT column, and flagged uncertainty whether the real issue was that these read results shouldn't appear at all
  7. Intervention · +4m
    Developer pointed out the first two entries still looked out of place ('前两条有点突兀')
    Why: The standalone tool results still visually stood out too much compared to normal messages
  8. Agent did · +4m
    Styled standalone tool results as a distinct 'unmatched result' variant with reduced opacity, smaller font, indentation, and renamed label; rebuilt successfully
  9. Outcome · +5m
    Standalone tool results restyled as de-emphasized 'unmatched result' blocks; build:web passes; agent offers to hide them entirely by default if still not clean enough
VERDICT

Next time I'd attach the screenshot and explicitly describe what looks wrong (e.g. 'these two read-result rows shouldn't stand out like normal messages') instead of just saying '没修好呢' twice, since the agent had to guess what was still broken. Pointing out that the first two entries looked '突兀' (out of place) was what finally got the right fix — a de-emphasized style instead of just removing a column.

I tried this · 0

Discussion · 0

How Builds work