Sending a prompt crashes with `URISyntaxException` when workspace-folder URI is malformed (Error: Illegal char <"> at index)
Describe the bug**
Sending a chat prompt that contains an @ sign (e.g. an email address like [email protected]) 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 [email protected] - 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 [email protected], 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.
Thank you, fixed!