Description
edit.txt tells the LLM to expect error messages that don't match what edit.ts actually throws.
When oldString is not found:
edit.txt says:
"oldString not found in content"
edit.ts throws:
throw new Error(
"Could not find oldString in the file. It must match exactly, including whitespace, indentation, and line endings.",
)
When oldString matches multiple times:
edit.txt says:
"Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match."
edit.ts throws:
throw new Error("Found multiple matches for oldString. Provide more surrounding context to make the match unique.")
edit.txt should be updated to match the actual error strings in edit.ts.
Plugins
None
OpenCode version
dev (latest, commit bc1fd06)
Steps to reproduce
- Open
packages/opencode/src/tool/edit.txt and read lines 8-9
- Open
packages/opencode/src/tool/edit.ts and read lines 649-654
- Compare the error strings — they don't match
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Description
edit.txttells the LLM to expect error messages that don't match whatedit.tsactually throws.When
oldStringis not found:edit.txtsays:edit.tsthrows:When
oldStringmatches multiple times:edit.txtsays:edit.tsthrows:edit.txtshould be updated to match the actual error strings in edit.ts.Plugins
None
OpenCode version
dev (latest, commit bc1fd06)
Steps to reproduce
packages/opencode/src/tool/edit.txtand read lines 8-9packages/opencode/src/tool/edit.tsand read lines 649-654Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal