MCPcopy Index your code
hub / github.com/anomalyco/opencode / patchLine

Function patchLine

packages/opencode/src/cli/cmd/run/tool.ts:706–724  ·  view source on GitHub ↗
(file: PatchFile)

Source from the content-addressed store, hash-verified

704}
705
706function patchLine(file: PatchFile): string {
707 const type = file.type
708 const rel = file.relativePath
709 const from = file.filePath
710
711 if (type === "add") {
712 return `+ Created ${rel || toolPath(from)}`
713 }
714
715 if (type === "delete") {
716 return `- Deleted ${rel || toolPath(from)}`
717 }
718
719 if (type === "move") {
720 return `→ Moved ${toolPath(from)} → ${rel || toolPath(file.movePath)}`
721 }
722
723 return `~ Patched ${rel || toolPath(from)}`
724}
725
726function scrollPatchFinal(p: ToolProps<typeof ApplyPatchTool>): string {
727 if (p.frame.status === "error") {

Callers 1

scrollPatchFinalFunction · 0.85

Calls 1

toolPathFunction · 0.85

Tested by

no test coverage detected