| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the `atuin update` command on Windows.
Windows doesn't let you overwrite a running exe, but it lets you rename
it. This PR special-cases the official `update` plugin by renaming the
running `atuin.exe` to `atuin.old` before the update, and rolling it
back if the update fails.
Note that the `atuin.old` file is left behind on success, which
shouldn't be a problem in practice: it will be overwritten on the next
call to `atuin update` (also deleted if there's no update available),
and is located in `~/.atuin/bin`, which is an isolated location specific
to Atuin.
Fixes #3451
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes keystroke lag in Atuin AI that scales with conversation length.
After extended use (many turns, lots of tool calls with output
viewports), pressing a key had noticeable delay before the letter
appeared.
Three layers of optimization:
- **Skip `sync_view_state` for `InputUpdated`** — every keystroke was
cloning all events, tools, and archived data even though no FSM state
changed. Uses `handle.update_tracked()` (eye_declare 0.5) to skip
rebuilds when values haven't actually changed.
- **Pre-compute turns and `has_command` on the driver thread** — the
view function was rebuilding the full turn structure from raw events and
scanning for `suggest_command` tool calls 3× per render frame. Now
computed once per FSM state change and cached in ViewState.
- **Commit-based element tree pruning** — turns that scroll into
terminal scrollback are tracked via `on_commit` and filtered from the
element tree, keeping rendering work proportional to visible content.
Turn views are now direct children of the root VStack (not nested inside
AtuinAi) so `detect_committed` can see them.
|
| |
|
| |
Adds a skills system that lets users define reusable LLM instructions as `SKILL.md` files with YAML frontmatter.
|
| |
|
|
|
|
|
|
|
|
| |
This PR adds the ability to inject user-defined content into Atuin AI
requests, a la `AGENTS.md` or `CLAUDE.md`.
* `.atuin/TERMINAL.md` (or alternatively just `TERMINAL.md`) is checked in every directory from the cwd up to the root
* `~/.config/atuin/TERMINAL.md` (or equivalent config dir) is also
checked
* Supports Claude-style ``` !`` ``` and ```` ```!...``` ```` style shell
interpolation
|
| |
|
|
|
|
|
|
|
|
| |
This PR fixes two minor issues when using Atuin with fish's vim mode(s):
1. Add support for `fish_hybrid_key_bindings`: in addition to
`fish_vi_key_bindings`, fish also provides `fish_hybrid_key_bindings`,
which is a vi-based mode with some extra keybinds; but the key bind
check for `atuin search` only checks for the former.
2. The AI keybind inserts a `?` on the command line in vim mode even
though it can only be called from normal mode, when pressing `?`
normally does nothing.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Replaces the tangled dispatch handler system (`tui/dispatch.rs`,
`tui/state.rs`) with a pure finite state machine + driver architecture.
The FSM handles all state transitions as explicit `(State, Event) →
(NewState, Effects)` mappings. The driver executes IO effects and
bridges the TUI to the FSM.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
## Summary
Implements the `write_file` client-side tool — creates new files or
overwrites existing ones with an explicit `overwrite` flag for safety.
- **Overwrite flag**: Writing to an existing file without `overwrite:
true` returns an error directing the LLM to set the flag or use
`edit_file` for targeted changes. Prevents accidental overwrites.
- **Snapshots**: Existing files are backed up before overwriting (same
infrastructure as `edit_file`).
- **Content preview**: Completed writes show the first 10 lines in gray
with line numbers, plus "+ N more lines" for longer files.
- **Atomic writes**: Uses `tempfile` + fsync + rename (same as
`edit_file`).
- **File tracker update**: After writing, the file is registered in the
tracker so subsequent `edit_file` calls work without a separate read.
- **Permission**: Shares the `"Write"` rule with `edit_file` — one
permission covers both tools.
|
| |
|
|
|
|
| |
Overhaul of how AI tool calls are modeled, rendered, and displayed in
the Atuin AI TUI. Fixes bugs in shell command output capture, implements
the `edit_file` tool with full safety infrastructure, and adds a diff
preview for edits.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
| |
## 18.15.2
### Bug Fixes
- Tab doesn't insert suggested command
([#3420](https://github.com/atuinsh/atuin/issues/3420))
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR introduces session continuation to Atuin AI.
* Conversations with Atuin AI are stored in a local SQLite database
* Upon startup, Atuin AI tries to find a session to resume based on its
directory/workspace and the time since the last event
* If found, Atuin AI will show a note that the session has been resumed,
and an event is added to help the LLM know where the invocation
boundaries are
* If not, Atuin AI will create a new conversation
* The user can create a new conversation with `/new`
* The new setting `ai.session_continue_minutes`, which defaults to `60`,
controls how old the last event in a session can be before it's no
longer considered for automatic resuming.
<img width="1055" height="593" alt="image"
src="https://github.com/user-attachments/assets/3f9ff01a-ef64-44a9-b0e2-3a4252c5746f"
/>
## Architecture
A new `SessionService` trait defines an API contract for a service that
can manage session data. `LocalSessionService` implements this, with
`DaemonSessionService` a possible future extension point.
`SessionManager` owns a `dyn SessionService` and delegates as
appropriate.
|
| |
|
|
|
|
|
|
|
|
|
| |
This was commented out in #3413 and needs to be fixed back up.
It's possible we can drop this line altogether if CI passed before
without it.
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This bumps the `portable-pty` dep which itself has a dependency on a
newer termios that knows about illumos. Unless this was pinned for a
particular reason I think this is fine.
With this dep bumped we can enable `atuin hex` on illumos.
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
| |
(#3404)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
include_str won't work outside of the crate boundary. Crates is so
frustrating sometimes.
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support installing the pi extension via `atuin hook install pi`. Bundle
the extension in the binary and update the docs.
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is essentially not a useful place to search agent history
Right now, using the CLI is the best way to explore this. We are looking
into building another TUI for searching records more widely and in more
detail
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
| |
https://github.com/user-attachments/assets/7868c7a4-6a91-4c93-ac6a-e8665cf1f799
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of only ensuring the daemon is running as part of writing
history, route all calls through a function that ensures it's running if
an error occurs.
This fixes the case where a system boots, no commands run, and the user
tries to search history.
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
| |
Useful for watching what agents are doing, or viewing live info from
other machines. Regardless I am liking it for debugging
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| | |
|
| |
|
|
|
|
| |
Adds client-side tool execution to Atuin AI, starting with
`atuin_history`. The server can request tool calls, which are executed
locally with a permission system, and results are sent back to continue
the conversation.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I can't think of any reason you would want this disabled by default -
trailing whitespace means nothing, breaks dedupe, and wastes a few bytes
closes #3387
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
This adds an option to disable mouse support, so that the terminal
handles mouse events, making it easy to select text. I've found myself
needing to copy from history frequently recently and holding Shift is
not convenient.
However, this makes mouse scrolling not work as expected, e.g. in my
case it scrolls six lines at a time.
Also see #1209.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
| |
(#3368)
Adds a new `atuin config` command with three subcommands for inspecting
and modifying `config.toml` without opening an editor.
|
| |
|
|
|
|
|
|
|
|
| |
This enables it to perform more effectively and give better suggestions.
Same as send_cwd, disabled by default, opt in.
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
characters (#3360)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
Or part of the command may be missing and the user may be misled to run
a wrong command.
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #3364
## Summary
When using `filter_mode = "workspace"`, each git worktree gets its own
isolated history scope instead of sharing history with the main
checkout.
## Root cause
`in_git_repo()` walks up the directory tree looking for a `.git` entry.
In a worktree, `.git` is a file (not a directory) containing a `gitdir:`
pointer back to the main repo's `.git/worktrees/<name>`. Since
`has_git_dir()` just checks `.exists()`, the worktree's own path becomes
the workspace root, and the `WHERE cwd LIKE '<root>%'` filter isolates
its history from the main repo and other worktrees.
## Fix
Add `resolve_git_worktree()`, which reads the `.git` file when it's not
a directory, parses the `gitdir:` pointer, and walks back up to find the
parent containing a real `.git` directory. No new dependencies -- just a
bit of file reading and path traversal.
## Testing
Two new tests in `utils::tests`:
- `in_git_repo_regular` -- baseline that normal repos still resolve
correctly
- `in_git_repo_worktree_resolves_to_main_repo` -- creates a simulated
worktree layout and verifies it resolves to the main repo root
Both pass locally, along with the full `atuin-common` test suite and
`cargo clippy -- -D warnings`.
---
Disclosure: I'm a Rust novice, and I put this together with help from
Claude Code. I'm eager to learn more, so please let me know if anything
doesn't feel like idiomatic Rust!
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
recording (#3358)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Summary
Fix nushell history recording completely broken since v18.13.0. No
commands are recorded because `ATUIN_HISTORY_ID` is always set to an
empty string.
Closes #3308
## Root Cause
PR #3183 (first included in v18.13.0) changed the `_atuin_pre_execution`
hook:
```diff
- $env.ATUIN_HISTORY_ID = (atuin history start -- $cmd)
+ $env.ATUIN_HISTORY_ID = (atuin history start -- $cmd e>| complete | get stdout | str trim)
```
The intent was to silence DB errors (e.g. when disk is full) by using
`complete` to swallow failures. However, `e>|` redirects exclusively
stderr into the pipe, dropping stdout. `complete` then sees atuin's
stdout in the `stderr` field and the `stdout` field is empty. The result
is that `ATUIN_HISTORY_ID` is always empty, and no commands are ever
recorded.
All nushell versions are affected. Not only 0.111.0, as I incorrectly
wrote in [the
issue](https://github.com/atuinsh/atuin/issues/3308#issuecomment-4113840110).
## Fix
Replace `e>|` with `|`. The `| complete | get stdout` pattern still
silences errors: `complete` captures stdout, stderr, and exit code into
a record, and `get stdout` discards the rest, preserving the error
suppression from #3183 without breaking stdout capture.
## Testing
Tested with nix shells across three nushell versions (0.98, 0.103,
0.111):
**History recording:**
| Version | `e>\| complete \| get stdout` | `\| complete \| get stdout`
|
|---------|-------------------------------|------------------------------|
| 0.98 | empty (broken) | valid history ID |
| 0.103 | empty (broken) | valid history ID |
| 0.111 | empty (broken) | valid history ID |
**Error silencing** (verified `| complete | get stdout` on a failing
command):
| Version | Error shown to user? | stdout field |
|---------|---------------------|--------------|
| 0.98 | No | empty |
| 0.103 | No | empty |
| 0.111 | No | empty |
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
eye-declare v0.2.0 includes two relevant changes:
* "Capture-phase" event handling lets us remove the special-case event
handling in `InputBox` that allowed global keyboard binds to work; the
`AtuinAi` component now handles this directly.
* `Tracked::read()` allows reading fields in tracked state without
triggering the dirty-tracking from the `DerefMut` implementation,
allowing us to send messages on the app event bus without marking the
containing state as dirty.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR replaces the mess of custom rendering code in Atuin AI with
[eye-declare](https://github.com/BinaryMuse/eye-declare), and updates
the TUI to feel more terminal-native: output appears inline and persists
in scrollback, so you can scroll up and look at previous conversations
for reference.
The "review" state — which used to exist between the LLM generating a
response and the user either executing or following up — has been
removed; just start typing to follow up with the LLM, or press `enter`
at the empty input box to execute the suggested command.
<img width="1203" height="633" alt="image"
src="https://github.com/user-attachments/assets/159ee447-9a2a-4edd-b56e-a79bf1aaaa94"
/>
|