You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Motivation
<!-- Why is this change necessary? -->
# Content
<!-- Please include a summary of the change -->
# Testing
<!-- How was the change tested? -->
# Please check the following before marking your PR as ready for review
- [ ] I have added tests for my changes
- [ ] I have updated the documentation or added new documentation as
needed
---------
Co-authored-by: kopekC <28070492+kopekC@users.noreply.github.com>
filepath: str=Field(..., description="Path to the file to edit")
767
-
pattern: str=Field(..., description="Regex pattern to match")
768
-
replacement: str=Field(..., description="Replacement text (can include regex groups)")
769
-
start: int=Field(default=1, description="Starting line number (1-indexed, inclusive). Default is 1.")
770
-
end: int=Field(default=-1, description="Ending line number (1-indexed, inclusive). Default is -1 (end of file).")
771
-
count: Optional[int] =Field(default=None, description="Maximum number of replacements. Default is None (replace all).")
870
+
filepath: str=Field(..., description="Path to the file to edit relative to the workspace root. The file must exist and be a text file.")
871
+
pattern: str=Field(
872
+
...,
873
+
description="Regular expression pattern to match text that should be replaced. Supports all Python regex syntax including capture groups (\1, \2, etc). The pattern is compiled with re.MULTILINE flag by default.",
874
+
)
875
+
replacement: str=Field(
876
+
...,
877
+
description="Text to replace matched patterns with. Can reference regex capture groups using \1, \2, etc. If using regex groups in pattern, make sure to preserve them in replacement if needed.",
878
+
)
879
+
start: int=Field(
880
+
default=1, description="Starting line number (1-indexed, inclusive) to begin replacements from. Use this with 'end' to limit changes to a specific region. Default is 1 (start of file)."
881
+
)
882
+
end: int=Field(
883
+
default=-1,
884
+
description="Ending line number (1-indexed, inclusive) to stop replacements at. Use -1 to indicate end of file. Use this with 'start' to limit changes to a specific region. Default is -1 (end of file).",
885
+
)
886
+
count: Optional[int] =Field(
887
+
default=None,
888
+
description="Maximum number of replacements to make. Use None to replace all occurrences (default), or specify a number to limit replacements. Useful when you only want to replace the first N occurrences.",
0 commit comments