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

Chat: fix at symbol title #3531

Merged
merged 5 commits into from
Mar 26, 2024
Merged

Chat: fix at symbol title #3531

merged 5 commits into from
Mar 26, 2024

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Mar 23, 2024

#3530

A user on Discord has reported that Cody is incorrectly showing an error message "No symbols found (try installing language extensions and opening a file)":

image

This error message/tooltip is incorrect as the result is expected to be empty when the query is empty, and not required to have a file opened for symbol search, this PR reverts the tooltip back to 'Search for a symbol to include...' to display on start-up screen.

Test plan

  • Type @# in the input, you should see 'Search for a symbol to include...'
  • No symbols found is displayed when no result is returned after typing more than 1 character

image

image

@abeatrix abeatrix requested review from toolmantim and a team March 23, 2024 01:04
@toolmantim
Copy link
Contributor

I'd like to leave this message in if there are 2 or more chars after @# but no results. Only because sometimes the VS Code API does return results after a period of time (and there's no API for loading state).

But we can make the message:

"No symbols found. Symbols may be loading, or language extensions not installed."

(May need overflow ellipsis)

@abeatrix
Copy link
Contributor Author

I'd like to leave this message in if there are 2 or more chars after @# but no results. Only because sometimes the VS Code API does return results after a period of time (and there's no API for loading state).

But we can make the message:

"No symbols found. Symbols may be loading, or language extensions not installed."

(May need overflow ellipsis)

I think there's a way to check if symbol providers are available in the current workspace or not to display the tooltip more accurately. Let me check on Monday to confirm, and we can add the "(symbols may be loading)" only if that works? @toolmantim

@toolmantim
Copy link
Contributor

Oh amazing! That would be even better.

@abeatrix
Copy link
Contributor Author

@toolmantim instead of "No symbols found (symbol maybe be loading)", what do you think about "Searching symbols..." and then display "No symbols found" after a timeout?

@toolmantim
Copy link
Contributor

I thought the API immediately returns a nil result? But if that's not right, or you're thinking of polling/retrying… some kind of experience like that could be nice. How would you calculate the timeout though, because huge codebases could take a very long time, and I'd still want us to show "(language extensions may be loading)"

@abeatrix
Copy link
Contributor Author

abeatrix commented Mar 25, 2024

I thought the API immediately returns a nil result?
That's my understanding as well but I misunderstood you when you said "only because sometimes the VS Code API does return results after a period of time (and there's no API for loading state)", which I just realized you are referring to when the symbol provider is initiating.

Updated to
image

@abeatrix abeatrix enabled auto-merge (squash) March 26, 2024 02:34
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good, but I wouldn't show the "(language extensions may be loading)" above two characters, because there's a good chance there's simply no matching symbols:

CleanShot 2024-03-26 at 15 18 15@2x

Two characters and under, you can be pretty sure there should always be a result, so something went wrong.

@abeatrix abeatrix merged commit 61f21d8 into main Mar 26, 2024
19 of 20 checks passed
@abeatrix abeatrix deleted the bee/fix-symbol-title branch March 26, 2024 04:19
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.

2 participants