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

Fix conflict of @ context selections and user intended annotations start with @ #95

Conversation

dogusata
Copy link
Collaborator

@dogusata dogusata commented Aug 8, 2024

Problem

It is not possible to write any text which starts with @ character if they are not in the available contexts list. And if it is in the context list, it works as a context instead of user intended text.

Solution

  • Added checks to avoid removal of the word if it starts with @ character and not in the available context selection list
  • Added checks to send only the words start with @ character in the available context items list as part of the prompt object
  • Added checks to paint only the words start with @ character in the available context items list, otherwise keep as normal texts

Here's how it works:

context-selection-conflict-fix.mov

NOTE: Even though the word is partially matching with one of the context items available, users are able to hit esc and proceed with their own texts. For example: after writing @cod if user directly hits space, it will automatically select @code as a context item. But if user hits escape and close the selector overlay, they can leave it as @cod.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@senorflor
Copy link

Nice, thanks for addressing so quickly, and for generalizing the expected behaviors from the issue into a more coherent feature set!

@dogusata dogusata merged commit ace8b73 into main Aug 9, 2024
1 check passed
@dogusata dogusata deleted the context-selector-conflicts-with-java-annotations-python-decorators-c-verbatim-strings branch August 9, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants