diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-27 20:49:23 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-27 20:49:23 -0500 |
| commit | fa924acccc2e85bc39433cae608dcc9292795ed2 (patch) | |
| tree | ea45ee899bf152620f0d7f464bd84ede90661a2d /todo.org | |
| parent | 7833fb8bc0e3f9ece01ab2fe6fe07ded0efc4af4 (diff) | |
| download | dotemacs-fa924acccc2e85bc39433cae608dcc9292795ed2.tar.gz dotemacs-fa924acccc2e85bc39433cae608dcc9292795ed2.zip | |
feat(ai): remember the AI-Assistant panel width across toggles
The *AI-Assistant* side window always opened at a fixed 0.4 width, so resizing it by hand was lost the next time it opened. Now the F-key toggle captures the panel's width when it closes and reopens at that width for the rest of the session, the same way the music playlist remembers its height.
The panel has three entry points that all open the same buffer: the toggle, loading a saved conversation, and escalating a quick-ask. I gave them one shared remembered-width var (cj/--ai-assistant-width, owned by ai-config; the other two forward-declare it to avoid a circular require), so the panel comes back at one consistent width whichever door opens it. Capture lives only in the toggle's close path; the other two just replay.
One latent edge: ai-conversations replays with its configurable side, which defaults to right. If that's ever set to top or bottom, the remembered width fraction would land as a height. It can't happen at the default, so I left it as a known edge rather than complicating the call now.
The escalation test needed a top-level defvar for the shared var: a value-less defvar in the module is only file-local to the byte-compiler, so without it the function read the var dynamically and hit void when the test loaded ai-quick-ask without ai-config. ai-quick-ask 13/13 and ai-conversations 47/47 green.
Diffstat (limited to 'todo.org')
0 files changed, 0 insertions, 0 deletions
