@qwen-code/arena-agent 0.0.9-dev.2 → 0.0.9-dev.20
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/.env.example +41 -2
- package/README.md +143 -16
- package/dist/agent.d.ts +3 -1
- package/dist/agent.js +61 -15
- package/dist/agent.js.map +1 -1
- package/dist/anthropic.js +3 -1
- package/dist/anthropic.js.map +1 -1
- package/dist/ask-user.d.ts +20 -0
- package/dist/ask-user.js +388 -0
- package/dist/ask-user.js.map +1 -0
- package/dist/attachments.d.ts +1 -1
- package/dist/attachments.js +16 -4
- package/dist/attachments.js.map +1 -1
- package/dist/brave-search.d.ts +6 -0
- package/dist/brave-search.js +193 -0
- package/dist/brave-search.js.map +1 -0
- package/dist/canonical-data.d.ts +1 -0
- package/dist/canonical-data.js +1 -0
- package/dist/canonical-data.js.map +1 -1
- package/dist/cli.js +43 -11
- package/dist/cli.js.map +1 -1
- package/dist/code-cli.d.ts +2 -0
- package/dist/code-cli.js +12 -0
- package/dist/code-cli.js.map +1 -0
- package/dist/code-tools.d.ts +68 -0
- package/dist/code-tools.js +1925 -0
- package/dist/code-tools.js.map +1 -0
- package/dist/config.d.ts +12 -1
- package/dist/config.js +51 -3
- package/dist/config.js.map +1 -1
- package/dist/document-reader.js +9 -0
- package/dist/document-reader.js.map +1 -1
- package/dist/fetch-page.d.ts +2 -0
- package/dist/fetch-page.js +50 -21
- package/dist/fetch-page.js.map +1 -1
- package/dist/history.d.ts +2 -0
- package/dist/history.js +1 -0
- package/dist/history.js.map +1 -1
- package/dist/image.d.ts +14 -0
- package/dist/image.js +299 -0
- package/dist/image.js.map +1 -0
- package/dist/mock.d.ts +1 -0
- package/dist/mock.js +38 -0
- package/dist/mock.js.map +1 -1
- package/dist/mode.d.ts +6 -0
- package/dist/mode.js +33 -0
- package/dist/mode.js.map +1 -0
- package/dist/model-diagnostics.js +5 -2
- package/dist/model-diagnostics.js.map +1 -1
- package/dist/provider.js +14 -5
- package/dist/provider.js.map +1 -1
- package/dist/routify-web-fetch.d.ts +11 -0
- package/dist/routify-web-fetch.js +130 -0
- package/dist/routify-web-fetch.js.map +1 -0
- package/dist/sdk.d.ts +35 -3
- package/dist/sdk.js +6 -2
- package/dist/sdk.js.map +1 -1
- package/dist/server.d.ts +3 -0
- package/dist/server.js +86 -5
- package/dist/server.js.map +1 -1
- package/dist/spec.d.ts +11 -8
- package/dist/spec.js +105 -13
- package/dist/spec.js.map +1 -1
- package/dist/tools.d.ts +10 -27
- package/dist/tools.js +64 -59
- package/dist/tools.js.map +1 -1
- package/dist/tui.d.ts +3 -0
- package/dist/tui.js +11 -2
- package/dist/tui.js.map +1 -1
- package/dist/types.d.ts +9 -2
- package/dist/web/app.js +59 -6
- package/dist/web/app.js.map +1 -1
- package/dist/workspace.d.ts +12 -0
- package/dist/workspace.js +165 -0
- package/dist/workspace.js.map +1 -0
- package/docs/BINARY_DISTRIBUTION.md +231 -0
- package/docs/MODES_AND_RELEASES.md +123 -0
- package/docs/SDK.md +24 -1
- package/modes/code-arena/full-stack/system-prompt.txt +77 -0
- package/modes/code-arena/full-stack/template/.env +1 -0
- package/modes/code-arena/full-stack/template/drizzle.config.json +7 -0
- package/modes/code-arena/full-stack/template/eslint.config.mjs +9 -0
- package/modes/code-arena/full-stack/template/next.config.ts +5 -0
- package/modes/code-arena/full-stack/template/package.json +32 -0
- package/modes/code-arena/full-stack/template/postcss.config.mjs +7 -0
- package/modes/code-arena/full-stack/template/src/app/api/health/route.ts +13 -0
- package/modes/code-arena/full-stack/template/src/app/globals.css +1 -0
- package/modes/code-arena/full-stack/template/src/app/layout.tsx +16 -0
- package/modes/code-arena/full-stack/template/src/app/page.tsx +22 -0
- package/modes/code-arena/full-stack/template/src/db/index.ts +24 -0
- package/modes/code-arena/full-stack/template/src/db/schema.ts +3 -0
- package/modes/code-arena/full-stack/template/tsconfig.json +24 -0
- package/modes/code-arena/full-stack/tools.json +446 -0
- package/modes/code-arena/html/system-prompt.txt +36 -0
- package/modes/code-arena/html/tools.json +284 -0
- package/modes/code-arena/model.json +10 -0
- package/modes/code-arena/react/system-prompt.txt +33 -0
- package/modes/code-arena/react/template/index.html +12 -0
- package/modes/code-arena/react/template/package.json +28 -0
- package/modes/code-arena/react/template/src/App.tsx +28 -0
- package/modes/code-arena/react/template/src/index.css +1 -0
- package/modes/code-arena/react/template/src/main.tsx +10 -0
- package/modes/code-arena/react/template/src/utils/cn.ts +6 -0
- package/modes/code-arena/react/template/tsconfig.json +25 -0
- package/modes/code-arena/react/template/vite.config.ts +18 -0
- package/modes/code-arena/react/tools.json +410 -0
- package/package.json +33 -5
- package/web/styles.css +22 -7
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"function": {
|
|
5
|
+
"name": "read_file",
|
|
6
|
+
"description": "Read the content of an existing file with line numbers. For large files, use `offset` (1-indexed start line) and `limit` (max lines, default 2000) to read specific ranges. Cannot read binary files (images, fonts, audio, video, archives, etc.) — only text files are supported.\n",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "File path relative to project root (for example, 'index.html')"
|
|
13
|
+
},
|
|
14
|
+
"offset": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"minimum": 1,
|
|
17
|
+
"description": "Line number to start reading from (1-indexed, default: 1)"
|
|
18
|
+
},
|
|
19
|
+
"limit": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"minimum": 1,
|
|
22
|
+
"description": "Maximum number of lines to read (default: 2000)"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [
|
|
26
|
+
"path",
|
|
27
|
+
"offset",
|
|
28
|
+
"limit"
|
|
29
|
+
],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "function",
|
|
36
|
+
"function": {
|
|
37
|
+
"name": "create_file",
|
|
38
|
+
"description": "Create a new file or overwrite an existing file in the project with the provided content. The file extension should match the type of file you want to create (e.g., 'index.html' for HTML files). If the file already exists, its content will be completely replaced.\n",
|
|
39
|
+
"parameters": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"path": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "File path relative to project root (for example, 'index.html')"
|
|
45
|
+
},
|
|
46
|
+
"content": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The complete content of the file"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"path",
|
|
53
|
+
"content"
|
|
54
|
+
],
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "function",
|
|
61
|
+
"function": {
|
|
62
|
+
"name": "edit_file",
|
|
63
|
+
"description": "Replace a section of content in a file. Uses fuzzy matching that ignores whitespace and indentation differences, so the context doesn't need to match exactly. This will fail if 'context' matches multiple sections in the file.\n",
|
|
64
|
+
"parameters": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"path": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "File path relative to project root (for example, 'index.html')"
|
|
70
|
+
},
|
|
71
|
+
"context": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "The text in the file to replace. Uses fuzzy matching that ignores whitespace and indentation differences, so it doesn't need to match exactly. Only the first occurrence will be replaced."
|
|
74
|
+
},
|
|
75
|
+
"replacement": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "The new text to replace the matched context with. This will be inserted exactly where the context was found."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"path",
|
|
82
|
+
"context",
|
|
83
|
+
"replacement"
|
|
84
|
+
],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "function",
|
|
91
|
+
"function": {
|
|
92
|
+
"name": "delete_file",
|
|
93
|
+
"description": "Delete a file from the project.\n",
|
|
94
|
+
"parameters": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"path": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "File path relative to project root (for example, 'index.html')"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"path"
|
|
104
|
+
],
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "function",
|
|
111
|
+
"function": {
|
|
112
|
+
"name": "list_files",
|
|
113
|
+
"description": "List file paths in the project. If no path is provided, lists all files from the project root. You can optionally provide a relative path to list files within a specific directory. You should generally prefer the glob_files and grep_files tools if you know which directories or patterns to search for.\n",
|
|
114
|
+
"parameters": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"path": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "The directory to list, relative to project root. Defaults to the project root."
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": [
|
|
124
|
+
"path"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "function",
|
|
131
|
+
"function": {
|
|
132
|
+
"name": "grep_files",
|
|
133
|
+
"description": "Fast content search tool that searches file contents using regular expressions. Supports full regex syntax (e.g., \"log.*Error\", \"function\\s+\\w+\"). Filter files with the glob parameter (e.g., \"*.js\", \"*.{ts,tsx}\"). Returns matching lines with file paths and line numbers. Results are limited to 100 matches.",
|
|
134
|
+
"parameters": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"properties": {
|
|
137
|
+
"pattern": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "The regex pattern to search for in file contents"
|
|
140
|
+
},
|
|
141
|
+
"path": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "The directory to search in, relative to project root. Defaults to the project root."
|
|
144
|
+
},
|
|
145
|
+
"glob": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\")"
|
|
148
|
+
},
|
|
149
|
+
"output_mode": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": [
|
|
152
|
+
"content",
|
|
153
|
+
"files_with_matches",
|
|
154
|
+
"count"
|
|
155
|
+
],
|
|
156
|
+
"description": "Output mode: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts per file."
|
|
157
|
+
},
|
|
158
|
+
"-i": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"description": "Case insensitive search"
|
|
161
|
+
},
|
|
162
|
+
"-B": {
|
|
163
|
+
"type": "integer",
|
|
164
|
+
"minimum": 0,
|
|
165
|
+
"description": "Number of lines to show before each match"
|
|
166
|
+
},
|
|
167
|
+
"-A": {
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"minimum": 0,
|
|
170
|
+
"description": "Number of lines to show after each match"
|
|
171
|
+
},
|
|
172
|
+
"-C": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 0,
|
|
175
|
+
"description": "Number of lines to show before and after each match"
|
|
176
|
+
},
|
|
177
|
+
"context": {
|
|
178
|
+
"type": "integer",
|
|
179
|
+
"minimum": 0,
|
|
180
|
+
"description": "Alias for -C (context lines before and after)"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"pattern",
|
|
185
|
+
"path",
|
|
186
|
+
"glob",
|
|
187
|
+
"output_mode",
|
|
188
|
+
"-i",
|
|
189
|
+
"-B",
|
|
190
|
+
"-A",
|
|
191
|
+
"-C",
|
|
192
|
+
"context"
|
|
193
|
+
],
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "function",
|
|
200
|
+
"function": {
|
|
201
|
+
"name": "glob_files",
|
|
202
|
+
"description": "Fast file pattern matching tool. Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\". Returns matching file paths. Use this tool when you need to find files by name or extension patterns. Results are limited to 100 files.",
|
|
203
|
+
"parameters": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"properties": {
|
|
206
|
+
"pattern": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "The glob pattern to match files against"
|
|
209
|
+
},
|
|
210
|
+
"path": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"description": "The directory to search in, relative to project root. Defaults to the project root."
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"required": [
|
|
216
|
+
"pattern",
|
|
217
|
+
"path"
|
|
218
|
+
],
|
|
219
|
+
"additionalProperties": false
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "function",
|
|
225
|
+
"function": {
|
|
226
|
+
"name": "install_npm_packages",
|
|
227
|
+
"description": "Install npm packages as dependencies. Takes an array of package names and runs 'npm install -S' with those packages.\n",
|
|
228
|
+
"parameters": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"properties": {
|
|
231
|
+
"packages": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"description": "Package name (e.g., 'react', 'lodash', 'axios@1.0.0')"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": [
|
|
240
|
+
"packages"
|
|
241
|
+
],
|
|
242
|
+
"additionalProperties": false
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "function",
|
|
248
|
+
"function": {
|
|
249
|
+
"name": "bash",
|
|
250
|
+
"description": "Execute a bash command in the sandbox. The command runs in a sandboxed environment with Node.js and common CLI tools available.\n\nGuidelines:\n- The working directory defaults to the project root. Only pass `workdir` for subdirectories within the project (e.g. `src/`). Never pass an absolute path.\n- Prefer specialized tools (create_file, edit_file, read_file) for file operations when possible.\n- Include a short `description` summarizing what the command does in 5-10 words.\n- The command runs with `/bin/bash -c` and captures both stdout and stderr.\n",
|
|
251
|
+
"parameters": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"command": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "The bash command to execute"
|
|
257
|
+
},
|
|
258
|
+
"workdir": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"description": "Working directory for the command (defaults to project root)"
|
|
261
|
+
},
|
|
262
|
+
"description": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"description": "Short (5-10 word) description of what the command does"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"command",
|
|
269
|
+
"workdir",
|
|
270
|
+
"description"
|
|
271
|
+
],
|
|
272
|
+
"additionalProperties": false
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "function",
|
|
278
|
+
"function": {
|
|
279
|
+
"name": "build_and_start",
|
|
280
|
+
"description": "Build and start the fullstack preview using the platform-managed runtime. Use this after you finish editing code to verify that the application bootstraps, builds, starts, and passes the healthcheck. If it fails, inspect the returned stage and log tail before deciding what to fix.\n",
|
|
281
|
+
"parameters": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"properties": {
|
|
284
|
+
"description": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"additionalProperties": false,
|
|
289
|
+
"required": [
|
|
290
|
+
"description"
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"type": "function",
|
|
297
|
+
"function": {
|
|
298
|
+
"name": "web_search",
|
|
299
|
+
"description": "Search the web for current information. Use when you need documentation, API references, examples, or facts beyond your training data. Returns results with titles, URLs, and content snippets. The current year is 2026 — use it when searching for recent information.",
|
|
300
|
+
"parameters": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"properties": {
|
|
303
|
+
"query": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"description": "The search query"
|
|
306
|
+
},
|
|
307
|
+
"depth": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"enum": [
|
|
310
|
+
"1",
|
|
311
|
+
"2",
|
|
312
|
+
"3"
|
|
313
|
+
],
|
|
314
|
+
"description": "The search tool accepts a depth parameter (1, 2, or 3) that controls how many results are fetched and how much content is extracted from each. At depth 1, fewer results are retrieved with shorter excerpts. At depth 3, more results are retrieved with longer, more detailed excerpts per source. Depth 2 falls between the two. Higher depth consumes more of the context window."
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": [
|
|
318
|
+
"query",
|
|
319
|
+
"depth"
|
|
320
|
+
],
|
|
321
|
+
"additionalProperties": false
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"type": "function",
|
|
327
|
+
"function": {
|
|
328
|
+
"name": "web_fetch",
|
|
329
|
+
"description": "Fetch and read the content of a web page. Use to read documentation, API references, or examples found via web_search. Returns content as markdown by default. Supports format options: \"markdown\" (default), \"text\", or \"html\".",
|
|
330
|
+
"parameters": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"properties": {
|
|
333
|
+
"url": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "The URL to fetch content from"
|
|
336
|
+
},
|
|
337
|
+
"format": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"enum": [
|
|
340
|
+
"markdown",
|
|
341
|
+
"text",
|
|
342
|
+
"html"
|
|
343
|
+
],
|
|
344
|
+
"description": "Output format: \"markdown\" (default), \"text\", or \"html\""
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": [
|
|
348
|
+
"url",
|
|
349
|
+
"format"
|
|
350
|
+
],
|
|
351
|
+
"additionalProperties": false
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"type": "function",
|
|
357
|
+
"function": {
|
|
358
|
+
"name": "fetch_media",
|
|
359
|
+
"description": "Search for stock photos and videos and return URL-based media assets. Use this when real photography or video is better than AI-generated imagery. Use `recommendedUrl`.\n",
|
|
360
|
+
"parameters": {
|
|
361
|
+
"type": "object",
|
|
362
|
+
"properties": {
|
|
363
|
+
"query": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"description": "Search query for stock media, such as 'modern office interior' or 'ocean waves'."
|
|
366
|
+
},
|
|
367
|
+
"media_type": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"enum": [
|
|
370
|
+
"image",
|
|
371
|
+
"video",
|
|
372
|
+
"both"
|
|
373
|
+
],
|
|
374
|
+
"default": "both",
|
|
375
|
+
"description": "Type of media: \"image\", \"video\", or \"both\". Defaults to \"both\"."
|
|
376
|
+
},
|
|
377
|
+
"count": {
|
|
378
|
+
"type": "number",
|
|
379
|
+
"default": 6,
|
|
380
|
+
"description": "Number of assets to return (1-10). Defaults to 6."
|
|
381
|
+
},
|
|
382
|
+
"orientation": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"enum": [
|
|
385
|
+
"any",
|
|
386
|
+
"landscape",
|
|
387
|
+
"portrait",
|
|
388
|
+
"square"
|
|
389
|
+
],
|
|
390
|
+
"default": "any",
|
|
391
|
+
"description": "Desired orientation. Defaults to \"any\"."
|
|
392
|
+
},
|
|
393
|
+
"size": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"enum": [
|
|
396
|
+
"any",
|
|
397
|
+
"large",
|
|
398
|
+
"medium",
|
|
399
|
+
"small"
|
|
400
|
+
],
|
|
401
|
+
"default": "any",
|
|
402
|
+
"description": "Minimum media size. Defaults to \"any\"."
|
|
403
|
+
},
|
|
404
|
+
"locale": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"description": "Search locale, such as \"en-US\". Defaults to \"en-US\"."
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"required": [
|
|
410
|
+
"query",
|
|
411
|
+
"media_type",
|
|
412
|
+
"count",
|
|
413
|
+
"orientation",
|
|
414
|
+
"size",
|
|
415
|
+
"locale"
|
|
416
|
+
],
|
|
417
|
+
"additionalProperties": false
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"type": "function",
|
|
423
|
+
"function": {
|
|
424
|
+
"name": "generate_image",
|
|
425
|
+
"description": "Generate a custom image using AI and save it to the project. Use this tool when you need to create images for the website such as hero backgrounds, icons, illustrations, or any visual content. The image will be saved at the specified path. Place web-accessible images in the 'public/' directory (e.g., 'public/images/hero.jpg'). Provide a detailed, descriptive prompt for best results. Supported formats: JPG, JPEG, and PNG. You can generate at most 10 images per session — plan your image usage carefully and prefer CSS gradients, SVG, or emoji for decorative elements.\n",
|
|
426
|
+
"parameters": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"properties": {
|
|
429
|
+
"file_path": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"description": "Relative path to save the generated image (e.g., 'public/images/hero.jpg'). Must end in .jpg, .jpeg, or .png."
|
|
432
|
+
},
|
|
433
|
+
"prompt": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"description": "Text prompt describing the image to generate"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"required": [
|
|
439
|
+
"file_path",
|
|
440
|
+
"prompt"
|
|
441
|
+
],
|
|
442
|
+
"additionalProperties": false
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
You are an expert coding assistant who creates single page websites by using the provided tools to create and/or edit an index.html file using HTML, CSS, and JavaScript.
|
|
2
|
+
For any user prompt, always try to generate a website. Always just update the code instead of asking the user to confirm details.
|
|
3
|
+
|
|
4
|
+
## Critical File Operations
|
|
5
|
+
|
|
6
|
+
All file operations must be done exclusively through the provided tools. After using a tool, provide only a brief summary of what you did - DO NOT output the actual code content in your response text.
|
|
7
|
+
You can use 'grep_files' to search file contents by regex pattern when you need to find specific code.
|
|
8
|
+
|
|
9
|
+
## Web Research
|
|
10
|
+
|
|
11
|
+
You have access to 'web_search' and 'web_fetch' tools for researching information on the internet.
|
|
12
|
+
- Use 'web_search' to find documentation, API references, examples, or any facts you need. This is especially useful when the user asks you to integrate a third-party API or library you're not fully familiar with.
|
|
13
|
+
- Use 'web_fetch' to read the content of a specific web page, such as documentation or API reference pages found via search.
|
|
14
|
+
- When the user's request involves a specific API, service, or library, proactively search for its documentation to ensure you use the correct endpoints, parameters, and authentication methods rather than guessing.
|
|
15
|
+
|
|
16
|
+
**IMPORTANT:** When using the tools to create or edit files, the content you provide should be plain HTML/CSS/JavaScript with normal angle brackets (< and >), NOT HTML entities like < or >. Write the code exactly as it would appear in a normal .html file.
|
|
17
|
+
|
|
18
|
+
## Task Planning
|
|
19
|
+
|
|
20
|
+
You have a maximum of 25 sequential tool-calling steps to complete the task. Plan your approach carefully and prioritize the most critical changes first to work within this limit.
|
|
21
|
+
|
|
22
|
+
For each file you create or edit, you must first explain what you are about to do, then call the tool, then confirm the result.
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
ALWAYS create complete, functional web applications in a single index.html file.
|
|
27
|
+
|
|
28
|
+
Make sure the index.html file includes:
|
|
29
|
+
- HTML structure with proper DOCTYPE
|
|
30
|
+
- Tailwind CSS for styling via CDN: <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>, styling inline, or via an inline <style> tag
|
|
31
|
+
- JavaScript functionality in <script> tags within the HTML
|
|
32
|
+
|
|
33
|
+
## Remember
|
|
34
|
+
|
|
35
|
+
Use tools for all file creation and editing. Never output code directly in your response text.
|
|
36
|
+
You MUST use non-escaped characters that can be rendered in a browser as-is. Don't escape them!
|