mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
feat: add browse binary discovery to DESIGN_SETUP resolver
The design setup block now discovers $B alongside $D, so skills can open comparison boards via $B goto and poll feedback via $B eval. Falls back to `open` on macOS when browse binary is unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -403,12 +403,23 @@ if [ -x "$D" ]; then
|
||||
else
|
||||
echo "DESIGN_NOT_AVAILABLE"
|
||||
fi
|
||||
B=""
|
||||
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
|
||||
[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse
|
||||
if [ -x "$B" ]; then
|
||||
echo "BROWSE_READY: $B"
|
||||
else
|
||||
echo "BROWSE_NOT_AVAILABLE (will use 'open' to view comparison boards)"
|
||||
fi
|
||||
```
|
||||
|
||||
If `DESIGN_NOT_AVAILABLE`: skip visual mockup generation and fall back to the
|
||||
existing HTML wireframe approach (`DESIGN_SKETCH`). Design mockups are a
|
||||
progressive enhancement, not a hard requirement.
|
||||
|
||||
If `BROWSE_NOT_AVAILABLE`: use `open file://...` instead of `$B goto` to open
|
||||
comparison boards. The user just needs to see the HTML file in any browser.
|
||||
|
||||
If `DESIGN_READY`: the design binary is available for visual mockup generation.
|
||||
Commands:
|
||||
- `$D generate --brief "..." --output /path.png` — generate a single mockup
|
||||
|
||||
@@ -564,12 +564,23 @@ if [ -x "$D" ]; then
|
||||
else
|
||||
echo "DESIGN_NOT_AVAILABLE"
|
||||
fi
|
||||
B=""
|
||||
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
|
||||
[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse
|
||||
if [ -x "$B" ]; then
|
||||
echo "BROWSE_READY: $B"
|
||||
else
|
||||
echo "BROWSE_NOT_AVAILABLE (will use 'open' to view comparison boards)"
|
||||
fi
|
||||
```
|
||||
|
||||
If `DESIGN_NOT_AVAILABLE`: skip visual mockup generation and fall back to the
|
||||
existing HTML wireframe approach (`DESIGN_SKETCH`). Design mockups are a
|
||||
progressive enhancement, not a hard requirement.
|
||||
|
||||
If `BROWSE_NOT_AVAILABLE`: use `open file://...` instead of `$B goto` to open
|
||||
comparison boards. The user just needs to see the HTML file in any browser.
|
||||
|
||||
If `DESIGN_READY`: the design binary is available for visual mockup generation.
|
||||
Commands:
|
||||
- `$D generate --brief "..." --output /path.png` — generate a single mockup
|
||||
|
||||
@@ -736,12 +736,23 @@ if [ -x "$D" ]; then
|
||||
else
|
||||
echo "DESIGN_NOT_AVAILABLE"
|
||||
fi
|
||||
B=""
|
||||
[ -n "$_ROOT" ] && [ -x "$_ROOT/${ctx.paths.localSkillRoot}/browse/dist/browse" ] && B="$_ROOT/${ctx.paths.localSkillRoot}/browse/dist/browse"
|
||||
[ -z "$B" ] && B=${ctx.paths.browseDir}/browse
|
||||
if [ -x "$B" ]; then
|
||||
echo "BROWSE_READY: $B"
|
||||
else
|
||||
echo "BROWSE_NOT_AVAILABLE (will use 'open' to view comparison boards)"
|
||||
fi
|
||||
\`\`\`
|
||||
|
||||
If \`DESIGN_NOT_AVAILABLE\`: skip visual mockup generation and fall back to the
|
||||
existing HTML wireframe approach (\`DESIGN_SKETCH\`). Design mockups are a
|
||||
progressive enhancement, not a hard requirement.
|
||||
|
||||
If \`BROWSE_NOT_AVAILABLE\`: use \`open file://...\` instead of \`$B goto\` to open
|
||||
comparison boards. The user just needs to see the HTML file in any browser.
|
||||
|
||||
If \`DESIGN_READY\`: the design binary is available for visual mockup generation.
|
||||
Commands:
|
||||
- \`$D generate --brief "..." --output /path.png\` — generate a single mockup
|
||||
|
||||
Reference in New Issue
Block a user