sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.53k stars 261 forks source link

refactor how remote repo/file providers represent context #5101

Open sqs opened 1 month ago

sqs commented 1 month ago

Now, they just embed a ContextItem in their mention.data.contextItem field. This eliminates ad-hoc intermediate ways of representing a remote repo or file, of which there were a few in the codebase.

No behavior change.

Test plan

Perform remote @-repo and @-file mentions in VS Code and Cody Web. Ensure they work. In particular, ensure the right context is fetched and that remote @-file mentions have the 2-step input (where first you pick the repo and then the file).

jtibshirani commented 1 month ago

Thanks for the heads up on this. It makes sense to me, defer to Dominic on the detailed review though!