Skip to content

v0.41.0 — apply_patch multi-edit tool for venice code

Choose a tag to compare

@gobha-me gobha-me released this 21 Jul 15:15

Continues the #59 agent-toolset epic (kimi-k3 field feedback): edit_file fails on non-unique strings and can't batch edits — the #1 retry-loop for an LLM editing code.

  • apply_patch (confirm-gated) takes {patches: [{path, edits: [{old, new, occurrence?}, ...]}, ...]} and applies them atomically per file — all hunks validate + apply in-memory (in order), and the file writes only if every hunk succeeds, so no half-edited files.
  • Non-unique solvedoccurrence=N (1-based) picks which match to replace; without it a non-unique old errors with a pointer to occurrence or more context.
  • Surgical errors — failures name file + hunk index + reason, so the model retries one hunk instead of the whole batch.
  • Same sandbox + atomic write as the other coding tools; schema steers the model (apply_patch for multi-hunk/non-unique, edit_file for a single unique change).

Closes #63. 549 tests green.