Commit Graph

34 Commits

Author SHA1 Message Date
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
d8c38a3564 chore: Add necessary configuration files for OneUptime service 2024-07-09 17:40:26 +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
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
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
Simon Larsen
77287868c4 refactor: Improve variable names in codebase 2024-06-27 14:15:18 +01:00
Simon Larsen
f59064108e refactor: Add isActionComplete method to CopilotActionsBase.ts
This commit adds a new method, `isActionComplete`, to the `CopilotActionsBase.ts` file. The method returns a boolean value indicating whether the action is complete. By default, the method returns `true`, but it can be overridden in derived classes to provide custom logic for determining the action's completion status. This enhancement improves the flexibility and extensibility of the `CopilotActionsBase` class.
2024-06-26 21:47:20 +01:00
Simon Larsen
44d8254e7d refactor: Remove unused getNextFilePath method in CopilotActionsBase.ts 2024-06-26 21:43:13 +01:00
Simon Larsen
d284a6ff54 refactor: Remove unused getNextFilePath method in CopilotActionsBase.ts 2024-06-26 21:40:39 +01:00
Simon Larsen
1908f02447 refactor: Extract code from CopilotActionBase to separate functions 2024-06-26 21:40:07 +01:00
Simon Larsen
f50e20d896 refactor: Extract code from CopilotActionBase to separate functions 2024-06-26 20:55:14 +01:00
Simon Larsen
bd8ed04e1b refactor: Extract code from CopilotActionBase to separate functions
This commit extracts code from the `CopilotActionBase.ts` file into separate functions for better code organization and readability. The extracted code includes the logic for ordering SSL certificates, checking the order status, and handling domain removal. This refactoring improves the maintainability and modularity of the codebase.
2024-06-26 19:33:01 +01:00
Simon Larsen
a3f5e268b5 refactor: Shuffle files in Copilot Init to avoid fixing the same file in each run 2024-06-23 21:29:23 +01:00
Simon Larsen
a4c5354152 refactor: Improve comments in ImproveComments.ts 2024-06-23 20:58:21 +01:00
Simon Larsen
1964db22f1 refactor: Add support for Markdown file extension in ServiceLanguage enum 2024-06-23 19:35:04 +01:00
Simon Larsen
2415f97ec6 refactor: Add NotAcceptedFileExtentionForCopilotAction exception handling 2024-06-22 19:40:18 +01:00
Simon Larsen
b6cabf12d5 refactor: Update CopilotActionsBase to include PR generation message
This commit updates the `CopilotActionsBase.ts` file to include a message about PR generation in the warning section. The message informs users that the PR is generated by OneUptime Copilot and advises them to review the changes before merging. This enhancement improves the clarity and transparency of the generated PRs.
2024-06-22 13:36:52 +01:00
Simon Larsen
27ef73be20 refactor: Execute CopilotAction and update currentFixCount
This commit modifies the `Copilot/Init.ts` file to execute the `CopilotActionService.execute` method for each event that needs fixing. It also updates the `currentFixCount` variable to keep track of the number of fixes performed. This refactor improves the functionality of the Copilot service by ensuring that all necessary actions are executed and the fix count is accurately maintained.
2024-06-22 13:34:54 +01:00
Simon Larsen
6a646c06b3 refactor: Remove unused CopilotActionType enum value
This commit removes the unused `CopilotActionType` enum value from the `CopilotActionType.ts` file. The value was commented out and had no impact on the functionality of the application. Removing it helps to improve code clarity and maintainability.
2024-06-22 12:38:27 +01:00
Simon Larsen
5223d1bd6d refactor: Improve comments in CopilotActionType and CopilotActionsBase
The code changes in this commit refactor the comments in the `CopilotActionType` and `CopilotActionsBase` files. The comments have been improved to provide clearer instructions and guidelines for code commenting. This enhancement ensures that the codebase is well-documented and easier to understand for future developers.
2024-06-22 12:35:12 +01:00
Simon Larsen
261072b1fd refactor: Update logging statements in CopilotActionService 2024-06-21 18:35:22 +01:00
Simon Larsen
a87f3ac896 refactor: Fix branch name generation in CopilotActionsBase.ts
The branch name generation in CopilotActionsBase.ts has been fixed to replace double hyphens with a single hyphen. This ensures that the branch name is correctly formatted and avoids any potential issues with branch creation and management.
2024-06-21 10:59:34 +01:00
Simon Larsen
2deeb32b78 refactor: Fix branch name generation in CopilotActionsBase.ts
The branch name generation in CopilotActionsBase.ts has been fixed to replace double hyphens with a single hyphen. This ensures that the branch name is correctly formatted and avoids any potential issues with branch creation and management.
2024-06-20 22:31:58 +01:00
Simon Larsen
bc8b8eb982 refactor: Update LlmType import paths in Copilot/Config.ts, Copilot/Service/LLM/Llama.ts, and Copilot/Service/LLM/LLM.ts
This commit updates the import paths for the LlmType module in the following files:
- Copilot/Config.ts
- Copilot/Service/LLM/Llama.ts
- Copilot/Service/LLM/LLM.ts

The import paths are corrected to match the actual file structure, ensuring that the LlmType module is properly imported and used throughout the codebase. This change improves the maintainability and readability of the code.
2024-06-20 21:37:24 +01:00
Simon Larsen
1260e482cf refactor: Improve comments in code and update job function in app.py 2024-06-20 13:14:39 +01:00
Simon Larsen
6e5081a4e3 refactor: Remove unused CopilotEvent and CopilotEventService 2024-06-20 12:30:06 +01:00
Simon Larsen
dd93998296 refactor: Remove unused CopilotEvent and CopilotEventService
This commit removes the unused CopilotEvent enum and CopilotEventService class. These files are no longer needed in the codebase and can be safely deleted. Removing unused code improves the maintainability and reduces the complexity of the project.
2024-06-20 11:41:04 +01:00