interface Action<T> {
    description?: string;
    forUser?: boolean;
    handler: ActionHandler<T>;
    keys?: null | (string | number)[];
    mcpDescription?: string;
    name: T;
    when?: (() => boolean);
}

Type Parameters

  • T extends string = string

Properties

description?: string

Description

forUser?: boolean

user can set keybinding or list in action manager

handler: ActionHandler<T>

Handler

keys?: null | (string | number)[]

Associate shortcuts

mcpDescription?: string

Description for MCP (Model Context Protocol) including parameter types and notes for AI models

name: T

Name

when?: (() => boolean)

When should execute handler