@ryan_nookpi/pi-extension-generative-ui 0.1.3 → 0.2.0
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/index.ts +18 -8
- package/package.json +4 -4
package/index.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { Key, matchesKey, Text, truncateToWidth } from "@mariozechner/pi-tui";
|
|
3
|
+
import type { ExtensionAPI, ThemeColor } from "@earendil-works/pi-coding-agent";
|
|
4
|
+
import { DynamicBorder } from "@earendil-works/pi-coding-agent";
|
|
5
|
+
import { Key, matchesKey, Text, truncateToWidth } from "@earendil-works/pi-tui";
|
|
7
6
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import {
|
|
7
|
+
import { getGuidelines } from "./guidelines.js";
|
|
9
8
|
import { escapeJS, shellHTML, wrapHTML } from "./html-utils.js";
|
|
10
9
|
|
|
11
10
|
interface WidgetHistoryEntry {
|
|
@@ -187,9 +186,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
187
186
|
"Pick the modules that match your use case: interactive, chart, mockup, art, diagram.",
|
|
188
187
|
],
|
|
189
188
|
parameters: Type.Object({
|
|
190
|
-
modules: Type.Array(
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
modules: Type.Array(
|
|
190
|
+
Type.Union(
|
|
191
|
+
[
|
|
192
|
+
Type.Literal("art"),
|
|
193
|
+
Type.Literal("mockup"),
|
|
194
|
+
Type.Literal("interactive"),
|
|
195
|
+
Type.Literal("chart"),
|
|
196
|
+
Type.Literal("diagram"),
|
|
197
|
+
],
|
|
198
|
+
{
|
|
199
|
+
description: "Which module(s) to load. Pick all that fit.",
|
|
200
|
+
},
|
|
201
|
+
),
|
|
202
|
+
),
|
|
193
203
|
}),
|
|
194
204
|
|
|
195
205
|
async execute(_toolCallId, params) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryan_nookpi/pi-extension-generative-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Generative UI widget extension for pi.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
32
|
+
"@earendil-works/pi-ai": "*",
|
|
33
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
34
|
+
"@earendil-works/pi-tui": "*",
|
|
35
35
|
"@sinclair/typebox": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|