Open History to see the last commit
1import {
2 type ComposerPathSearchState,
3 type ComposerPathSearchTarget,
4} from "@v12/client-runtime/state/threads";
5
6import { useComposerPathSearch as useComposerPathSearchQuery } from "../state/queries";
7
8export function useComposerPathSearch(target: ComposerPathSearchTarget): ComposerPathSearchState {
9 const state = useComposerPathSearchQuery(target);
10 return {
11 entries: state.entries.map((entry) => ({
12 path: entry.path,
13 kind: entry.kind,
14 })),
15 error: state.error,
16 isPending: state.isPending,
17 };
18}