(p: ToolProps<typeof EditTool>)
| 513 | } |
| 514 | |
| 515 | function snapEdit(p: ToolProps<typeof EditTool>): ToolSnapshot | undefined { |
| 516 | const file = p.input.filePath || "" |
| 517 | const diff = p.metadata.diff || "" |
| 518 | if (!file || !diff.trim()) { |
| 519 | return undefined |
| 520 | } |
| 521 | |
| 522 | return { |
| 523 | kind: "diff", |
| 524 | items: [ |
| 525 | { |
| 526 | title: `# Edited ${toolPath(file)}`, |
| 527 | diff, |
| 528 | file, |
| 529 | }, |
| 530 | ], |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | function snapPatch(p: ToolProps<typeof ApplyPatchTool>): ToolSnapshot | undefined { |
| 535 | const files = list<PatchFile>(p.frame.meta.files) |
nothing calls this directly
no test coverage detected