Function: eca-mcp-open-menu

eca-mcp-open-menu is an interactive and natively compiled function defined in eca-mcp.el.

Signature

(eca-mcp-open-menu &optional EVENT)

Documentation

Open a popup menu for MCP-related settings.

With EVENT, show a mouse popup. Without it, prompt in minibuffer.

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-mcp.el
(defun eca-mcp-open-menu (&optional event)
  "Open a popup menu for MCP-related settings.
With EVENT, show a mouse popup.  Without it, prompt in minibuffer."
  (interactive (list (when (mouse-event-p last-input-event)
                       last-input-event)))
  (eca-assert-session-running (eca-session))
  (let ((choice
         (if (and event (display-popup-menus-p))
             (x-popup-menu
              event
              (list "Config"
                    (cons "MCPs" eca-mcp-menu-items)))
           (let* ((labels (mapcar #'car eca-mcp-menu-items))
                  (label (completing-read "Open MCP settings: "
                                          labels nil t)))
             (cdr (assoc label eca-mcp-menu-items))))))
    (when choice
      (eca-mcp--open-menu-choice choice))))