This refactor updates the TelemetryIngestor and Probe components to initialize telemetry with the correct service name. Previously, the service name was hardcoded or set to a default value, which could lead to inconsistencies and confusion. By using the APP_NAME constant defined in each component, the service name is now dynamically set, ensuring accurate telemetry tracking.
Files modified:
- TelemetryIngestor/Index.ts
- Probe/Index.ts
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 updates the branch name in Copilot/Index.ts from 'test-branch-3' to 'test-branch-4'. Additionally, it adds the GITHUB_USERNAME variable to the .env.example file. These changes improve the accuracy and functionality of the code.
This commit modifies the CodeRepositoryUtil class in CodeRepository.ts to include a new parameter, serviceRepository, in the createBranch and createOrCheckoutBranch methods. This change allows for better integration with the ServiceRepository class and improves the flexibility and maintainability of the code.
The HostedCodeRepository class in HostedCodeRepository.ts has been updated to include a new method, createPullRequest. This method allows for the creation of pull requests in the code repository. This change enhances the functionality and flexibility of the HostedCodeRepository class.
This commit refactors the CodeRepositoryUtil and LocalFile classes to include a new method, sanitizeFilePath, which removes double slashes from file paths. This change ensures that file paths are properly formatted and improves the reliability and maintainability of the code.
The CodeRepositoryType.ts file has been refactored to remove commented out code and unused imports. This change improves code cleanliness and reduces unnecessary clutter in the file.
The Config.ts file has been updated to handle the GitHub token more efficiently. The GetGitHubToken function now checks the repository type and throws an exception if a GitHub token is required but not provided. This change improves the security and reliability of the application by ensuring that the correct token is used for GitHub repositories.
The jest.config.json files in the Model, Probe, Common, Copilot, CommonUI, Ingestor, IsolatedVM, TestServer, and CommonServer directories have been updated. The "testPathIgnorePatterns" property has been added to each file, excluding the "node_modules" and "dist" directories from test path matching. This change improves test performance and ensures that unnecessary files are not included in the test coverage.
The CodeRepositoryUtil methods getGitCommitHashForFile and getFilesInDirectory have been updated to accept a repoPath parameter. This change allows for specifying the repository path when retrieving the git commit hash for a file or getting the files in a directory. It improves the flexibility and reusability of the CodeRepositoryUtil class.
Update CodeRepository.getRepository() to return a Promise<CodeRepositoryModel> instead of a string. This change improves the functionality and flexibility of the CodeRepository class.
The startup message in the Copilot/Index.ts file has been updated to provide a clearer description of the application. This change improves the readability and understanding of the log output during the startup process.
This code change updates the logger class to use the configured log level from the environment configuration. The getLogLevel method is added to retrieve the log level, and the info, error, warn, and debug methods are updated to check the log level before logging the message. This change ensures that the logger behaves according to the configured log level, improving the consistency and control of log output.