From 47b218ed15acd00c18cbc3bef604c4f2e0050a08 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 7 May 2026 19:25:18 -0500 Subject: feat(ai-vterm): add Claude launcher with vertical-split vterm 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 []` 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 -> use-some-window -> 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. --- modules/ai-config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/ai-config.el') diff --git a/modules/ai-config.el b/modules/ai-config.el index d3765ab8..779862bc 100644 --- a/modules/ai-config.el +++ b/modules/ai-config.el @@ -28,6 +28,8 @@ ;;; Code: +(require 'keybindings) ;; provides cj/custom-keymap + (autoload 'cj/gptel-save-conversation "ai-conversations" "Save the AI conversation to a file." t) (autoload 'cj/gptel-load-conversation "ai-conversations" "Load a saved AI conversation." t) (autoload 'cj/gptel-delete-conversation "ai-conversations" "Delete a saved AI conversation." t) @@ -310,7 +312,7 @@ Works for any buffer, whether it's visiting a file or not." :defer t :commands (gptel gptel-send gptel-menu) :bind - (("" . cj/toggle-gptel) + (("C-" . cj/toggle-gptel) :map gptel-mode-map ("C-" . gptel-send)) :custom -- cgit v1.2.3