Commit Graph

53 Commits

Author SHA1 Message Date
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
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
6e3ec31e0e
refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts 2024-09-05 16:08:39 +01:00
Simon Larsen
e7377f6c8f
refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts 2024-09-05 14:30:30 +01:00
Simon Larsen
5bfe38736e
refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts 2024-09-05 13:50:53 +01:00
Simon Larsen
eac7134630
refactor: Enable lazy loading for images in BlogPostUtil and remove unnecessary whitespace in Copilot/Init.ts 2024-09-05 13:49:41 +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
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
0559997c01
refactor: Update LlmType enum values and improve error message for OneUptime LLM server not reachable 2024-09-04 11:51:56 +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
0f0f2c1b81
feat: Update react-syntax-highlighter to latest version and use a11yDark style
This commit updates the react-syntax-highlighter package to the latest version and switches to the a11yDark style for syntax highlighting in the MarkdownViewer component. This update ensures compatibility with the latest features and improvements of react-syntax-highlighter and enhances the accessibility of the code snippets in the MarkdownViewer.
2024-07-14 15:40:10 -06:00
Simon Larsen
71151ea92e
feat: Add serviceCatalogId and serviceRepositoryId to CopilotPullRequestAPI and CopilotActionAPI
This commit adds the `serviceCatalogId` and `serviceRepositoryId` fields to the `CopilotPullRequestAPI` and `CopilotActionAPI` classes. These fields are included in the API response to provide additional information about the service catalog and service repository associated with a pull request or action. This change enhances the data returned by the APIs and improves the overall functionality of the application.
2024-07-12 22:04:18 +01:00
Simon Larsen
d514059d5d
chore: Setup Git LFS in workflows
This commit adds a step to the GitHub workflows (`test-release.yaml` and `release.yml`) to setup Git LFS. Git LFS is necessary for handling large files in the repository. By installing Git LFS, we ensure that the repository can handle large files properly during the CI/CD process.
2024-07-12 20:28:46 +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
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
5e486e4ce6
chore: Update LlmType enum and related code 2024-07-10 21:33:38 +01:00
Simon Larsen
04650f165f
chore: Add logger to Execute.ts and fix formatting in Config.ts and Init.ts 2024-07-10 13:50:29 +01:00
Simon Larsen
214c4e4839
chore: Await discardAllChangesOnCurrentBranch in Copilot/Init.ts 2024-07-10 13:43:59 +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
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
9b9e6d666b
refactor: Update CodeRepositoryUtil to set author identity 2024-07-08 16:36:22 +01:00
Simon Larsen
24845b267f
refactor: Set author identity in CodeRepositoryUtil
This commit adds a new method, setAuthorIdentity, to the CodeRepositoryUtil class. The method sets the author's name and email in the global git configuration using the provided data. It executes the necessary git config command and logs the output. This change enhances the functionality of the CodeRepositoryUtil class by allowing the author's identity to be easily configured for git operations.
2024-07-08 16:19:19 +01:00
Simon Larsen
448326ee88
refactor: Add LOG_LEVEL=DEBUG environment variable to docker-compose.copilot.yml
This commit adds the LOG_LEVEL=DEBUG environment variable to the docker-compose.copilot.yml file. Setting the log level to DEBUG will enable more detailed logging for the Copilot service. This change is made to improve debugging and troubleshooting capabilities during development and testing.
2024-07-08 16:01:51 +01:00
Simon Larsen
b947ed2ed1
refactor: Add cloneRepository method to CodeRepositoryUtil
This commit adds a new method, cloneRepository, to the CodeRepositoryUtil class. The method is responsible for cloning a repository from a given URL to a specified path. It uses the git clone command to perform the cloning operation. This method will be used to clone the repository to a temporary directory in the Copilot/Init.ts file. The method takes an object as a parameter, which includes the repoPath and repoUrl. It executes the git clone command using the Execute.executeCommand() method and logs the output using the logger.debug() method. This new method enhances the functionality of the CodeRepositoryUtil class and improves the codebase.
2024-07-08 15:40:16 +01:00
Simon Larsen
6eef29e4a3
refactor: Update Copilot configuration for local development 2024-07-08 14:05:09 +01:00
Simon Larsen
8be8c23ed9
refactor: Refactor code into smaller functions/methods 2024-06-27 15:48:52 +01:00
Simon Larsen
77287868c4
refactor: Improve variable names in codebase 2024-06-27 14:15:18 +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
0987634e54
refactor: Fix formatting and add comments in ArrayUtil.ts and CopilotActionProcessingException.ts 2024-06-23 21:37:36 +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
e85e351797
refactor: Remove unnecessary blank lines in ServiceLanguageUtil class 2024-06-23 19:41:24 +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
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
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
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
Simon Larsen
b2f650a865
refactor: Sanitize file path in CodeRepositoryUtil.getFileContent()
The file path in the CodeRepositoryUtil.getFileContent() method is now sanitized using the LocalFile.sanitizeFilePath() function before executing the command. This change ensures that the file path is properly formatted and prevents any potential security vulnerabilities or errors caused by invalid file paths.
2024-06-20 10:26:16 +01:00