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

protocol: add meta.mentions.label #152

Merged
merged 3 commits into from
Jun 18, 2024
Merged

protocol: add meta.mentions.label #152

merged 3 commits into from
Jun 18, 2024

Conversation

keegancsmith
Copy link
Member

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 keegancsmith requested a review from a team June 13, 2024 21:43
@keegancsmith
Copy link
Member Author

keegancsmith commented Jun 13, 2024

@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
Copy link
Collaborator

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?

  • azure-devops-workitems — "Search by title, description or id..."
  • confluence — "Search by page title..."
  • devdocs — "Search docs... (angular~16, css, typescript)"
  • github — "Search issues and pull requests..."
  • google-docs — "Search by title or paste a URL..."
  • hello-world — "Choose an item..."
  • jira — "Search by name, id or paste a URL..."
  • linear-docs — "Search..."
  • linear-issues — "Search..."
  • links — n/a
  • notion — "Search..."
  • prometheus — n/a
  • semgrep — "Paste a URL..."
  • sentry — "Paste a URL..."
  • slack — "Search by channel name..."
  • sourcegraph-search — "Paste a code search URL..."
  • storybook — n/a
  • web — "Paste a URL..."

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..."

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.
@keegancsmith
Copy link
Member Author

keegancsmith commented Jun 18, 2024

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.

I did this by running this command

  git show --stat | \
    grep -o 'provider/[^/]*' | \
    sort | uniq | \
    while read dir; do pushd $dir; npm version patch; popd; done
  pnpm biome
@keegancsmith keegancsmith marked this pull request as ready for review June 18, 2024 14:48
@keegancsmith keegancsmith merged commit ba1d9e6 into main Jun 18, 2024
17 checks passed
@keegancsmith keegancsmith deleted the k/label branch June 18, 2024 14:52
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.

3 participants