Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ export function replace(content: string, oldString: string, newString: string, r

if (notFound) {
throw new Error(
"Could not find oldString in the file. It must match exactly, including whitespace, indentation, and line endings.",
"Could not find oldString in the file. Exact match and all fuzzy fallbacks (whitespace/indentation/escape-tolerant) were attempted. Re-read the file and copy the exact text (whitespace included) into oldString.",
)
}
throw new Error("Found multiple matches for oldString. Provide more surrounding context to make the match unique.")
Expand Down
Loading