UNPKG

rosie-cli

Version:

AI-powered command-line interface tool that uses OpenAI's API to help you interact with your computer through natural language

33 lines (32 loc) 830 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExecutionContext = void 0; const uuid_1 = require("uuid"); class ExecutionContext { constructor(historyId) { this.answerHistory = []; this.currentAnswer = null; this.params = {}; this.historyId = historyId || (0, uuid_1.v4)(); } getHistoryId() { return this.historyId; } setHistoryId(id) { this.historyId = id; } update(update) { this.currentAnswer = update.answer; this.answerHistory.push({ answer: update.answer, actions: update.actions }); } getAnswerHistory() { return this.answerHistory; } getAnswer() { return this.currentAnswer; } } exports.ExecutionContext = ExecutionContext;