Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
718 changes: 351 additions & 367 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,36 @@ Terminal UI abstractions — reusable output formatting, diff display, and confi
tinyharness-ui/src/
├── lib.rs Module declarations
├── output.rs Structured output writer (stdout/stderr abstraction)
├── style.rs ANSI color constants (BOLD, CYAN, RED, BG_TOOL, SPINNER_FRAMES, etc.)
├── style.rs ANSI color constants (BOLD, CYAN, the tool-frame palette, SPINNER_FRAMES)
└── ui/
├── mod.rs Module declarations
├── confirm.rs Tool call confirmation prompts (Yes/No/Auto-accept)
├── diff.rs Unified diff display
├── frame.rs Shared layout primitives for the tool-frame family
├── input.rs CommandHelper for rustyline tab-completion
├── markdown.rs Incremental markdown renderer for streamed assistant output
├── tool_result.rs Tool execution cards (status band + capped body)
└── wrap.rs Word-wrapped output with ANSI-aware line filling
```

Tool I/O shares one visual language: a filled **title band** names each call
(`● run · cargo test --workspace · 2.3s`), and an outlined **gutter** carries
its body, closing with an elbow so every block reads as one unit.

```
● read · tinyharness-ui/src/ui/frame.rs · 42ms
│ (180 lines)
│ use std::io::{self, Write};
╰ +176 more lines

✕ run · cargo clippy --workspace · 1.5s
╰ error[E0308]: mismatched types

▲ Allow? · run — execute a shell command
│ $ rm -rf ./target
▲ [y]es [n]o [a]uto-accept the rest of this turn ›
```

### Binary crate (`src/`)

CLI application — argument parsing, agent loop, slash commands, tool dispatch, safety checking.
Expand Down
13 changes: 9 additions & 4 deletions docs/safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,19 @@ Mixed chains work:

### Destructive Tools

`write`, `edit`, and `run` always show a confirmation prompt:
`write`, `edit`, and `run` always show a confirmation prompt — a title band
naming the tool and its effect, the command or diff it applies to, then the
choices:

```
Write to /path/to/file.rs (4194 bytes)

Confirm? (Y)es / (N)o / (A)uto-accept future
▲ Allow? · run — execute a shell command
│ $ cargo clippy --workspace -- -D warnings
▲ [y]es [n]o [a]uto-accept the rest of this turn ›
```

Declining renders a `⊘ … · denied` card, so the transcript records what was
refused rather than nothing at all.

### Auto-Accept Mode

Toggle with `/autoaccept off`, `/autoaccept safe`, or `/autoaccept all`.
Expand Down
Loading
Loading