AI
Generate Widget with AIPro
Describe a widget in plain language and the extension orchestrates the whole flow — scaffold, generate, preview and refine — using your own AI key (BYOK).
Generate a widget from a description
Generate Widget with AI — a new command, the IA Generated Widget panel, and a button in the Control Panel. Describe a widget in natural language and the extension orchestrates the existing building blocks. It:
- creates a blank widget on your instance and pulls it locally,
- generates the code and writes the files,
- opens the Live Preview.
widgets/<instance>/<id>/
├── template.html → generated
├── client.js → generated
├── server.js → generated
├── styles.scss → generated
├── option-schema.json → generated
├── demo-data.json → generated
└── .widget-meta.json → never touched (sys_id, scope, instance)Push Current Widget — and .widget-meta.json is never touched.In-panel refine loop
After generating, describe changes in natural language right in the panel. The same widget is regenerated (reading the current files as context), rewritten, and the preview reloads automatically. Iterate until it's right.
Bring Your Own Key (BYOK)
SN Widget: Configure AI (also a ⚙ button in the Control Panel) opens a single guided AI Settings panel:
- Provider — Anthropic or OpenAI-compatible
- Model — a curated list plus a custom entry.
- Base URL and mode for non-standard endpoints.
- A Test connection button.
ai.provider / ai.model / ai.baseUrl / ai.mode can still be edited by hand, and SN Widget: Set AI API Key / Clear AI API Key remain available.AI skill file (project grounding)
SN Widget: Edit AI Skill File creates and opens a starter .sn-widget-kit/ai-skill.md. If present it is auto-discovered and appended to the AI prompt — no setting needed. Put your team conventions and instance-specific table/field notes there so generations match your standards.
snWidgetKit.ai.skillFile.