Skip to main content

OPEN_EDITOR_TOOL

Constant OPEN_EDITOR_TOOL 

Source
pub(crate) const OPEN_EDITOR_TOOL: &str = r#"{
  "name": "OpenEditor",
  "description": "Open a file in an AgentMux editor pane next to this conversation. Use when you want the user to see a file you're discussing or editing. Pass an absolute host path. Fire-and-forget: returns once the pane is opened.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "file":  { "type": "string", "description": "Absolute path to the file to open" },
      "title": { "type": "string", "description": "Optional tab/pane title (defaults to the file name)" },
      "split": { "type": "string", "enum": ["right", "left", "down", "up"], "description": "Where to place the new pane relative to this agent pane (default: right). Ignored when floating is true." },
      "collapse_tree": { "type": "boolean", "description": "Open the editor with its file-tree sidebar collapsed (just the file, no explorer). Default: false (tree expanded)." },
      "floating": { "type": "boolean", "description": "Open the file in a floating window (a chromeless pane over the app) instead of a docked split. Default: false." },
      "connection": { "type": "string", "description": "Where the file is: an SSH host (an ssh config alias, host, user@host or user@host:port; ConnList shows them), whose editor then opens on that host for the user. Absent or \"local\": this machine. An SSH host is reached as the user with their SSH keys, so the first use asks the user to allow it (an error says if they did not), and any ssh prompt goes to the user, never to you. The path is the host's own (~ is its home)." }
    },
    "required": ["file"]
  }
}"#;