pi-design-deck 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.ts +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Design Deck
|
|
6
6
|
|
|
7
|
-
A tool for [Pi coding agent](https://github.com/badlogic/pi-mono/) that presents multi-slide visual decision decks in
|
|
7
|
+
A tool for [Pi coding agent](https://github.com/badlogic/pi-mono/) that presents multi-slide visual decision decks. On macOS, uses [Glimpse](https://github.com/nicobailon/glimpseui) to render in a native WKWebView window; falls back to a browser tab on other platforms. Each slide shows 2-4 high-fidelity previews — code diffs, architecture diagrams, UI mockups — and you pick one per slide. The agent gets back a clean selection map and moves on to implementation.
|
|
8
8
|
|
|
9
9
|
<img width="1340" alt="Design Deck screenshot" src="https://github.com/user-attachments/assets/20864ac6-9223-4e2e-ba3c-db3eaae0abd8" />
|
|
10
10
|
|
|
@@ -41,7 +41,7 @@ Restart pi to load the extension and the bundled `design-deck` skill.
|
|
|
41
41
|
|
|
42
42
|
**Requirements:**
|
|
43
43
|
- pi-agent v0.35.0 or later (extensions API)
|
|
44
|
-
-
|
|
44
|
+
- For native macOS window: `pi install npm:glimpseui` (optional, falls back to browser if not installed)
|
|
45
45
|
|
|
46
46
|
https://github.com/user-attachments/assets/aff1bac6-8bc2-461a-8828-f588ce655f7f
|
|
47
47
|
|
package/index.ts
CHANGED
|
@@ -416,6 +416,16 @@ export default function (pi: ExtensionAPI) {
|
|
|
416
416
|
async execute(_toolCallId, params, signal, onUpdate, ctx) {
|
|
417
417
|
const p = params as Record<string, unknown>;
|
|
418
418
|
|
|
419
|
+
if (!p.action && typeof p.slides === "string") {
|
|
420
|
+
try {
|
|
421
|
+
const parsed = JSON.parse(p.slides);
|
|
422
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed) && typeof parsed.action === "string") {
|
|
423
|
+
Object.assign(p, parsed);
|
|
424
|
+
delete p.slides;
|
|
425
|
+
}
|
|
426
|
+
} catch {}
|
|
427
|
+
}
|
|
428
|
+
|
|
419
429
|
if (!ctx.hasUI && p.action !== "list" && p.action !== "export") {
|
|
420
430
|
throw new Error(
|
|
421
431
|
"design_deck requires interactive mode with browser support. " +
|