claudecode/crates/runtime/src
Yeachan-Heo 0376604dea Expose structured thinking without polluting normal assistant output
Extended thinking needed to travel end-to-end through the API,
runtime, and CLI so the client can request a thinking budget,
preserve streamed reasoning blocks, and present them in a
collapsed text-first form. The implementation keeps thinking
strictly opt-in, adds a session-local toggle, and reuses the
existing flag/slash-command/reporting surfaces instead of
introducing a new UI layer.

Constraint: Existing non-thinking text/tool flows had to remain backward compatible by default
Constraint: Terminal UX needed a lightweight collapsed representation rather than an interactive TUI widget
Rejected: Heuristic CLI-only parsing of reasoning text | brittle against structured stream payloads
Rejected: Expanded raw thinking output by default | too noisy for normal assistant responses
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Keep thinking blocks structurally separate from answer text unless the upstream API contract changes
Tested: cargo fmt --all; cargo clippy --workspace --all-targets -- -D warnings; cargo test -q
Not-tested: Live upstream thinking payloads against the production API contract
2026-04-01 01:08:18 +00:00
..
bash.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
bootstrap.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
compact.rs Expose structured thinking without polluting normal assistant output 2026-04-01 01:08:18 +00:00
config.rs feat: config discovery and CLAUDE.md loading (cherry-picked from rcc/runtime) 2026-04-01 00:40:34 +00:00
conversation.rs Expose structured thinking without polluting normal assistant output 2026-04-01 01:08:18 +00:00
file_ops.rs Close the Claude Code tools parity gap 2026-03-31 22:53:20 +00:00
json.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
lib.rs feat: config discovery and CLAUDE.md loading (cherry-picked from rcc/runtime) 2026-04-01 00:40:34 +00:00
mcp_client.rs Add first MCP client transport scaffolding 2026-03-31 20:42:49 +00:00
mcp_stdio.rs Add MCP server orchestration so configured stdio tools can be discovered and called 2026-03-31 23:31:37 +00:00
mcp.rs Add MCP normalization and config identity helpers 2026-03-31 20:23:00 +00:00
oauth.rs feat: config discovery and CLAUDE.md loading (cherry-picked from rcc/runtime) 2026-04-01 00:40:34 +00:00
permissions.rs Enforce tool permissions before execution 2026-04-01 00:06:15 +00:00
prompt.rs feat: config discovery and CLAUDE.md loading (cherry-picked from rcc/runtime) 2026-04-01 00:40:34 +00:00
remote.rs Add fail-open remote proxy runtime primitives 2026-03-31 19:54:38 +00:00
session.rs Expose structured thinking without polluting normal assistant output 2026-04-01 01:08:18 +00:00
sse.rs feat: Rust port of Claude Code CLI 2026-03-31 17:43:09 +00:00
usage.rs Make Rust cost reporting aware of the active model 2026-03-31 19:42:31 +00:00