Node.js's cpSync fails on Windows when the path contains non-ASCII characters (e.g. C:\Users\Görloff) due to the \\?\ extended-length path prefix not handling Unicode correctly. This affects both the build script (copy-assets.cjs) and the runtime resource sync (resource-loader.ts). Added a try/catch fallback: when cpSync throws, fall back to a manual recursive copy using copyFileSync which handles non-ASCII paths correctly. Changed files: - src/resource-loader.ts: syncResourceDir() catches cpSync failure and falls back to copyDirRecursive() - packages/pi-coding-agent/scripts/copy-assets.cjs: all cpSync calls wrapped in safeCpSync() with the same fallback Fixes #1178 |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||