diff --git a/apps/docs/docs/management/assistant.mdx b/apps/docs/docs/management/assistant.mdx index 8d133f5fa..725a08ce6 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 user menu, with `Cmd/Ctrl + Shift + K`, and from the +It is available to signed-in users from the user menu, with `Shift + A`, and from the `Cmd/Ctrl + K` command menu. **Ask Homarr Assistant** is always available as a local result in the default search. Selecting it with an existing query sends that query in the background; selecting it without a query turns the command-menu search field into a prompt composer. Press @@ -21,7 +21,8 @@ avatar shows a thinking indicator. The activity bar can be opened to follow the responses add an unread count to the user menu until they are opened or dismissed. The expanded conversation has a minimize action that returns it to the activity bar without interrupting a response. -`Cmd/Ctrl + Shift + K` opens the compact conversation panel directly. +`Shift + A` opens the compact conversation panel directly. The shortcut is ignored while typing in text +fields, selectors, and editable content. When the assistant is unavailable, its command-menu result remains visible but disabled and explains that an administrator must configure and enable it. diff --git a/apps/nextjs/src/components/assistant/assistant-provider.tsx b/apps/nextjs/src/components/assistant/assistant-provider.tsx index fe2057ab3..7b2efeeb6 100644 --- a/apps/nextjs/src/components/assistant/assistant-provider.tsx +++ b/apps/nextjs/src/components/assistant/assistant-provider.tsx @@ -620,7 +620,7 @@ const EnabledAssistantProvider = ({ children }: PropsWithChildren) => { setUnreadCount((current) => current + 1); }, [isLoading, notificationKey, opened]); - useHotkeys([[hotkeys.openAssistant, open]]); + useHotkeys([[hotkeys.openAssistant, open, { preventDefault: true }]]); const spotlightItem = useMemo( () => ({ diff --git a/packages/definitions/src/hotkeys.ts b/packages/definitions/src/hotkeys.ts index e200e53d1..ffa630fcf 100644 --- a/packages/definitions/src/hotkeys.ts +++ b/packages/definitions/src/hotkeys.ts @@ -3,5 +3,5 @@ export const hotkeys = { toggleColorScheme: "mod+j", saveNotebook: "mod+s", openSpotlight: "mod+k", - openAssistant: "mod+shift+k", + openAssistant: "shift+a", }; diff --git a/packages/definitions/src/test/hotkeys.spec.ts b/packages/definitions/src/test/hotkeys.spec.ts new file mode 100644 index 000000000..65ca4537f --- /dev/null +++ b/packages/definitions/src/test/hotkeys.spec.ts @@ -0,0 +1,9 @@ +import { describe, expect, it } from "vitest"; + +import { hotkeys } from "../hotkeys"; + +describe("hotkeys", () => { + it("uses the discoverable assistant shortcut", () => { + expect(hotkeys.openAssistant).toBe("shift+a"); + }); +});