eca icon indicating copy to clipboard operation
eca copied to clipboard

Sending a prompt crashes with `URISyntaxException` when workspace-folder URI is malformed (Error: Illegal char <"> at index)

Open snoopier opened this issue 8 months ago • 1 comments

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

  1. Open an ECA chat session
  2. Type a message containing an @ sign, e.g. send a mail to [email protected]
  3. Send the prompt
  4. 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.

snoopier avatar Mar 26 '26 16:03 snoopier

Thank you, fixed!

ericdallo avatar Mar 26 '26 18:03 ericdallo