8000 CLI: fix enhanced context by olafurpg · Pull Request #4894 · sourcegraph/cody · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CLI: fix enhanced context #4894

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

Conversation

olafurpg
Copy link
Member
@olafurpg olafurpg commented Jul 16, 2024

Fixes CODY-2742

Previously, the --context-repo option did not work with the CLI because of two issues:

  • The CLI used the client name "cody-cli", which Sourcegraph Enterprise rejects due to a problem that is described in the PR https://github.com/sourcegraph/sourcegraph/pull/63855 To work around this problem, the CLI will use the client name "jetbrains" for time being.
  • The addEnhancedOptions was set to false in chat/submitMessage. We now set this option to true when --context-repo or --context-file is enabled.

Test plan

See updated test case that fixes the Squirrel test. This change required using S2 credentials instead of dotcom.

Previously, the `--context-repo` option did not work with the CLI
because of two issues:

- The CLI used the client name "cody-cli", which Sourcegraph Enterprise
  rejects due to a problem that is described in the PR https://github.com/sourcegraph/sourcegraph/pull/63855
  To work around this problem, the CLI will use the client name
  "jetbrains" for time being.
- The `addEnhancedOptions` was set to false in `chat/submitMessage`. We
  now set this option to `true` when `--context-repo` or
  `--context-file` is enabled.
@olafurpg olafurpg requested a review from a team July 16, 2024 15:27
@olafurpg olafurpg enabled auto-merge (squash) July 16, 2024 15:27
@olafurpg olafurpg requested a review from janhartman July 16, 2024 15:28
@olafurpg olafurpg merged commit 8edab7e into main Jul 16, 2024
20 of 21 checks passed
@olafurpg olafurpg deleted the olafurpg-cody-2891-work-around-sourcegraph-enterprise-issue-with-context branch July 16, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0