Files
orca/src/shared/terminal-quick-command-capabilities.ts
T
Jinjing 42f59f3460 Allow saving quick command lists beyond forty (#32972)
* Allow saving quick command lists beyond forty

Preserve compatibility by limiting older clients to readable commands

* Cover quick command persistence across client capabilities

* Reject edits to hidden quick commands from stale clients
2026-10-24 10:42:55 -07:00

20 lines
1.1 KiB
TypeScript

// Why: older hosts lack the targeted settings RPCs and strip agentPrompt from
// terminal creation, so mobile must hide Quick Commands unless both are present.
export const TERMINAL_QUICK_COMMANDS_RUNTIME_CAPABILITY = 'terminal.quick-commands.v1' as const
// Why: prompts used to be capped at 6,000 characters. A host advertising this stores longer ones; a
// client advertising it can read them, so the host withholds longer prompts from older clients,
// which reject a whole list holding one. Transitional once no supported release lacks it.
export const TERMINAL_QUICK_COMMAND_LONG_PROMPTS_RUNTIME_CAPABILITY =
'terminal.quick-commands.long-prompts.v1' as const
// Older clients reject lists above forty; publish only a readable subset to them.
export const LEGACY_MAX_QUICK_COMMANDS = 40
export const TERMINAL_QUICK_COMMAND_LARGE_LISTS_RUNTIME_CAPABILITY =
'terminal.quick-commands.large-lists.v1' as const
export const TERMINAL_QUICK_COMMAND_RUNTIME_CAPABILITIES = [
TERMINAL_QUICK_COMMANDS_RUNTIME_CAPABILITY,
TERMINAL_QUICK_COMMAND_LONG_PROMPTS_RUNTIME_CAPABILITY,
TERMINAL_QUICK_COMMAND_LARGE_LISTS_RUNTIME_CAPABILITY
] as const