OpenPoiesis/poietic-tool

Add reset-midpoints command

Aberta

#1 aberto em 25 de mar. de 2025

 (0 comentário) (0 reação) (0 responsável)Swift (1 fork)auto 404
enhancementgood first issue

Métricas do repositório

Stars
 (1 estrela)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador