<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-ai-config-gptel-commands.el, branch load-graph-classify-start</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-14T06:26:28+00:00</updated>
<entry>
<title>test(ai-config): cover gptel switch/add/toggle commands + small helpers</title>
<updated>2026-05-14T06:26:28+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-14T06:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a9a9e56148e9ab83f9abc4e4c531be86974364d1'/>
<id>urn:sha1:a9a9e56148e9ab83f9abc4e4c531be86974364d1</id>
<content type='text'>
Second pass on ai-config. First batch covered the auth-source, API-key caching, file-context, clear-buffer, context-clear, and model-heading helpers. This batch covers the gptel command wrappers and a couple of small helpers:

- `cj/gptel--refresh-org-prefix`: refreshes the org-mode entry in `gptel-prompt-prefix-alist`.
- `cj/gptel-backend-and-model`: formats a vector-backend's name + the current model + a timestamp; falls back to "AI:" when no backend is bound.
- `cj/gptel-switch-backend`: picks a backend and one of its models, updates both gptel vars; errors on an invalid backend choice.
- `cj/gptel-add-buffer-file`: hands the visited file off to `cj/gptel--add-file-to-context`, messages otherwise.
- `cj/gptel-add-this-buffer`: calls `gptel-add` with the (4) prefix-arg.
- `cj/toggle-gptel`: deletes the window when *AI-Assistant* is already shown.

gptel and projectile primitives are stubbed throughout.
</content>
</entry>
</feed>
