aws / mynah-ui

https://aws.github.io/mynah-ui/
Apache License 2.0
13 stars 11 forks source link

@ command parsing conflicts with chatting about literal Java annotations, Python decorators, C# verbatim strings, etc. #89

Closed senorflor closed 1 month ago

senorflor commented 1 month ago

Problem

Steps to reproduce the issue

  1. Type any code that includes a @ symbol, e.g. @SomeAnnotation in Java @Decorator in Python, @instance_var in Ruby, etc.
  2. Observe special syntax highlighting from @ character onwards, e.g.
  3. Type enough characters so that word is not in the command picker, then Spacebar or Tab
  4. Token starting at @ is deleted

Expected behavior

  1. Either:
    • Once the identifier was no longer in the command list, I would expect the token to lose syntax highlighting and to be left intact, allowing entry of such code elements into chat with the underlying service/model.
    • Alternately, I would expect some combination of escape characters, e.g. `@backtick_fencing` or \ prefixing, to allow the entry of @IdentifiersLikeThis without command parsing.

System details