Description
Implement the collapsible ThinkingIndicatorView that surfaces the agent's extended thinking blocks. Collapsed by default; expanding reveals raw monospaced text (not rendered as markdown — thinking is raw reasoning).
Spec: Epic #250 §6 (thinking block behavior); docs/architecture/dialogue-events.md §2 (thinking events), §6.5 (long thinking handling).
Scope
File
MacApp/Packages/AgentChatUI/Sources/AgentChatUI/Messages/ThinkingIndicatorView.swift
Structure
```swift
public struct ThinkingIndicatorView: View {
public init(thinking: Thinking, isStreaming: Bool)
}
public struct Thinking: Equatable, Sendable {
public let text: String // accumulated thinking content
public let tokenCountApprox: Int? // if available
public let elapsedSeconds: TimeInterval?
}
```
- Header (always visible): SF Symbol "brain" +
Thinking… / Thinking (2s · ~420 tokens) + DS.Color.textTertiary text.
- Streaming indicator: spinner or ellipsis "…" next to "Thinking" when
isStreaming == true. Guarded by reduceMotion.
- Collapsed by default; disclosure chevron on right.
- Expand → show
Thinking.text in monospaced font, inset indent, DS.Color.textSecondary. No markdown rendering.
- After
content_block_stop (streaming = false), header transitions to lightbulb 💡 icon (or SF Symbol lightbulb.fill) with final tokenCount.
A11y
.accessibilityLabel: "Agent thinking block, collapsed/expanded, N tokens".
- Expanded content readable by VoiceOver (raw text).
Acceptance Criteria
Relationships
Description
Implement the collapsible
ThinkingIndicatorViewthat surfaces the agent's extended thinking blocks. Collapsed by default; expanding reveals raw monospaced text (not rendered as markdown — thinking is raw reasoning).Spec: Epic #250 §6 (thinking block behavior); docs/architecture/dialogue-events.md §2 (thinking events), §6.5 (long thinking handling).
Scope
File
MacApp/Packages/AgentChatUI/Sources/AgentChatUI/Messages/ThinkingIndicatorView.swiftStructure
```swift
public struct ThinkingIndicatorView: View {
public init(thinking: Thinking, isStreaming: Bool)
}
public struct Thinking: Equatable, Sendable {
public let text: String // accumulated thinking content
public let tokenCountApprox: Int? // if available
public let elapsedSeconds: TimeInterval?
}
```
Thinking…/Thinking (2s · ~420 tokens)+DS.Color.textTertiarytext.isStreaming == true. Guarded by reduceMotion.Thinking.textin monospaced font, inset indent,DS.Color.textSecondary. No markdown rendering.content_block_stop(streaming = false), header transitions to lightbulb 💡 icon (or SF Symbollightbulb.fill) with final tokenCount.A11y
.accessibilityLabel: "Agent thinking block, collapsed/expanded, N tokens".Acceptance Criteria
ThinkingIndicatorViewimplemented.Relationships