feat(dialog): handle dialogs (#212)

This commit is contained in:
Pavel Feldman
2025-04-17 14:03:13 -07:00
committed by GitHub
parent 4b261286bf
commit 6481100bdf
10 changed files with 461 additions and 15 deletions

View File

@@ -32,14 +32,22 @@ export type FileUploadModalState = {
fileChooser: playwright.FileChooser;
};
export type ModalState = FileUploadModalState;
export type DialogModalState = {
type: 'dialog';
description: string;
dialog: playwright.Dialog;
};
export type ModalState = FileUploadModalState | DialogModalState;
export type ToolActionResult = { content?: (ImageContent | TextContent)[] } | undefined | void;
export type ToolResult = {
code: string[];
action?: () => Promise<{ content?: (ImageContent | TextContent)[] } | undefined | void>;
action?: () => Promise<ToolActionResult>;
captureSnapshot: boolean;
waitForNetwork: boolean;
resultOverride?: { content?: (ImageContent | TextContent)[] };
resultOverride?: ToolActionResult;
};
export type Tool = {