UNPKG

donobu

Version:

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

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