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

Adds an experimental command /symf that provides an indexed keyword search capability #728

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

beyang
Copy link
Member

@beyang beyang commented Aug 17, 2023

Adds an experimental /symf command to the Cody sidebar. /symf uses symf, a CLI that implements LLM-enabled keyword search. MVP for #583

Use

  1. Install symf: go get github.com/sourcegraph/symf/cmd/symf@latest
  2. Set the following fields in the VS Code settings:
    "cody.experimental.symf.path": "the full path to the symf binary",
    "cody.experimental.symf.anthropicKey": "an api key from anthropic",
    
  3. Type "/symf <your query>" in the Cody sidebar:
    image

The first time /symf is used for a given repository, it will need to build an index, so you'll see a message like this:

An alert will appear when the index is finished building:

Comments

The command is experimental and requires manual steps (installing the binary and setting the config fields) at the moment. It's intended for internal use to test out the quality of the search results within the Cody UI.

Currently, the following languages are supported by symf:

  • TypeScript
  • TSX
  • Go
  • Python
  • C

The next milestone is to make this a viable replacement for /search. This will require:

  • Replacing the direct Anthropic dependency with Cody Gateway
  • Auto-download the symf binary
  • Show the expanded keyword query being used under the hood (more transparency)
  • A better UX for communicating index build status
  • (Potential) implement index-less search in symf
  • Add more languages to symf

Test plan

Command is experimental only at the moment.

@beyang beyang requested a review from abeatrix August 20, 2023 00:04
@beyang beyang marked this pull request as ready for review August 20, 2023 00:04
@beyang beyang requested a review from a team August 20, 2023 00:08
Copy link
Member

@sqs sqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't run it, but i don't see anything that would cause the non-exoerimental functionality in the extension to fail, so lgtm to merge

@beyang beyang merged commit 2d497cd into main Aug 21, 2023
17 checks passed
@beyang beyang deleted the bl/symf branch August 21, 2023 01:25
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.

None yet

2 participants