void icon indicating copy to clipboard operation
void copied to clipboard

Apply changes lazily

Open andrewpareles opened this issue 1 year ago • 0 comments

Right now, the "Apply" button always takes whatever is in the box (see right side) and writes it to the whole file:

image

This means the LLM needs to rewrite the whole file every time it suggests an edit. It's not able to write out partial changes like this:

// ... rest of file 

let x = 5

// ... rest of file 

We should allow the AI to output partial changes as above. When the user clicks "Apply", the AI should rewrite the file using the partial changes. We should also add a text decoration that shows the progress of the rewrite. Once the user clicks "Apply" the whole file should be gray, and as the LLM writes, the unwritten part should remain gray.

image After we make this change, we should remove this part of the prompt, and tell the AI to output comments like // ... rest of file instead.

andrewpareles avatar Sep 17 '24 22:09 andrewpareles