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
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@ versioning: [SemVer](https://semver.org/spec/v2.0.0.html).

### Added

- **Prompt history + undo/redo** — `Up`/`Down` in the prompt recall previously
submitted messages, shell-style: recall triggers only at the editor's
vertical edges (`Up` on the first row, `Down` on the last) so multi-line
cursor movement is unaffected, and stepping back down past the newest entry
restores your in-progress draft. History is de-duplicated and capped.
`Ctrl+Z` / `Ctrl+Y` undo / redo prompt edits.

- **Syntax-highlighted code blocks** — fenced code in assistant markdown is now
highlighted by language via `syntect` (pure-Rust `fancy-regex` engine, no C
toolchain). Common LLM fence tags (`rust`, `python`, `ts`, `bash`, …) are
normalised to the right syntax; unknown languages fall back to the previous
flat-green rendering. Highlighting is stateful across a block and paid once
per message version through the existing render cache.

- **`@`-file mention autocomplete** — typing `@` in the prompt opens a
filesystem palette (relative to the focused session's workdir), fuzzy-ranked
against what you've typed. `Tab` completes to the top hit: directories keep a
trailing `/` so you can keep drilling, files get a trailing space. Descends
subdirectories (`@src/re…`) and reveals dotfiles only when you type a leading
dot.

- **Fuzzy slash-command matching** — the `/` command palette and `Tab`
completion now rank by a fuzzy subsequence score (consecutive-run and
word-boundary bonuses, gap penalties) instead of a strict prefix, so `/expsn`
finds `/export` and `Tab` always commits the best match.

- **Multi-provider sessions** (pairs with the daemon's pi backend +
mid-session switching): `/new <name> [workdir] --provider <id>` creates a
session on a specific backend, `/provider <id>` switches the focused
Expand Down
181 changes: 181 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ tui-textarea = "0.7"
# Utility
anyhow = "1"
unicode-width = "0.2"
# Syntax highlighting for fenced code blocks. `default-fancy` swaps the
# oniguruma C dependency for the pure-Rust fancy-regex engine, so the build
# stays cross-compile-friendly with no C toolchain requirement.
syntect = { version = "5", default-features = false, features = ["default-fancy"] }
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ cargo test -p codeoid-tui state:: # reducer tests (no Tokio, no Ratatui)
| `Ctrl+X` / `.` | Interrupt — unconditional aliases |
| `Enter` | Send prompt |
| `Shift+Enter` / `Ctrl+J` | Newline in prompt |
| `Tab` (in prompt) | Autocomplete — slash-command after `/`, or a file after `@` (fuzzy-ranked; directories keep drilling) |
| `↑` / `↓` (in prompt) | Recall previous / next submitted prompt (at the editor's top / bottom edge) |
| `Ctrl+Z` / `Ctrl+Y` | Undo / redo prompt edits |
| `←` / `→`, `p` / `n` | Prev / next session |
| `y` / `d` | Approve / deny pending tool |
| `m` | Cycle execution mode |
Expand Down
1 change: 1 addition & 0 deletions crates/codeoid-tui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ tracing-subscriber = { workspace = true }
clap = { workspace = true }
chrono = { workspace = true }
unicode-width = { workspace = true }
syntect = { workspace = true }
Loading
Loading