mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
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:
@@ -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(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user