UNPKG

donobu

Version:

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

27 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowsAiQueriesApi = void 0; /** * API controller for retrieving AI query records within Donobu flows. * * AI queries represent the decision cycles where the AI analyzed the current * page state (via clean and annotated screenshots) before deciding on the next * action. Each record includes the screenshots the AI was shown, the * interactable elements it could choose from, and any error that occurred * during the query. */ class FlowsAiQueriesApi { constructor(donobuFlowsManager) { this.donobuFlowsManager = donobuFlowsManager; } /** * Retrieves all AI query records for a specific flow, ordered by query time. */ async getAiQueries(req, res) { const flowId = String(req.params.flowId); const aiQueries = await this.donobuFlowsManager.getAiQueries(flowId); res.json(aiQueries); } } exports.FlowsAiQueriesApi = FlowsAiQueriesApi; //# sourceMappingURL=FlowsAiQueriesApi.js.map