From 725d4ff08f72ab75c56e09a3629681c318181ac8 Mon Sep 17 00:00:00 2001 From: liangfung Date: Fri, 27 Dec 2024 23:18:52 +0800 Subject: [PATCH] update --- ee/tabby-ui/lib/hooks/use-repositories.ts | 19 ++----------------- ee/tabby-ui/lib/tabby/query.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ee/tabby-ui/lib/hooks/use-repositories.ts b/ee/tabby-ui/lib/hooks/use-repositories.ts index 6c4544b69e2a..2b4905d4a684 100644 --- a/ee/tabby-ui/lib/hooks/use-repositories.ts +++ b/ee/tabby-ui/lib/hooks/use-repositories.ts @@ -3,23 +3,8 @@ import { useMemo } from 'react' import { useQuery } from 'urql' -import { graphql } from '@/lib/gql/generates' - -import { useChatStore } from '../stores/chat-store' - -const repositorySourceListQuery = graphql(/* GraphQL */ ` - query RepositorySourceList { - repositoryList { - id - name - kind - gitUrl - sourceId - sourceName - sourceKind - } - } -`) +import { useChatStore } from '@/lib/stores/chat-store' +import { repositorySourceListQuery } from '@/lib/tabby/query' export function useRepositorySources() { return useQuery({ diff --git a/ee/tabby-ui/lib/tabby/query.ts b/ee/tabby-ui/lib/tabby/query.ts index 036cf928edb4..58bc6b35c435 100644 --- a/ee/tabby-ui/lib/tabby/query.ts +++ b/ee/tabby-ui/lib/tabby/query.ts @@ -473,3 +473,17 @@ export const notificationsQuery = graphql(/* GraphQL */ ` } } `) + +export const repositorySourceListQuery = graphql(/* GraphQL */ ` + query RepositorySourceList { + repositoryList { + id + name + kind + gitUrl + sourceId + sourceName + sourceKind + } + } +`)