tabby-agent-sessions
v0.4.2
Published
Tabby sidebar listing AI agent sessions for the focused terminal's working directory, backed by asbutler
Downloads
244
Readme
tabby-agent-sessions
Feasibility skeleton: a Tabby side pane listing AI agent sessions for the focused terminal's working directory, backed by asbutler.
How it works
Tabby has no sidebar extension point (verified against builtin-plugins/*/typings — zero sidebar/sidePanel hits). The supported equivalent is a split pane holding our own tab:
ToolbarButtonProvideradds a toolbar button that toggles the pane- the button splits the active
SplitTabComponentand insertsSessionListTabComponenton the right (addTab(panel, relative, 'r')) — terminals leave more slack on that side - the pane follows the focused sibling via
SplitTabComponent.focusChanged$, readingsession.getWorkingDirectory() - session data comes from
asbutler list --path <cwd>(JSON) — parsing is not reimplemented here, so adding an agent in Go surfaces it in Tabby for free - SSH terminals work too: asbutler is run on the remote host over Tabby's existing authenticated connection, so no second login. If it isn't installed there, the pane says so and links to the asbutler releases, instead of showing an empty list
- a click selects a row; double-click (or the hover
▶) types that agent's resume command into the adjacent terminal (claude --resume <id>,kiro-cli chat --resume-id <id>). Refused for alockedsession, for an agent with no known resume command, and while that terminal is running something - the hover
✎renames a session viaasbutler rename, editing the title in place — Enter commits, Escape cancels. Untitled sessions start from an empty box rather than asbutler's(untitled · …)placeholder - the hover
✕deletes viaasbutler rm, behind a native confirm dialog that defaults to Cancel. Permanent — asbutler unlinks the file and the JSON exposes no path for the plugin to trash it instead - cmd/ctrl-click toggles rows and shift-click extends a range; with two or more selected, a Delete bar removes them in one
asbutler rmcall, skipping any held by a running agent - Kiro keeps some sessions in two stores under the same id (opening a
v1session copies it tov2), so rows are badgedv1and keyed by id and store. Resume passes--session-source, and delete/rename pass--store, since asbutler refuses an ambiguous id rather than picking one - agent chips filter the rows already fetched, so switching filters costs nothing; sessions whose directory no longer exists are badged
orphan - while a directory switch is in flight the previous rows are dimmed and inert, so an action can't land on the directory you just left
Requirements
asbutler >= 0.8.1 (releases), installed on whichever machine the terminal is on — this one for local shells, the remote host for SSH. Querying one directory matters: --path narrows before asbutler enriches, so one directory costs ~0.8s where machine-wide costs ~36s.
The binary is resolved by searching ~/.local/bin, /opt/homebrew/bin, /usr/local/bin, /usr/bin, then $PATH — a GUI-launched Electron app only inherits /usr/bin:/bin:/usr/sbin:/sbin from launchd, so $PATH alone doesn't find ~/.local/bin. Override if it lives elsewhere:
Develop
npm install
npm run check # tsc --noEmit + Angular template parse + unit tests
npm test # asbutler transport/parsing only; needs no Angular
npm run build # or: npm run watch
ln -sfn "$PWD" ~/Library/Application\ Support/tabby/plugins/node_modules/tabby-agent-sessionsRestart Tabby to load a rebuilt bundle — it reads plugins once at startup.
npm run check is worth running before you trust a template change: the template is an inline string that Angular compiles at runtime, so webpack will bundle a broken binding without complaint and the pane just renders blank.
Known gaps
- delete is permanent, and can't be made recoverable here — asbutler unlinks the file and the JSON row exposes no path, which also rules out reveal-in-Finder entirely
- no
TabRecoveryProvider, so the pane doesn't survive a restart (andrecoverTabsis off in this config anyway) - switching directory still costs a fresh ~1s
asbutlersubprocess; the pane makes that legible rather than faster, since querying more widely is the wrong fix
Managing sessions across directories is deliberately not here — that's what asbutler webui is for. This pane only ever deals with the focused terminal's directory.
Note the 2s cwd poll is not a gap: focusChanged$ alone misses a plain cd, which Tabby emits no event for. Removing it leaves the directory silently stale.
