Fix: embed prompts when generate-image lives under a path with spaces (#670)

URL.pathname leaves spaces percent-encoded, so the embed helper never ran and the generator still claimed success. Convert with fileURLToPath, check the spawn result, and warn instead of lying.

Prepared with AI assistance.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-08-31 01:34:05 +05:00
co-authored by Cursor
parent b0594c72d1
commit c8a9d9e38a
3 changed files with 91 additions and 3 deletions
+2 -1
View File
@@ -26,7 +26,7 @@ export const SUITES = {
triggers: [
...COMMON_INFRA_PATTERNS,
/^scripts\/(?!benchmark-detector|build-browser-detector|build-extension)/,
/^skill\/(SKILL\.src\.md|agents\/|reference\/|scripts\/(cleanup-deprecated|comp-diff|comp-spec|build-phase|font-match|data\/font-index|concept-seed|context|context-signals|critique-storage|design-parser|doctor|hook|impeccable-paths|is-generated|lib\/(artifact-schema|png|raster|image-metrics|font-fingerprint|font-index|hero-checks|composition-catalog|concept-catalog|provider|staleness|staleness-deep|staleness-notice|surface-briefs|target-slug|template-extensions)|pin|surface-brief))/,
/^skill\/(SKILL\.src\.md|agents\/|reference\/|scripts\/(cleanup-deprecated|comp-diff|comp-spec|build-phase|font-match|data\/font-index|concept-seed|generate-image|context|context-signals|critique-storage|design-parser|doctor|hook|impeccable-paths|is-generated|lib\/(artifact-schema|png|raster|image-metrics|font-fingerprint|font-index|hero-checks|composition-catalog|concept-catalog|provider|staleness|staleness-deep|staleness-notice|surface-briefs|target-slug|template-extensions)|pin|surface-brief))/,
/^README(\.npm)?\.md$/,
/^cli\/bin\//,
],
@@ -54,6 +54,7 @@ export const SUITES = {
'tests/ci-test-plan.test.mjs',
'tests/cli-args.test.mjs',
'tests/concept-seed.test.mjs',
'tests/generate-image-embed.test.mjs',
'tests/comp-diff.test.mjs',
'tests/build-phase.test.mjs',
'tests/font-match.test.mjs',