integrate assistant custom widget workflow

This commit is contained in:
ajnart committed 2026-08-03 15:22:08 +02:00
1 parent abc17e7c2a
commit 5a3022a073
11 files changed
+406 -161

No files matched your search

+10
View File
@@ -39,6 +39,10 @@ Homarr includes presets for OpenRouter, OpenAI, Anthropic Claude, Google Gemini,
DeepSeek, Together AI, Ollama, and LM Studio. Provider icons make the presets easy to identify. A custom
preset connects any other service that implements the OpenAI Chat Completions API.
The provider list also shows **Homarr — Coming soon** as a disabled option. It reserves a clear place for
Homarr's future managed assistant service without making an unavailable backend selectable or changing
the server-side provider configuration today.
The management page presents setup as three compact sections: provider and endpoint, credentials, then
model and availability. A status summary at the top shows whether the connection is ready, whether a key
is protected, which model is selected, and whether users can open the assistant.
@@ -136,6 +140,12 @@ validated input, result, and error state without flooding the conversation with
Common collection and widget results are summarized inline as compact responsive cards, while the full
structured result remains available in the tool card details.
Custom-widget tools let an administrator list, inspect, create, and update definitions. The custom-widget
form's **Design with AI** action sends a focused request into the current conversation, where the assistant
can propose the matching mutation and use the same approval controls. Existing stored secret values are
reported only as configured/not configured and are preserved on update unless replacements are explicitly
provided.
The shield control in the conversation header can enable automatic approvals for the current conversation.
While enabled, Homarr accepts every affirmative approval step as it arrives: protected mutations are approved,
presented app details and board changes are used, and structured questions with an explicitly categorized
@@ -50,9 +50,17 @@ To create a custom widget, navigate to the **Custom Widgets** section in the man
| **Action Button** | Clickable button executing the API request | Triggers: restart, clear cache |
| **Custom JSX** | Custom JSX template with Mantine v9 components | Full layout control |
### AI-Powered JSX Generation
### Design with AI
When editing or creating a custom widget with the **Custom JSX** display type, you'll find a **Copy Prompt** button. Clicking it copies a pre-formatted prompt describing your widget's name, API endpoint, and available Mantine components. Paste this into your preferred AI assistant (ChatGPT, Claude, Copilot, etc.) to generate a JSX template tailored to your data.
The **Design with AI** action is available while creating or editing a custom widget. Describe what the
widget should show and, when [Homarr Assistant](../assistant) is enabled, send the request directly from
the form. The assistant receives the widget schema, the current non-secret configuration, and the latest
test response. It can then propose and run the matching create or update tool after you approve the
mutation in the conversation.
Run **Test** first when possible so the prompt includes the endpoint's real response shape. Saved secret
values are never added to the prompt. **Copy to clipboard** remains available when Homarr Assistant is
disabled or when you prefer to use another AI service such as ChatGPT, Claude, or Gemini.
<details>
<summary>Example: Pokédex widget using Custom JSX</summary>