sourcegraph / openctx

See contextual info about code from your dev tools, in your editor, code review, and anywhere else you read code.
https://openctx.org
Apache License 2.0
149 stars 17 forks source link

Add query selector config #178

Closed thenamankumar closed 3 months ago

thenamankumar commented 3 months ago

Context: https://sourcegraph.slack.com/archives/C04MSD3DP5L/p1721935489008949

A customer wants to return context items from their provider if the user's query matches some keywords. They wish to bypass the whole mentions process and return context items for queries on submission time.

This makes sense and is useful.

This PR adds meta.items.querySelectors which will be used at query evaluation time to match with query and then call provider.items for the matching providers to collect context items.

thenamankumar commented 3 months ago

The skip-typescript optional ci checks seem broken. Everything else was green so merged.