| author | |
| committer | |
| log | ee2f6bd7421b9ced1877719620ebe6835180a34c |
| tree | 5890433c21a0e502adfd72d5651175127bcd131d |
| parent | e1ba603605a146ce609496454fb51082a5911c46 |
3 files changed, 10 insertions(+), 11 deletions(-)
apps/web/src/components/ChatView.tsx+5-2| ... | @@ -30,7 +30,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; | ... | @@ -30,7 +30,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; |
| 30 | import { useDebouncedValue } from "@tanstack/react-pacer/debouncer"; | 30 | import { useDebouncedValue } from "@tanstack/react-pacer/debouncer"; |
| 31 | import { gitBranchesQueryOptions, gitCreateWorktreeMutationOptions } from "~/lib/gitReactQuery"; | 31 | import { gitBranchesQueryOptions, gitCreateWorktreeMutationOptions } from "~/lib/gitReactQuery"; |
| 32 | import { projectSearchEntriesQueryOptions } from "~/lib/projectReactQuery"; | 32 | import { projectSearchEntriesQueryOptions } from "~/lib/projectReactQuery"; |
| 33 | import { serverKeybindingsQueryOptions } from "~/lib/serverReactQuery"; | 33 | import { serverConfigQueryOptions } from "~/lib/serverReactQuery"; |
| 34 | 34 | ||
| 35 | import { isElectron } from "../env"; | 35 | import { isElectron } from "../env"; |
| 36 | import { buildBootstrapInput } from "../historyBootstrap"; | 36 | import { buildBootstrapInput } from "../historyBootstrap"; |
| ... | @@ -471,7 +471,10 @@ export default function ChatView() { | ... | @@ -471,7 +471,10 @@ export default function ChatView() { |
| 471 | ); | 471 | ); |
| 472 | const effectivePathQuery = pathTriggerQuery.length > 0 ? debouncedPathQuery : ""; | 472 | const effectivePathQuery = pathTriggerQuery.length > 0 ? debouncedPathQuery : ""; |
| 473 | const branchesQuery = useQuery(gitBranchesQueryOptions(api, gitCwd)); | 473 | const branchesQuery = useQuery(gitBranchesQueryOptions(api, gitCwd)); |
| 474 | const keybindingsQuery = useQuery(serverKeybindingsQueryOptions(api)); | 474 | const keybindingsQuery = useQuery({ |
| 475 | ...serverConfigQueryOptions(api), | ||
| 476 | select: (config) => config.keybindings, | ||
| 477 | }); | ||
| 475 | const workspaceEntriesQuery = useQuery( | 478 | const workspaceEntriesQuery = useQuery( |
| 476 | projectSearchEntriesQueryOptions({ | 479 | projectSearchEntriesQueryOptions({ |
| 477 | api, | 480 | api, |
apps/web/src/components/Sidebar.tsx+5-2| ... | @@ -16,7 +16,7 @@ import { | ... | @@ -16,7 +16,7 @@ import { |
| 16 | } from "../types"; | 16 | } from "../types"; |
| 17 | import { useNativeApi } from "../hooks/useNativeApi"; | 17 | import { useNativeApi } from "../hooks/useNativeApi"; |
| 18 | import { gitRemoveWorktreeMutationOptions } from "../lib/gitReactQuery"; | 18 | import { gitRemoveWorktreeMutationOptions } from "../lib/gitReactQuery"; |
| 19 | import { serverKeybindingsQueryOptions } from "../lib/serverReactQuery"; | 19 | import { serverConfigQueryOptions } from "../lib/serverReactQuery"; |
| 20 | import { toastManager } from "./ui/toast"; | 20 | import { toastManager } from "./ui/toast"; |
| 21 | import { formatWorktreePathForDisplay, getOrphanedWorktreePathForThread } from "../worktreeCleanup"; | 21 | import { formatWorktreePathForDisplay, getOrphanedWorktreePathForThread } from "../worktreeCleanup"; |
| 22 | 22 | ||
| ... | @@ -118,7 +118,10 @@ function terminalStatusIndicator(thread: Thread): TerminalStatusIndicator | null | ... | @@ -118,7 +118,10 @@ function terminalStatusIndicator(thread: Thread): TerminalStatusIndicator | null |
| 118 | export default function Sidebar() { | 118 | export default function Sidebar() { |
| 119 | const { state, dispatch } = useStore(); | 119 | const { state, dispatch } = useStore(); |
| 120 | const api = useNativeApi(); | 120 | const api = useNativeApi(); |
| 121 | const { data: keybindings = EMPTY_KEYBINDINGS } = useQuery(serverKeybindingsQueryOptions(api)); | 121 | const { data: keybindings = EMPTY_KEYBINDINGS } = useQuery({ |
| 122 | ...serverConfigQueryOptions(api), | ||
| 123 | select: (config) => config.keybindings, | ||
| 124 | }); | ||
| 122 | const queryClient = useQueryClient(); | 125 | const queryClient = useQueryClient(); |
| 123 | const removeWorktreeMutation = useMutation( | 126 | const removeWorktreeMutation = useMutation( |
| 124 | gitRemoveWorktreeMutationOptions({ api, queryClient }), | 127 | gitRemoveWorktreeMutationOptions({ api, queryClient }), |
apps/web/src/lib/serverReactQuery.ts-7| ... | @@ -19,10 +19,3 @@ export function serverConfigQueryOptions(api: NativeApi | undefined) { | ... | @@ -19,10 +19,3 @@ export function serverConfigQueryOptions(api: NativeApi | undefined) { |
| 19 | staleTime: Infinity, | 19 | staleTime: Infinity, |
| 20 | }); | 20 | }); |
| 21 | } | 21 | } |
| 22 | |||
| 23 | export function serverKeybindingsQueryOptions(api: NativeApi | undefined) { | ||
| 24 | return queryOptions({ | ||
| 25 | ...serverConfigQueryOptions(api), | ||
| 26 | select: (config) => config.keybindings, | ||
| 27 | }); | ||
| 28 | } |