Skip to content

Commit

Permalink
[Backport jb-v7.12.x] Disable Intent Detection if Code Search Disabled (
Browse files Browse the repository at this point in the history
#6756)

Check for `codeSearchEnabled` using the

[query](https://sourcegraph.sourcegraph.com/api/console#%7B%22query%22%3A%22query%20%7B%5Cn%20%20enterpriseLicenseHasFeature(feature%3A%5C%22code-search%5C%22)%5Cn%7D%5Cn%22%7D)
to make sure intent detection is only available for users with code
search enabled.

Also display the intent selection dropdown only when code search is
enabled.

- test that intent detection is working as intended when connected to
s2.
- connect to an instance with code search disabled and intent detection
should be totally disbled and hidden and there should be no intent
selection dropdown as well.

(cherry picked from commit 76cc36e)


## Test plan

- test that intent detection is working as intended when connected to
s2.
- connect to an instance with code search disabled and intent detection
should be totally disbled and hidden and there should be no intent
selection dropdown as well.

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->

Co-authored-by: Naman Kumar <[email protected]>
  • Loading branch information
umpox and thenamankumar authored Jan 22, 2025
1 parent 60bbda0 commit 545d593
Show file tree
Hide file tree
Showing 13 changed files with 1,223 additions and 301 deletions.
96 changes: 96 additions & 0 deletions agent/recordings/auth_2503977039/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions agent/recordings/autocomplete_2136217965/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions agent/recordings/cody-chat_103640681/recording.har.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 545d593

Please sign in to comment.