/** * UI commands: commands the frontend runs itself. They are registered with * the engine (`ui.registerCommands`) so `listCommands`, the palette, the * keymap and agents see them; running one through the engine comes back as * a `uiCommand` event. Components supply the behaviour with * `useCommandsStore().provide(id, handler)`; a UI command nobody provides * is disabled. */ /** A UI command as registered with the engine. */ export interface UiCommandSpec { /** Command id, `area.action` in camelCase. */ id: string; /** Catalog key of the label. */ labelKey: string; /** Menu path with `/` separators. */ menuPath?: string; /** Default shortcut in Lutra notation. */ defaultShortcut?: string; } /** The frontend's UI commands. */ export const UI_COMMANDS: readonly UiCommandSpec[] = [ { id: "editor.reveal", labelKey: "command.editor.reveal" }, { id: "find.open", labelKey: "command.find.open", defaultShortcut: "Mod+Alt+F" }, { id: "palette.open", labelKey: "command.palette.open", defaultShortcut: "Mod+Shift+P" }, { id: "settings.open", labelKey: "command.settings.open", defaultShortcut: "Mod+," }, { id: "view.toggleProjectTree", labelKey: "command.view.toggleProjectTree", defaultShortcut: "Mod+1" }, ];