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

贡献者指南