UNPKG

@hyperbrowser/agent

Version:

Hyperbrowsers Web Agent

26 lines (25 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ThinkingActionDefinition = exports.ThinkingAction = void 0; const zod_1 = require("zod"); exports.ThinkingAction = zod_1.z .object({ thought: zod_1.z .string() .describe("Think about what your current course of action, and your future steps, and what difficulties you might encounter, and how you'd tackle them."), }) .describe(`Think about a course of action. Think what your current task is, what your next should be, and how you would possibly do that. This step is especially useful if performing a complex task, and/or working on a visually complex page (think nodes > 300).`); exports.ThinkingActionDefinition = { type: "thinkAction", actionParams: exports.ThinkingAction, run: async (ctx, action) => { const { thought } = action; return { success: true, message: `A simple thought process about your next steps. You thought about: ${thought}`, }; }, pprintAction: function (params) { return `Think about: "${params.thought}"`; }, };