<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/ai-conversations.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-05-28T01:49:23+00:00</updated>
<entry>
<title>feat(ai): remember the AI-Assistant panel width across toggles</title>
<updated>2026-05-28T01:49:23+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-28T01:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=fa924acccc2e85bc39433cae608dcc9292795ed2'/>
<id>urn:sha1:fa924acccc2e85bc39433cae608dcc9292795ed2</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(ai-conversations): autosave on a periodic timer</title>
<updated>2026-05-16T22:39:56+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-16T22:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1fef9aed248aaf7586950475aa22849e413f1c04'/>
<id>urn:sha1:1fef9aed248aaf7586950475aa22849e413f1c04</id>
<content type='text'>
The existing autosave only fired after gptel-send returned, so a
conversation paused mid-thought wasn't on disk if Emacs crashed. I
added a buffer-local repeating timer that calls
cj/gptel--save-buffer-to-file every cj/gptel-autosave-interval seconds
(default 60) for as long as cj/gptel--autosave-active-p holds.
Toggle-off and kill-buffer-hook cancel it cleanly.

Tests cover start/stop idempotency, the active-p predicate, the
kill-buffer cleanup hook, and the toggle integration.
</content>
</entry>
<entry>
<title>feat(ai-conversations): add cj/gptel-autosave-toggle with [AS] mode-line indicator</title>
<updated>2026-05-16T06:42:30+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-16T06:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a8c7e8bf822535470d1a4621030b0edd07aaccb4'/>
<id>urn:sha1:a8c7e8bf822535470d1a4621030b0edd07aaccb4</id>
<content type='text'>
`cj/gptel-autosave-enabled` flipped to t inside the save/load entry
points with no way back off short of editing the variable or
clearing the buffer, and no visible indicator that it was on.

Two pieces:

- `cj/gptel-autosave-toggle` flips the buffer-local state in the
  current GPTel buffer.  Bound to `C-; a A` via `cj/ai-keymap`
  (which-key: "toggle autosave").  When autosave is OFF and no
  filepath is configured yet, the command prompts to save the
  conversation first so a save target exists; otherwise it just
  flips the bit.
- `cj/gptel-autosave-mode-line-format` surfaces " [AS]" in the
  mode-line when autosave is on, blank when off.  Installed via a
  `gptel-mode-hook` so every GPTel buffer picks it up.  The install
  helper is idempotent.

6 new tests cover enable/disable paths, the no-filepath prompt path,
the not-a-gptel-buffer error path, the mode-line format evaluation,
and the install idempotence.
</content>
</entry>
<entry>
<title>chore: Remove redundant autoload directives from modules</title>
<updated>2025-10-27T04:06:31+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T04:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=cd64af4642fd54a4d7b7be93bfb317fc64f623a6'/>
<id>urn:sha1:cd64af4642fd54a4d7b7be93bfb317fc64f623a6</id>
<content type='text'>
Remove unnecessary autoload directives from various functions across
multiple modules, cleaning up the codebase and improving
readability. These directives were redundant and not needed for the
current project setup.
</content>
</entry>
<entry>
<title>changing repositories</title>
<updated>2025-10-12T16:47:26+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-12T16:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=092304d9e0ccc37cc0ddaa9b136457e56a1cac20'/>
<id>urn:sha1:092304d9e0ccc37cc0ddaa9b136457e56a1cac20</id>
<content type='text'>
</content>
</entry>
</feed>
