Kind: Function
Source: atloria-monorepo/libs/agent-core/src/tools/edit-file.tool.ts
Apply parsed hunks to file content with fuzzy line offset matching. Hunks are applied in reverse order (bottom-to-top) to preserve line numbers.
Signature
tsfunction applyHunks(content: string, hunks: DiffHunk[], fuzzLines): { success: boolean; content?: string; error?: string; lastNewText?: string }
Parameters
| Name | Type |
|---|---|
content | string |
hunks | DiffHunk[] |
fuzzLines | any |
Returns: { success: boolean; content?: string; error?: string; lastNewText?: string }
Was this page helpful?