aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ai-config--apply-model-selection.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-23 20:12:58 -0400
committerCraig Jennings <c@cjennings.net>2026-06-23 20:12:58 -0400
commit10fa6f4e2e7150ad99827721ada1ae4badcc5e90 (patch)
tree960065c8e69f1e7a4150ecf522e2f813c239b5ee /tests/test-ai-config--apply-model-selection.el
parentf4cc70c69e7707dd4a686637e14885f5443fcca6 (diff)
downloaddotemacs-10fa6f4e2e7150ad99827721ada1ae4badcc5e90.tar.gz
dotemacs-10fa6f4e2e7150ad99827721ada1ae4badcc5e90.zip
chore(ai): archive gptel and remove it from the live config
I archived gptel to archive/gptel/ since I rarely use it. Moved there: the six gptel modules (ai-config, ai-conversations, ai-conversations-browser, ai-mcp, ai-quick-ask, ai-rewrite), the gptel-tools/ directory, custom/gptel-prompts.el, their test files and utilities, and the four gptel-only specs. Scrubbed from the live config: the ai-config require in init.el, which also drops the whole C-; a keymap; the gptel-mode emojify hook in font-config.el; the gptel-tools entries in the Makefile clean target and the coverage runner; and the gptel feature notes in README. Cancelled the open gptel tasks in todo.org (the AI Open Work issues, the feature-extension brainstorm, the velox gptel-magit bug). ai-term stays. It is the ghostel Claude launcher, independent of gptel. Verified: every module loads, a batch init launch reaches completion clean, and the full test suite shows only pre-existing coverage failures unrelated to this change.
Diffstat (limited to 'tests/test-ai-config--apply-model-selection.el')
-rw-r--r--tests/test-ai-config--apply-model-selection.el45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/test-ai-config--apply-model-selection.el b/tests/test-ai-config--apply-model-selection.el
deleted file mode 100644
index 4ccd6d7a..00000000
--- a/tests/test-ai-config--apply-model-selection.el
+++ /dev/null
@@ -1,45 +0,0 @@
-;;; test-ai-config--apply-model-selection.el --- Tests for cj/--gptel-apply-model-selection -*- lexical-binding: t; -*-
-
-;;; Commentary:
-;; cj/--gptel-apply-model-selection is the apply step extracted from the
-;; interactive cj/gptel-change-model: it sets gptel-backend/gptel-model globally
-;; or buffer-locally and returns the confirmation message. The extraction also
-;; dropped a dead `(if (stringp model) ...)' branch (model is always a symbol by
-;; that point).
-
-;;; Code:
-
-(require 'ert)
-
-(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
-(require 'ai-config)
-
-(defvar gptel-backend)
-(defvar gptel-model)
-
-(ert-deftest test-ai-config-apply-model-global-sets-globals ()
- "Normal: global scope assigns the global vars and reports (global)."
- (let ((gptel-backend nil) (gptel-model nil))
- (let ((msg (cj/--gptel-apply-model-selection "global" 'mybackend 'mymodel "MyAI")))
- (should (eq gptel-backend 'mybackend))
- (should (eq gptel-model 'mymodel))
- (should (string-match-p "MyAI" msg))
- (should (string-match-p "mymodel" msg))
- (should (string-match-p "global" msg)))))
-
-(ert-deftest test-ai-config-apply-model-buffer-sets-buffer-locals ()
- "Normal: buffer scope makes the vars buffer-local and reports (buffer-local)."
- (let ((gptel-backend 'orig) (gptel-model 'origm))
- (with-temp-buffer
- (let ((msg (cj/--gptel-apply-model-selection "buffer" 'be 'mo "Name")))
- (should (local-variable-p 'gptel-backend))
- (should (local-variable-p 'gptel-model))
- (should (eq gptel-backend 'be))
- (should (eq gptel-model 'mo))
- (should (string-match-p "buffer-local" msg))))
- ;; outside the temp buffer the globals are untouched
- (should (eq gptel-backend 'orig))
- (should (eq gptel-model 'origm))))
-
-(provide 'test-ai-config--apply-model-selection)
-;;; test-ai-config--apply-model-selection.el ends here