@alexleekt/pi-ask-user-glimpse 0.3.0 → 0.3.1
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/CHANGELOG.md +24 -0
- package/dist/index.html +3433 -57
- package/index.ts +31 -0
- package/package.json +4 -3
package/index.ts
CHANGED
|
@@ -284,6 +284,36 @@ function buildDebugParams(mode: string): AskUserParams | null {
|
|
|
284
284
|
],
|
|
285
285
|
allowComment: true,
|
|
286
286
|
};
|
|
287
|
+
case "mermaid":
|
|
288
|
+
return {
|
|
289
|
+
question: "Test: Mermaid Diagrams",
|
|
290
|
+
context: `This prompt includes a Mermaid diagram to test rendering.
|
|
291
|
+
|
|
292
|
+
\`\`\`mermaid
|
|
293
|
+
graph TD
|
|
294
|
+
A[User asks question] --> B{Has context?}
|
|
295
|
+
B -->|Yes| C[Show left panel]
|
|
296
|
+
B -->|No| D[Single panel]
|
|
297
|
+
C --> E[Render markdown + diagrams]
|
|
298
|
+
D --> E
|
|
299
|
+
\`\`\`
|
|
300
|
+
|
|
301
|
+
The diagram above should render as an SVG. Below is a sequence diagram:
|
|
302
|
+
|
|
303
|
+
\`\`\`mermaid
|
|
304
|
+
sequenceDiagram
|
|
305
|
+
participant Agent
|
|
306
|
+
participant User
|
|
307
|
+
Agent->>User: Ask question
|
|
308
|
+
User->>Agent: Submit answer
|
|
309
|
+
\`\`\`
|
|
310
|
+
`,
|
|
311
|
+
options: [
|
|
312
|
+
{ title: "Looks good", description: "Diagrams render correctly" },
|
|
313
|
+
{ title: "Broken", description: "Something is wrong" },
|
|
314
|
+
],
|
|
315
|
+
allowComment: true,
|
|
316
|
+
};
|
|
287
317
|
default:
|
|
288
318
|
return null;
|
|
289
319
|
}
|
|
@@ -542,6 +572,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
542
572
|
"multi-select",
|
|
543
573
|
"freeform",
|
|
544
574
|
"questionnaire",
|
|
575
|
+
"mermaid",
|
|
545
576
|
]);
|
|
546
577
|
if (!mode) return;
|
|
547
578
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexleekt/pi-ask-user-glimpse",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Pi extension that replaces ask_user with rich native WebView dialogs via glimpseui and shadcn/ui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@vitejs/plugin-react": "^4.3.0",
|
|
62
62
|
"autoprefixer": "^10.4.20",
|
|
63
63
|
"marked": "^15.0.12",
|
|
64
|
+
"mermaid": "^11.15.0",
|
|
64
65
|
"playwright": "^1.60.0",
|
|
65
66
|
"postcss": "^8.4.47",
|
|
66
67
|
"react": "^18.3.1",
|
|
@@ -71,8 +72,8 @@
|
|
|
71
72
|
"vite-plugin-singlefile": "^2.0.0"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
|
-
"@earendil-works/pi-
|
|
75
|
-
"@earendil-works/pi-
|
|
75
|
+
"@earendil-works/pi-ai": "*",
|
|
76
|
+
"@earendil-works/pi-coding-agent": "*"
|
|
76
77
|
},
|
|
77
78
|
"engines": {
|
|
78
79
|
"node": ">=18.0.0"
|