eca icon indicating copy to clipboard operation
eca copied to clipboard

What can I do if prompt becomes too big?

Open madorian opened this issue 1 year ago • 8 comments

I was fixing some compiler errors and it had to read a few files and after that I got the prompt is too big message.

I had to reset and start all over, but is there any way to edit the context, so that I don't have to start anew? - or tell it to focus on one part or what is the proper procedure? I'm used to gptel where I just remove files from the context, but it seems that's not the way goes about things here?

madorian avatar Oct 24 '25 11:10 madorian

Yes, you can:

  • /compact it accepts optional text describing something to focus the compact or to tell to LLM
  • Add contexts to system prompt (Above user prompt) and remove on next requests

ericdallo avatar Oct 24 '25 12:10 ericdallo

ok, great, thanks, I'll try that next time.

I also wonder if I tell it to compile something, it might get enormous output, but the actual error is like the last line. Not sure where to ask about this, so injecting it here to get a clue;)

What is the idea? To edit the output before it gets sent or it's able to do that locally itself before it sends?

When I compile manually , I just cut what the LLM needs, but with this automated process, what is the proper procedure?;)

madorian avatar Oct 24 '25 12:10 madorian

the eca_shell_command return to LLM all stdout and stderr so LLM can decide what to do next, you could have a script that cuts that and tell LLM to call that, or have a custom tool to compile your project.

I'd like to avoid options to cut the stderr/stdout as it may be too specific for your case, most of the time it's good to give LLM context about the command and it's not that what makes context size huge.

Another way is to pass flags to supress too much output in the compile command, most CLIs have that.

ericdallo avatar Oct 24 '25 12:10 ericdallo

I did

/compact keep only unsolved todos from .md files and current problems we're actively working on, remove all solved issues documented in CHANGES.md, filter out compiler outputs and debug traces, preserve key architecture decisions and design patterns still being used, exclude resolved discussions and outdated code examples, focus on information necessary to complete remaining work

It doesn't accept a file that I can put the compact instructions in?

Also, the actual buffer what not changed; it just created a compact entry, sort of.

madorian avatar Oct 28 '25 11:10 madorian

Hmm, that didn't go so well


Compacting... ✅


what is the next text to focus on?
Thoughts

I don't see the actual summary of our previous conversation. It seems the summary content wasn't included in your message.

Could you please provide:
1. **What were we working on?** (e.g., implementing a feature, fixing a bug, refactoring code)
2. **What has been completed so far?**
3. **What is the current state or goal?**

Alternatively, if you remember what we were discussing, you can just tell me what task you'd like to continue with, and I'll help you move forward!

madorian avatar Oct 28 '25 11:10 madorian

@madorian we had a bug on compact not working I fixed recently, can you try latest server version please? Also, I believe you can ask to after compaction save to a file and that would work

ericdallo avatar Oct 28 '25 12:10 ericdallo

I did, but is there any eca-version command?;) I did pull and require, so it should be newest.

madorian avatar Oct 31 '25 12:10 madorian

you can type /doctor on chat to get informations like the version

ericdallo avatar Oct 31 '25 12:10 ericdallo