diff --git a/.config/quickshell/modules/sidebarLeft/AiChat.qml b/.config/quickshell/modules/sidebarLeft/AiChat.qml index 1ce752c7b..422dc41b8 100644 --- a/.config/quickshell/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/modules/sidebarLeft/AiChat.qml @@ -244,7 +244,7 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) color: Appearance.m3colors.m3outline horizontalAlignment: Text.AlignLeft wrapMode: Text.Wrap - text: qsTr("Ctrl+O to expand the sidebar\nCtrl+P to detach sidebar into a window") + text: qsTr("Type /key to get started with online models\nCtrl+O to expand the sidebar\nCtrl+P to detach sidebar into a window") } } } diff --git a/.config/quickshell/services/Ai.qml b/.config/quickshell/services/Ai.qml index 9a5ef5124..f545b878f 100644 --- a/.config/quickshell/services/Ai.qml +++ b/.config/quickshell/services/Ai.qml @@ -298,6 +298,8 @@ Singleton { modelId = modelId.toLowerCase() if (modelList.indexOf(modelId) !== -1) { const model = models[modelId] + // Fetch API keys if needed + if (model?.requires_key) KeyringStorage.fetchKeyringData(); // See if policy prevents online models if (ConfigOptions.policies.ai === 2 && !model.endpoint.includes("localhost")) { root.addMessage(StringUtils.format(StringUtils.format("Online models disallowed\n\nControlled by `policies.ai` config option"), model.name), root.interfaceRole); @@ -314,9 +316,6 @@ Singleton { } else { if (feedback) root.addMessage(qsTr("Invalid model. Supported: \n```\n") + modelList.join("\n```\n```\n"), Ai.interfaceRole) + "\n```" } - if (models[modelId]?.requires_key) { - KeyringStorage.fetchKeyringData(); - } } function getTemperature() {