v1.3.11

v0.28.18 Release Notes

Released


v0.28.17 -> v0.28.18

Summary


Expands file patching into multi-target edits with line-level inserts and clearer TUI previews. Group chats now retain unmentioned messages so later turns keep ambient context.
翻譯
擴充檔案修補為多目標編輯,支援行級插入並改善預覽。群組聊天會保留未提及的訊息,讓後續對話保有環境脈絡。

⚠️ Breaking Changes


patch_file parameter schema replaced with multi-target edits


Top-level old_string / new_string / replace_all are gone. Callers must pass a targets array; each target is either a replace (old_string / new_string[, replace_all][, 7]) or a pure insert (insert_string / row).
Before:
  1. {
  2. "path": "/abs/path/foo.go",
  3. "old_string": "exact text",
  4. "new_string": "replacement",
  5. "replace_all": false
  6. }

After:
  1. {
  2. "path": "/abs/path/foo.go",
  3. "targets": [
  4. {
  5. "old_string": "exact text",
  6. "new_string": "replacement"
  7. },
  8. {
  9. "insert_string": "new independent line(s)",
  10. "row": 12
  11. }
  12. ]
  13. }

Migration:
  1. // Old single-edit call
  2. {"path": p, "old_string": old, "new_string": neu}
  3. // New multi-target call
  4. {"path": p, "targets": [{"old_string": old, "new_string": neu}]}
  5. // Optional: pin an occurrence by 1-based row, or insert without replacing
  6. {"path": p, "targets": [
  7. {"old_string": old, "new_string": neu, "row": 42},
  8. {"insert_string": "line to insert", "row": 10}
  9. ]}

Row-bearing targets apply highest-row-first so original line numbers stay valid; remaining targets then apply top to bottom. insert_string cannot combine with old_string / new_string.
翻譯
patch_file 改為 targets 陣列:每筆目標可為取代(old_string / new_string)或純插入(insert_string / row)。舊的頂層參數需改包進 targets。有 row 的目標由高到低套用,其餘再由上到下。

FormatPatchDiff returns hunk slices instead of two line slices


Diff formatting now models multi-target patches as ordered hunks so TUI previews can render each edit separately.
Before:
  1. func FormatPatchDiff(raw string) (oldLines, newLines []string)

After:
  1. type PatchHunk struct {
  2. OldLines []string
  3. NewLines []string
  4. }
  5. func FormatPatchDiff(raw string) []PatchHunk

Migration:
  1. // Old
  2. oldLines, newLines := utils.FormatPatchDiff(args)
  3. // New
  4. hunks := utils.FormatPatchDiff(args)
  5. for _, h := range hunks {
  6. // h.OldLines / h.NewLines
  7. }

Legacy single-edit JSON (old_string / new_string only) still parses into one hunk for backward-compatible preview of old payloads.
翻譯
FormatPatchDiff 改回傳 []PatchHunk,以支援多目標預覽。呼叫端需改走 hunk 迴圈;僅含舊參數的 payload 仍會落成單一 hunk。

Changes


FEAT

  • Record unmentioned group chat messages into session history (@pardnchiu) [2ddafb8]

翻譯
  • 將群組中未提及機器人的訊息寫入 session history


BREAKING

  • Expand patch_file for multi-target edits, row-scoped replace, and pure insert (@pardnchiu) [e1f850a]
  • Return multi-hunk patch previews from FormatPatchDiff and restyle TUI diff blocks (@pardnchiu) [e1f850a]

翻譯
  • 擴充 patch_file 支援多目標編輯、依行號取代與純插入
  • FormatPatchDiff 改回傳多 hunk,並重做 TUI 差異預覽樣式


UPDATE

  • Truncate nested targets string fields in tool-call arg previews (@pardnchiu) [e1f850a]
  • Pad TUI patch/write diff lines to terminal width with background styles (@pardnchiu) [e1f850a]

翻譯
  • 工具呼叫參數預覽會截斷巢狀 targets 字串欄位
  • TUI 差異列依終端寬度補齊並套用背景色


DOC

  • Document cost-effective model setup recommendations in bilingual READMEs (@pardnchiu) [e1f850a]
  • Update skill tool-mapping examples for the new patch_file schema (@pardnchiu) [e1f850a]

翻譯
  • 於雙語 README 新增省錢模型配置建議
  • 更新 skill 工具對照範例以符合新的 patch_file schema


Scope


  • internal/tools/file/ — BREAKING (patchFile.go)
  • internal/utils/ — BREAKING, UPDATE (utils.go)
  • internal/runtime/tui/ — UPDATE (handlerPopup.go, view.go, viewRender.go)
  • internal/agents/exec/ — UPDATE (toolCall.go)
  • internal/runtime/telegram/, internal/runtime/discord/ — FEAT (run.go)
  • README.md, doc/README.zh.md, configs/prompts/ — DOC



Generated by SKILL