-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make sidebar chat commands match main quick pick #902
make sidebar chat commands match main quick pick #902
Conversation
…sh-command-required
…sh-command-required
…sh-command-required
…sh-command-required
84d429d
to
7f262d6
Compare
7f262d6
to
69c8c05
Compare
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.
@abeatrix no let’s leave that off as it’s more specific to the chat view. |
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.
Pushed a few small tweaks. It would be good to add /ask
in there too.
@toolmantim, "/ask" submits a question is a sidebar chat. The user has already chat input focused, they need to type their question and submit. Does having "/ask" command add additional value in this case? |
Part of https://github.com/sourcegraph/sourcegraph/issues/56182 Here's how to get this running: 1. Azure keys * https://portal.azure.com > Azure OpenAI > sourcegraph-test-oai > Keys and Endpoint * Copy the key and `export AZURE_API_KEY="<paste the key here>"` 1. `export SRC_ENDPOINT=https://sourcegraph.sourcegraph.com` 1. `export SRC_ACCESS_TOKEN="<s2 access token goes here>"` 1. Run like so: `pnpm run start --label="Beam search" --output="$HOME/test.results" --provider=azure` * single beam search test runs faster than total # test cases * output file actually allows you to drill into the LLM interaction details ## Test plan Manually verified: ### success scenario with Azure OpenAI and ``` ➜ e2e git:(cb/s/56182-azure) ✗ pnpm run start --label="Beam search" --output="$HOME/azure.results" --provider=azure > @sourcegraph/cody-e2e@0.0.1 start /Users/cbart/cody/e2e > pnpm run --silent build && node dist/e2e "--label=Beam search" "--output=/Users/cbart/azure.results" "--provider=azure" Run 1 of 1 Testing (1/1): Beam search (github.com/huggingface/transformers) Incorrect answers (LLM judge): 0/2 (0%) Incorrect or partial answers (LLM judge): 1/2 (50%) Missing facts: 5/9 (56%) Hallucinated entities: 9/9 (100%) Run 1 of 1 summary: Incorrect answers (LLM judge): 0/2 (0%) Incorrect or partial answers (LLM judge): 1/2 (50%) Missing facts: 5/9 (56%) Hallucinated entities: 9/9 (100%) ``` ### fast fail when not enough env vars provided ``` ➜ e2e git:(cb/s/56182-azure) unset AZURE_DEPLOYMENT_ID ➜ e2e git:(cb/s/56182-azure) ✗ pnpm run start --label="Beam search" --output="$HOME/azure.results" --provider=azure > @sourcegraph/cody-e2e@0.0.1 start /Users/cbart/cody/e2e > pnpm run --silent build && node dist/e2e "--label=Beam search" "--output=/Users/cbart/azure.results" "--provider=azure" Missing required environment variables: AZURE_DEPLOYMENT_ID 1. https://portal.azure.com > Azure OpenAI > sourcegraph-test-oai > Keys and Endpoint 2. Go to Model Deployments > Manage Deployments. Find the deployment name and: export AZURE_DEPLOYMENT_ID="<paste deployment name here>" ELIFECYCLE Command failed with exit code 1. ```
…sh-command-required
…mets/enhance-sidebar-chat-commands
…sidebar-chat-commands
@taras-yemets there's a similar argument in the command quickpick too, in that they can ask a question just by typing and hitting enter. But the real value is in consistency & muscle memory. People can get used to mashing the same keys on the keyboard and having the same commands available, whether it's the chat window or the command quickpick. The goal is that people don't have to keep a mental map of what commands are available in each of the places. Even though it does feel a little redundant or repetitive in isolation. |
1. Adds `/ask` command to sidebar chat commands. 2. Refactors `/ask` and `/edit` commands to use variables for description and slash commands instead of hardcoded strings. Follow-up on #902 (#902 (comment)) https://github.com/sourcegraph/cody/assets/25318659/e5363ffe-5b89-4970-aff4-eb329e3bd1ff ## Test plan CI passes. Tested manually (video attached). <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. -->
Next iteration on #631
Follow-up on #798
Design
Screen.Recording.2023-09-02.at.09.30.10.mov
Test plan
CI passes.
Tested manually (video attached).