Commit Graph

83 Commits

Author SHA1 Message Date
Simon Larsen
c57fb025f0
Refactor Docker instructions in Copilot introduction.md 2024-09-08 21:30:09 +01:00
Simon Larsen
e3c68fdb4c
refactor: Enable lazy loading for images in Copilot/Utils/CopilotAction.ts, Common/Utils/CronTime.ts, Common/Server/Services/BillingInvoiceService.ts, and Dashboard/src/Pages/Settings/Invoices.tsx 2024-09-05 19:08:40 +01:00
Simon Larsen
1682a25513
refactor: Enable lazy loading for images in Copilot/Utils/CopilotAction.ts, Common/Utils/CronTime.ts, Common/Server/Services/BillingInvoiceService.ts, and Dashboard/src/Pages/Settings/Invoices.tsx 2024-09-05 18:25:26 +01:00
Simon Larsen
3925354332
refactor: Enable lazy loading for images in Copilot/Init.ts and improve logging in CopilotActionsBase.ts 2024-09-05 17:39:47 +01:00
Simon Larsen
6037c30765
refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts 2024-09-05 17:13:09 +01:00
Simon Larsen
94eaab9ca4
refactor: Update import statements to use ArrayUtil from Common/Utils/Array 2024-09-05 13:29:58 +01:00
Simon Larsen
0aa4d39ab0
refactor: Update CodeRepositoryFile interface to include filePath property 2024-09-05 13:28:17 +01:00
Simon Larsen
848b61033a
refactor: Update CodeRepositoryFile interface to include filePath property 2024-09-05 12:59:59 +01:00
Simon Larsen
e11ab9ee5c
refactor: Update CopilotActionAPI to include permission checks for create, read, delete, and update actions 2024-09-05 11:26:01 +01:00
Simon Larsen
62bf2ee6f3
refactor: Add optional startLineNumber and endLineNumber to FileActionProp interface 2024-09-05 10:48:01 +01:00
Simon Larsen
87234c95ce
refactor: Add API endpoint for updating CopilotAction 2024-09-04 21:01:58 +01:00
Simon Larsen
fb1f129089
refactor: Remove unnecessary whitespace in CopilotActionsBase.ts and ImproveComments.ts 2024-09-04 18:45:58 +01:00
Simon Larsen
989a082d3e
refactor: Make ImproveComments methods private and update method signatures 2024-09-04 18:41:50 +01:00
Simon Larsen
eb4d8325a5
refactor: Remove unused imports and properties in CodeRepository.ts and CodeRepositoryFile.ts 2024-09-04 18:37:31 +01:00
Simon Larsen
39ff367afe
refactor: Update LLMBase.ts and OpenAI.ts to import CopilotActionPrompt from the new location 2024-09-04 14:52:32 +01:00
Simon Larsen
012c9299ed
refactor: Fix typo in CopilotActionType enum values and update related code 2024-09-04 12:50:46 +01:00
Simon Larsen
dea6c55365
refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 15:50:32 -06:00
Simon Larsen
b29fb6e833
refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 13:00:31 -06:00
Simon Larsen
52630b16d1
refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 10:06:53 -06:00
Simon Larsen
886f753422
refactor: Update TechStack enum and related imports 2024-07-16 14:50:24 -06:00
Simon Larsen
60aa7032c5
refactor: Update TechStack enum and related imports
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.
2024-07-16 14:07:47 -06:00
Simon Larsen
5f3cfa3f0d
feat: Update Docker configuration for Copilot debugging
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.
2024-07-15 08:36:23 -06:00
Simon Larsen
137cdb7716 refactor: Remove unused code and comments in LLMServer.ts 2024-07-12 20:18:34 +00:00
Simon Larsen
5d1ad931fc
chore: Remove unused Copilot configuration variables
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.
2024-07-12 19:36:33 +01:00
Simon Larsen
4e0d56de54
feat: Add setup pull request flag to CopilotPullRequestAPI.ts
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.
2024-07-12 19:02:47 +01:00
Simon Larsen
a33b1f20f8
feat: Add migration for dropping NOT NULL constraint on serviceCatalogId and serviceRepositoryId in CopilotPullRequest
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.
2024-07-12 18:46:41 +01:00
Simon Larsen
c648a6bf79
feat: Add CopilotPullRequestStatus enum
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.
2024-07-12 13:07:59 +01:00
Simon Larsen
54db88dd96
feat: Add git commands to add and commit changes in CodeRepositoryUtil
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.
2024-07-10 22:53:31 +01:00
Simon Larsen
dd336896d2
chore: Remove unused configuration files and scripts 2024-07-10 22:07:52 +01:00
Simon Larsen
af0a5d1022
chore: Update LlmType enum and related code 2024-07-10 18:39:13 +01:00
Simon Larsen
43a22d9973
chore: Update LlmType enum and related code
- 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.
2024-07-10 18:36:00 +01:00
Simon Larsen
d8c8a76c1d
chore: Update Copilot configuration files
- 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.
2024-07-10 18:19:09 +01:00
Simon Larsen
6b9e0c8b99
chore: Disable Copilot in development environment 2024-07-10 13:39:35 +01:00
Simon Larsen
ec704cbe34
Refactor executeScript function to execute multiple commands sequentially 2024-07-09 21:06:40 +01:00
Simon Larsen
aaacaa654b
chore: Refactor executeAction function to use typescript interfaces and types 2024-07-09 17:51:36 +01:00
Simon Larsen
d8c38a3564
chore: Add necessary configuration files for OneUptime service 2024-07-09 17:40:26 +01:00
Simon Larsen
33a295c191
chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 14:17:05 +01:00
Simon Larsen
5251b93fc9
refactor: Improve logging in Llama class 2024-07-09 12:54:49 +01:00
Simon Larsen
646c0f37d6
refactor: Improve logging in Llama class 2024-07-08 19:59:58 +01:00
Simon Larsen
1fdc36fea2
refactor: Update logging in Llama class for better debugging 2024-07-08 19:56:27 +01:00
Simon Larsen
95f87567e8
refactor: Improve logging in Llama class
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.
2024-07-08 18:15:27 +01:00
Simon Larsen
9ad97b1fe0
refactor: Add timeout handling to Llama prompt execution
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.
2024-07-08 18:06:06 +01:00
Simon Larsen
4442437ad7
refactor: Improve comments and error handling in Llama.ts and ImproveComments.ts 2024-07-01 10:39:27 +01:00
Simon Larsen
08f39af9ec
refactor: Improve comments and handle bad operations in Llama.ts and ImproveComments.ts
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.
2024-06-28 19:25:53 +01:00
Simon Larsen
7bf58d23bc
chore: Update CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts
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.
2024-06-28 19:15:53 +01:00
Simon Larsen
6743193872
chore: Update LLM Dockerfile and build process 2024-06-28 12:18:01 +01:00
Simon Larsen
b67583f8d3
refactor: Update Llama.ts to fix API route for prompt result 2024-06-27 19:16:49 +01:00
Simon Larsen
6f4045ffe9
refactor: Update SubscriptionPlan method name to getPlanType 2024-06-27 18:00:08 +01:00
Simon Larsen
8be8c23ed9
refactor: Refactor code into smaller functions/methods 2024-06-27 15:48:52 +01:00
Simon Larsen
626312d495
refactor: Refactor code into smaller functions/methods 2024-06-27 14:33:25 +01:00