Describe the bug**
Sending a chat prompt that contains an @ sign (e.g. an email address like user@aol.com) crashes with:
Error: Illegal char <"> at index 11: "
Check ECA stderr for more details.
Steps to reproduce
- Open an ECA chat session
- Type a message containing an
@ sign, e.g. send a mail to user@siemens.com
- Send the prompt
- Error appears instead of a response
Root cause
contexts-str-from-prompt in context.clj extracts @mentions from the prompt text using the regex @([^\s:]+). When the prompt contains user@siemens.com, it extracts siemens.com as a context path. This extracted string eventually reaches shared/uri->filename which passes it to java.net.URI — and since siemens.com is not a valid file URI, it throws URISyntaxException.
Expected behavior
Text after @ that is not a valid file path or context reference should be ignored. An email address in the prompt should not crash the session.
Describe the bug**
Sending a chat prompt that contains an
@sign (e.g. an email address likeuser@aol.com) crashes with:Steps to reproduce
@sign, e.g.send a mail to user@siemens.comRoot cause
contexts-str-from-promptincontext.cljextracts@mentionsfrom the prompt text using the regex@([^\s:]+). When the prompt containsuser@siemens.com, it extractssiemens.comas a context path. This extracted string eventually reachesshared/uri->filenamewhich passes it tojava.net.URI— and sincesiemens.comis not a valid file URI, it throwsURISyntaxException.Expected behavior
Text after
@that is not a valid file path or context reference should be ignored. An email address in the prompt should not crash the session.