mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 07:23:51 +01:00
feat: add ctx.prompt.form() API for multi-field form dialogs
Add PromptFormRequest and PromptFormResponse types to enable plugins to display forms with multiple input fields. Implement the form() method in the prompt context and wire up frontend event handling to show and collect form responses from users.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,6 +11,8 @@ import type {
|
||||
ListHttpRequestsRequest,
|
||||
ListHttpRequestsResponse,
|
||||
OpenWindowRequest,
|
||||
PromptFormRequest,
|
||||
PromptFormResponse,
|
||||
PromptTextRequest,
|
||||
PromptTextResponse,
|
||||
RenderGrpcRequestRequest,
|
||||
@@ -37,6 +39,7 @@ export interface Context {
|
||||
};
|
||||
prompt: {
|
||||
text(args: PromptTextRequest): Promise<PromptTextResponse['value']>;
|
||||
form(args: PromptFormRequest): Promise<PromptFormResponse['values']>;
|
||||
};
|
||||
store: {
|
||||
set<T>(key: string, value: T): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user