donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
20 lines • 745 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WaitTool = void 0;
const Tool_1 = require("./Tool");
const ToolCallResult_1 = require("../models/ToolCallResult");
class WaitTool extends Tool_1.Tool {
constructor() {
super(WaitTool.NAME, 'Wait the given number of seconds.', 'WaitToolCoreParameters', 'WaitToolGptParameters');
}
async call(context, parameters) {
await context.page.waitForTimeout(parameters.seconds * 1000);
return ToolCallResult_1.ToolCallResult.successful();
}
async callFromGpt(context, parameters) {
return this.call(context, parameters);
}
}
exports.WaitTool = WaitTool;
WaitTool.NAME = 'wait';
//# sourceMappingURL=WaitTool.js.map