How to remove a file or buffer from context? #487
-
From the For 2), maybe map the below to (defun gptel-clear-context ()
"Prompts for confirmation before clearing the `gptel-context--alist`."
(interactive)
(when (y-or-n-p "Are you sure you want to clear the gptel context? ")
(setq gptel-context--alist nil)
(message "Context cleared."))) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For 2: yes, I think it's a good idea to add a command to dump the context. There's a little more to it than resetting For 1: You can remove specific context chunks from the context inspection buffer. Press For regions or buffers, you can also clear context chunks from their destination locations, run |
Beta Was this translation helpful? Give feedback.
For 2: yes, I think it's a good idea to add a command to dump the context. There's a little more to it than resetting
gptel-context--alist
, see my response in #486.For 1: You can remove specific context chunks from the context inspection buffer. Press
d
to mark a context chunk for deletion,n
andp
to navigate, it's the same keybindings as dired/buffer-list/ibuffer:For regions or buffers, you can also clear context chunks from their destination locations, run
M-x gptel-add
again to toggle context.