OpenPoiesis/poietic-tool

Add reset-midpoints command

開放

#1 建立於 2025年3月25日

 (0 則留言) (0 個反應) (0 位負責人)Swift (1 個分叉)auto 404
enhancementgood first issue

倉庫指標

星標
 (1 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Add edit reset-midpoints command that will remove midpoints from all or selected edges.

Proposed usage:

poietic edit reset-midpoints [EDGE...]

Implementation Notes

  • resolve ID references to actual ID objects
  • throw error if any of the IDs does not exist
  • change only those that have midpoints set
let trans: TransientFrame

for edge in edges {
    guard edge["midpoints"] != nil else {
        continue
    }
    var mutable = trans.mutate(edge.id)
    mutable["midpoints"] = nil
}
...
  • Commit only if there are changes

貢獻者指南