fix(omp): accept all command source types in slash command schema (#2175)

OmpRpcSlashCommandSchema had a strict source enum
['extension', 'prompt', 'skill', 'builtin'] that rejected omp
commands with source 'custom' or 'file'. When omp reported any such
command, the entire get_available_commands response failed Zod
validation and listCommands returned an empty array — so the Paseo
autocomplete only showed /exit and /clear instead of all omp commands.

Relax source to z.string().optional(), matching the already-permissive
OmpAvailableCommandSchema used for the available_commands_update event.
This commit is contained in:
Josh Bendavid
2026-07-22 21:47:09 +02:00
committed by GitHub
parent 35f5171477
commit 894fa8516e

View File

@@ -149,7 +149,7 @@ export const OmpRpcSlashCommandSchema = z
.object({
name: z.string(),
description: z.string().optional(),
source: z.enum(["extension", "prompt", "skill", "builtin"]),
source: z.string().optional(),
sourceInfo: z.record(z.string(), z.unknown()).optional(),
input: z.object({ hint: z.string().optional() }).passthrough().nullable().optional(),
})