UNPKG

donobu

Version:

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

20 lines 798 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReloadPageTool = void 0; const Tool_1 = require("./Tool"); const ToolCallResult_1 = require("../models/ToolCallResult"); class ReloadPageTool extends Tool_1.Tool { constructor() { super(ReloadPageTool.NAME, 'Reload the current page (maps to Playwright Page::reload).', 'ReloadPageToolCoreParameters', 'ReloadPageToolGptParameters'); } async call(context, _parameters) { await context.page.reload(); return ToolCallResult_1.ToolCallResult.successful(); } async callFromGpt(context, parameters) { return this.call(context, parameters); } } exports.ReloadPageTool = ReloadPageTool; ReloadPageTool.NAME = 'reloadPage'; //# sourceMappingURL=ReloadPageTool.js.map