Skip to content
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

fix: respect cody.useContext for context fetching #2616

Merged
merged 4 commits into from
Jan 8, 2024
Merged

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jan 8, 2024

CLOSE #2615

fix: add config to control context fetching strategy

This adds the exisiting 'cody.useContext' config to SimpleChatPanelProvider that allows selecting between 'embeddings', 'keyword', and 'none' strategies for context fetching.

  • 'embeddings' will use embeddings-based indexing if available, falling back to keyword search (symf).
  • 'keyword' will only use keyword search-based (symf) context fetching.
  • 'none' will limit context to the user's current open file.

The default is now 'embeddings'

Test plan

  1. Start build from this branch
  2. Set cody.useContext to search to confirm context from embeddings are not added, and context from symf are added (if any)
  3. Set cody.useContext to embeddings to confirm context from embeddings are added (if any)
  4. Set cody.useContext to none to confirm only context from open file (if any) is added

@abeatrix abeatrix requested review from dominiccooney and a team January 8, 2024 18:57
@abeatrix abeatrix merged commit 2a70d3f into main Jan 8, 2024
16 checks passed
@abeatrix abeatrix deleted the bee/fix-useContext branch January 8, 2024 23:28
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.

bug: cody.useContext config option does not work
2 participants