fix(init-ai): prevent unwanted autocompletion in agent-shell

This commit is contained in:
kj
2026-09-05 12:14:19 -03:00
parent 6a633a806c
commit 2e51bbb969

View File

@@ -229,13 +229,18 @@ content do not break gptel-magit."
(setq agent-shell-transcript-file-path-function nil) (setq agent-shell-transcript-file-path-function nil)
(setq shell-maker-prompt-before-killing-buffer nil) (setq shell-maker-prompt-before-killing-buffer nil)
;; Quitar cape-dabbrev y cape-history de agent-shell (evita autocompletar texto del buffer) ;; Quitar cape-dabbrev, cape-history, comint-completion-at-point y el centinela t
;; de agent-shell (evita autocompletar texto del buffer o historial de prompts previos)
(add-hook 'agent-shell-mode-hook (add-hook 'agent-shell-mode-hook
(lambda () (lambda ()
(remove-hook 'completion-at-point-functions #'cape-dabbrev t)
(remove-hook 'completion-at-point-functions #'cape-history t)
(remove-hook 'completion-at-point-functions #'comint-completion-at-point t)
(setq-local completion-at-point-functions (setq-local completion-at-point-functions
(seq-remove (lambda (fn) (delq t completion-at-point-functions))
(memq fn '(cape-dabbrev cape-history))) (setq-local corfu-auto nil))
completion-at-point-functions))))) t) ;; :append para correr DESPUÉS de que agent-shell configure sus CAPFs
)
(provide 'init-ai) (provide 'init-ai)
;;; init-ai.el ends here ;;; init-ai.el ends here