Repository navigation
v1.3.99
v1.3.99
Highlights
- Per-model cost breakdown:
/costnow groups token usage by model, showing each model's contribution separately with individual pricing. - New slash commands:
/context,/copy,/review,/filesfor common workflow tasks. - Readline-style editing: Ctrl+A/E/K/U/W shortcuts for efficient text editing in the input box.
- Multi-image paste: Paste multiple images at once with a visual attachment bar.
- Performance: Async disk writes for usage/metrics, eliminated fsync from session append hot path.
New Features
Per-Model Cost Breakdown
The /cost command now groups token usage by vendor/model, showing each model's tokens and estimated cost separately. This works correctly across model switches mid-session — each turn's usage is tagged with the actually active model.
New Slash Commands
| Command | Description |
|---|---|
/context |
Context window usage breakdown showing token allocation across system prompt, conversation history, and tools |
/copy |
Copy the last agent response to clipboard |
/review |
AI-powered pre-commit code review using git diff |
/files |
Summary of all files modified by the agent in this session |
Readline-Style Input Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+A | Move cursor to beginning of line |
| Ctrl+E | Move cursor to end of line |
| Ctrl+K | Delete from cursor to end of line |
| Ctrl+U | Delete from beginning of line to cursor |
| Ctrl+W | Delete previous word |
Multi-Image Paste Support
Paste multiple images from clipboard at once. Each image is shown as a thumbnail in a visual attachment bar above the input box. Use /image remove or Ctrl+H to remove individual images.
Fixes
- Usage records track wrong model after model switch:
recordSessionUsage()used the session's initial model (ses.Model) instead of the currently active model. Now readsactiveModelwhich is updated on every provider activation. - Usage/metric records lost after context compaction:
loadSession()cleared all post-checkpoint entries including usage and metric records when encountering a checkpoint. Usage/metric are cumulative historical data and now survive across checkpoints. - New usage entries not visible in /cost until reload:
recordSessionUsage()wrote entries to disk viaAppendUsageEntry()but never appended them to the in-memoryses.UsageHistoryslice./costreads from memory, so new entries were invisible until session reload. /contextoutput formatting: Wrapped in code block to preserve table alignment in the TUI.- Cross-platform image removal: Added Ctrl+H fallback for terminals where Backspace doesn't work, plus
/image removesubcommand.
Performance
- Async disk writes for usage/metrics:
recordSessionUsage()andrecordSessionMetric()moved disk I/O (fsync) from the synchronous TUI event loop to background goroutines viasafego.Go(). Eliminates UI stutter on every agent turn for large sessions. - Removed fsync from session append path:
appendRecordLine()no longer callsf.Sync(). The OS buffer cache handles flushing. Previously, 222K+ tunnel events per session each triggered an fsync.Save()(full session rewrite) never fsynced — now the append path is consistent. - Eliminated unnecessary index updates for tunnel events and metrics:
AppendTunnelEventToDisk()andAppendMetric()no longer callupdateIndex()— these record types don't change session index fields (title, model, workspace). Avoids 222K+ index read+write cycles per session.
Internal
- Winget release script: auto-close stale winget PRs before submitting new version.
- Checkpoint undo support:
checkpoint.gonow supports tracking deletions for file removal operations. - 17 new/updated tests across session store, TUI model, submit flow, and input editing.