Feature Reference

Keyboard shortcuts, annotation pipeline, and technical details

Keyboard Shortcuts

Application

KeyActionContext
qQuit the applicationGlobal
TabCycle focus between file tree, code viewer, and detail paneGlobal
rRefresh explain annotations for current file’s directoryGlobal
tToggle annotation gutter visibilityGlobal
gOpen go-to-line dialogGlobal
eLaunch the configured code agent for explain on the current fileGlobal
dToggle detail pane visibilityGlobal
DToggle detail pane between default and expanded widthGlobal

Code Viewer

KeyActionContext
UpMove cursor up one lineCode viewer
DownMove cursor down one lineCode viewer
Shift+UpExtend selection upwardCode viewer
Shift+DownExtend selection downwardCode viewer
EscapeClear selectionCode viewer
PageUpMove cursor up by one screenCode viewer
PageDownMove cursor down by one screenCode viewer

Go-to-Line Dialog

KeyActionContext
EnterJump to entered line numberDialog
EscapeCancel and close dialogDialog

Mouse Interactions

ActionEffect
Click on file tree entrySelect and open file
Click in code viewerPosition cursor at clicked line
Drag in code viewerSelect line range
Scroll wheel in code viewerScroll content

Annotation Data Pipeline

The codebrowser uses the same explain data pipeline as /aitask-explain:

  1. When a file is selected, the ExplainManager checks for cached explain data for the file’s directory
  2. If no cache exists, it runs aitask_explain_extract_raw_data.sh --gather --source-key <dir_key> targeting direct child files of the directory
  3. Output is stored under aiexplains/codebrowser/<dir_key>__<timestamp>/ containing:
    • reference.yaml — Structured line-to-commit-to-task mapping
    • files.txt — List of analyzed files
    • tasks/ and plans/ — Extracted task and plan files for context
  4. reference.yaml is parsed to build annotation ranges (start line, end line, task IDs, commit hashes)
  5. Annotations are rendered as color-coded task IDs in the gutter column of the code viewer

The dir_key identifies the source directory (e.g., aiscripts__lib for .aitask-scripts/lib/). Root-level files use the key _root_.

Explain Run Management

Explain data generated by the codebrowser is stored under aiexplains/codebrowser/, separate from top-level /aitask-explain runs. On startup, the codebrowser cleans up stale runs — for each directory key, only the newest run is kept.

You can also manage runs manually:

# List all runs (top-level and codebrowser)
ait explain-runs --list

# Interactive deletion with fzf
ait explain-runs

# Remove stale runs (keep newest per source directory)
ait explain-runs --cleanup-stale

See ait explain-runs and ait explain-cleanup for the full command reference.

Environment Variables

VariableDefaultPurpose
TERMINALAuto-detectedTerminal emulator for launching the configured code agent (when pressing e)
PYTHONpython3Python interpreter (used by launcher if shared venv is unavailable)

Terminal auto-detection order: $TERMINAL, then alacritty, kitty, ghostty, foot, x-terminal-emulator, xdg-terminal-exec, gnome-terminal, konsole, xfce4-terminal, lxterminal, mate-terminal, xterm.

Requirements

  • Python venv at ~/.aitask/venv/ with packages: textual, pyyaml
  • Falls back to system python3 if venv not found (warns about missing packages)
  • Git repository (uses git rev-parse --show-toplevel and git ls-files)
  • Checks terminal capabilities and warns on legacy terminals