eca icon indicating copy to clipboard operation
eca copied to clipboard

Allow file references and contents in chat history as well

Open ericdallo opened this issue 1 year ago • 4 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

  1. I will send a message with file content in system message and prompt will contain the identical path.
  2. The LLM will know that the system message contains it
  3. I will remove it from the context for the 3 next messages
  4. Then i will ask it about something regarding that file again and i won’t add it to the context
  5. It will use the tool to read the file

If it would be just in the history then it wouldn’t have to read the file again…

ericdallo avatar Oct 10 '25 14:10 ericdallo

In this ticket, we will also look at how to use attached files so that their content is not sent to the system prompt and LLM does not subsequently read them right again with a tool, which is unnecessary.

zikajk avatar Oct 10 '25 15:10 zikajk

Summary We will implement two distinct behaviors for the @ symbol:

@ above the prompt: Appends content to the system prompt (for instructions, rules, etc.).

@ inside the prompt: Injects file content into the current user prompt for one-time context.

zikajk avatar Oct 11 '25 06:10 zikajk

Re-discussion update:

Summary We will implement two distinct behaviors for contexts improvements:

@ context-area: Appends context content to the system prompt (for instructions, rules, etc.), this field is not stored in chat history, it's sent every prompt to LLM together with ECA instructions (we already do that)

# inside the prompt: Injects context identifier (ex: abs file path) only into the current user prompt, saved in chat history messages.

Optional: In the future we may allow users type @ in prompt as well to fill context content in prompt or just add to context area like we do ATM

ericdallo avatar Oct 12 '25 16:10 ericdallo

Done, available in 0.68.0

ericdallo avatar Oct 14 '25 14:10 ericdallo