From 75cf36183811a1a9208baf6d75b56c274debebca Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 10:33:34 -0400 Subject: feat(ai-term): auto-set each project's session color on fresh launch Every project now maps to a stable Claude Code session color: an override alist wins, else a character-sum hash of the project basename picks one of the eight names. When a fresh tmux session is created (never on reattach), a poller waits for the TUI to boot and types /color itself, with the Enter deferred a beat so the slash-command menu can't swallow it. Two refusals keep the injection safe: the bypass banner must be on screen (a bare shell never gets typed into) and the prompt line must still be empty (typed-ahead input is never corrupted). --- tests/test-ai-term--accent.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test-ai-term--accent.el') diff --git a/tests/test-ai-term--accent.el b/tests/test-ai-term--accent.el index 2f381bab..c5b0ecc5 100644 --- a/tests/test-ai-term--accent.el +++ b/tests/test-ai-term--accent.el @@ -120,6 +120,10 @@ (lambda (_buf _s) nil)) ((symbol-function 'display-buffer) (lambda (&rest _) nil)) + ((symbol-function 'cj/--ai-term-live-tmux-sessions) + (lambda () nil)) + ((symbol-function 'cj/--ai-term-schedule-color) + (lambda (_buffer _color) nil)) ((symbol-function 'cj/--ai-term-apply-accent) (lambda (buffer) (push (buffer-name buffer) applied)))) (cj/--ai-term-show-or-create "/tmp/accent-wire-test" name) -- cgit v1.2.3