fix(mcp): preserve exact guided prompt context (#761)

Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
Rudy Mizrahi Celekli
2026-10-07 02:36:31 +08:00
committed by GitHub
parent cffc548cd3
commit 66c26f280b
2 changed files with 52 additions and 2 deletions
+5 -1
View File
@@ -82,7 +82,11 @@ const argumentSchema = (
argument: PromptArgumentContract,
completion: PromptCompletionSource,
): z.ZodType => {
const value = z.string().trim().min(1).describe(argument.description);
const value = z
.string()
.min(1)
.refine((value) => value.trim().length > 0)
.describe(argument.description);
const kind = argument.completion;
const completed =
kind === undefined