Use this extension when you need to search code with Sourcegraph.
Tools provided by this extension:
nls_search: semantic search (natural language).keyword_search: keyword/regex search (Sourcegraph query syntax).read_file: fetch file contents (supports line ranges + revisions).list_repos,list_files: discover repos/files before reading.go_to_definition,find_references: basic code navigation.
Configuration:
SOURCEGRAPH_ENDPOINT: Base URL of your Sourcegraph instance.SOURCEGRAPH_ACCESS_TOKEN: Access token used asAuthorization: token ….
Guidelines:
- Prefer narrow, targeted queries: use
repo:,file:,lang:,type:where possible. - If results are too broad, add constraints (
repo:,file:,count:) and retry. - When you need more context, use
read_filefor the specific file and revision.