Skip to content

Commit c0c46a6

Browse files
committed
refactor(tui): address reviewer findings
- Remove unused color-eyre dependency. - Eliminate duplicate ToolRegistry: extract create_tool_registry() helper, remove unused tools param from run_tui. - Remove show_thinking from agent_turn/stream_response (now handled by the sink). - Take user_rx by value in agent_loop_task (sole consumer). - Fix #[expect] reason strings to describe current state, not future plans (project convention). - Update stale tool.rs exit_code expect reason. - Update CLAUDE.md crate structure with tui/ modules. - Update roadmap.md with shipped TUI foundation.
1 parent 1a90ae0 commit c0c46a6

9 files changed

Lines changed: 86 additions & 233 deletions

File tree

CLAUDE.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,32 @@ ox # Start an interactive session
3131
├── config/
3232
│ ├── file.rs # TOML config file discovery, parsing, and merge (user + project)
3333
│ └── oauth.rs # Claude Code OAuth credentials (macOS Keychain + file), token refresh, file locking
34-
├── main.rs # CLI entry point, agent loop, async REPL
34+
├── main.rs # CLI entry point, agent loop, TUI / REPL / headless dispatch
3535
├── message.rs # Conversation message types
3636
├── prompt.rs # System prompt builder (section assembly, static content)
3737
├── prompt/
3838
│ ├── environment.rs # Runtime environment detection (platform, git, date)
3939
│ └── instructions.rs # Instruction file discovery and loading (CLAUDE.md, AGENTS.md)
4040
├── tool.rs # Tool trait, registry, definitions
41-
└── tool/
42-
├── bash.rs # Shell command execution with timeout
43-
├── edit.rs # Exact string replacement in files
44-
├── glob.rs # File pattern matching (glob)
45-
├── grep.rs # Content search via regex
46-
├── read.rs # File reading with line numbers and pagination
47-
└── write.rs # File writing with directory creation
41+
├── tool/
42+
│ ├── bash.rs # Shell command execution with timeout
43+
│ ├── edit.rs # Exact string replacement in files
44+
│ ├── glob.rs # File pattern matching (glob)
45+
│ ├── grep.rs # Content search via regex
46+
│ ├── read.rs # File reading with line numbers and pagination
47+
│ └── write.rs # File writing with directory creation
48+
├── tui.rs # TUI module root
49+
└── tui/
50+
├── app.rs # Root App struct, tokio::select! event loop, render dispatch
51+
├── component.rs # Component trait and Action enum
52+
├── components.rs # Components module root
53+
├── components/
54+
│ ├── chat.rs # Scrollable chat message list with streaming buffer
55+
│ ├── input.rs # Single-line input area with cursor navigation
56+
│ └── status.rs # Status bar (model, status indicator)
57+
├── event.rs # AgentEvent, UserAction, AgentSink trait, ChannelSink, StdioSink
58+
├── terminal.rs # Terminal init / restore, synchronized output, panic hook
59+
└── theme.rs # Catppuccin Mocha palette, style helpers
4860
```
4961

5062
## Coding Conventions

Cargo.lock

Lines changed: 0 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pedantic = { level = "warn", priority = -1 }
1919
anyhow = "1"
2020
clap = { version = "4", features = ["derive"] }
2121
crossterm = { version = "0.29", features = ["event-stream"] }
22-
color-eyre = "0.6"
2322
dirs = "6"
2423
futures = "0.3"
2524
globset = "0.4"

crates/oxide-code/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ workspace = true
1515
[dependencies]
1616
anyhow.workspace = true
1717
clap.workspace = true
18-
color-eyre.workspace = true
1918
crossterm.workspace = true
2019
dirs.workspace = true
2120
futures.workspace = true

0 commit comments

Comments
 (0)