Tags

Tags give the ability to mark specific points in history as being important
  • v2.0.0

    856be789 · Release v2.0.0 ·
    Release: ait v2.0.0
    Release v2.0.0
    
    - **Help overlay (TUI)** — `F1` opens a centered modal listing all keybindings in grouped sections (Navigation, Editing, Overlays, AI/Shell). Styled identically to the picker overlay. Dismiss with `Esc` or `F1`.
    - **`/help` slash command (REPL)** — prints the same keybinding groups with ANSI styling in `--no-tui` mode.
    - **Reverse search (TUI)** — `Ctrl+R` opens bash/zsh-style reverse incremental search in the input bar. Type to filter history, `Ctrl+R` cycles matches, `Enter` accepts, `Esc` cancels.
    - **Session browser overlay (TUI)** — `Ctrl+S` opens a centered overlay listing all sessions with title, age, and message count. Active session marked with `●`. Navigate with `↑/↓`, `Enter` to resume, `d` to delete (with confirmation), `r` to rename (inline editing), `n` for new session, `Esc` to close.
    - **`/sessions` and `/session` slash commands (REPL)** — `/sessions` lists sessions; `/session resume <N>` switches to a session by number; `/session delete <N>` deletes with confirmation; `/session rename <N> <title>` renames.
    - **`SessionStore::delete()` and `SessionStore::rename()`** — new methods for session management (used by both TUI and REPL).
    - **Runtime profile switching in REPL and TUI** — `/profile [use <name>]` switches the active profile at runtime without editing `config.toml`; `/profile [list]` lists all configured profiles with the active one marked (`●`). Works in both the rustyline REPL and the TUI input bar.
    - **Account/Profile/Model picker overlay (TUI)** — `Ctrl+P` opens a centered three-tab popup:
      - **Account** tab: switch the active account per provider for the current session
      - **Profile** tab: switch the active profile (all four roles change at once)
      - **Model** tab: pick a specific model for the current session (session-scoped override, no config change)
      - `[Tab]` cycles tabs, `[↑↓]` navigates, `[Enter]` applies, `[Esc]` closes. Active selection marked with `●`.
    - **Session-scoped model override** — picking a model in the overlay (or typing `/profile use <name>` to switch profiles) updates the status bar immediately without restarting.
    - **`AiContext::switch_account()`** — rebuilds the provider registry when the active account changes, re-routing credentials to the newly selected account.
    
    - `ait profile use <name>` (CLI subcommand) previously only validated the name and printed a hint. The REPL now has its own `/profile use <name>` slash command for actual runtime switching.
  • v1.5.1

    4eee8991 · Release v1.5.1 ·
    Release: ait v1.5.1
    Release v1.5.1
    
    - Linux and macOS arm64 builds in the CI pipeline
  • v1.5.0

    11d10fd9 · Release v1.5.0 ·
    Release: ait v1.5.0
    Release v1.5.0
    
    - **Multi-provider support** — `Provider` trait (`src/provider/traits.rs`) abstracts over different AI providers; `AnthropicProvider` uses the native Anthropic API, `OpenAiProvider` (`src/provider/openai.rs`) covers OpenAI, DeepSeek, Ollama, LM Studio, and any `/v1/chat/completions` endpoint
    - **Provider registry** — `ProviderRegistry` (`src/provider/registry.rs`) lazily builds only the providers referenced by the active profile; resolves role bindings to `(provider, model)` pairs
    - **Profiles** — `[profiles.<name>]` config sections bind four roles (`simple`, `planner`, `executor`, `patcher`) to provider/model pairs; `General.active_profile` selects the active profile
    - **Routing classifier** — `classify_complexity()` (`src/provider/routing.rs`) routes prompts as `Simple` (single-turn) or `Complex` (agent loop) using heuristic word count + keyword matching, with `hybrid` and `classifier_api` strategies
    - **Agent loop** — `run_agent_loop()` (`src/provider/agent_loop.rs`) for complex prompts: planner step (produces a numbered plan), plan approval dialog (`[Enter]` approve / `[e]` edit / `[Esc]` cancel), executor loop with tool dispatch
    - **Prompt templates** — `PLANNER_PREFIX` and `EXECUTOR_PREFIX` (`src/provider/prompts.rs`) prepended to system prompt for planner and executor roles
    - **`ait profile list`** — prints all configured profiles with their role bindings; active profile marked with `*`
    - **`ait profile use <name>`** — validates a profile exists (runtime switching via REPL planned)
    - **Active profile in REPL prompt** — non-default profiles shown as `ait [profile] ~/path> `
    - **`profile` and `model` fields on `Message`** — recorded on assistant messages in session JSON
    - **`[routing]` config section** — `strategy` (`heuristic` / `classifier_api` / `hybrid`), `[routing.heuristic]` with `complex_word_threshold` and `complex_keywords`
    - **Credential store integration** — API keys are resolved from the system credential store (macOS Keychain, Linux secret-service, Windows Credential Manager) first, falling back to environment variables
    - **`ait auth set <provider>`** — store an API key securely with validation (lists models to verify the key works)
    - **`ait auth list`** — show which providers have keys stored (credential store + env vars)
    - **`ait auth remove <provider>`** — remove a stored key
    - **`ait model list [--provider <name>]`** — list available models from configured providers
    - **Agent loop: planner reads files before planning** — planner gets read-only tools (`read_file`, `list_files`, `grep_files`, `cwd`) with no 5KB truncation; gathers context before producing the plan
    - **Agent loop: file diff status** — `Creating file diff for <path>...` shown while computing diffs in `write_file`/`patch_file` (replaces blank screen after spinner disappears)
    - **Agent loop: wrap-up with context** — when hitting the turn limit, the model receives the original task, plan, and list of modified files to produce an accurate summary instead of hallucinating
    - **Agent loop: consecutive error detection** — 3 consecutive tool errors break the loop to avoid infinite retries (e.g. repeated `patch_file` failures)
    - **`AIT_NO_CREDENTIAL_STORE`** env var — disables credential store lookups for CI/Docker/test environments
    
    - Agent loop executor limit increased from 30 to 100 iterations
    - Agent loop wrap-up fires 2 turns before the limit (with empty tools to force prose) instead of on the last turn
    - Executor gets a clean session (original prompt + plan only) — no planner tool history, avoids cross-provider tool ID format mismatches
    - Planner prompt updated: "gather context efficiently in 2-3 tool turns, batch calls, use grep first"
    - Planner budget hint fires at turn 3 to stop context gathering and produce the plan
    - Config reload now also checks right before sending AI prompts (not just at REPL loop top)
    - Ctrl+C now works during proactive rate limit waits
    - Rate limit countdown display fixed (explicit `write_all` + `flush` per tick)
    - Terminal line cleared on Ctrl+C to prevent spinner remnants
    - Fixed UTF-8 panic in OpenAI debug log truncation (multi-byte chars like `─` and `⠹`)
    
    - `Config.providers` is now `HashMap<String, ProviderConfig>` (was a single-field `Providers` struct) — supports any number of named providers
    - `AiContext` uses `ProviderRegistry` instead of direct `AnthropicProvider`; model is resolved per-request from the active profile
    - `handle_prompt` uses the routing classifier to dispatch simple prompts to the single-turn loop and complex prompts to the agent loop
    - Default config template updated with `[profiles.default]`, `[routing]`, and multi-provider `[providers.*]` sections
    - `ait config validate` now checks all configured providers and validates the active profile exists
    
    - `AnthropicProvider::complete()` and `stream()` — dead code; streaming will be rewritten for TUI in v2
    - `AnthropicProvider::from_config()` — superseded by `new()` used by the registry
    - `Provider::name()` trait method — unused
    
    - Added `async-trait` 0.1 (Provider trait)
    - Added `keyring` 3.x (system credential store: macOS Keychain, Linux secret-service)
    - Added `rpassword` 5.x (hidden password input for `ait auth set`)
  • v1.3.0

    2d1c9b4a · Release v1.3.0 ·
    Release: ait v1.3.0
    Release v1.3.0
    
    - **Rate limit intelligence** — full rate-limit-aware agentic loop: parses `anthropic-ratelimit-*` headers, tracks cumulative token/request usage, auto-retries on 429 (capped at 60s), and proactively waits before hitting limits. Includes adaptive threshold (avg cost × 1.2), live countdown, micro-wait for ≤5s resets, and qualitative budget tiers (`healthy`/`moderate`/`low`) so the model stays calm under pressure
    - **Context usage display** — `⟡ 6.2% context | 21K / 50K tokens, 3 calls` shown after every API call; full details in `--debug`
    - **Iteration-aware budget notes** — turns are numbered `[turn N/50]`; forced wrap-up after 15 turns to prevent infinite exploration. Tool call batching hints encourage the model to batch independent calls per turn
    - **Thinking spinner** — animated braille-dot spinner during tool-use API calls
    - **Navigation tools** — `cwd` (always available) and `change_directory` (when `restrict_to_cwd = false`) let the model navigate projects; CWD is injected into the system prompt
    - **Dynamic AGENTS.md reloading** — system prompt rebuilds on every `cd` and AI turn, picking up the new project's AGENTS.md automatically
    - **Smarter file & search tools** — `grep_files` returns 5 context lines around matches with markers and merged overlaps; `read_file` shows file size metadata and hard-truncates at 5KB (directing the model to use line ranges for larger files); debug mode shows matched paths with line numbers and session UUID
    - **Secret redaction** — built-in patterns (API keys, AWS keys, PATs, Slack/bearer tokens) are always active; users can add extra patterns via `[safety.redaction]` config. New `src/provider/redaction.rs` module with `OnceLock`-cached compiled regexes
    - **`ait init`** — AI-powered AGENTS.md generator (explores project, drafts, opens in `$EDITOR`)
    - **`ait new`** — top-level shorthand for `ait session new`
    - **GitLab CI** — lint (`clippy` + `fmt`), test, and release stages with binary artifact and changelog extraction
    - GitLab issue templates (`Bug.md`, `Feature.md`) and MR template (`Default.md`)
    - `CONTRIBUTING.md` with prerequisites, build/test/lint, branching conventions, and MR workflow
    
    - **System prompt rewritten** — grep-first file searching, 5KB read threshold with mandatory line ranges, tier-based token budget guidance with "do not panic" framing
    - **Tighter context condensing** — `CONDENSE_KEEP_RECENT` 8→4, `CONDENSE_PREVIEW_CHARS` 200→120 (roughly halving per-request cost); last 3 tool results kept uncompressed (up from 1)
    - **`[safety.files]` whitelist now empty by default** — all file writes require confirmation; `restrict_to_cwd` and universal blacklist remain as safety net
    - API internals: `tool_definitions()` takes `&Config` for dynamic tool sets; `complete_with_tools()` returns `(ApiResponse, RateLimitInfo)`; `ApiResponse` includes token counts; `AnthropicProvider::from_config()` takes full `Config` for redaction access; all config structs derive `Clone`
    - Default config template updated with `[safety.redaction]` section
    
    - Added `regex` 1.0 (redaction pattern matching)
  • v1.2.0

    50dbaf6a · Release v1.2.0 ·
    Release v1.2.0
    
    - **File editing tools** — `ait` can now read and write files via Anthropic's native tool-use API
    - `read_file(path)` tool: injects file contents into the AI context
    - `list_files(path)` tool: returns directory listing with file types and sizes
    - `write_file(path, content)` tool: writes a file with unified diff preview and user confirmation
    - `patch_file(path, search, replace)` tool: applies targeted search-and-replace edits with diff preview
    - **File safety layer** — `[safety.files]` config section with whitelist/blacklist glob matching for file paths, mirroring the existing command safety layer
    - `restrict_to_cwd` option in `[safety.files]` (default `true`) — any file path resolving outside the current working directory requires confirmation, even if whitelisted
    - `FileAction` enum (`Write`, `Confirm`, `Reject`) and `check_file_path()` in `src/execution/safety.rs`
    - File write confirmation dialog — same UX pattern as command confirmation: title bar with diff body, `[Ctrl+C]` Cancel / `[e]` Edit / `[Enter]` Accept
    - Colored unified diff display using the `similar` crate (green additions, red deletions, cyan hunk headers)
    - `ApiResponse` struct in `src/provider/anthropic.rs` — structured response type carrying text, tool calls, content blocks, and stop reason
    - `complete_with_tools()` method on `AnthropicProvider` — sends tool definitions to the API and parses `tool_use` content blocks
    - Tool-use loop in `src/provider/ai_context.rs` — executes tool calls, sends `tool_result` messages back, loops until the model responds with prose (capped at 10 iterations)
    - `src/provider/tools.rs` module: tool definitions (Anthropic schema), `ToolCall`/`ToolResult` types, `dispatch_tool()` router, file handlers, diff display, and confirmation UI
    - `push_blocks()` method on `Session` for recording structured content-block messages
    - `content_blocks` and `output_mode` optional fields on `Message` for tool-use session recording
    - 20 new unit tests (tool definitions, file read/write/patch, dispatch, diff generation, file safety with restrict_to_cwd)
    
    - `send_request()` in `AnthropicProvider` now accepts an optional `tools` array and builds API messages from `content_blocks` when present (required for tool-result messages)
    - `max_tokens` increased from 1024 to 4096 to accommodate file-editing responses
    - AI context loop rewritten: sends tool definitions on every call, handles `tool_use` stop reason alongside legacy bash-block extraction
    - System prompt updated with file-editing instructions (rules 7–12): use `read_file` before editing, prefer `patch_file` for small edits, never use bash blocks to write files
    - `Message` struct extended with `content_blocks: Option<Vec<Value>>` and `output_mode: Option<String>` (backward-compatible via `skip_serializing_if`)
    - Default config template now includes `[safety.files]` section with sensible defaults
    
    - Added `similar` 2.0 (unified diff generation)
  • v1.1.0

    9806708d · Release v1.1.0 ·
    Release v1.1.0
    
    - **Session persistence** — conversations are saved automatically as JSON in `~/.local/share/ait/sessions/` and restored on relaunch
    - `ait session list` — shows past sessions with title, message count, and age
    - `ait session new` — starts a fresh session, optionally with an initial prompt (`ait session new explain ownership`)
    - `ait session export <id>` — exports a session as JSON to stdout (supports ID prefix matching)
    - Auto-resume on REPL launch — active session tracked via an `active` symlink
    - Resume notice on startup (dim `↱ Resuming "<title>"` line)
    - Auto-generated session titles from the first user prompt (truncated to ~50 chars)
    - Terminal tab title updates with the session title via OSC escape sequence
    - `src/session/` module consolidating all session logic: `state.rs` (runtime types), `store.rs` (persistence), `title.rs` (auto-titling), `commands.rs` (CLI handlers)
    - Timestamps on all messages (ISO 8601)
    - UUID-based session IDs
    - Unit tests for `SessionStore` round-trip, `SessionFile` serde, title generation, `Session::from_file`/`to_file`
    
    - CLI subcommands are now nested: `ait session {list,new,export}` (matching the `ait config {path,edit,validate}` pattern)
    - `Session` moved from `src/repl/session.rs` into `src/session/state.rs` and re-exported from `crate::session`
    - `Message` now derives `Serialize`/`Deserialize` with a `timestamp` field
    - `Session` carries `id` and `title` fields for persistence round-tripping
    
    - Added `chrono` 0.4 (timestamps)
    - Added `uuid` 1.0 with `v4` feature (session IDs)
  • v0.8.0

    fb6acc1d · Release v0.8.0 ·
    Release v0.8.0
    
    - Shell built-in command handling — `cd`, `export`, and `unset` are now intercepted and executed directly in the ait process instead of a subprocess (`src/repl/builtins.rs`)
    - `cd` supports bare `cd` (→ `$HOME`), `cd -` (→ previous directory), `cd ~` and `cd ~/path` (tilde expansion), and normal paths
    - `export KEY=VALUE` sets environment variables in the ait process, persisting to all future child commands
    - `unset KEY` removes environment variables from the ait process
    - Tab completion for file and directory names via `rustyline::FilenameCompleter` (`src/repl/completer.rs`)
    - Dynamic REPL prompt showing current working directory (e.g. `ait ~/Developments/ait> `)
    - `SHELL_BUILTINS` const in `cli.rs` — `cd`, `export`, `unset` are always classified as shell commands even though they may not be in `$PATH`
    - `prev_dir` field on `Session` for `cd -` support
    - Shell history export — commands executed in the REPL are appended to the user's shell history file (`~/.zsh_history` or `~/.bash_history`) so they're available after exiting ait
    - Shell alias detection in input classifier — aliases defined in `.zshrc` / `.bashrc` (e.g. `g` for `git`) are now recognized as shell commands, not AI prompts (`src/cli.rs`)
    - Alias names loaded once at startup via `OnceLock<HashSet<String>>` and cached for fast lookup
    - 17 new unit tests (cd target resolution, tilde expansion, cd -, export/unset env var effects, quote stripping, builtin dispatch)
    
    - REPL now uses `Editor<AitHelper>` instead of `DefaultEditor` (enables custom tab completion)
    - Built-in commands are tried before subprocess execution in both `ShellCommand` and `ForcedShellCommand` paths
    - All built-in command results are recorded in the session so the AI stays aware of cwd/env changes
    - Both `run_command()` and `run_command_captured()` now source the user's shell rc file before execution and wrap commands in `eval` so aliases expand correctly (`src/execution/runner.rs`)
    
    - Added `rustyline-derive` 0.10 for derive macros (`Helper`, `Completer`, `Hinter`, `Validator`)
  • v0.7.0

    4da6b480 · Release v0.7.0 ·
    Release v0.7.0
    
    - In-memory conversation history — AI calls include full session context (`src/session.rs`)
    - Multi-command loop — AI can request shell commands via bash blocks, receive output, and iterate up to 5 times before giving a final answer
    - `run_command_captured()` captures stdout/stderr (`src/execution/runner.rs`) — used for both AI-requested and user-initiated commands
    - `extract_all_bash_blocks()` extracts all bash/sh fenced blocks from a response (`src/output.rs`)
    - `Session` struct with `Message` history and automatic trimming at 50 messages
    - `Session::record_command()` stores user shell command output into session history so the AI can reference it
    - `handle_prompt_oneshot()` for one-shot CLI mode (temporary session, no persistence)
    - `NATURAL_LANGUAGE_WORDS` list in `cli.rs` — common English words (`what`, `how`, `test`, `time`, etc.) that also exist as binaries are filtered out of shell command detection
    - 13 new unit tests (session trimming, record_command formatting, command capture, multi-block extraction, natural language word filtering)
    - `ForcedShellCommand` variant in `InputKind` — `!` prefix bypasses safety checks entirely, runs directly with captured output
    
    - `AnthropicProvider::stream()` and `send_request()` now accept `&[Message]` history instead of a single prompt string
    - `AiContext::handle_prompt()` is now a multi-command loop with `&mut Session` parameter
    - System prompt updated: tells the model its bash commands will be executed and output returned, enabling multi-turn command gathering
    - REPL creates a `Session` at startup and threads it through every AI interaction
    - REPL captures output from all executed user shell commands (whitelisted, confirmed, and edited) into the session
    - One-shot mode uses `handle_prompt_oneshot()` with a temporary session
    - Input classification: replaced uppercase-only check with case-insensitive `NATURAL_LANGUAGE_WORDS` filter for more robust prompt detection
  • v0.6.0

    0076e62f · Release v0.6.0 ·
    Release v0.6.0
    
    - Interactive REPL — `ait` with no args launches an interactive shell (`src/repl.rs`)
    - Streaming AI responses with "thought" UX: tokens stream in dim/grey text, then collapse and show the clean parsed result
    - SSE streaming from Anthropic Messages API (`stream: true`, `content_block_delta` event parsing)
    - `rustyline` integration for readline (arrow keys, in-memory history, Home/End, Ctrl+A/E)
    - `tokio` async runtime — `main()` is now `#[tokio::main] async fn main()`
    - Dual mode: REPL when no args, one-shot when args provided
    - `AiContext` struct (`src/provider/ai_context.rs`) bundles provider + system prompt setup
    - Shell commands now run via `$SHELL -i -c` with proper process group management (`libc`), so user aliases and functions work in the REPL
    
    - `AnthropicProvider` is now a concrete async struct (dropped `Provider` trait — deferred to v1.5)
    - `reqwest` switched from blocking to async with `stream` feature (dropped `blocking` feature)
    - One-shot AI prompts now use streaming + thought UX (same as REPL)
    - `AnthropicProvider::complete()` and `stream()` refactored to share `send_request()` helper
    - `handle_command()` moved from `main.rs` to `execution/runner.rs` — single source of truth
    - `handle_ai_prompt()` moved into `AiContext::handle_prompt()` method
    - Config subcommand dispatch moved into `config/commands.rs::run()`
    - Command execution uses `$SHELL` instead of hardcoded `sh` (falls back to `sh` if unset)
    
    - `Provider` trait (`provider/mod.rs`) — only one provider exists; trait returns in v1.5 Phase 1
  • v0.5.0

    28b8ad21 · Release v0.5.0 ·
    Release v0.5.0
    
    - Auto-create default `config.toml` on first run (no manual `init` step needed)
    - `ait config validate` — checks TOML syntax, glob patterns, and API key env var
    - `ait config path` — prints config file path (composable: `subl $(ait config path)`)
    - `ait config edit` — opens config in `$EDITOR` (fallback: `vi`)
    - Well-commented default config template with all safety rules and provider settings
    - `DEFAULT_CONFIG_TEMPLATE` constant in `config.rs` for reuse
    - 4 new unit tests (default template parsing, glob validation, invalid pattern detection)
    
    - `ConfigError` variants renamed from `ReadError`/`WriteError`/`ParseError` to `Read`/`Write`/`Parse` (clippy `enum_variant_names`)
    - CLI now uses `clap` subcommands (`#[derive(Subcommand)]`) alongside trailing var args
    - `--debug` flag is now global (works with subcommands too)
  • v0.4.0

    2f1511d9 · Release v0.4.0 ·
    Release v0.4.0
    
    - Auto-detection of shell commands vs AI prompts via `which` lookup on the first word
    - `!` prefix to force shell passthrough (e.g. `ait !git status`)
    - Default to AI prompt when first word is not a known binary
    - `AGENTS.md` loading from project git root — injected into system prompt for project-aware answers (`src/agents_md.rs`)
    - `find_git_root()` utility walking parent directories for `.git/` (`src/git.rs`)
    - `build_system_prompt()` prepends AGENTS.md content to base system prompt
    - `--debug` flag showing raw model response, input classification, AGENTS.md status, and parsed output mode
    - 19 new unit tests (cli detection, git root, agents_md loading, build_system_prompt, prose+command parsing)
    
    - Bumped `crossterm` 0.28 → 0.29, `toml` 0.8 → 1.0
    - Input without `/ai` prefix now auto-classifies instead of always treating as shell command
    - Response parser now only treats pure bash blocks as `Command`; mixed prose+command responses are shown as `Chat` so the user sees the full context
    - System prompt hardened: bash blocks must contain executable commands only, never fabricated output; prefer prose when unsure
  • v0.3.0

    1ea18676 · Release v0.3.0 ·
    Release v0.3.0
    
    - CLI parsing with `clap` derive (`src/cli.rs`)
    - `/ai` and `/prompt` prefix detection to send prompts to the AI
    - `Provider` trait for LLM provider abstraction (`src/provider.rs`)
    - `AnthropicProvider` implementation with `reqwest::blocking`
    - System prompt instructing the model to reply with fenced `bash` blocks or prose
    - Response parsing: extract commands from fenced `bash`/`sh` blocks (`src/output.rs`)
    - `OutputMode::Command` routes through safety layer → execution UI
    - `OutputMode::Chat` prints prose directly to stdout
    - Provider config section (`[providers.anthropic]`) with `api_key_env` and `base_url`
    - Low-credit error detection with direct Anthropic billing link
    - 20 new unit tests (cli, output, provider)
  • v0.2.0

    6da11b6c · Release v0.2.0 ·
    Release v0.2.0
    
    - Config loading from `~/.config/ait/config.toml` with built-in defaults (`serde` + `toml`)
    - Safety layer: whitelist/blacklist glob matching for shell commands (`glob`)
    - YOLO mode support (reads from config, skips confirmation for non-blacklisted commands)
    - Confirmation dialog with single-keypress input (`crossterm` raw mode)
    - Command execution via `sh -c` with stdout/stderr passthrough
    - Editor support (`$EDITOR` / `vi` fallback) for editing commands before execution
    - `ConfigError` typed errors via `thiserror`
    - Multi-file module structure (`config.rs`, `safety.rs`, `exec.rs`)
  • v0.1.0

    6255dc19 · Bumped version v0.1.0 ·
    v0.1.0