This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes the Cody integration tests by adding a separate in-memory secret store when testing. The VSCode secret storage uses the Keychain Access.app on macOS to store the values, but it does not separate between developing the extension and testing the extension. So whenever you would run the integration test, it would override the previously set development access token. We can avoid that by switching to an in-memory implementation when testing. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> * Run `pnpm run build && pnpm run test` in the `client/cody/vscode-codegen` directory. The tests should pass. ## App preview: - [Web](https://sg-web-rn-fix-cody-integration-test.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more.
This PR refactors parts of the extension to make it unit testable, specifically the `Transcript` class. This involved making the `Transcript` class and its dependencies independent of the VSCode API. I replaced specific implementations with interfaces where possible, allowing us to mock any dependencies we need. I added a single unit test as a proof of concept, and more will be coming in subsequent PRs. I recommend that you review commit by commit, as I tried to group the relevant changes as much as possible. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> * Run `pnpm run build && pnpm run test:unit && pnpm run test:integration`, tests should be green. ## App preview: - [Web](https://sg-web-rn-make-cody-unit-testable.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more.
RE [slack thread ](https://sourcegraph.slack.com/archives/C04NPH6SZMW/p1678900652268589) 1. Add: auto scroll to the bottom of the screen on new chat messages ([Loom](https://www.loom.com/share/5bf6b5d9bef6446291d5a8ef480f7776))  2. Replace `arrow-up` icon with `arrow-down` on expanded context messages. Also updated the default font color for bot messages <table> <tr> <td>Before</td> <td>After</td> </tr> <tr> <td> <img width="487" alt="image" src="https://user-images.githubusercontent.com/68532117/225406411-f3d2ddaa-aa1c-4627-9d25-13f04d64cf06.png"> </td> <td> <img width="489" alt="image" src="https://user-images.githubusercontent.com/68532117/225405891-ef303973-4140-4b4a-a429-92b7a4f5aa7a.png"> </td> </tr> </table> ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> launch Cody in VS Code Debug mode: - Run `pnpm i` at the root of this repository - Select `Launch Cody Extension` from the dropdown menu in the `RUN AND DEBUG` sidebar in VS Code ## App preview: - [Web](https://sg-web-bee-cody-chat-scroll.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more. --------- Co-authored-by: Dominic Cooney <[email protected]>
Implements the new Sourcegraph backend for the Cody extension. Since it's a fairly large PR, I recommend reviewing commit by commit. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> * Chatting and executing recipes should still work. * `pnpm run build && pnpm run test:integration && pnpm run test:unit` should be green. ## App preview: - [Web](https://sg-web-rn-cody-sourcegraph-backend.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more.
This PR removes all the unused and outdated directories from the `client/cody` project as they have been integrated into the main app, and moves the VS Code extension to the base `client/cody` directory. I have also updated the README.md in `client/cody` to reflect the changes. All CSS files are now using relative units instead of hard-coded units. Everything should scale according to user's system. Some minor CSS fixes. <table> <tr> <td>Before</td> <td>After</td> </tr> <tr> <td> <img width="425" alt="image" src="https://user-images.githubusercontent.com/68532117/226679956-d4182efb-3175-4aab-88ea-f3130babf507.png"> </td> <td> <img width="435" alt="image" src="https://user-images.githubusercontent.com/68532117/226713400-195b4158-3192-4492-95a9-e89a8a98acbf.png"> </td> </tr> </table> <table> <tr> <td>Before</td> <td>After</td> </tr> <tr> <td> <img width="425" alt="image" src="https://user-images.githubusercontent.com/68532117/226689174-b50fef13-32fd-4260-935f-933c559fa100.png"> </td> <td> <img width="425" alt="image" src="https://user-images.githubusercontent.com/68532117/226713189-d725ff96-f976-41a7-8fec-b1146142c32e.png"> </td> </tr> </table> Replaced placeholder logo with logo for cody: <img width="510" alt="image" src="https://user-images.githubusercontent.com/68532117/226713033-c4b5b629-6fb8-47eb-8a0d-a857c4357417.png"> ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Run the following commands from the **root** of this repository in this branch: - pnpm --filter cody run build - pnpm --filter cody run test:unit - pnpm --filter cody run test:integration - pnpm --filter cody run vsce:package Everything should work as before the move. ## App preview: - [Web](https://sg-web-bee-cody-restructure.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more.
…t find the repository on their Sourcegraph instance.
reset version number for cody enterprise
### 1. Fix light theme issue RE[ issue reported by user 1 ](https://sourcegraph.slack.com/archives/C04MSD3DP5L/p1679515816745719)[issue reported by user 2](https://sourcegraph.slack.com/archives/C04MSD3DP5L/p1679519459355209) Issue:  We have been using --vscode-background and --vscode-foreground as the default color, which is different than the default color theme for the sidebar. Replace these values with `--vscode-sideBar-background` and `--vscode-sideBar-foreground` fixed the issue. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Tested on multiple light themes and dark themes: <img width="2168" alt="Screenshot 2023-03-23 at 7 26 47 AM" src="https://user-images.githubusercontent.com/68532117/227253076-562f5977-c331-4354-8838-c9e1d49dab23.png"> <img width="2168" alt="Screenshot 2023-03-23 at 7 27 00 AM" src="https://user-images.githubusercontent.com/68532117/227253039-35e7aed6-bfe7-4147-a4ad-75e34cd6e337.png"> <img width="2168" alt="Screenshot 2023-03-23 at 7 27 31 AM" src="https://user-images.githubusercontent.com/68532117/227253125-9da78126-e440-4faf-a09f-406f496d3413.png"> <img width="2168" alt="Screenshot 2023-03-23 at 7 27 22 AM" src="https://user-images.githubusercontent.com/68532117/227253166-78ec9a0f-86a1-43e7-908a-e82ea4e9b115.png"> ## App preview: - [Web](https://sg-web-bee-cody-login.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more.
abeatrix
approved these changes
Mar 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the tests work and the package built from this branch also works!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test plan
pnpm run build && pnpm run test:integration && pnpm run test:unit
should be green.App preview:
Check out the client app preview documentation to learn more.