MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / handlePartial

Method handlePartial

src/core/tools/EditTool.ts:246–266  ·  view source on GitHub ↗
(task: Task, block: ToolUse<"edit">)

Source from the content-addressed store, hash-verified

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/**

Callers 5

handleFunction · 0.45
executePartialFunction · 0.45

Calls 3

isPathOutsideWorkspaceFunction · 0.90
getReadablePathFunction · 0.90
askMethod · 0.80

Tested by 1

executePartialFunction · 0.36