mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 06:17:58 +00:00
ReplaceContentTool: Improve error case message
This commit is contained in:
1 parent
16792389d7
commit
5c60f1e8b5
1 file changed
+2
-1
@@ -228,7 +228,8 @@ class ReplaceContentTool(Tool, ToolMarkerCanEdit):
|
||||
if "\n" in matched_text and re.search(regex_pattern, matched_text[1:], flags=regex_flags):
|
||||
raise ValueError(
|
||||
"Match is ambiguous: the search pattern matches multiple overlapping occurrences. "
|
||||
"Please revise the search pattern to be more specific to avoid ambiguity."
|
||||
"Please revise the search pattern to be more specific to avoid ambiguity, "
|
||||
"e.g. by matching specific context after the match, or try using the literal mode."
|
||||
)
|
||||
|
||||
# Handle backreferences: replace $!1, $!2, etc. with actual matched groups
|
||||
|
||||
Reference in new issue
Block a user