fix(editor): Allow users to logout of dynamic creds in chathub (#29117)

This commit is contained in:
phyllis-noester 2026-04-27 09:27:14 +02:00 committed by GitHub
parent 1d325a20ca
commit b1ddbf26b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 1 deletions

View File

@ -549,6 +549,7 @@
"chatHub.chat.header.button.editAgent": "Edit Agent",
"chatHub.chat.header.button.newChat": "New Chat",
"chatHub.chat.header.button.openWorkflow": "Open Workflow",
"chatHub.chat.header.button.manageConnections": "Manage connections",
"chatHub.chat.prompt.microphone.accessDenied": "Microphone access denied",
"chatHub.chat.prompt.microphone.allowAccess": "Please allow microphone access to use voice input",
"chatHub.chat.prompt.microphone.noSpeech": "No speech detected. Please try again",

View File

@ -715,12 +715,16 @@ function onFilesDropped(files: File[]) {
:show-artifact-icon="
artifacts.allArtifacts.value.length > 0 && artifacts.isViewerCollapsed.value
"
:has-dynamic-credentials="dynamicCreds.hasDynamicCredentials.value"
@select-model="handleSelectModel"
@edit-custom-agent="handleEditAgent"
@create-custom-agent="openNewAgentCreator"
@select-credential="selectCredential"
@open-workflow="handleOpenWorkflow"
@reopen-artifact="artifacts.handleOpenViewer"
@toggle-dynamic-credentials="
isDynamicCredentialsDrawerOpen = !isDynamicCredentialsDrawerOpen
"
/>
<N8nScrollArea

View File

@ -13,11 +13,18 @@ import { useI18n } from '@n8n/i18n';
import { computed, useTemplateRef, watch, ref } from 'vue';
import { useChatStore } from '../chat.store';
const { selectedModel, credentials, readyToShowModelSelector, showArtifactIcon } = defineProps<{
const {
selectedModel,
credentials,
readyToShowModelSelector,
showArtifactIcon,
hasDynamicCredentials,
} = defineProps<{
selectedModel: ChatModelDto | null;
credentials: CredentialsMap | null;
readyToShowModelSelector: boolean;
showArtifactIcon: boolean;
hasDynamicCredentials: boolean;
}>();
const emit = defineEmits<{
@ -28,6 +35,7 @@ const emit = defineEmits<{
selectCredential: [provider: ChatHubProvider, credentialId: string | null];
openWorkflow: [workflowId: string];
reopenArtifact: [];
toggleDynamicCredentials: [];
}>();
const modelSelectorRef = useTemplateRef('modelSelectorRef');
@ -110,6 +118,16 @@ defineExpose({
icon="panel-right"
@click="emit('reopenArtifact')"
/>
<N8nIconButton
v-if="hasDynamicCredentials"
variant="subtle"
size="small"
icon="key-round"
:title="i18n.baseText('chatHub.chat.header.button.manageConnections')"
:aria-label="i18n.baseText('chatHub.chat.header.button.manageConnections')"
data-testid="manage-dynamic-credentials-button"
@click="emit('toggleDynamicCredentials')"
/>
<N8nButton
v-if="showOpenWorkflow"
variant="subtle"