aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ai-term--accent.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-02 10:33:34 -0400
committerCraig Jennings <c@cjennings.net>2026-07-02 10:33:34 -0400
commit75cf36183811a1a9208baf6d75b56c274debebca (patch)
tree5b81eae8299a603cfc2c19fd416f456ca4e39121 /tests/test-ai-term--accent.el
parent82b195278b551839314edf1bfab37d5f54c432cb (diff)
downloaddotemacs-75cf36183811a1a9208baf6d75b56c274debebca.tar.gz
dotemacs-75cf36183811a1a9208baf6d75b56c274debebca.zip
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 <name> 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).
Diffstat (limited to 'tests/test-ai-term--accent.el')
-rw-r--r--tests/test-ai-term--accent.el4
1 files changed, 4 insertions, 0 deletions
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)