-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.Valid, but needs effort estimate or design input before work can start.bugSomething isn't workingSomething isn't working
Description
Which version of the app are you using?
3.8.4
Which API Provider are you using?
Anthropic
Which Model are you using?
sonnet-3.5
What happened?
The apply_diff tool currently allows incorrect ordering of separators in diff blocks which could lead to file corruption. The example shows a diff block with multiple ======= separators and incorrect ordering
Steps to reproduce
This will depend on model response so there is not a reproducer, but it would be simple to write some test cases and make sure the implementation handles hey meaningful response to the model.
Relevant API REQUEST output
<<<<<<< SEARCH
:start_line:47
:end_line:52
-------
if (!terminalInfo) {
console.error("[TerminalRegistry] Shell execution ended but process is undefined for terminal:", {
terminalId: terminalInfo?.id,
exitCode: e?.exitCode
})
return
=======
if (!terminalInfo) {
console.error("[TerminalRegistry] Shell execution ended but terminal not found:", {
exitCode: e?.exitCode
})
return
=======
<<<<<<< SEARCH
:start_line:64
:end_line:69
-------
const exitDetails = TerminalProcess.interpretExitCode(e?.exitCode)
console.info("[TerminalRegistry] Shell execution ended:", {
...exitDetails,
terminalId: terminalInfo?.id,
command: process.command
})
=======
const exitDetails = TerminalProcess.interpretExitCode(e?.exitCode)
console.info("[TerminalRegistry] Shell execution ended:", {
...exitDetails,
terminalId: terminalInfo.id,
command: process?.command || '<unknown>'
})
>>>>>>> REPLACEAdditional context
No response
dosubot
Metadata
Metadata
Assignees
Labels
Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.Valid, but needs effort estimate or design input before work can start.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done