<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/ai-term-backend-eat.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-07-02T14:33:34+00:00</updated>
<entry>
<title>feat(ai-term): auto-set each project's session color on fresh launch</title>
<updated>2026-07-02T14:33:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-02T14:33:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=75cf36183811a1a9208baf6d75b56c274debebca'/>
<id>urn:sha1:75cf36183811a1a9208baf6d75b56c274debebca</id>
<content type='text'>
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 &lt;name&gt; 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).
</content>
</entry>
<entry>
<title>feat(ai-term): render Claude Code session colors in dupre hues</title>
<updated>2026-07-02T14:20:08+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-02T14:20:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=82b195278b551839314edf1bfab37d5f54c432cb'/>
<id>urn:sha1:82b195278b551839314edf1bfab37d5f54c432cb</id>
<content type='text'>
Claude Code's /color picks a session accent from eight names, each emitted as a fixed xterm-256 index (probed against v2.1.198 by cycling /color in a scratch tmux session and reading the SGR codes). Agent terminals now pin all eight indices plus the bypass banner to dupre faces, so any /color choice renders in the theme's palette instead of stock xterm hues. dupre has no orange or pink, so those borrow red+1 and magenta+1. If a Claude Code update moves an index, the stock hue comes back (the alist docstring carries the re-probe note).
</content>
</entry>
<entry>
<title>feat(ai-term): paint the agent accent dupre blue</title>
<updated>2026-07-02T13:43:55+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-02T13:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=4b53b52507faef662a8f670b4b80cbe24290de95'/>
<id>urn:sha1:4b53b52507faef662a8f670b4b80cbe24290de95</id>
<content type='text'>
Claude Code draws its accent (the bypass-permissions banner, borders, spinner) with xterm-256 palette codes, and the stock rose red is palette index 211. eat resolves those codes through a per-terminal face vector, so agent terminals now point index 211 at the new cj/ai-term-accent face (dupre blue #67809c) at creation. Every other eat terminal keeps the true palette. Per-project colors can later ride the same per-terminal mechanism.
</content>
</entry>
<entry>
<title>refactor(ai-term): split into sessions, display, and EAT-backend layers</title>
<updated>2026-07-02T02:42:38+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-02T02:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=cf6dfae6ad311991ce0914370c04e60c284874b2'/>
<id>urn:sha1:cf6dfae6ad311991ce0914370c04e60c284874b2</id>
<content type='text'>
ai-term.el had grown to ~1,215 lines mixing project/tmux session discovery, window display policy, the EAT terminal backend, and the public commands, so a change to any one risked coupling to the others.

I extracted three layers, following the calendar-sync split shape: ai-term-sessions.el (discovery, tmux naming and parsing, launch command, picker ordering), ai-term-display.el (display-buffer actions and rule, toggle state, server-window routing), and ai-term-backend-eat.el (terminal create/reattach, pty send, EAT keymap). The backend file is named for its backend so a future one lands as a sibling. ai-term.el stays the public face (options, commands, keymap, shutdown), every name unchanged, so existing (require 'ai-term) callers and all 30 test files work as before.

The extracted layers forward-declare the face's defcustoms rather than requiring it, keeping the graph acyclic. I dropped the unused cl-lib and host-environment requires and added the three modules to the header-contract list.
</content>
</entry>
</feed>
