File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -452,9 +452,10 @@ export class ApplyPatchTool extends BaseTool<"apply_patch"> {
452452 override async handlePartial ( task : Task , block : ToolUse < "apply_patch" > ) : Promise < void > {
453453 const patch : string | undefined = block . params . patch
454454 const candidateRelPath = this . extractFirstPathFromPatch ( patch )
455- const fallbackRelPath = " "
456- const resolvedRelPath = candidateRelPath ?? fallbackRelPath
455+ const fallbackDisplayPath = path . basename ( task . cwd ) || "workspace "
456+ const resolvedRelPath = candidateRelPath ?? ""
457457 const absolutePath = path . resolve ( task . cwd , resolvedRelPath )
458+ const displayPath = candidateRelPath ? getReadablePath ( task . cwd , candidateRelPath ) : fallbackDisplayPath
458459
459460 let patchPreview : string | undefined
460461 if ( patch ) {
@@ -465,7 +466,7 @@ export class ApplyPatchTool extends BaseTool<"apply_patch"> {
465466
466467 const sharedMessageProps : ClineSayTool = {
467468 tool : "appliedDiff" ,
468- path : getReadablePath ( task . cwd , resolvedRelPath ) ,
469+ path : displayPath ,
469470 diff : patchPreview || "Parsing patch..." ,
470471 isOutsideWorkspace : isPathOutsideWorkspace ( absolutePath ) ,
471472 }
You can’t perform that action at this time.
0 commit comments