Infinite “Parsing given context” when chat starts with absolute path
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Describe the bug
If you send a message to the chat that starts with / and is not an eca command, for example when trying to paste a log from github ci, the chat stack forever.
To Reproduce Steps to reproduce the behavior:
- Open eca chat
- Send
/some/absolute/path/some.log
Please read this log file.
Expected behavior Messages are being processed successfully
Doctor
ECA version: 0.77.0
Server cmd: /Users/me/.emacs.d/eca/eca server
Default model: anthropic/claude-sonnet-4-5-20250929
Login providers:
anthropic: {:step :login/done, :mode :max, :verifier "ZcV*W1O", :type :auth/oauth, :refresh-token "sk-*AAA", :api-key "sk-*QAA", :expires-at 1762439822}
azure: {}
deepseek: {}
github-copilot: {:step :login/done, :device-code "7d8*48a", :access-token "ghu*Pw7", :api-key "tid*c76", :expires-at 1761779015}
google: {}
openai: {}
openrouter: {}
z-ai: {}
Relevant env vars:
Ha good catch, we are indeed failing and thinking it's a command
For me, this looks like it's not an edge case:
I added a file to the context and the filename is included in the prompt with an absolute path, so this happens in the normal operation of eca.
@johanatzoopla hum, indeed, since before sending to LLM we normalize the content so if your prompt is #/path/to-something check this, it will be sent as /path/to-something check this, falling on this issue.
I will prioritize this one, thanks
To clarify. I used this function: M-x eca-chat-add-filepath-to-user-prompt which causes this issue.
I think I should have used M-x eca-chat-add-context-to-user-prompt instead (which seems to work).
(I recently upgraded and had to change which function to use, and I thought that was the more suitable one.)
@johanatzoopla both should work when this is fixed, currently only # (eca-chat-add-filepath-to-user-prompt) will cause that when in the start of the prompt.