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
135 stars 14 forks source link

protocol: add meta.mentions.label #152

Closed keegancsmith closed 2 months ago

keegancsmith commented 3 months ago

The intention behind this field is this is the placeholder label that is shown when a user selects a provider for mentioning, but before they have searched anything.

Part of https://linear.app/sourcegraph/issue/CODY-2275/add-all-the-right-labels-for-provider-mentions-query-stats

keegancsmith commented 3 months ago

@toolmantim did you imagine any other fields we may want to customize? eg the message when there are no results. My imagination is also really bad at what text we would actually use instead of "Search..." for each provider. Mind giving some examples?

@sourcegraph/noodle what do you think of this change to the protocol? Unsure its a good name. Also I keep admiring the choice of ai and ui fields and wondering if maybe we need a ui like field here? Then maybe there could also be an ai field to help with prompting?

toolmantim commented 3 months ago

eg the message when there are no results. My imagination is also really bad at what text we would actually use instead of "Search..." for each provider. Mind giving some examples?

I think just this single static label is fine for now.

Down the track, we may want to allow the provider to change the label based whenever mentions is called, e.g. "Invalid Google Docs URL. Paste a valid URL..."

There's an interesting case of multi-step providers too, like Remote Files that @thenamankumar added. For Remote Files it would be something like "Search or choose a repository..." and then "Search or choose a file..."

keegancsmith commented 2 months ago

I didn't update hello-world, that provider doesn't implement mentions and needs a little bit of love for another PR.

I also didn't update if we will use the default label of "Search..."

sourcegraph-search — "Paste a code search URL..."

This actually takes in a normal sourcegraph query not a URL.