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
{{ message }}
Repository navigation
Commit 0d1c221
Browse filesBrowse the repository at this point in the historyBrowse files
fix: resolve 8 open bug reports from upstream tracker
- anomalyco#16353: Filter LSP diagnostics to current worktree, preventing external
project errors from leaking into tool results and wasting context tokens
- anomalyco#16392: Bump session time.updated during compaction so session list
correctly reflects recently compacted sessions
- anomalyco#16395: Set session time.compacting at start of compaction and clear on
completion so TUI can display compacting status indicator
- anomalyco#16333/anomalyco#15871: Use max(context - maxOutput, input - reserved) for
compaction threshold so large-context models (1M) don't trigger early
- anomalyco#16332/anomalyco#15715: Skip empty text parts in toModelMessages and fallback to
space for empty tool outputs to prevent provider "non-empty" errors
- anomalyco#15888: Update edit.txt tool description error messages to match actual
error strings thrown by edit.ts
- anomalyco#15724: Handle empty files in apply_patch by collecting chunk new_lines
directly instead of failing on context search in empty content
- anomalyco#16193: Strip ANSI escape sequences from generic tool output in TUI to
prevent terminal corruption from colored/cursor-moving output
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy file name to clipboardExpand all lines: packages/opencode/src/tool/edit.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,6 @@ Usage:
5
5
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: line number + colon + space (e.g., `1: `). Everything after that space is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.
6
6
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
7
7
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
8
-
- The edit will FAIL if `oldString` is not found in the file with an error "oldString not found in content".
9
-
- The edit will FAIL if `oldString` is found multiple times in the file with an error "Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match." Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
8
+
- The edit will FAIL if `oldString` is not found in the file with an error "Could not find oldString in the file. It must match exactly, including whitespace, indentation, and line endings."
9
+
- The edit will FAIL if `oldString` is found multiple times in the file with an error "Found multiple matches for oldString. Provide more surrounding context to make the match unique." Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
10
10
- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
0 commit comments