<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-ai-vterm--pick-project.el, branch load-graph-classify-end</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-end</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-end'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-11T12:18:20+00:00</updated>
<entry>
<title>refactor(ai-vterm): rename Claude-specific names to a generic "agent"</title>
<updated>2026-05-11T12:18:20+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-11T12:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=59b0854464ef29511a0d09f1e76fd1140e675833'/>
<id>urn:sha1:59b0854464ef29511a0d09f1e76fd1140e675833</id>
<content type='text'>
I may add other terminal agents to this launcher (aider, an open-source LLM TUI), so the buffer prefix, the user knob, and the internal helpers shouldn't say "Claude". The module name (ai-vterm) and the `cj/ai-vterm-*` customs were already generic. This finishes the job:

- buffer prefix `claude [&lt;basename&gt;]` -&gt; `agent [&lt;basename&gt;]` (the `defconst` and the matching display-buffer-alist regex move together)
- `cj/ai-vterm-claude-command` -&gt; `cj/ai-vterm-agent-command` (the default still runs the `claude` CLI, with a docstring note on swapping it)
- `cj/--ai-vterm-claude-buffers` / `-displayed-claude-window` / `-reuse-existing-claude` -&gt; `-agent-*`, and their test files renamed to match
- prose in the module commentary and docstrings, plus the matching test docstrings and buffer-name literals

`vterm-config.el` hardcodes the same buffer prefix in `cj/--vterm-toggle-buffer-p` (F12 excludes agent buffers from its candidate set), so that literal moved too. Collapsing it into the shared `cj/--ai-vterm-name-prefix` is a cleanup for another day.

After a reload, a project's buffer opens as `agent [foo]` instead of `claude [foo]`. Old buffers keep their names until killed. I also corrected two stale `eshell-vterm-config.el` references in ai-vterm.el docstrings (that module was split into `vterm-config.el`).

Two things keep saying "Claude": the `cj/ai-vterm-agent-command` default value (the actual CLI), and the "Claude Code" example in `vterm-config.el`'s cursor-restore docstring (a concrete TUI example, not branding).

90 tests pass. `make validate-modules` clean.
</content>
</entry>
<entry>
<title>feat(ai-vterm): surface surviving tmux sessions in the project picker</title>
<updated>2026-05-11T10:17:44+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-11T10:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ca7015486d230192e94c51c0e5d014fc83a7a35f'/>
<id>urn:sha1:ca7015486d230192e94c51c0e5d014fc83a7a35f</id>
<content type='text'>
Each project's tmux session is now named `&lt;cj/ai-vterm-tmux-session-prefix&gt;&lt;basename&gt;` (default `aiv-`), so `tmux ls` can be filtered to AI-vterm's own sessions. After an Emacs crash the C-F9 project picker reads `tmux list-sessions`, matches surviving sessions back to their directories, and sorts those to the top: `[detached]` when only the tmux session is alive, `[running]` when a vterm buffer exists. The rest follow alphabetically. With tmux missing or no server running, it falls back to a plain alphabetical list. The picker's collection is a completion table that pins display order so Vertico doesn't re-sort and undo the active-first grouping.

The prefix is a new `defcustom` rather than `claude-`, which collides with hand-rolled tmux sessions. Sessions named before this change use the bare basename and won't be matched afterward. One `tmux kill-server` clears any orphans.
</content>
</entry>
<entry>
<title>feat(ai-vterm): show [running] in picker and F9 redisplays last-used</title>
<updated>2026-05-09T17:00:30+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-09T17:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a29ac8d9f31443279ba5897b13cf5cda49519975'/>
<id>urn:sha1:a29ac8d9f31443279ba5897b13cf5cda49519975</id>
<content type='text'>
The C-F9 project picker now flags projects whose claude buffer is alive with a " [running]" suffix on the abbreviated path. I added `cj/--ai-vterm-format-candidate` to compute the display name and routed the picker through it. Before the change, the picker showed every candidate identically, so you couldn't tell at a glance whether picking a project would attach to an existing session or start a fresh one.

F9 with two or more alive claude buffers used to open the project picker. That meant after toggling claude-A off, opening claude-B via C-F9, then toggling B off, the next F9 dropped into a picker rather than redisplaying B (the one you just toggled off). I renamed `redisplay-single` to `redisplay-recent` in `cj/--ai-vterm-dispatch` and broadened the trigger from "exactly one alive" to "one or more alive". F9 now redisplays the MRU claude buffer, so it consistently means "toggle THE claude I was last using". The project picker stays explicit on C-F9 for "start a different project", and M-F9 still picks among existing claudes.

2 new tests for the indicator (`format-candidate` flagged + unflagged), 2 dispatch tests renamed to match the new contract. 80 ai-vterm tests pass. Full make test green.
</content>
</entry>
<entry>
<title>feat(ai-vterm): add Claude launcher with vertical-split vterm</title>
<updated>2026-05-08T00:25:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-08T00:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=47b218ed15acd00c18cbc3bef604c4f2e0050a08'/>
<id>urn:sha1:47b218ed15acd00c18cbc3bef604c4f2e0050a08</id>
<content type='text'>
The new module picks a Claude-template project from a filtered completing-read list. It scans the same roots the `ai` shell launcher uses, then opens or reuses a vterm buffer named `claude [&lt;repo&gt;]` on the right. F9 launches it. The prior `cj/toggle-gptel` binding moves from F9 to C-F9 so both AI tools share the same physical key.

The display rule chains reuse-window -&gt; use-some-window -&gt; in-direction (right). The resulting window isn't dedicated. That matters because side-window dedication was breaking `buffer-move` (C-M-arrows) and `switch-to-buffer` replacement on the claude buffer. I also narrowed `vterm-toggle`'s display rule to skip `claude [` buffers. Otherwise it claimed them first with its bottom-split + dedicated treatment.

I added 23 tests across 5 files: the buffer-name transform, candidate walker, show-or-create dispatch, picker, and display rule. Design lives at docs/design/ai-vterm.org.
</content>
</entry>
</feed>
