From fd188da879d977ca847f10708c39dd4801a204c4 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Tue, 14 Apr 2026 16:03:08 -0700 Subject: feat: Allow resuming previous AI sessions (#3407) 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. image ## 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. --- CONTRIBUTING.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f47e1ff4..36065018 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,10 +13,12 @@ Before working on anything, we suggest taking a copy of your Atuin data director While data directory backups are always a good idea, you can instruct Atuin to use custom path using the following environment variables: ```shell -export ATUIN_RECORD_STORE_PATH=/tmp/atuin_records.db -export ATUIN_DB_PATH=/tmp/atuin_dev.db -export ATUIN_KV__DB_PATH=/tmp/atuin_kv.db -export ATUIN_SCRIPTS__DB_PATH=/tmp/atuin_scripts.db +export ATUIN_RECORD_STORE_PATH=/tmp/atuin_records.db # path to primary record store +export ATUIN_DB_PATH=/tmp/atuin_dev.db # path to materialized history database +export ATUIN_KV__DB_PATH=/tmp/atuin_kv.db # path to key-value store +export ATUIN_SCRIPTS__DB_PATH=/tmp/atuin_scripts.db # path to scripts database +export ATUIN_AI__DB_PATH=/tmp/atuin_ai_sessions.db # path to AI sessions database +export ATUIN_META__DB_PATH=/tmp/atuin_meta.db # path to meta database ``` It is also recommended to update your `$PATH` so that the pre-exec scripts would use the locally built version: -- cgit v1.3.1