diff --git a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/add-repository-form.tsx b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/add-repository-form.tsx index 6a346b50ba3f..31420066605a 100644 --- a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/add-repository-form.tsx +++ b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/add-repository-form.tsx @@ -75,6 +75,8 @@ export default function LinkRepositoryForm({ const form = useForm({ resolver: zodResolver(formSchema) }) + const [searchValue, setSearchValue] = React.useState() + const commandListRef = React.useRef(null) const { isSubmitting } = form.formState @@ -131,6 +133,18 @@ export default function LinkRepositoryForm({ } } + const scrollCommandListToTop = () => { + requestAnimationFrame(() => { + if (commandListRef.current) { + commandListRef.current.scrollTop = 0 + } + }) + } + + const onSearchChange = () => { + scrollCommandListToTop() + } + return (
@@ -165,9 +179,15 @@ export default function LinkRepositoryForm({ align="start" side="bottom" > - - - + + + {emptyText} {providerStatus !== diff --git a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/github-provider-detail.tsx b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/github-provider-detail.tsx index 25b80785ab8f..6e9cf12c5309 100644 --- a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/github-provider-detail.tsx +++ b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/[kind]/detail/components/github-provider-detail.tsx @@ -171,7 +171,7 @@ const LinkedRepoTable: React.FC<{ URL - + Add new repository diff --git a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/components/tabs-header.tsx b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/components/tabs-header.tsx index 5c78ee5b3834..dba394960f63 100644 --- a/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/components/tabs-header.tsx +++ b/ee/tabby-ui/app/(dashboard)/settings/(integrations)/repository/components/tabs-header.tsx @@ -4,7 +4,7 @@ import Link from 'next/link' import { useParams } from 'next/navigation' import { RepositoryKind } from '@/lib/gql/generates/graphql' -import { IconGit, IconGitHub, IconGitLab } from '@/components/ui/icons' +import { IconGitHub, IconGitLab } from '@/components/ui/icons' import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' export default function GitTabsHeader() { @@ -17,7 +17,6 @@ export default function GitTabsHeader() { - Git diff --git a/ee/tabby-ui/app/files/components/blob-header.tsx b/ee/tabby-ui/app/files/components/blob-header.tsx index c81d60c520ad..852672410509 100644 --- a/ee/tabby-ui/app/files/components/blob-header.tsx +++ b/ee/tabby-ui/app/files/components/blob-header.tsx @@ -3,7 +3,6 @@ import React from 'react' import Image from 'next/image' import tabbyLogo from '@/assets/tabby.png' -import { isNil } from 'lodash-es' import prettyBytes from 'pretty-bytes' import { toast } from 'sonner' @@ -54,9 +53,7 @@ export const BlobHeader: React.FC = ({ enableCodeBrowserQuickActionBar.value && !chatSideBarVisible - const contentLengthText = !isNil(contentLength) - ? prettyBytes(contentLength) - : '' + const contentLengthText = contentLength ? prettyBytes(contentLength) : '' const onCopy: React.MouseEventHandler = async () => { if (isCopied || !blob) return diff --git a/ee/tabby-ui/app/files/components/file-directory-view.tsx b/ee/tabby-ui/app/files/components/file-directory-view.tsx index ed36183ff33d..20b20445aa9a 100644 --- a/ee/tabby-ui/app/files/components/file-directory-view.tsx +++ b/ee/tabby-ui/app/files/components/file-directory-view.tsx @@ -133,7 +133,6 @@ function getCurrentDirFromTree( treeData: TFileTreeNode[], path: string | undefined ): TFileTreeNode[] { - // const regx = new RegExp(`${path}\/[\\w\.\-]+$`) if (!treeData?.length) return [] if (!path) { const repos = treeData.map(x => omit(x, 'children')) || [] diff --git a/ee/tabby-ui/app/files/components/repository-kind-icon.tsx b/ee/tabby-ui/app/files/components/repository-kind-icon.tsx index 0785e68a9cbd..f472ed8c9fbe 100644 --- a/ee/tabby-ui/app/files/components/repository-kind-icon.tsx +++ b/ee/tabby-ui/app/files/components/repository-kind-icon.tsx @@ -1,5 +1,9 @@ import { RepositoryKind } from '@/lib/gql/generates/graphql' -import { IconGit, IconGitHub, IconGitLab } from '@/components/ui/icons' +import { + IconDirectorySolid, + IconGitHub, + IconGitLab +} from '@/components/ui/icons' export function RepositoryKindIcon({ kind, @@ -10,7 +14,7 @@ export function RepositoryKindIcon({ }) { switch (kind) { case RepositoryKind.Git: - return + return case RepositoryKind.Github: return case RepositoryKind.Gitlab: