Skip to content

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

@snoopier

Description

@snoopier

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

  1. Open an ECA chat session
  2. Type a message containing an @ sign, e.g. send a mail to user@siemens.com
  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 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions