runtimerevolution / labs

0 stars 0 forks source link

Redo how we get the code changes from the LLM #108

Open ctmartinez1992 opened 6 days ago

ctmartinez1992 commented 6 days ago

The Problem

This line is in the prompt:

"If the file is to be modified send the finished version of the entire file."

This works for small files but will come into issues if files are too big or if there's a lot of changes to be done in files.

Let's say we have a file with 1000 lines, if there's the need to change just 1 line from that file, the LLM will try to return the entire file in the response but will not be able to do so because the response will be too big. In that case, it's going to remove everything and just return the 1 line it's going to change.

This is fine but the code that applies all changes call_agent_to_apply_code_changes is always expecting the entire file. This needs to change.


Possible Solutions

I see 2 solutions (there might be more):

Or both solutions at the same time, if possible.