native_tool_call_adapter icon indicating copy to clipboard operation
native_tool_call_adapter copied to clipboard

Error with "search and replace" tool

Open mizuikki opened this issue 1 year ago • 5 comments

GPT-OSS-20B always uses the wrong regular expression.

Errors:

Error search and replace:
Invalid regular expression: /(?s)<div class="additional-filter-section"[^>]*>.*?</div>/g: Invalid group
Error search and replace:
Invalid regular expression: /(?s)<div class="additional-filter-section"[^>]*>.*?</div>/g: Invalid group
Image

mizuikki avatar Sep 03 '25 12:09 mizuikki

Currently, this tool returns complete XML to Roo-Code, but Roo-Code's processing appears incomplete and unescaped, seemingly implemented assuming potentially dangerous XML. If the XML contains characters requiring escaping, the correctly processed XML appears to become unmanageable in Roo-Code. I will fix this later.

irreg avatar Sep 04 '25 14:09 irreg

Currently, this tool returns complete XML to Roo-Code, but Roo-Code's processing appears incomplete and unescaped, seemingly implemented assuming potentially dangerous XML. If the XML contains characters requiring escaping, the correctly processed XML appears to become unmanageable in Roo-Code. I will fix this later.

The apply_diff tool doesn't work well either.

mizuikki avatar Sep 05 '25 07:09 mizuikki

I would appreciate it if you could check whether it has been improved.

irreg avatar Sep 05 '25 15:09 irreg

I fixed the escape, but the regular expression error might be due to using the environment-dependent (?s). In that case, you need to instruct the LLM not to use it.

irreg avatar Sep 05 '25 15:09 irreg

Yes, the search‑and‑replace tool has been improved, but apply_diff still keeps failing.

mizuikki avatar Sep 06 '25 16:09 mizuikki