Extracted shared helpers to eliminate copy-pasted code: Core: - computeAbsoluteBounds() in geometry.ts — replaces 4 bounding box loops - makeDocumentNodeChange/makeCanvasNodeChange in kiwi-serialize.ts - parseFigBuffer/parseFigKiwiContainer in kiwi/fig-parse-core.ts (fig-parse-worker.ts: 103 → 11 lines) - createDefaultEditorState() — shared between core + app store - calcClusterConfidence() in tools/analyze.ts - retryWithNormalizedFamily() in fonts.ts - getVectorNode() in tools/vector.ts - renderFills() helper in renderer/scene.ts - withNodeBounds() helper in renderer/overlays.ts - drawNodeHighlightRect() in renderer/highlight-rect.ts - isInViewport() in renderer/label-cache.ts App: - decodeTauriStderr() in utils/tauri.ts - printNodeResults() in cli format.ts Remaining 28 clones are: text-editor cursor movement (inherent), xpath DOM traversal (inherent), small 5-line patterns too context-specific to extract. |
||
|---|---|---|
| .. | ||
| acp-map-update.ts | ||
| acp-permission.ts | ||
| acp-transport.ts | ||
| chat-debug.ts | ||
| system-prompt.md | ||
| tools.ts | ||