eca icon indicating copy to clipboard operation
eca copied to clipboard

Infinite “Parsing given context” when chat starts with absolute path

Open Artawower opened this issue 1 year ago • 5 comments

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:

  1. Open eca chat
  2. 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: 

Artawower avatar Nov 06 '25 07:11 Artawower

Ha good catch, we are indeed failing and thinking it's a command

ericdallo avatar Nov 06 '25 11:11 ericdallo

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 avatar Nov 10 '25 16:11 johanatzoopla

@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

ericdallo avatar Nov 10 '25 17:11 ericdallo

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 avatar Nov 10 '25 17:11 johanatzoopla

@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.

ericdallo avatar Nov 10 '25 18:11 ericdallo