fix unit test

This commit is contained in:
duanfuxiang
2025-04-08 14:53:05 +08:00
parent 5118b3e3a7
commit 520fe80d11
16 changed files with 79 additions and 462 deletions

View File

@@ -1,7 +1,13 @@
import { applyPatch } from "diff"
import { DiffStrategy, DiffResult } from "../types"
import { applyPatch } from "diff";
import { DiffResult, DiffStrategy } from "../types";
export class UnifiedDiffStrategy implements DiffStrategy {
getName(): string {
return "Unified"
}
getToolDescription(args: { cwd: string; toolOptions?: { [key: string]: string } }): string {
return `## apply_diff
Description: Apply a unified diff to a file at the specified path. This tool is useful when you need to make specific modifications to a file based on a set of changes provided in unified diff format (diff -U3).