Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 1.92 KB

File metadata and controls

89 lines (61 loc) · 1.92 KB

Sessions

Source of truth:

  • crates/core/src/session/mod.rs
  • crates/cli/src/main.rs (session commands)
  • crates/tui/src/export.rs

Session Data Model

Session metadata (SessionMeta):

  • id
  • title
  • created_at
  • updated_at
  • message_count
  • provider
  • model

Persisted runtime shape:

  • sessions
  • session_messages
  • session_message_parts
  • structured_replay_events
  • conversation_archives

Storage Path

Sessions are stored in:

  • ~/.quavil/runtime/state.db

data_dir comes from Config::data_dir() and now resolves to ~/.quavil.

Persistence Behavior

  • non-ephemeral runs persist sessions
  • qvl exec --ephemeral disables session persistence
  • title is derived from first user message (truncated to ~80 chars)
  • replay and structured replay are both stored in SQLite, not JSONL side files

CLI Session Commands

qvl sessions [query]
qvl session delete <id-or-title-fragment>
qvl session rename <id-or-title-fragment> "New title"
qvl export <id-or-title-fragment> [-o output.md]
qvl replay <id> [--filter <event-type>]
qvl --continue
qvl --session "<query>"

Lookup behavior:

  • query matches id prefix or title substring
  • if multiple matches are found where a single target is required, command fails with candidate list

Export

qvl export loads session thread and emits markdown via quavil_tui::export::export_thread_markdown.

Default output path:

  • generated timestamped path when -o is omitted

Replay

qvl replay prints stored event timeline for session id, with optional event-type filtering.

Session Lifecycle APIs

Core APIs:

  • save_session
  • load_session
  • list_sessions
  • find_sessions
  • latest_session
  • delete_session
  • rename_session

Operational Tips

  • use --ephemeral for one-off CI automation where history is not needed
  • use qvl sessions <query> to recover old work by title fragment
  • use export for review artifacts and issue reports