@ikuma.cloud/pix-mcp 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/package.json +1 -1
- package/src/index.ts +7 -2
package/README.md
CHANGED
|
@@ -301,8 +301,9 @@ commands behind:
|
|
|
301
301
|
|
|
302
302
|
In TUI mode, `/mcp-prompt` without arguments opens a native prompt selector
|
|
303
303
|
that shows the focused prompt's title and description, followed by native input
|
|
304
|
-
dialogs.
|
|
305
|
-
|
|
304
|
+
dialogs. Each dialog shows the argument description when the server provides
|
|
305
|
+
one. Required and optional arguments are requested in declaration order; leaving
|
|
306
|
+
an optional input empty omits it. The rendered prompt is placed in Pi's
|
|
306
307
|
editor so you can review or modify it before sending. Image blocks are stored in
|
|
307
308
|
private temporary files and inserted as `@` references. Escape cancels without
|
|
308
309
|
retrieving the prompt. The explicit `list` and `run` forms remain available in
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -460,9 +460,14 @@ export default function mcp(pi: ExtensionAPI) {
|
|
|
460
460
|
const dialogOptions = ctx.signal ? { signal: ctx.signal } : undefined;
|
|
461
461
|
const argumentTokens: PromptArgumentToken[] = [];
|
|
462
462
|
for (const argument of item.prompt.arguments ?? []) {
|
|
463
|
+
const description = compact(argument.description ?? "", 160);
|
|
464
|
+
const label = `${argument.name} (${argument.required ? "required" : "optional"})`;
|
|
465
|
+
const guidance = argument.required
|
|
466
|
+
? "Enter a value"
|
|
467
|
+
: "Leave empty to omit";
|
|
463
468
|
const value = await ctx.ui.input(
|
|
464
|
-
|
|
465
|
-
|
|
469
|
+
[label, description, guidance].filter(Boolean).join("\n"),
|
|
470
|
+
undefined,
|
|
466
471
|
dialogOptions,
|
|
467
472
|
);
|
|
468
473
|
if (value === undefined) return;
|