Function: eca-workspaces-delete

eca-workspaces-delete is an interactive and natively compiled function defined in eca-workspaces.el.

Signature

(eca-workspaces-delete)

Documentation

Delete the chat or stop the workspace at point, with confirmation.

Key Bindings

eca-workspaces-mode-map <deletechar> eca-workspaces-mode-map DEL eca-workspaces-mode-map d

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-workspaces.el
(defun eca-workspaces-delete ()
  "Delete the chat or stop the workspace at point, with confirmation."
  (interactive)
  (let ((chat-buffer (eca-workspaces--chat-buffer-at-point))
        (session (eca-workspaces--session-at-point)))
    (cond
     (chat-buffer
      (when (y-or-n-p (format "Delete chat '%s' from server? "
                              (with-current-buffer chat-buffer
                                (substring-no-properties (eca-chat-title)))))
        (with-current-buffer chat-buffer
          (eca-chat-delete))
        (eca-workspaces--schedule-refresh)))
     (session
      (when (y-or-n-p (format "Stop ECA session '%s'? "
                              (eca--session-project-name session)))
        (eca-stop-session session)
        (eca-workspaces--schedule-refresh)))
     (t (user-error "No chat or workspace at point")))))