Skip to content

Commit

Permalink
Merge branch 'cline'
Browse files Browse the repository at this point in the history
  • Loading branch information
jakenuts committed Dec 19, 2024
2 parents 54f3d86 + b7b5d28 commit c9c4c68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cline-unleashed",
"displayName": "Cline Unleashed⛓️‍💥 (prev. Claude Dev)",
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
"version": "3.0.0",
"version": "3.0.1",
"icon": "assets/icons/icon.png",
"galleryBanner": {
"color": "#617A91",
Expand Down
25 changes: 20 additions & 5 deletions src/core/Cline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,11 +1106,26 @@ export class Cline {
// Construct newContent from diff
let newContent: string
if (diff) {
newContent = await constructNewFileContent(
diff,
this.diffViewProvider.originalContent || "",
!block.partial,
)
try {
newContent = await constructNewFileContent(
diff,
this.diffViewProvider.originalContent || "",
!block.partial,
)
} catch (error) {
await this.say(
"error",
`Failed to apply changes to ${relPath}. The model's diff instructions could not be processed correctly. This usually happens when the search patterns don't match the file content exactly.`,
)
pushToolResult(
formatResponse.toolError(
`Error writing file: ${JSON.stringify(serializeError(error))}`,
),
)
await this.diffViewProvider.revertChanges()
await this.diffViewProvider.reset()
break
}
} else if (content) {
newContent = content

Expand Down

0 comments on commit c9c4c68

Please sign in to comment.