fix(core): Miscellaneous chat hub fixes (no-changelog) (#20995)

This commit is contained in:
Jaakko Husso 2025-10-21 12:06:43 +03:00 committed by GitHub
parent b4a92f32f6
commit cdeb8cb7e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 16 deletions

View File

@ -116,6 +116,16 @@ const mainMenuItems = computed<IMenuItem[]>(() => [
icon: 'cloud',
available: settingsStore.isCloudDeployment && hasPermission(['instanceOwner']),
},
{
id: 'chat',
icon: 'message-circle',
label: 'Chat',
position: 'bottom',
route: { to: { name: CHAT_VIEW } },
available:
settingsStore.isChatFeatureEnabled &&
hasPermission(['rbac'], { rbac: { scope: 'chatHub:message' } }),
},
{
// Link to in-app pre-built agent templates, available experiment is enabled
id: 'templates',
@ -195,16 +205,6 @@ const mainMenuItems = computed<IMenuItem[]>(() => [
settingsStore.isModuleActive('insights') &&
hasPermission(['rbac'], { rbac: { scope: 'insights:list' } }),
},
{
id: 'chat',
icon: 'bot',
label: 'Chat',
position: 'bottom',
route: { to: { name: CHAT_VIEW } },
available:
settingsStore.isChatFeatureEnabled &&
hasPermission(['rbac'], { rbac: { scope: 'chatHub:message' } }),
},
{
id: 'help',
icon: 'circle-help',

View File

@ -26,10 +26,12 @@ const speechInput = useSpeechRecognition({
lang: navigator.language,
});
function onAttach() {}
function onMic() {
speechInput.isListening.value ? speechInput.stop() : speechInput.start();
if (speechInput.isListening.value) {
speechInput.stop();
} else {
speechInput.start();
}
}
function onStop() {
@ -102,6 +104,7 @@ defineExpose({
/>
<div :class="$style.actions">
<!-- TODO: Implement attachments
<N8nIconButton
native-type="button"
type="secondary"
@ -111,7 +114,7 @@ defineExpose({
icon-size="large"
text
@click="onAttach"
/>
/> -->
<N8nIconButton
v-if="speechInput.isSupported"
native-type="button"

View File

@ -13,7 +13,7 @@ export const ChatModule: FrontendModuleDescription = {
routes: [
{
name: CHAT_VIEW,
path: '/ask',
path: '/home/chat',
components: {
default: ChatView,
sidebar: ChatSidebar,
@ -24,7 +24,7 @@ export const ChatModule: FrontendModuleDescription = {
},
{
name: CHAT_CONVERSATION_VIEW,
path: '/ask/:id',
path: '/home/chat/:id',
components: {
default: ChatView,
sidebar: ChatSidebar,