mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-10 19:49:52 +08:00
- Add a drawing guide adapted from the web system prompt (layout, edge routing, styles, minimal style, editing rules), returned by start_session, a new get_drawing_guide tool and the diagram-workflow prompt - Add get_shape_library with the 30 icon libraries; the build copies docs/shape-libraries into dist and CI checks the packed files - Accept bare mxCell lists in create_new_diagram and add_page; the server adds the wrapper and root cells - Send server instructions, shorten create_new_diagram's description to fit Claude Code's 2,048 character limit, and annotate every tool - Fix dead links and the totals in docs/shape-libraries/README.md
18 lines
696 B
JavaScript
18 lines
696 B
JavaScript
// Copy non-TypeScript assets into dist/ after tsc, so they ship in the npm
|
|
// package ("files": ["dist"]).
|
|
import { cpSync, mkdirSync, readdirSync } from "node:fs"
|
|
import { dirname, join } from "node:path"
|
|
import { fileURLToPath } from "node:url"
|
|
|
|
const pkg = join(dirname(fileURLToPath(import.meta.url)), "..")
|
|
|
|
// Shape library docs live at the repository root, shared with the web app
|
|
const libSrc = join(pkg, "../../docs/shape-libraries")
|
|
const libDest = join(pkg, "dist/shape-libraries")
|
|
mkdirSync(libDest, { recursive: true })
|
|
for (const file of readdirSync(libSrc)) {
|
|
if (file.endsWith(".md") && file !== "README.md") {
|
|
cpSync(join(libSrc, file), join(libDest, file))
|
|
}
|
|
}
|