feat(chat): show real-time AI thinking steps inline while chatting#13360
Conversation
… progress Replace the side panel thinking details with an inline accordion experience matching Attio's UX: - During streaming: show the latest thinking step outside the accordion with shimmer animation - After completion: collapsible "Thought for X seconds" with full timeline inside - Add ap_update_thinking_status tool for AI to announce steps in real-time - Show tool calls as compact pill cards with piece icons and expandable JSON - Track and persist thinkingDurationMs for accurate duration display on reload - Consolidate duplicated utilities (deriveToolStatus, extractToolOutputText) into chatPartUtils
Confidence Score: 4/5The chat feature's logic changes are well-contained and backwards-compatible; the main gap is that the feature documentation was not updated to reflect the deleted panel, removed store state, and new thinking tool. The code changes themselves are clean and additive — new part type, new tool, inline UI replacing the old side panel — and historical conversations reconstruct correctly. The missing update to .agents/features/chat.md is the only blocking gap: the doc still references the deleted thinking-details-panel.tsx, the old thinking panel store state, and omits ap_update_thinking_status from the tool inventory. packages/web/src/app/routes/chat-with-ai/components/activity-accordion.tsx has the most new logic (streaming step renderer, tool cards, duration label) and warrants a careful manual test. The feature doc .agents/features/chat.md needs updating before merge. Important Files Changed
Reviews (2): Last reviewed commit: "fix(chat): resolve PR review comments" | Re-trigger Greptile |
- Remove dead thinkingToolParts array from AssistantMessage useMemo - Fix mutation of memoized object (use spread instead of direct assignment) - Replace humanizeToolName with existing formatToolActionName - Use StepLayout in ToolStep instead of duplicating DOM structure - Memoize pieceNames in ToolCard to avoid invalidating usePieceSummariesByNames - Add xxs (16px) size variant to PieceIcon for compact tool cards
- Remove detailsOpen guard on CollapsibleContent so close animation runs - Remove THINKING_STATUS_TOOL_NAME from HIDDEN_TOOL_NAMES (unreachable dead code)
Summary
ap_update_thinking_statustool for AI to announce steps in real-timethinkingDurationMsfor accurate duration on reloadderiveToolStatus,extractToolOutputText,extractPieceNames) intochatPartUtilsTest plan
THINKING_STATUSparts render gracefully