| 244 | } |
| 245 | |
| 246 | override async handlePartial(task: Task, block: ToolUse<"edit">): Promise<void> { |
| 247 | const relPath: string | undefined = block.params.file_path |
| 248 | |
| 249 | // Wait for path to stabilize before showing UI (prevents truncated paths) |
| 250 | if (!this.hasPathStabilized(relPath)) { |
| 251 | return |
| 252 | } |
| 253 | |
| 254 | // relPath is guaranteed non-null after hasPathStabilized |
| 255 | const absolutePath = path.resolve(task.cwd, relPath!) |
| 256 | const isOutsideWorkspace = isPathOutsideWorkspace(absolutePath) |
| 257 | |
| 258 | const sharedMessageProps: ClineSayTool = { |
| 259 | tool: "appliedDiff", |
| 260 | path: getReadablePath(task.cwd, relPath!), |
| 261 | diff: block.params.old_string ? "1 edit operation" : undefined, |
| 262 | isOutsideWorkspace, |
| 263 | } |
| 264 | |
| 265 | await task.ask("tool", JSON.stringify(sharedMessageProps), block.partial).catch(() => {}) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | /** |