Files
vibn-frontend/components/vibn-chat
Mark Henderson 41f5f02c68 fix(chat-ui): interleave thoughts + tools chronologically; per-thought pills
The bug: 12 rounds of model thinking were concatenated into one giant
msg.thoughts string and rendered as a single ThinkingBubble blob. User
saw a wall of meta-narrated reasoning ("Okay, here's my interpretation
of those thoughts..." x12) with no visual breaks between rounds.

Replace separate thoughts/toolEvents fields on Message with a single
chronological timeline of mixed entries:

  type TimelineEntry =
    | { kind: "thought"; text: string }
    | { kind: "tool"; name: string; status; result? }

Each thought event from the SSE stream becomes its own timeline entry
and renders as its own collapsed ThinkingBubble pill. Adjacent same-
named tool entries still collapse into a ×N TimelineToolGroup.

Visual flow now matches what actually happened in the turn:
  [thought pill] [dev_server.list ✓] [thought pill]
  [dev_server.stop ×2 ✓] [thought pill] [shell.exec ×2 ✓]
  [final summary text]

Each pill is independently expandable, so a user who wants to read
the model's reasoning for round 7 can click round 7 — they don't
have to scroll through a single 4000-char blob.

Made-with: Cursor
2026-04-30 23:42:19 -07:00
..