src/
main.rs CLI, setup, print mode
agent.rs agent loop, permission gating, parallel tool execution, compaction, subagents
llm.rs, llm/ streaming clients: Ollama, OpenAI-compatible, Anthropic, OpenAI Responses, Bedrock/Vertex/Azure; text tool-call parsing
cloud/ cloud credentials (AWS SigV4, Google ADC, Azure Entra ID)
permissions.rs modes, rules, safe-command analysis, auto-mode classifier
tools/ Read/Write/Edit/MultiEdit, Glob/Grep/Ls, Bash, Web, Browser (CDP), Computer, Todo/Ask/Plan/Skill, Task
lsp.rs language server client (post-edit diagnostics, Lsp tool)
mcp.rs MCP client (stdio + HTTP), resources, prompts
mcp_auth.rs MCP OAuth (discovery, registration, PKCE, tokens)
hooks.rs user hooks
context.rs system prompt, AGENTS.md/CLAUDE.md, skills, commands, agents
session.rs persistence
server.rs HTTP API
runs/ background, remote and queue runs (daemon, worktrees, containers)
tui/ ratatui frontend (markdown renderer, input editor)
plain.rs, repl.rs line-based frontendsVisual UI tests
The visual workflow checks 72 deterministic terminal frames: 12 UI states at three widths in dark and light themes. Baselines include cell colors and modifiers as well as text. Covered states include a successful exchange, streaming, background jobs, quota warnings, dialogs, completion and scrolling.
cargo test --locked --lib visual_snapshots -- --ignored --test-threads=1The separate invocation keeps process-global theme changes isolated from normal unit tests. CI uploads chanto-ui-previews, a gallery of PNGs/GIFs plus captured text, styles and pending snapshot diffs. Download the artifact and open index.html. Snapshots are the regression check; the previews show those captured frames and do not replace live-terminal or behavior tests. Visual-test instructions explain local previews and intentional baseline updates.