diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b5d808f..68256f2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,17 @@ Open the folder in Visual Studio Code by running: code . ``` -### 4. Install Dependencies +### 4. Local PyPI Packages + +Update `src/py_scripts/requirements.txt` with the following content, to use the local editable installations of the PyPI packages: + +``` +urllib3==1.25.11 +-e {{absolute path to cloned sirji repo}}/messages +-e {{absolute path to cloned sirji repo}}/agents +``` + +### 5. Install Dependencies Install the project dependencies: @@ -53,15 +63,15 @@ Install the project dependencies: npm install ``` -### 5. Compile TypeScript +### 7. Compile TypeScript Compile the TypeScript code to JavaScript: ```zsh -npm run compile +npm run watch ``` -### 6. Run Sirji in Debug Mode +### 8. Run Sirji in Debug Mode To start debugging the extension and see your changes in action, follow these steps: @@ -77,7 +87,7 @@ To start debugging the extension and see your changes in action, follow these st - Press the **Start Debugging** button (the green play icon) to launch a new VS Code window (Extension Development Host) where the extension will be loaded. -### 7. Activating Sirji +### 9. Activating Sirji To activate the extension in the Extension Development Host: @@ -95,6 +105,6 @@ To contribute to one of the PyPI packages (`sirji-agents`, `sirji-messages`, `si ## Questions or Issues? -If you face any issues or have questions about contributing, don’t hesitate to open an issue in our GitHub repository. We're here to help and look forward to your contributions! +If you run into any issues or have suggestions, please report them by following our [issue reporting guidelines](./ISSUES.md). Your reports help us make Sirji better for everyone. Thank you for considering contributing to Sirji. Happy coding! diff --git a/agents/requirements.txt b/agents/requirements.txt index 6b0d326a..0ba0059b 100644 --- a/agents/requirements.txt +++ b/agents/requirements.txt @@ -1,3 +1,3 @@ -sirji-messages==0.0.13 +sirji-messages==0.0.14 sirji-tools==0.0.9 openai==1.14.1 diff --git a/agents/setup.py b/agents/setup.py index a87c1d77..ad2296df 100644 --- a/agents/setup.py +++ b/agents/setup.py @@ -2,7 +2,7 @@ setup( name='sirji-agents', - version='0.0.18', + version='0.0.19', author='Sirji', description='Research, Coding and Planning agents used by Sirji.', license='MIT', diff --git a/agents/sirji_agents/llm/base.py b/agents/sirji_agents/llm/base.py index 052597bf..43d40a43 100644 --- a/agents/sirji_agents/llm/base.py +++ b/agents/sirji_agents/llm/base.py @@ -91,7 +91,7 @@ def __call_llm(self, conversation): chat_completion = self.client.chat.completions.create( messages=history, - model="gpt-4-turbo-preview", + model="gpt-4-turbo", temperature=0, max_tokens=4095, ) diff --git a/agents/sirji_agents/researcher/README.md b/agents/sirji_agents/researcher/README.md index 54fb0609..579c915a 100644 --- a/agents/sirji_agents/researcher/README.md +++ b/agents/sirji_agents/researcher/README.md @@ -21,4 +21,4 @@ In this part, the LLM model is called to infer using a prompt that has both the ## Fun Fact -When developing the Researcher module, we needed to go through the OpenAI Assistants API documentation. This documentation was outside the knowledge of our LLM (gpt-4-turbo-preview). So the model was not able to assist us in development. Rather than going through the documentation manually, we thought of using the Sirji approach to research. We manually indexed (manual, since the automated process is what we needed to develop) a new assistant with the PDF prints of the documentation. After this indexing, the assistant helped us to write the Researcher. This also proved to us that the Sirji way of research works! +When developing the Researcher module, we needed to go through the OpenAI Assistants API documentation. This documentation was outside the knowledge of our LLM (gpt-4-turbo). So the model was not able to assist us in development. Rather than going through the documentation manually, we thought of using the Sirji approach to research. We manually indexed (manual, since the automated process is what we needed to develop) a new assistant with the PDF prints of the documentation. After this indexing, the assistant helped us to write the Researcher. This also proved to us that the Sirji way of research works! diff --git a/agents/sirji_agents/researcher/embeddings/openai_assistant.py b/agents/sirji_agents/researcher/embeddings/openai_assistant.py index d0625f0c..a1eeafdb 100644 --- a/agents/sirji_agents/researcher/embeddings/openai_assistant.py +++ b/agents/sirji_agents/researcher/embeddings/openai_assistant.py @@ -105,7 +105,7 @@ def _create_assistant(self): name="Research Assistant", instructions="As a research assistant, your task is to address problem statements programmatically. In your response, include code examples, GitHub URLs, relevant external URLs based on your trained knowledge. Also, if knowledge on additional terms is needed, mention them in your response. Avoid providing fabricated information if uncertain.", tools=[{"type": "retrieval"}], - model="gpt-4-turbo-preview", + model="gpt-4-turbo", ) logger.info("Completed creating a new assistant") diff --git a/agents/sirji_agents/researcher/inferer/openai_assistant.py b/agents/sirji_agents/researcher/inferer/openai_assistant.py index 79eb45ee..13314dda 100644 --- a/agents/sirji_agents/researcher/inferer/openai_assistant.py +++ b/agents/sirji_agents/researcher/inferer/openai_assistant.py @@ -89,7 +89,7 @@ def _fetch_response(self): run = self.client.beta.threads.runs.create( thread_id=self.init_payload['thread_id'], assistant_id=self.assistant_id, - model="gpt-4-turbo-preview", + model="gpt-4-turbo", tools=[{"type": "retrieval"}] ) diff --git a/messages/setup.py b/messages/setup.py index b02bd249..89efc7de 100644 --- a/messages/setup.py +++ b/messages/setup.py @@ -2,7 +2,7 @@ setup( name='sirji-messages', - version='0.0.13', + version='0.0.14', author='Sirji', description='Sirji messaging protocol implementation to create, validate and parse messages.', license='MIT', diff --git a/messages/sirji_messages/messages/actions/create_file.py b/messages/sirji_messages/messages/actions/create_file.py index 2623b62b..c8372f4c 100644 --- a/messages/sirji_messages/messages/actions/create_file.py +++ b/messages/sirji_messages/messages/actions/create_file.py @@ -22,7 +22,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "file_name": "File name along with the path.", + "file_name": "File name along with the path relative to the workspace root folder.", "content": "Multiline file content. It should start from a new line." }) diff --git a/messages/sirji_messages/messages/actions/execute_command.py b/messages/sirji_messages/messages/actions/execute_command.py index 94e395f6..21232725 100644 --- a/messages/sirji_messages/messages/actions/execute_command.py +++ b/messages/sirji_messages/messages/actions/execute_command.py @@ -20,7 +20,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "command": "Command to execute." + "command": "Command to execute, considering workspace root folder as current working directory." }) def description(self): diff --git a/messages/sirji_messages/messages/actions/install_package.py b/messages/sirji_messages/messages/actions/install_package.py index 95adc775..ac5f27ce 100644 --- a/messages/sirji_messages/messages/actions/install_package.py +++ b/messages/sirji_messages/messages/actions/install_package.py @@ -20,7 +20,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "command": "Command to install the package or library." + "command": "Command to execute, considering workspace root folder as current working directory." }) def description(self): diff --git a/messages/sirji_messages/messages/actions/read_dir.py b/messages/sirji_messages/messages/actions/read_dir.py index 0877fa4b..eb2eef38 100644 --- a/messages/sirji_messages/messages/actions/read_dir.py +++ b/messages/sirji_messages/messages/actions/read_dir.py @@ -20,7 +20,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "dir_path": "Name of a directory alongwith the path.", + "dir_path": "Name of a directory alongwith the path relative to the workspace root folder.", }) def description(self): diff --git a/messages/sirji_messages/messages/actions/read_file.py b/messages/sirji_messages/messages/actions/read_file.py index 80a936ea..b78a4496 100644 --- a/messages/sirji_messages/messages/actions/read_file.py +++ b/messages/sirji_messages/messages/actions/read_file.py @@ -20,7 +20,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "file_name": "File name along with the path.", + "file_name": "File name along with the path relative to the workspace root folder.", }) def description(self): diff --git a/messages/sirji_messages/messages/actions/run_server.py b/messages/sirji_messages/messages/actions/run_server.py index a06d3658..72f6801c 100644 --- a/messages/sirji_messages/messages/actions/run_server.py +++ b/messages/sirji_messages/messages/actions/run_server.py @@ -20,7 +20,7 @@ def template_payload_part(self): def sample(self): return self.generate({ - "command": "Command to start server process." + "command": "Command to start server process. This command should be relative to the workspace root folder." }) def description(self): diff --git a/messages/sirji_messages/system_prompts/agents/coder.py b/messages/sirji_messages/system_prompts/agents/coder.py index 66d52031..45597351 100644 --- a/messages/sirji_messages/system_prompts/agents/coder.py +++ b/messages/sirji_messages/system_prompts/agents/coder.py @@ -25,32 +25,37 @@ def responsibilities(self): - Make sure that key points, information and data is always present in the user story. - Have the features listed as points in the user story. - Then send this user story as a {ActionEnum.QUESTION.name} to get a confirmation on. The message details should look like: "\nHere's the user story based on your problem statement:\n\n <> \n\nDoes everything look good, or would you like any changes?" - - Once user story is finalized, by considering the user story and the features in it prepare a list of architecture components needed and get it finalized with the {AgentEnum.USER.name}: - - Prepare list of architecture components including things like programming language (example: Python, Node.js), Framework (example: Express, Flask), Database (example: PostgreSQL, MySQL), Cache (example: Memcache, Redis), etc. + - Once the user story is finalized, then ensure to prepare a list of architecture components needed (by considering the problem statement and the finalized user story) and get it finalized with the {AgentEnum.USER.name}: + - Prepare list of architecture components including things like: + - Programming language (example: Python, Node.js), + - Framework (example: Express, Flask), + - Database (example: PostgreSQL, MySQL), + - Cache (example: Memcache, Redis), etc. - Do not include Hosting component. - - Have only those components which can run on or can be called from a local development environment. - - Have the architecture components listed as points and sub-points. - - Then send the architecture components as a {ActionEnum.QUESTION.name} to get a confirmation on. The message details should look like: "\nHere are the main parts of the architecture::\n\n <> \n\nDoes everything look good to you, or do you need any adjustments?" + - Show the architecture components listed as points. Also specify intent of each component. + - Send the architecture components as a {ActionEnum.QUESTION.name} to get a confirmation on. The message details should look like: "\nHere are the main parts of the architecture::\n\n <> \n\nDoes everything look good to you, or do you need any adjustments?" - Once architecture components are finalized, then {ActionEnum.GENERATE_STEPS.name} to solve the problem statement: - Share the problem statement, finalized user story and finalized architecture compoents with {AgentEnum.PLANNER.name} to get the list of steps on how to solve the problem statement (PS). - The message details shared with the planner should look like "\n\nProblem Statement (PS):\n<>\n\nUser Story:\n<>\n\nArchitecture Components:\n<>" - - Once steps are generated, Solve the problem statement programatically by following the generated steps: - - Write concrete code and not just conceptualize or simulate it. - - Always write end-to-end working code in accordance with the problem statement, user story, and architectural components. Strictly don't just create an outline or folder structure. - - Use Python, if the programming language cannot be inferred from PS. + - Once steps are generated, ensure to solve the problem statement programatically by following the generated steps (one step at a time sequentially): + - Always write end-to-end working code in accordance with the problem statement, user story, and architectural components. + - Write concrete code and not just conceptualize or outline or simulate it. - Identify URLs (Excluding GitHub) present in the PS, on which you have no knowledge and want to be trained on or researched. After training, infer from the trained content/knowledge. If the response of the inference has new URLs (Excluding GitHub), on which you have no knowledge, you can get trained on them too. - - Follow the generated steps sequentially to solve the PS. - Follow secure software development practices while generating code. - - Ensure that you don't create any file/folder outside of current directory, i.e. './' + - Ensure that you don't create any file/folder outside of workspace root folder, i.e. './' - Read the GitHub files by first cloning the repository and then reading the files at once. - - Strictly make sure: + - Ensure while responding with {ActionEnum.EXECUTE_COMMAND.name} action or {ActionEnum.INSTALL_PACKAGE.name} action: + - Command must be compatible with macOS. + - Command must be sufficiently chained. For example: 'source venv/bin/activate && pip install openai', 'cd server && npm run start' + - Always make sure: - To respond with the {ActionEnum.RUN_SERVER.name} action to run a server like continuous process. - - Do not execute chained commands with the {ActionEnum.EXECUTE_COMMAND.name} action. - Ensure if the step is to verify whether a command is installed or not, you check them one at a time. - - Ensure to always call 'pwd' command before using 'cd' command (either in a standalone way). - - On getting file not found error for files which you created earlier, reason might be a wrongly assumed current directory. Check the present working directory using 'pwd' command. - Pose explicit questions only when you have no other option but to reach out to the user. An ideal question format is direct, such as "Should I ...?" Additionally, it is crucial to ask such questions only when absolutely necessary. - - Always notify about the step started before you start working on it. Similarly, notify about the step completed before you move to the next step. + - Regarding step status change messages ({ActionEnum.STEP_STARTED.name} action, {ActionEnum.STEP_COMPLETED.name} action): + - Always implement / work on one step at a time, let's call it the current step. + - If the work for the current step was already done as a part of some previous step, respond with {ActionEnum.STEP_COMPLETED.name} action for the current step. + - Before starting work for the current step, respond with {ActionEnum.STEP_STARTED.name} action for the current step. + - Before moving to the next step, respond with {ActionEnum.STEP_COMPLETED.name} action for the current step. - Only interact with the agents listed below using the allowed responses, also mentioned below. - Ensure the response is also enclosed inside 3 backticks (```). - If error is encountered in execution of a command, then find the root cause and resolve the issue by solving the root cause. diff --git a/requirements.txt b/sirji/desktop/requirements.txt similarity index 100% rename from requirements.txt rename to sirji/desktop/requirements.txt diff --git a/sirji/vscode-extension/README.md b/sirji/vscode-extension/README.md index 8f475338..f49dbafb 100644 --- a/sirji/vscode-extension/README.md +++ b/sirji/vscode-extension/README.md @@ -24,18 +24,33 @@ ## Sirji -Sirji is a Visual Studio Code Extension that acts as an AI Software Development Agent, an open-source alternative to Devin. It functions as a virtual software developer, geared towards solving the given problem statement. These problem statements can either involve fresh, greenfield development or efforts aimed at enhancing existing code, bug fixing, documentation, and test case creation in brownfield development. +Sirji is a Visual Studio Code extension that works as an AI software development agent. -The extension leverages the capabilities of VS Code, including the Editor, Terminal, Browser, and Project Explorer. +It is a virtual software developer that includes individual agents for planning, coding, researching, and executing projects. -Additionally, it provides an interactive chat interface through which users can submit their problem statements, enhancement requests, feedback, and answers to requests for elaboration. +Sirji solves users’ problem statements ranging from a new greenfield project to an existing brownfield project where it enhances existing code, fixes bugs, and writes test cases. -## Demo Videos +The extension leverages the capabilities of VS Code, including the Editor, Terminal, and Project Explorer. + +It provides an interactive chat interface through which users submit their problem statements, answer questions, and provide feedback to Sirji. + +Additionally and most importantly, Sirji sets up your local development environment by installing system-level packages as well as programming language-specific dependencies. It later executes the generated code in your local development environment. + +## Demo Video + +``` +Create a fully interactive website for playing the Tic-Tac-Toe game. +``` + +Watch on YouTube: https://www.youtube.com/watch?v=DC_gmz04Ovs + +Tic Tac Toe game by Sirji -TODO: Show 2 good demo videos - side by side. Then afterwards, give a link to the demos page. ## Prerequisites +Sirji has been tested on **macOS** only for now. We know there are certain OS-specific functionalities that we will soon generalize. + Make sure you have installed all of the following prerequisites on your machine: - Visual Studio Code (>= 1.80.2) @@ -43,23 +58,11 @@ Make sure you have installed all of the following prerequisites on your machine: - Python (>= 3.10) - Make sure `python --version` runs without error. - tee command - Make sure `which tee` runs without error. -To check whether your machine meets these prerequisites, run: - -```zsh -sh check_prerequisites.sh -``` - -Also, you will need an OpenAI API key. - -## Contributing - -We welcome contributions to Sirji! If you're interested in helping improve this VS Code extension, please take a look at our [Contributing Guidelines](./CONTRIBUTING.md) for more information on how to get started. - -Thank you for considering contributing to Sirji. We look forward to your contributions! +Also, you will need an OpenAI API key to access the GPT-4 Turbo model. -## Reporting Issues +## Installation -If you run into any issues or have suggestions, please report them by following our [issue reporting guidelines](./ISSUES.md). Your reports help us make Sirji better for everyone. +You can start using Sirji by installing this [extension](https://marketplace.visualstudio.com/items?itemName=TrueSparrow.sirji) from the Visual Studio Marketplace. ## Architecture @@ -84,6 +87,20 @@ The tools for crawling URLs (converting them into markdowns), searching for term All these packages are invoked by Python Adapter Scripts, which are spawned by the extension. +## Contributing + +We welcome contributions to Sirji! If you're interested in helping improve this VS Code extension, please take a look at our [Contributing Guidelines](./CONTRIBUTING.md) for more information on how to get started. + +Thank you for considering contributing to Sirji. We look forward to your contributions! + +## Reporting Issues + +If you run into any issues or have suggestions, please report them by following our [issue reporting guidelines](./ISSUES.md). Your reports help us make Sirji better for everyone. + +## Stay In Touch + +Office Hours + ## License Distributed under the MIT License. See `LICENSE` for more information. diff --git a/sirji/vscode-extension/package.json b/sirji/vscode-extension/package.json index af6dfd35..7c0b9119 100644 --- a/sirji/vscode-extension/package.json +++ b/sirji/vscode-extension/package.json @@ -2,7 +2,7 @@ "name": "sirji", "displayName": "Sirji", "description": "Sirji is an AI Software Development Agent.", - "version": "0.0.5", + "version": "0.0.6", "publisher": "TrueSparrow", "icon": "out/assets/sirji.png", "repository": { diff --git a/sirji/vscode-extension/src/py_scripts/requirements.txt b/sirji/vscode-extension/src/py_scripts/requirements.txt index 0afabbda..72f8134a 100644 --- a/sirji/vscode-extension/src/py_scripts/requirements.txt +++ b/sirji/vscode-extension/src/py_scripts/requirements.txt @@ -1,3 +1,3 @@ urllib3==1.25.11 -sirji-messages==0.0.13 -sirji-agents==0.0.18 \ No newline at end of file +sirji-messages==0.0.14 +sirji-agents==0.0.19 \ No newline at end of file diff --git a/sirji/vscode-extension/src/utils/execute_spawn.ts b/sirji/vscode-extension/src/utils/execute_spawn.ts new file mode 100644 index 00000000..cd5c9443 --- /dev/null +++ b/sirji/vscode-extension/src/utils/execute_spawn.ts @@ -0,0 +1,46 @@ +import * as vscode from 'vscode'; +import * as fs from 'fs'; +import * as path from 'path'; +import { spawn } from 'child_process'; + +const fsPromises = fs.promises; + +function constructResponse(success: boolean, output: string): string { + const response = success ? 'Execute command complete.' : 'Error executing failed.'; + const additionalInfo = `Output:\n\n${output}`; + return response + additionalInfo; +} + +// let sirjiTerminal: vscode.Terminal | undefined; +export async function executeSpawn(command: string, workspaceRootPath: string): Promise { + let successResp = ''; + let errorResp = ''; + const [cmd, ...args] = command.split(/\s+/); + + return new Promise(async (resolve, reject) => { + const child = spawn(cmd, args, { + cwd: workspaceRootPath, + shell: true + }); + + child.stdout.on('data', (data) => { + successResp += data; + }); + + child.stderr.on('data', (data) => { + errorResp += data; + }); + + child.on('close', (code) => { + if (code === 0) { + resolve(constructResponse(true, successResp)); + } else { + resolve(constructResponse(false, errorResp)); + } + }); + + child.on('error', (error) => { + resolve(constructResponse(false, `Failed to start subprocess: ${error.message}`)); + }); + }); +} diff --git a/sirji/vscode-extension/src/utils/execute_task.ts b/sirji/vscode-extension/src/utils/execute_task.ts index cd78e1de..c68f87d3 100644 --- a/sirji/vscode-extension/src/utils/execute_task.ts +++ b/sirji/vscode-extension/src/utils/execute_task.ts @@ -1,6 +1,7 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; +import { Constants } from './constants'; let currentTaskExecution: any = null; @@ -15,18 +16,21 @@ async function checkForChanges(filePath: string, previousContent: string): Promi }; } -function constructResponse(isRunning: Boolean, tempFilePath: string, tempFileContent: string): string { - let response = isRunning ? 'Execute Command still running.' : 'Execute command complete. '; - response += `Command execution output from ${tempFilePath}\n`; - response += `${tempFileContent}`; +function constructResponse(isRunning: Boolean, tempFileRelativePath: string, tempFileContent: string): string { + let response = isRunning ? 'Command is still running.' : 'Command execution completed.'; + response += `\n------\nOutput from the command is getting logged to ${tempFileRelativePath}`; + response += `\n------\nOutput till now:\n${tempFileContent}\n------`; return response; } -export async function executeTask(command: string, workspaceRootPath: string): Promise { +export async function executeTask(command: string, workspaceRootPath: string, sirjiRunId: string): Promise { return new Promise(async (resolve, reject) => { const tempFileName = `output.txt`; - const tempFilePath = path.join(workspaceRootPath, tempFileName); - let tempFileContent: string; + + const tempFileRelativePath = path.join(Constants.HISTORY_FOLDER, sirjiRunId, tempFileName); + const tempFilePath = path.join(workspaceRootPath, tempFileRelativePath); + + let tempFileContent = ''; command = `(${command}) 2>&1 | tee "${tempFilePath}"`; @@ -68,10 +72,10 @@ export async function executeTask(command: string, workspaceRootPath: string): P console.log(`executeTask setInterval executed ${command}:`, { isTaskExecutionInProgress, tempFileName }); - tempFileContent = response.currentContent; + tempFileContent += response.currentContent; clearInterval(checkTaskPeriodically); - return resolve(constructResponse(isTaskExecutionInProgress, tempFilePath, tempFileContent)); - }, 5000); + return resolve(constructResponse(isTaskExecutionInProgress, tempFileRelativePath, tempFileContent)); + }, 10000); } }) ); @@ -83,7 +87,7 @@ export async function executeTask(command: string, workspaceRootPath: string): P clearInterval(checkTaskPeriodically); const response = await checkForChanges(tempFilePath, tempFileContent); tempFileContent = response.currentContent; - return resolve(constructResponse(isTaskExecutionInProgress, tempFilePath, tempFileContent)); + return resolve(constructResponse(isTaskExecutionInProgress, tempFileRelativePath, tempFileContent)); }) ); } catch (error) { diff --git a/sirji/vscode-extension/src/utils/facilitator.ts b/sirji/vscode-extension/src/utils/facilitator.ts index 0c6f232c..d6192d02 100644 --- a/sirji/vscode-extension/src/utils/facilitator.ts +++ b/sirji/vscode-extension/src/utils/facilitator.ts @@ -12,6 +12,7 @@ import { executeCommand } from './execute_command'; import { createFile } from './create_file'; import { readContent } from './read_content'; import { executeTask } from './execute_task'; +import { executeSpawn } from './execute_spawn'; export class Facilitator { private context: vscode.ExtensionContext | undefined; @@ -143,7 +144,7 @@ export class Facilitator { const coderConversationFilePath = path.join(oThis.workspaceRootPath, Constants.HISTORY_FOLDER, oThis.sirjiRunId, 'logs', 'coder.log'); let coderLogFileContent = ''; - + if (oThis.historyManager?.checkIfFileExists(coderConversationFilePath)) { coderLogFileContent = oThis.historyManager?.readFile(coderConversationFilePath); // return coderLogFileContent; @@ -455,8 +456,7 @@ export class Facilitator { break; case ACTION_ENUM.INSTALL_PACKAGE: - const installPackageLogPath = path.join(oThis.workspaceRootPath, Constants.HISTORY_FOLDER, oThis.sirjiRunId); - const installPackageCommandRes = await executeCommand(parsedMessage.COMMAND, installPackageLogPath); + const installPackageCommandRes = await executeSpawn(parsedMessage.COMMAND, oThis.workspaceRootPath); rawMessage = installPackageCommandRes; parsedMessage = { TO: ACTOR_ENUM.CODER @@ -465,9 +465,7 @@ export class Facilitator { break; case ACTION_ENUM.EXECUTE_COMMAND: - const executedCommandLogPath = path.join(oThis.workspaceRootPath, Constants.HISTORY_FOLDER, oThis.sirjiRunId); - - const executedCommandRes = await executeCommand(parsedMessage.COMMAND, executedCommandLogPath); + const executedCommandRes = await executeSpawn(parsedMessage.COMMAND, oThis.workspaceRootPath); rawMessage = executedCommandRes; parsedMessage = { @@ -477,9 +475,7 @@ export class Facilitator { break; case ACTION_ENUM.RUN_SERVER: - const runServerLogPath = path.join(oThis.workspaceRootPath, Constants.HISTORY_FOLDER, oThis.sirjiRunId); - - const runServerRes = await executeTask(parsedMessage.COMMAND, runServerLogPath); + const runServerRes = await executeTask(parsedMessage.COMMAND, oThis.workspaceRootPath, oThis.sirjiRunId); rawMessage = runServerRes; parsedMessage = { @@ -621,7 +617,7 @@ export class Facilitator { switch (parsedMessage.ACTION) { case ACTION_ENUM.STEPS: - contentMessage = 'Steps generation done.'; + contentMessage = 'Steps generation done. Proceeding step by step.'; break; default: