feat: add ctx.prompt.form() plugin API for multi-field form dialogs (#359)

This commit is contained in:
Gregory Schier
2026-01-10 08:55:43 -08:00
committed by GitHub
parent 6654d6c346
commit fe01796536
7 changed files with 72 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ import type {
ListHttpRequestsResponse,
ListWorkspacesResponse,
PluginContext,
PromptFormResponse,
PromptTextResponse,
RenderGrpcRequestResponse,
RenderHttpRequestResponse,
@@ -661,6 +662,13 @@ export class PluginInstance {
});
return reply.value;
},
form: async (args) => {
const reply: PromptFormResponse = await this.#sendForReply(context, {
type: 'prompt_form_request',
...args,
});
return reply.values;
},
},
httpResponse: {
find: async (args) => {