diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-11 07:18:20 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-11 07:18:20 -0500 |
| commit | 4000330e5e6536f64f404c1cabc8dc86d9556bb5 (patch) | |
| tree | bb0ad65fb1cb9b1dba629998fe2983a9a3020fa7 /tests/test-vterm-tmux-history.el | |
| parent | 56680633ea0e1b549fd7087c1f9d6d1abf9f0690 (diff) | |
| download | dotemacs-4000330e5e6536f64f404c1cabc8dc86d9556bb5.tar.gz dotemacs-4000330e5e6536f64f404c1cabc8dc86d9556bb5.zip | |
refactor(ai-vterm): rename Claude-specific names to a generic "agent"
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 [<basename>]` -> `agent [<basename>]` (the `defconst` and the matching display-buffer-alist regex move together)
- `cj/ai-vterm-claude-command` -> `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` -> `-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.
Diffstat (limited to 'tests/test-vterm-tmux-history.el')
| -rw-r--r-- | tests/test-vterm-tmux-history.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-vterm-tmux-history.el b/tests/test-vterm-tmux-history.el index db82176f..901d96c9 100644 --- a/tests/test-vterm-tmux-history.el +++ b/tests/test-vterm-tmux-history.el @@ -164,13 +164,13 @@ modern keyboards and was redundant." "Normal: an AI-vterm-named buffer still resolves by process TTY. The copy path belongs to `vterm-mode', not to `*vterm*'-named buffers. -A buffer named like `claude [repo]' (ai-vterm.el's naming) is a +A buffer named like `agent [repo]' (ai-vterm.el's naming) is a `vterm-mode' buffer and must inherit tmux history copy. The pane lookup keys off the live process TTY, never the buffer name -- so the AI-vterm name neither helps nor blocks resolution." - (let ((claude (cj/test--make-fake-vterm-buffer "claude [emacs.d]"))) + (let ((agent (cj/test--make-fake-vterm-buffer "agent [emacs.d]"))) (unwind-protect - (with-current-buffer claude + (with-current-buffer agent (cl-letf (((symbol-function 'get-buffer-process) (lambda (_buffer) 'fake-process)) ((symbol-function 'process-tty-name) @@ -179,8 +179,8 @@ AI-vterm name neither helps nor blocks resolution." '((("list-clients" "-F" "#{client_tty}\t#{pane_id}") 0 "/dev/pts/1\t%1\n/dev/pts/8\t%8\n")) (should (equal (cj/vterm--current-tmux-pane-id) "%8"))))) - (when (buffer-live-p claude) - (kill-buffer claude))))) + (when (buffer-live-p agent) + (kill-buffer agent))))) (provide 'test-vterm-tmux-history) ;;; test-vterm-tmux-history.el ends here |
