fix(custom-widgets): restore bundled authoring
This commit is contained in:
16 files changed
+180
-58
No files matched your search
@@ -48,10 +48,14 @@ export function buildCustomWidgetAiPrompt(
|
||||
currentConfig?: Partial<HomarrCustomWidgetV2> | Record<string, unknown> | null,
|
||||
request?: string | null,
|
||||
documentationUrl?: string | null,
|
||||
embeddedSkill?: string,
|
||||
) {
|
||||
const sections = [AUTHORING_PROMPT];
|
||||
if (documentationUrl) sections.push(`API documentation: ${redactUrl(documentationUrl)}`);
|
||||
sections.push(`Requested widget: ${redactText(request?.trim() || "Describe the widget you want to create.")}`);
|
||||
if (embeddedSkill) {
|
||||
sections.push(`Use this embedded Homarr Custom Widget skill while authoring:\n\n${embeddedSkill}`);
|
||||
}
|
||||
if (rawResponse) sections.push(`Sample API response:\n\n\`\`\`json\n${redactResponse(rawResponse)}\n\`\`\``);
|
||||
if (currentConfig) {
|
||||
sections.push(`Current widget:\n\n\`\`\`json\n${JSON.stringify(redactValue(currentConfig), null, 2)}\n\`\`\``);
|
||||
|
||||
@@ -9,7 +9,7 @@ import { customJsxTablerIconNames } from "./tabler-icons";
|
||||
export const CUSTOM_WIDGET_SKILL_VERSION = "2.0.0";
|
||||
export const CUSTOM_WIDGET_SKILLS_SH_URL = "https://www.skills.sh/homarr-labs/homarr/homarr-custom-widget";
|
||||
export const CUSTOM_WIDGET_SKILL_SOURCE_URL =
|
||||
"https://github.com/homarr-labs/homarr/tree/v2/.agents/skills/homarr-custom-widget";
|
||||
"https://github.com/homarr-labs/homarr/tree/dev/.agents/skills/homarr-custom-widget";
|
||||
export const CUSTOM_WIDGET_SKILL_INSTALL_COMMAND =
|
||||
"npx skills add https://github.com/homarr-labs/homarr --skill homarr-custom-widget";
|
||||
|
||||
|
||||
Reference in new issue
Block a user