Autoload gptel-context commands manually

This commit is contained in:
Jeremy Dormitzer 2024-08-20 11:06:37 -04:00
parent d1147a81c3
commit 685230b4a8

View File

@ -5,6 +5,10 @@
(use-package gptel (use-package gptel
:commands (gptel-request) :commands (gptel-request)
:init
;; Annoyingly, gptel fails to require gptel-context, so we have to do it manually
(autoload 'gptel-context-add "gptel-context")
(autoload 'gptel-context-add-file "gptel-context")
:config :config
;; Default to creating a new buffer when invoking gptel ;; Default to creating a new buffer when invoking gptel
(defun gptel-before-advice (name &optional _ initial interactivep) (defun gptel-before-advice (name &optional _ initial interactivep)