|
1 | 1 | import { AuthPreviewOperateScope } from "@t3tools/contracts"; |
2 | 2 | import { Outlet, createFileRoute, redirect, useParams } from "@tanstack/react-router"; |
3 | 3 | import { useAtomValue } from "@effect/atom-react"; |
4 | | -import { useEffect, useMemo } from "react"; |
| 4 | +import { useEffect } from "react"; |
5 | 5 |
|
6 | 6 | import { isCommandPaletteOpen } from "../commandPaletteBus"; |
7 | 7 | import { ThreadRouteView } from "../components/ThreadRouteView"; |
@@ -46,16 +46,12 @@ function ChatRouteGlobalShortcuts() { |
46 | 46 | const projects = useProjects(); |
47 | 47 | const primaryEnvironmentId = usePrimaryEnvironmentId(); |
48 | 48 | const { scratchEnvironmentId, startScratchThread } = useScratchProject(); |
49 | | - const projectGroupCount = useMemo( |
50 | | - () => |
51 | | - buildSidebarProjectSnapshots({ |
52 | | - projects, |
53 | | - settings: projectGroupingSettings, |
54 | | - primaryEnvironmentId, |
55 | | - resolveEnvironmentLabel: () => null, |
56 | | - }).length, |
57 | | - [primaryEnvironmentId, projectGroupingSettings, projects], |
58 | | - ); |
| 49 | + const projectGroupCount = buildSidebarProjectSnapshots({ |
| 50 | + projects, |
| 51 | + settings: projectGroupingSettings, |
| 52 | + primaryEnvironmentId, |
| 53 | + resolveEnvironmentLabel: () => null, |
| 54 | + }).length; |
59 | 55 | const terminalOpen = useTerminalUiStateStore((state) => |
60 | 56 | routeThreadRef |
61 | 57 | ? selectThreadTerminalUiState(state.terminalUiStateByThreadKey, routeThreadRef).terminalOpen |
|
0 commit comments