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
|
- Security
|
||||||
---
|
---
|
||||||
|
|
||||||
# Homarr Assistant
|
# Assistant
|
||||||
|
|
||||||
Administrators can configure the instance-wide AI assistant from **Management → 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.
|
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);
|
setModelDiscoveryPath(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const changeApiKeyRemoval = (remove: boolean) => {
|
||||||
|
if (remove) {
|
||||||
|
setApiKey("");
|
||||||
|
}
|
||||||
|
setClearApiKey(remove);
|
||||||
|
};
|
||||||
|
|
||||||
const addHeader = () => {
|
const addHeader = () => {
|
||||||
setHeaders((current) => [...current, { id: nextHeaderId, name: "", value: "" }]);
|
setHeaders((current) => [...current, { id: nextHeaderId, name: "", value: "" }]);
|
||||||
setNextHeaderId((current) => current + 1);
|
setNextHeaderId((current) => current + 1);
|
||||||
@@ -328,17 +335,19 @@ export const AssistantConfiguration = () => {
|
|||||||
setClearApiKey(false);
|
setClearApiKey(false);
|
||||||
}}
|
}}
|
||||||
leftSection={<IconKey size={16} />}
|
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"
|
autoComplete="new-password"
|
||||||
/>
|
/>
|
||||||
{configuration?.apiKeyConfigured && (
|
{configuration?.apiKeyConfigured && (
|
||||||
<Button
|
<Switch
|
||||||
variant="subtle"
|
checked={clearApiKey}
|
||||||
color={clearApiKey ? "gray" : "red"}
|
onChange={(event) => changeApiKeyRemoval(event.currentTarget.checked)}
|
||||||
onClick={() => setClearApiKey(!clearApiKey)}
|
color="red"
|
||||||
>
|
label={t("apiKey.remove")}
|
||||||
{clearApiKey ? t("apiKey.keep") : t("apiKey.clear")}
|
description={clearApiKey ? t("apiKey.removalPendingDescription") : t("apiKey.removeDescription")}
|
||||||
</Button>
|
/>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
|||||||
@@ -5862,7 +5862,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"assistant": {
|
"assistant": {
|
||||||
"title": "Homarr Assistant",
|
"title": "Assistant",
|
||||||
"description": "Connect an OpenAI-compatible model endpoint for the instance-wide assistant.",
|
"description": "Connect an OpenAI-compatible model endpoint for the instance-wide assistant.",
|
||||||
"security": {
|
"security": {
|
||||||
"title": "Server-side secrets",
|
"title": "Server-side secrets",
|
||||||
@@ -5947,11 +5947,12 @@
|
|||||||
"required": "Required by this provider. The value is encrypted and write-only.",
|
"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.",
|
"optional": "Optional for local endpoints. Leave it blank when the service does not require bearer authentication.",
|
||||||
"placeholder": "Enter an API key",
|
"placeholder": "Enter an API key",
|
||||||
"configured": "A key is configured. Enter a new key to replace it.",
|
"replacementPlaceholder": "Enter a replacement API key",
|
||||||
"configuredBadge": "Key configured",
|
"configuredBadge": "Saved key active",
|
||||||
"pendingRemoval": "Removal pending",
|
"pendingRemoval": "Removal pending",
|
||||||
"clear": "Remove stored API key when saving",
|
"remove": "Remove saved API key",
|
||||||
"keep": "Keep stored 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": {
|
"headers": {
|
||||||
"title": "Additional request headers",
|
"title": "Additional request headers",
|
||||||
@@ -5983,7 +5984,7 @@
|
|||||||
"toolsUnknown": "Verify tool support"
|
"toolsUnknown": "Verify tool support"
|
||||||
},
|
},
|
||||||
"enabled": {
|
"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."
|
"description": "Shows the assistant to all signed-in users. Existing Homarr permissions still apply to every internal tool call."
|
||||||
},
|
},
|
||||||
"save": "Save assistant",
|
"save": "Save assistant",
|
||||||
|
|||||||
Reference in new issue
Block a user