This commit updates the TechStack enum in the TechStack.ts file to include a comprehensive list of technology stacks. It also updates the import paths in various files to reflect the changes from using ServiceLanguage to TechStack. This refactoring improves the clarity and consistency of the codebase.
This commit updates the Docker configuration in the `.vscode/launch.json` file to improve the debugging experience for Copilot. It modifies the `Debug: Copilot Locally` configuration by changing the `localRoot` to `${workspaceFolder}/TestServer` and updating the `name` to `Copilot: Debug with Docker`. Additionally, it sets the `port` to `9985`, `remoteRoot` to `/usr/src/app`, and enables `restart` and `autoAttachChildProcesses` for better debugging capabilities. These changes enhance the development workflow and make it easier to debug Copilot locally with Docker.
This commit removes the unused Copilot configuration variables from the `config.example.env` file. The `COPILOT_OPENAI_API_KEY` and `COPILOT_OPENAI_MODEL` variables are no longer needed and have been removed. This cleanup improves the clarity and maintainability of the codebase.
This commit adds the `isSetupPullRequest` flag to the `CopilotPullRequestAPI.ts` file. The flag is set to true when creating a pull request for setting up the repository with OneUptime Copilot. This flag will be used to identify setup pull requests in the application.
This commit adds a migration file (1720806196274-MigrationName.ts) that drops the NOT NULL constraint on the columns "serviceCatalogId" and "serviceRepositoryId" in the "CopilotPullRequest" table. This change allows these columns to have nullable values, providing flexibility in the data model.
This commit adds the `CopilotPullRequestStatus` enum to the `CopilotPullRequestStatus.ts` file in the `Common/Types/Copilot` directory. This enum defines the possible statuses of a Copilot pull request, including "Created", "Merged", and "Closed". This enum will be used to track the status of Copilot pull requests throughout the application.
The CodeRepositoryUtil class now includes two new methods: `addAllChangedFilesToGit` and `commitChanges`. These methods allow for adding all changed files to the git repository and committing the changes with a specified message. This will make it easier to manage and track changes in the code repository.
- Update LlmType enum values to match the new naming convention.
- Update references to Llama to LLM in various files.
- Update CopilotActionsBase.ts to set the llmType to LLM in the constructor.
- Update Init.ts to use the llmServerUrl instead of llamaServerUrl.
- Update LLM.ts to use LLMServer class instead of Llama class.
- Add OpenAI class and update LLM.ts to handle OpenAI LLM type.
- Update Config.ts to handle OpenAI API key and model.
- Add OpenAI.ts file to handle OpenAI LLM responses.
- Update Copilot Dockerfile.tpl to remove unnecessary code and fix formatting.
- Update config.example.env and Copilot/.env.example to correct the LLM server URL.
- Remove unused code and update documentation in Copilot/README.md.
- Update navigation links in App/FeatureSet/Docs/Utils/Nav.ts to include Copilot documentation.
- Update Copilot/Config.ts and Copilot/Utils/Init.ts to use the new LLM server URL.
- Add logger statements in Copilot/Service/CopilotActions/CopilotActionsBase.ts to log file content.
This commit improves the logging in the Llama class by adding more detailed log messages. It modifies the log statements in the execute method to include the current file path and the type of Copilot action being executed. This change enhances the readability and debugging capabilities of the Llama service.
This commit adds timeout handling to the Llama prompt execution in the Llama class. It introduces a timeoutInMinutes property in the CopilotActionPrompt interface and uses it to set a timeout for the prompt execution. If the prompt execution exceeds the specified timeout, a LLMTimeoutException is thrown, indicating that the prompt has timed out. This change enhances the reliability and responsiveness of the Llama service by preventing long-running prompts from blocking the execution flow.
This commit refactors the code in Llama.ts and ImproveComments.ts to improve comments and handle bad operations. In Llama.ts, a new import statement for the BadOperationException class is added, and if the result object contains an error string, a BadOperationException is thrown. In ImproveComments.ts, an unused variable declaration is removed. These changes enhance code readability and error handling.
Refactor CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts to use an array of messages instead of a single prompt. Each message in the array contains the content and role of the prompt. This change improves the flexibility and readability of the code.