fix: clarify assistant credential removal
This commit is contained in:
1 parent
8d9d2fe802
commit
f3360e0d97
3 files changed
+25
-15
No files matched your search
@@ -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.
|
||||
|
||||
+17
-8
@@ -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={<IconKey size={16} />}
|
||||
placeholder={configuration?.apiKeyConfigured ? t("apiKey.configured") : t("apiKey.placeholder")}
|
||||
placeholder={
|
||||
configuration?.apiKeyConfigured ? t("apiKey.replacementPlaceholder") : t("apiKey.placeholder")
|
||||
}
|
||||
autoComplete="new-password"
|
||||
/>
|
||||
{configuration?.apiKeyConfigured && (
|
||||
<Button
|
||||
variant="subtle"
|
||||
color={clearApiKey ? "gray" : "red"}
|
||||
onClick={() => setClearApiKey(!clearApiKey)}
|
||||
>
|
||||
{clearApiKey ? t("apiKey.keep") : t("apiKey.clear")}
|
||||
</Button>
|
||||
<Switch
|
||||
checked={clearApiKey}
|
||||
onChange={(event) => changeApiKeyRemoval(event.currentTarget.checked)}
|
||||
color="red"
|
||||
label={t("apiKey.remove")}
|
||||
description={clearApiKey ? t("apiKey.removalPendingDescription") : t("apiKey.removeDescription")}
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user