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 | 59b0854464ef29511a0d09f1e76fd1140e675833 (patch) | |
| tree | 0c18aee463b4ff14f2fa6675e2cde6fc5f50bbdc /tests/test-ai-vterm--pick-project.el | |
| parent | de555fa8b48c5ed5f17c0a8db9de7ecb946aa75d (diff) | |
| download | dotemacs-59b0854464ef29511a0d09f1e76fd1140e675833.tar.gz dotemacs-59b0854464ef29511a0d09f1e76fd1140e675833.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-ai-vterm--pick-project.el')
| -rw-r--r-- | tests/test-ai-vterm--pick-project.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-ai-vterm--pick-project.el b/tests/test-ai-vterm--pick-project.el index a90fe822..f332589a 100644 --- a/tests/test-ai-vterm--pick-project.el +++ b/tests/test-ai-vterm--pick-project.el @@ -69,7 +69,7 @@ Works whether COLLECTION is an alist or a completion-table function." '("/c/baz [detached]" "/c/bar" "/c/foo")))))) (ert-deftest test-ai-vterm--format-candidate-flags-running-project () - "Normal: a path whose claude buffer has a live process gets a [running] suffix." + "Normal: a path whose agent buffer has a live process gets a [running] suffix." (let* ((path (expand-file-name "~/code/already-running")) (buffer-name (cj/--ai-vterm-buffer-name path)) (buf (get-buffer-create buffer-name))) @@ -107,7 +107,7 @@ Works whether COLLECTION is an alist or a completion-table function." (ert-deftest test-ai-vterm--format-candidate-omits-flag-when-not-running () "Boundary: a path with no buffer or no live process -> plain abbreviated path." (let ((path (expand-file-name "~/code/not-running"))) - ;; Make sure no claude buffer exists for this path. + ;; Make sure no agent buffer exists for this path. (let ((bn (cj/--ai-vterm-buffer-name path))) (when (get-buffer bn) (kill-buffer bn))) (should (equal (cj/--ai-vterm-format-candidate path) |
