@kvasar/google-stitch 0.1.14 → 0.1.16
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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/SKILL.md +37 -3
- package/src/tools/list_screens.ts +18 -5
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -85,7 +85,7 @@ Example prompts:
|
|
|
85
85
|
|
|
86
86
|
### Screen generation
|
|
87
87
|
|
|
88
|
-
For new screens from prompts:
|
|
88
|
+
For creating new screens from prompts:
|
|
89
89
|
|
|
90
90
|
- `generate_screen_from_text`
|
|
91
91
|
|
|
@@ -96,12 +96,19 @@ Example prompts:
|
|
|
96
96
|
- build landing page
|
|
97
97
|
- design mobile onboarding
|
|
98
98
|
|
|
99
|
+
Use this tool when the user wants to create a new UI screen from a text description.
|
|
100
|
+
|
|
99
101
|
Always extract:
|
|
100
102
|
|
|
101
103
|
- projectId
|
|
102
104
|
- prompt
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
|
|
106
|
+
Important:
|
|
107
|
+
- Screen generation usually takes a few minutes to complete
|
|
108
|
+
- Do **not retry automatically** if a connection error or timeout occurs
|
|
109
|
+
- A connection error does **not necessarily mean the generation failed**
|
|
110
|
+
- After waiting a few minutes, use `get_screen` or `list_screens` to verify whether the screen was successfully created
|
|
111
|
+
- Avoid duplicate retries to prevent generating the same screen multiple times
|
|
105
112
|
|
|
106
113
|
## Supported device types:
|
|
107
114
|
|
|
@@ -135,6 +142,33 @@ Always structure the tool call as:
|
|
|
135
142
|
|
|
136
143
|
Never call the tool with only a string prompt.
|
|
137
144
|
|
|
145
|
+
### List screens
|
|
146
|
+
|
|
147
|
+
Lists all screens within a given Stitch project.
|
|
148
|
+
|
|
149
|
+
- `list_screens`
|
|
150
|
+
|
|
151
|
+
Required parameters:
|
|
152
|
+
- `projectId`: the Stitch project ID (without the `projects/` prefix)
|
|
153
|
+
|
|
154
|
+
Use this tool when the user wants to:
|
|
155
|
+
- see all generated screens in a project
|
|
156
|
+
- review existing designs
|
|
157
|
+
- inspect project screens before updating or exporting
|
|
158
|
+
|
|
159
|
+
Example prompts:
|
|
160
|
+
- List all screens in project 12345
|
|
161
|
+
- Show me all screens for project 4044680601076201931
|
|
162
|
+
- What screens are in project 12345?
|
|
163
|
+
- Show me the designs in this project
|
|
164
|
+
- List the generated UI screens for project 12345
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
- Array of `Screen` objects
|
|
168
|
+
- Includes fields such as `name`, `title`, `prompt`, `deviceType`, `width`, `height`, and grouping metadata
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
138
172
|
### Screen editing
|
|
139
173
|
|
|
140
174
|
For modifying existing screens:
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { StitchMCPClient } from "../services/stitch-mcp-client.js";
|
|
2
|
+
|
|
3
|
+
interface ListScreensParams {
|
|
4
|
+
projectId: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const listScreensTool = (client: StitchMCPClient) => ({
|
|
2
8
|
name: "list_screens",
|
|
3
|
-
description: "
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
description: "Lists all screens within a given Stitch project",
|
|
10
|
+
|
|
11
|
+
async execute(_: string, params: ListScreensParams) {
|
|
12
|
+
if (!params?.projectId) {
|
|
13
|
+
throw new Error("projectId is required");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return client.request("list_screens", {
|
|
17
|
+
projectId: params.projectId,
|
|
18
|
+
});
|
|
6
19
|
},
|
|
7
|
-
});
|
|
20
|
+
});
|