agentgui 1.0.44 → 1.0.45

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/system-prompt.js +89 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/system-prompt.js CHANGED
@@ -263,6 +263,95 @@ Use RippleUI's rich component library to create interesting, visually effective
263
263
  </div>
264
264
  \`\`\`
265
265
 
266
+ ### Interactive Forms (Request User Input)
267
+
268
+ When you need user input, create an interactive form:
269
+
270
+ \`\`\`html
271
+ <div class="space-y-4 p-6 max-w-4xl">
272
+ <h2 class="text-2xl font-bold text-gray-900">User Input Required</h2>
273
+
274
+ <form class="space-y-4" onsubmit="return handleFormSubmit(event)">
275
+ <!-- Text Input -->
276
+ <div>
277
+ <label class="block text-sm font-semibold text-gray-900 mb-1">Name</label>
278
+ <input type="text" name="name" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Enter your name" required>
279
+ </div>
280
+
281
+ <!-- Email Input -->
282
+ <div>
283
+ <label class="block text-sm font-semibold text-gray-900 mb-1">Email</label>
284
+ <input type="email" name="email" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Enter email" required>
285
+ </div>
286
+
287
+ <!-- Textarea -->
288
+ <div>
289
+ <label class="block text-sm font-semibold text-gray-900 mb-1">Message</label>
290
+ <textarea name="message" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" rows="4" placeholder="Your message here" required></textarea>
291
+ </div>
292
+
293
+ <!-- Select Dropdown -->
294
+ <div>
295
+ <label class="block text-sm font-semibold text-gray-900 mb-1">Option</label>
296
+ <select name="option" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" required>
297
+ <option value="">Select an option</option>
298
+ <option value="option1">Option 1</option>
299
+ <option value="option2">Option 2</option>
300
+ <option value="option3">Option 3</option>
301
+ </select>
302
+ </div>
303
+
304
+ <!-- Checkbox -->
305
+ <div class="flex items-center">
306
+ <input type="checkbox" name="agree" id="agree" class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" required>
307
+ <label for="agree" class="ml-2 text-sm text-gray-700">I agree to the terms</label>
308
+ </div>
309
+
310
+ <!-- Radio Buttons -->
311
+ <div>
312
+ <label class="block text-sm font-semibold text-gray-900 mb-2">Choice</label>
313
+ <div class="space-y-2">
314
+ <div class="flex items-center">
315
+ <input type="radio" name="choice" id="choice1" value="yes" class="w-4 h-4 text-blue-600" required>
316
+ <label for="choice1" class="ml-2 text-sm text-gray-700">Yes</label>
317
+ </div>
318
+ <div class="flex items-center">
319
+ <input type="radio" name="choice" id="choice2" value="no" class="w-4 h-4 text-blue-600">
320
+ <label for="choice2" class="ml-2 text-sm text-gray-700">No</label>
321
+ </div>
322
+ </div>
323
+ </div>
324
+
325
+ <!-- Submit Button -->
326
+ <button type="submit" class="w-full bg-blue-600 text-white font-semibold py-2 px-4 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
327
+ Submit
328
+ </button>
329
+ </form>
330
+
331
+ <script>
332
+ function handleFormSubmit(event) {
333
+ event.preventDefault();
334
+ const formData = new FormData(event.target);
335
+ const data = Object.fromEntries(formData);
336
+ console.log('Form submitted:', data);
337
+ // Form data will be captured by the interface
338
+ return false;
339
+ }
340
+ </script>
341
+ </div>
342
+ \`\`\`
343
+
344
+ ## Form Input Guidelines
345
+
346
+ - ✓ Always wrap forms in proper semantic HTML
347
+ - ✓ Include labels with "for" attributes
348
+ - ✓ Use proper input types (text, email, password, number, etc.)
349
+ - ✓ Add placeholder text for guidance
350
+ - ✓ Include required attributes where needed
351
+ - ✓ Style consistently with Tailwind
352
+ - ✓ Submit button MUST be included
353
+ - ✓ Use onsubmit handler to capture data
354
+
266
355
  ### Icon + Text Combination
267
356
  \`\`\`html
268
357
  <div class="space-y-4 p-6 max-w-4xl">