UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

23 lines 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PauseForUserInteractionTool = void 0; const Tool_1 = require("./Tool"); const ToolCallResult_1 = require("../models/ToolCallResult"); /** * This tool pauses the script to let the user interact with the webpage manually. */ class PauseForUserInteractionTool extends Tool_1.Tool { constructor() { super(PauseForUserInteractionTool.NAME, 'Temporarily pause Playwright script execution so that the user can interact with the webpage.', 'PauseForUserInteractionToolCoreParameters', 'PauseForUserInteractionToolGptParameters'); } async call(context, _parameters) { context.metadata.nextState = 'PAUSED'; return ToolCallResult_1.ToolCallResult.successful(); } async callFromGpt(context, parameters) { return this.call(context, parameters); } } exports.PauseForUserInteractionTool = PauseForUserInteractionTool; PauseForUserInteractionTool.NAME = 'pauseForUserInteraction'; //# sourceMappingURL=PauseForUserInteractionTool.js.map