Function: eca-chat-drop-context-from-system-prompt
eca-chat-drop-context-from-system-prompt is an interactive and
natively compiled function defined in eca-chat.el.
Signature
(eca-chat-drop-context-from-system-prompt &optional ARG)
Documentation
Drop context from system prompt in chat if found.
if ARG is current prefix, ask for file, otherwise drop current file.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
;;;###autoload
(defun eca-chat-drop-context-from-system-prompt (&optional arg)
"Drop context from system prompt in chat if found.
if ARG is current prefix, ask for file, otherwise drop current file."
(interactive "P")
(eca-assert-session-running (eca-session))
(-let ((path (if (equal arg '(4))
(read-file-name "Select the file to drop from context: " (funcall eca-find-root-for-buffer-function))
(buffer-file-name))))
(eca-chat--with-current-buffer (eca-chat--get-last-buffer (eca-session))
(eca-chat--remove-context (list :type "file"
:path path))
(eca-chat-open (eca-session)))))