From f3360e0d970957e954e03845ff8bfbb51c956acf Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 30 Jul 2026 09:18:34 +0200 Subject: [PATCH] fix: clarify assistant credential removal --- apps/docs/docs/management/assistant.mdx | 2 +- .../_components/assistant-configuration.tsx | 25 +++++++++++++------ packages/translation/src/lang/en.json | 13 +++++----- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/apps/docs/docs/management/assistant.mdx b/apps/docs/docs/management/assistant.mdx index 88b8a0b2c..aeadd7db2 100644 --- a/apps/docs/docs/management/assistant.mdx +++ b/apps/docs/docs/management/assistant.mdx @@ -6,7 +6,7 @@ tags: - Security --- -# Homarr Assistant +# Assistant Administrators can configure the instance-wide AI assistant from **Management → Assistant**. It is available to signed-in users from the header, the user menu, and the `Cmd/Ctrl + K` command menu. diff --git a/apps/nextjs/src/app/[locale]/manage/assistant/_components/assistant-configuration.tsx b/apps/nextjs/src/app/[locale]/manage/assistant/_components/assistant-configuration.tsx index ba3f57657..e676311c1 100644 --- a/apps/nextjs/src/app/[locale]/manage/assistant/_components/assistant-configuration.tsx +++ b/apps/nextjs/src/app/[locale]/manage/assistant/_components/assistant-configuration.tsx @@ -216,6 +216,13 @@ export const AssistantConfiguration = () => { setModelDiscoveryPath(value); }; + const changeApiKeyRemoval = (remove: boolean) => { + if (remove) { + setApiKey(""); + } + setClearApiKey(remove); + }; + const addHeader = () => { setHeaders((current) => [...current, { id: nextHeaderId, name: "", value: "" }]); setNextHeaderId((current) => current + 1); @@ -328,17 +335,19 @@ export const AssistantConfiguration = () => { setClearApiKey(false); }} leftSection={} - placeholder={configuration?.apiKeyConfigured ? t("apiKey.configured") : t("apiKey.placeholder")} + placeholder={ + configuration?.apiKeyConfigured ? t("apiKey.replacementPlaceholder") : t("apiKey.placeholder") + } autoComplete="new-password" /> {configuration?.apiKeyConfigured && ( - + changeApiKeyRemoval(event.currentTarget.checked)} + color="red" + label={t("apiKey.remove")} + description={clearApiKey ? t("apiKey.removalPendingDescription") : t("apiKey.removeDescription")} + /> )} diff --git a/packages/translation/src/lang/en.json b/packages/translation/src/lang/en.json index 1cef5907d..2248155e7 100644 --- a/packages/translation/src/lang/en.json +++ b/packages/translation/src/lang/en.json @@ -5862,7 +5862,7 @@ } }, "assistant": { - "title": "Homarr Assistant", + "title": "Assistant", "description": "Connect an OpenAI-compatible model endpoint for the instance-wide assistant.", "security": { "title": "Server-side secrets", @@ -5947,11 +5947,12 @@ "required": "Required by this provider. The value is encrypted and write-only.", "optional": "Optional for local endpoints. Leave it blank when the service does not require bearer authentication.", "placeholder": "Enter an API key", - "configured": "A key is configured. Enter a new key to replace it.", - "configuredBadge": "Key configured", + "replacementPlaceholder": "Enter a replacement API key", + "configuredBadge": "Saved key active", "pendingRemoval": "Removal pending", - "clear": "Remove stored API key when saving", - "keep": "Keep stored API key" + "remove": "Remove saved API key", + "removeDescription": "Deletes the saved key after you click Save provider connection.", + "removalPendingDescription": "The saved key will be deleted when you save the provider connection." }, "headers": { "title": "Additional request headers", @@ -5983,7 +5984,7 @@ "toolsUnknown": "Verify tool support" }, "enabled": { - "label": "Enable Homarr Assistant", + "label": "Enable Assistant", "description": "Shows the assistant to all signed-in users. Existing Homarr permissions still apply to every internal tool call." }, "save": "Save assistant",