-
Notifications
You must be signed in to change notification settings - Fork 323
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
Send client-name, client-version query string parameters to completions #4018
Conversation
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.
Nice! But this misses lib/shared/src/sourcegraph-api/completions/browserClient.ts
let's make sure to add the headers there as well even though it's unclear wether we actually have customers using it 🤔
4f79ff1
to
e02ebc4
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.
Thank you 🙇
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.
👀
biome Update agent recordings Add client-name-version Revert spurious graph-context.test.ts change. Add missing symf recordings, update graph snapshot. De-flake an e2e test. Lowercase the client name, Sourcegraph server expects lowercase strings. Update agent recordings. Feedback
…t be reliably updated.
e02ebc4
to
ce5aec2
Compare
Closes CODY-1300
Sourcegraph 5.4 or later completions endpoint will start to check a minimum version asserted by the client. This starts sending the relevant header.
Part of sourcegraph/sourcegraph#62116
Test plan
CI
Note updated recordings have client-name, client-version query string parameters.
Manual test
Sign in to sg02.sourcegraphcloud.com and do a chat. You should see an error message like "Request Failed: ClientCodyIgnoreCompatibilityError: Cody for vscode version "1.16.0" doesn't match version constraint ">= 1.20.0" Note, the "vscode" and "1.16.0" strings come from the client.
Generate an autocomplete with alt-\ and check the Cody by Sourcegraph output category contains a cody.completion/error log:
JetBrains: Run JetBrains plugin with this agent and do similar actions. Error messages indicate the right client name and version are sent: