eca icon indicating copy to clipboard operation
eca copied to clipboard

remove markdown from rewrite

Open nico202 opened this issue 9 months ago • 4 comments

I know that eca rewrite prompt specifies no markdown fences, but it happens to me that sometimes the llm places them. Since it's quite obvious how to detect them (string begins and ends with ```) maybe eca-rewrite--add-text could just handle and remove them

nico202 avatar Mar 02 '26 09:03 nico202

@nico202 we do that for completion, I think we can just do the same, will take a look

ericdallo avatar Mar 02 '26 12:03 ericdallo

THe major problem is that we stream the text so it's hard to tell client that changed without changing the protocol, but I can do the protocol change as this makes sense

ericdallo avatar Mar 02 '26 12:03 ericdallo

@nico202 Done, can you update both eca-emacs and use latest eca (0.109.1) and test that? from my tests works nice, it should replace the final content with the normalized code once the rewrite streaming finishes

ericdallo avatar Mar 02 '26 12:03 ericdallo

Thanks! Tried a few times and I never got markdown in the output so I think it's working! :) Also the model this time outputted a description before the change which got correctly removed by eca! Thanks

nico202 avatar Mar 02 '26 15:03 nico202