fix: simplify assistant shortcut

This commit is contained in:
ajnart committed 2026-08-14 11:32:10 +02:00
1 parent 6dc9a565b0
commit f3420a4149
4 files changed
+14 -4

No files matched your search

+3 -2
View File
@@ -9,7 +9,7 @@ tags:
# Assistant # Assistant
Administrators can configure the instance-wide AI assistant from **Management → 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 `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 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 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 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. 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 When the assistant is unavailable, its command-menu result remains visible but disabled and explains that
an administrator must configure and enable it. an administrator must configure and enable it.
@@ -620,7 +620,7 @@ const EnabledAssistantProvider = ({ children }: PropsWithChildren) => {
setUnreadCount((current) => current + 1); setUnreadCount((current) => current + 1);
}, [isLoading, notificationKey, opened]); }, [isLoading, notificationKey, opened]);
useHotkeys([[hotkeys.openAssistant, open]]); useHotkeys([[hotkeys.openAssistant, open, { preventDefault: true }]]);
const spotlightItem = useMemo( const spotlightItem = useMemo(
() => ({ () => ({
+1 -1
View File
@@ -3,5 +3,5 @@ export const hotkeys = {
toggleColorScheme: "mod+j", toggleColorScheme: "mod+j",
saveNotebook: "mod+s", saveNotebook: "mod+s",
openSpotlight: "mod+k", openSpotlight: "mod+k",
openAssistant: "mod+shift+k", openAssistant: "shift+a",
}; };
@@ -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");
});
});