From 8a8e222da34db2a3422e4fd8649a668dab88e373 Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 30 Jul 2026 09:37:52 +0200 Subject: [PATCH] fix: keep assistant in user menu --- apps/docs/docs/management/assistant.mdx | 2 +- .../assistant/assistant-trigger.tsx | 23 ------------------- apps/nextjs/src/components/layout/header.tsx | 2 -- 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 apps/nextjs/src/components/assistant/assistant-trigger.tsx diff --git a/apps/docs/docs/management/assistant.mdx b/apps/docs/docs/management/assistant.mdx index aeadd7db2..6c87a4d5c 100644 --- a/apps/docs/docs/management/assistant.mdx +++ b/apps/docs/docs/management/assistant.mdx @@ -9,7 +9,7 @@ tags: # 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 user menu and the `Cmd/Ctrl + K` command menu. `Cmd/Ctrl + Shift + K` opens it directly. When the assistant is unavailable, its command-menu result remains visible but disabled and explains that diff --git a/apps/nextjs/src/components/assistant/assistant-trigger.tsx b/apps/nextjs/src/components/assistant/assistant-trigger.tsx deleted file mode 100644 index ebcf8bc11..000000000 --- a/apps/nextjs/src/components/assistant/assistant-trigger.tsx +++ /dev/null @@ -1,23 +0,0 @@ -"use client"; - -import { Tooltip } from "@mantine/core"; -import { IconRobot } from "@tabler/icons-react"; - -import { useScopedI18n } from "@homarr/translation/client"; - -import { HeaderButton } from "../layout/header/button"; -import { useOptionalHomarrAssistant } from "./assistant-provider"; - -export const AssistantHeaderButton = () => { - const t = useScopedI18n("common.assistant"); - const assistant = useOptionalHomarrAssistant(); - if (!assistant?.enabled) return null; - - return ( - - - - - - ); -}; diff --git a/apps/nextjs/src/components/layout/header.tsx b/apps/nextjs/src/components/layout/header.tsx index aad975009..2ad377576 100644 --- a/apps/nextjs/src/components/layout/header.tsx +++ b/apps/nextjs/src/components/layout/header.tsx @@ -4,7 +4,6 @@ import { AppShellHeader, Group, UnstyledButton } from "@mantine/core"; import { Link } from "@homarr/ui"; import { ClientBurger } from "./header/burger"; -import { AssistantHeaderButton } from "../assistant/assistant-trigger"; import { DesktopSearchInput, MobileSearchButton } from "./header/search"; import { TourTarget } from "./header/tour-target"; import { UserButton } from "./header/user"; @@ -38,7 +37,6 @@ export const MainHeader = ({ logo, actions, hasNavigation = true }: Props) => { {actions} -