Function: eca-chat-rename

eca-chat-rename is an interactive and natively compiled function defined in eca-chat.el.

Signature

(eca-chat-rename)

Documentation

Rename last visited chat to a custom NEW-NAME.

Key Bindings

eca-chat-mode-map C-c C-S-r

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-rename ()
  "Rename last visited chat to a custom NEW-NAME."
  (interactive)
  (let ((new-name (read-string "Inform the new chat title: ")))
    (eca-assert-session-running (eca-session))
    (with-current-buffer (eca-chat--get-active-buffer (eca-session))
      ;; Update local title immediately for responsiveness
      (setq-local eca-chat--title new-name)
      ;; Clear any custom title since we now have an official title
      (setq-local eca-chat--custom-title nil)
      (eca-chat--invalidate-tab-line-cache (eca-session))
      ;; Request server to persist and broadcast to other clients
      (eca-api-request-sync (eca-session)
                            :method "chat/update"
                            :params (list :chatId eca-chat--id :title new-name))
      (eca-chat--notify-status-changed (eca-session)))))