mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 21:57:06 +00:00
@hanzo/sketch — a Sketch plugin adapter over the shared Hanzo design-AI action catalog, mirroring @hanzo/figma/@hanzo/canva. Five commands: summarize/critique, rewrite, translate, content-fill, ask. - design-core.ts (PURE, 43 vitest tests): the action catalog, selection context assembly/truncation, @hanzo/ai request shaping (createAiClient, @hanzo/ai@^0.2.0), and per-layer / prose response parsing. - sketch-bridge.cjs: the only sketch/dom boundary — readSelection, applyLayerEdits (layer.text = …), insertNote. - command.cjs: opens the WebView, bridges messages; key stored via sketch/settings (never bundled/committed). - webview/: HTML + TS panel that runs @hanzo/ai (model call where fetch exists), previews edits, applies them back. - build.js: assembles the .sketchplugin bundle (esbuild, two runtimes). Model calls route through api.hanzo.ai /v1 via @hanzo/ai only.