Skip to content

Commit aaf38a9

Browse files
committed
proper setting navigation inside chat
1 parent 649a41c commit aaf38a9

File tree

1 file changed

+12
-3
lines changed
  • apps/desktop/src/components/chat/body

1 file changed

+12
-3
lines changed

apps/desktop/src/components/chat/body/empty.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import { useCallback } from "react";
2+
13
import { commands as windowsCommands } from "@hypr/plugin-windows";
24
import { Button } from "@hypr/ui/components/ui/button";
35

46
export function ChatBodyEmpty({ isModelConfigured = true }: { isModelConfigured?: boolean }) {
5-
const handleGoToSettings = () => {
6-
windowsCommands.windowShow({ type: "settings" });
7-
};
7+
const handleGoToSettings = useCallback(() => {
8+
windowsCommands.windowShow({ type: "settings" })
9+
.then(() => new Promise((resolve) => setTimeout(resolve, 1000)))
10+
.then(() =>
11+
windowsCommands.windowEmitNavigate({ type: "settings" }, {
12+
path: "/app/settings",
13+
search: { tab: "intelligence" },
14+
})
15+
);
16+
}, []);
817

918
const quickActions = [
1019
"Make a 1-paragraph summary",

0 commit comments

Comments
 (0)