From 3f8f7fb7c6ef60423f260a2278e67f94abe37cca Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Fri, 8 Dec 2023 12:40:45 +0800 Subject: [PATCH] refactor(webserver): enable import order + remove useless import (#984) * refactor(webserver): enable import order + remove useless import * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .../app/(dashboard)/components/sidebar.tsx | 7 +- .../(dashboard)/components/worker-card.tsx | 2 +- ee/tabby-ui/app/(dashboard)/layout.tsx | 4 +- ee/tabby-ui/app/(dashboard)/page.tsx | 18 +-- .../signin/components/user-signin-form.tsx | 13 +- ee/tabby-ui/app/auth/signin/page.tsx | 1 + .../app/auth/signup/components/signup.tsx | 3 +- .../signup/components/user-register-form.tsx | 13 +- ee/tabby-ui/app/auth/signup/page.tsx | 1 + ee/tabby-ui/app/layout.tsx | 4 +- .../playground/components/chat-sessions.tsx | 16 +-- .../app/playground/components/chats.tsx | 8 +- .../components/clear-chats-button.tsx | 1 + .../components/edit-chat-title-dialog.tsx | 14 +-- ee/tabby-ui/app/playground/page.tsx | 4 +- .../components/button-scroll-to-bottom.tsx | 2 +- ee/tabby-ui/components/chat-list.tsx | 2 +- .../components/chat-message-actions.tsx | 4 +- ee/tabby-ui/components/chat-message.tsx | 6 +- ee/tabby-ui/components/chat-panel.tsx | 13 +- ee/tabby-ui/components/chat.tsx | 19 +-- ee/tabby-ui/components/clear-history.tsx | 2 +- ee/tabby-ui/components/copy-button.tsx | 5 +- ee/tabby-ui/components/header.tsx | 16 +-- ee/tabby-ui/components/prompt-form.tsx | 33 +++--- ee/tabby-ui/components/providers.tsx | 2 +- ee/tabby-ui/components/ui/codeblock.tsx | 2 +- ee/tabby-ui/components/ui/combobox.tsx | 19 +-- ee/tabby-ui/components/user-panel.tsx | 6 +- ee/tabby-ui/lib/gql/generates/gql.ts | 3 +- ee/tabby-ui/lib/gql/generates/graphql.ts | 1 + ee/tabby-ui/lib/hooks/use-health.tsx | 3 +- ee/tabby-ui/lib/hooks/use-latest-release.tsx | 2 +- ee/tabby-ui/lib/hooks/use-patch-fetch.ts | 12 +- ee/tabby-ui/lib/hooks/use-store.ts | 1 + ee/tabby-ui/lib/hooks/use-workers.ts | 8 +- ee/tabby-ui/lib/stores/chat-actions.ts | 4 +- ee/tabby-ui/lib/stores/chat-store.ts | 3 +- ee/tabby-ui/lib/tabby/auth.tsx | 5 +- ee/tabby-ui/lib/tabby/gql.ts | 4 +- ee/tabby-ui/package.json | 2 + ee/tabby-ui/prettier.config.cjs | 5 - ee/tabby-ui/yarn.lock | 111 +++++++++++++++++- 43 files changed, 271 insertions(+), 133 deletions(-) diff --git a/ee/tabby-ui/app/(dashboard)/components/sidebar.tsx b/ee/tabby-ui/app/(dashboard)/components/sidebar.tsx index ed273ae..d1603bd 100644 --- a/ee/tabby-ui/app/(dashboard)/components/sidebar.tsx +++ b/ee/tabby-ui/app/(dashboard)/components/sidebar.tsx @@ -1,10 +1,11 @@ 'use client' -import UserPanel from '@/components/user-panel' -import { cn } from '@/lib/utils' -import { cva } from 'class-variance-authority' import Link from 'next/link' import { usePathname } from 'next/navigation' +import { cva } from 'class-variance-authority' + +import { cn } from '@/lib/utils' +import UserPanel from '@/components/user-panel' export interface SidebarProps { children: React.ReactNode diff --git a/ee/tabby-ui/app/(dashboard)/components/worker-card.tsx b/ee/tabby-ui/app/(dashboard)/components/worker-card.tsx index 2f672f9..f8cc727 100644 --- a/ee/tabby-ui/app/(dashboard)/components/worker-card.tsx +++ b/ee/tabby-ui/app/(dashboard)/components/worker-card.tsx @@ -1,6 +1,6 @@ -import { CardTitle, CardHeader, CardContent, Card } from '@/components/ui/card' import { Worker, WorkerKind } from '@/lib/gql/generates/graphql' import { cn } from '@/lib/utils' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' type RunnerType = WorkerKind | 'INDEX' diff --git a/ee/tabby-ui/app/(dashboard)/layout.tsx b/ee/tabby-ui/app/(dashboard)/layout.tsx index 3889165..ded45b5 100644 --- a/ee/tabby-ui/app/(dashboard)/layout.tsx +++ b/ee/tabby-ui/app/(dashboard)/layout.tsx @@ -1,7 +1,9 @@ import { Metadata } from 'next' -import Sidebar from './components/sidebar' + import { Header } from '@/components/header' +import Sidebar from './components/sidebar' + export const metadata: Metadata = { title: 'Dashboard' } diff --git a/ee/tabby-ui/app/(dashboard)/page.tsx b/ee/tabby-ui/app/(dashboard)/page.tsx index fdd777a..491bbed 100644 --- a/ee/tabby-ui/app/(dashboard)/page.tsx +++ b/ee/tabby-ui/app/(dashboard)/page.tsx @@ -1,5 +1,13 @@ 'use client' +import { PropsWithChildren, useEffect, useState } from 'react' + +import { graphql } from '@/lib/gql/generates' +import { WorkerKind } from '@/lib/gql/generates/graphql' +import { useHealth } from '@/lib/hooks/use-health' +import { useWorkers } from '@/lib/hooks/use-workers' +import { useSession } from '@/lib/tabby/auth' +import { useGraphQLQuery } from '@/lib/tabby/gql' import { buttonVariants } from '@/components/ui/button' import { Dialog, @@ -11,15 +19,9 @@ import { } from '@/components/ui/dialog' import { IconSlack } from '@/components/ui/icons' import { Separator } from '@/components/ui/separator' -import { useHealth } from '@/lib/hooks/use-health' -import { PropsWithChildren, useEffect, useState } from 'react' -import WorkerCard from './components/worker-card' -import { useWorkers } from '@/lib/hooks/use-workers' -import { WorkerKind } from '@/lib/gql/generates/graphql' import { CopyButton } from '@/components/copy-button' -import { graphql } from '@/lib/gql/generates' -import { useGraphQLQuery } from '@/lib/tabby/gql' -import { useSession } from '@/lib/tabby/auth' + +import WorkerCard from './components/worker-card' const COMMUNITY_DIALOG_SHOWN_KEY = 'community-dialog-shown' diff --git a/ee/tabby-ui/app/auth/signin/components/user-signin-form.tsx b/ee/tabby-ui/app/auth/signin/components/user-signin-form.tsx index fb85323..001f5b8 100644 --- a/ee/tabby-ui/app/auth/signin/components/user-signin-form.tsx +++ b/ee/tabby-ui/app/auth/signin/components/user-signin-form.tsx @@ -1,15 +1,16 @@ 'use client' import * as React from 'react' - +import { useRouter } from 'next/navigation' import { zodResolver } from '@hookform/resolvers/zod' import { useForm } from 'react-hook-form' import * as z from 'zod' +import { graphql } from '@/lib/gql/generates' +import { useSignIn } from '@/lib/tabby/auth' +import { useGraphQLForm } from '@/lib/tabby/gql' import { cn } from '@/lib/utils' -import { IconSpinner } from '@/components/ui/icons' import { Button } from '@/components/ui/button' -import { Input } from '@/components/ui/input' import { Form, FormControl, @@ -18,10 +19,8 @@ import { FormLabel, FormMessage } from '@/components/ui/form' -import { graphql } from '@/lib/gql/generates' -import { useGraphQLForm } from '@/lib/tabby/gql' -import { useSignIn } from '@/lib/tabby/auth' -import { useRouter } from 'next/navigation' +import { IconSpinner } from '@/components/ui/icons' +import { Input } from '@/components/ui/input' export const tokenAuth = graphql(/* GraphQL */ ` mutation tokenAuth($email: String!, $password: String!) { diff --git a/ee/tabby-ui/app/auth/signin/page.tsx b/ee/tabby-ui/app/auth/signin/page.tsx index 07806cf..c45dbbc 100644 --- a/ee/tabby-ui/app/auth/signin/page.tsx +++ b/ee/tabby-ui/app/auth/signin/page.tsx @@ -1,4 +1,5 @@ import { Metadata } from 'next' + import Signin from './components/signin' export const metadata: Metadata = { diff --git a/ee/tabby-ui/app/auth/signup/components/signup.tsx b/ee/tabby-ui/app/auth/signup/components/signup.tsx index c756eaf..0e09fa8 100644 --- a/ee/tabby-ui/app/auth/signup/components/signup.tsx +++ b/ee/tabby-ui/app/auth/signup/components/signup.tsx @@ -1,8 +1,9 @@ 'use client' -import { UserAuthForm } from './user-register-form' import { useSearchParams } from 'next/navigation' +import { UserAuthForm } from './user-register-form' + export default function Signup() { const searchParams = useSearchParams() const invitationCode = searchParams.get('invitationCode') || undefined diff --git a/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx b/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx index 1eba9c5..fffcc18 100644 --- a/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx +++ b/ee/tabby-ui/app/auth/signup/components/user-register-form.tsx @@ -1,15 +1,16 @@ 'use client' import * as React from 'react' - +import { useRouter } from 'next/navigation' import { zodResolver } from '@hookform/resolvers/zod' import { useForm } from 'react-hook-form' import * as z from 'zod' +import { graphql } from '@/lib/gql/generates' +import { useSignIn } from '@/lib/tabby/auth' +import { useGraphQLForm } from '@/lib/tabby/gql' import { cn } from '@/lib/utils' -import { IconSpinner } from '@/components/ui/icons' import { Button } from '@/components/ui/button' -import { Input } from '@/components/ui/input' import { Form, FormControl, @@ -18,10 +19,8 @@ import { FormLabel, FormMessage } from '@/components/ui/form' -import { graphql } from '@/lib/gql/generates' -import { useGraphQLForm } from '@/lib/tabby/gql' -import { useSignIn } from '@/lib/tabby/auth' -import { useRouter } from 'next/navigation' +import { IconSpinner } from '@/components/ui/icons' +import { Input } from '@/components/ui/input' export const registerUser = graphql(/* GraphQL */ ` mutation register( diff --git a/ee/tabby-ui/app/auth/signup/page.tsx b/ee/tabby-ui/app/auth/signup/page.tsx index ccebb04..330d585 100644 --- a/ee/tabby-ui/app/auth/signup/page.tsx +++ b/ee/tabby-ui/app/auth/signup/page.tsx @@ -1,4 +1,5 @@ import { Metadata } from 'next' + import Signup from './components/signup' export const metadata: Metadata = { diff --git a/ee/tabby-ui/app/layout.tsx b/ee/tabby-ui/app/layout.tsx index bf1c7e1..43d509a 100644 --- a/ee/tabby-ui/app/layout.tsx +++ b/ee/tabby-ui/app/layout.tsx @@ -1,12 +1,12 @@ import { Metadata } from 'next' - import { Toaster } from 'react-hot-toast' import '@/app/globals.css' + import { fontMono, fontSans } from '@/lib/fonts' import { cn } from '@/lib/utils' -import { TailwindIndicator } from '@/components/tailwind-indicator' import { Providers } from '@/components/providers' +import { TailwindIndicator } from '@/components/tailwind-indicator' export const metadata: Metadata = { title: { diff --git a/ee/tabby-ui/app/playground/components/chat-sessions.tsx b/ee/tabby-ui/app/playground/components/chat-sessions.tsx index 64a5e9c..8ad49af 100644 --- a/ee/tabby-ui/app/playground/components/chat-sessions.tsx +++ b/ee/tabby-ui/app/playground/components/chat-sessions.tsx @@ -1,27 +1,29 @@ 'use client' import React from 'react' -import { cn, nanoid } from '@/lib/utils' -import { useChatStore } from '@/lib/stores/chat-store' + +import { useStore } from '@/lib/hooks/use-store' import { clearChats, deleteChat, setActiveChatId } from '@/lib/stores/chat-actions' +import { useChatStore } from '@/lib/stores/chat-store' +import { cn, nanoid } from '@/lib/utils' +import { Button } from '@/components/ui/button' import { IconPlus, IconTrash } from '@/components/ui/icons' +import { Separator } from '@/components/ui/separator' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { EditChatTitleDialog } from './edit-chat-title-dialog' -import { useStore } from '@/lib/hooks/use-store' -import { Button } from '@/components/ui/button' import { ListSkeleton } from '@/components/skeleton' -import { Separator } from '@/components/ui/separator' -import { ClearChatsButton } from './clear-chats-button' import UserPanel from '@/components/user-panel' +import { ClearChatsButton } from './clear-chats-button' +import { EditChatTitleDialog } from './edit-chat-title-dialog' + interface ChatSessionsProps { className?: string } diff --git a/ee/tabby-ui/app/playground/components/chats.tsx b/ee/tabby-ui/app/playground/components/chats.tsx index 010125b..4a67393 100644 --- a/ee/tabby-ui/app/playground/components/chats.tsx +++ b/ee/tabby-ui/app/playground/components/chats.tsx @@ -1,12 +1,14 @@ 'use client' import React from 'react' -import { Chat } from '@/components/chat' +import type { Message } from 'ai' + +import { useStore } from '@/lib/hooks/use-store' import { useChatStore } from '@/lib/stores/chat-store' import { getChatById } from '@/lib/stores/utils' +import { Chat } from '@/components/chat' + import { ChatSessions } from './chat-sessions' -import { useStore } from '@/lib/hooks/use-store' -import type { Message } from 'ai' const emptyMessages: Message[] = [] diff --git a/ee/tabby-ui/app/playground/components/clear-chats-button.tsx b/ee/tabby-ui/app/playground/components/clear-chats-button.tsx index 0dbd856..9c9a7ef 100644 --- a/ee/tabby-ui/app/playground/components/clear-chats-button.tsx +++ b/ee/tabby-ui/app/playground/components/clear-chats-button.tsx @@ -1,6 +1,7 @@ 'use client' import React from 'react' + import { Button, ButtonProps } from '@/components/ui/button' import { IconCheck, IconTrash } from '@/components/ui/icons' diff --git a/ee/tabby-ui/app/playground/components/edit-chat-title-dialog.tsx b/ee/tabby-ui/app/playground/components/edit-chat-title-dialog.tsx index b7ad39d..80dac75 100644 --- a/ee/tabby-ui/app/playground/components/edit-chat-title-dialog.tsx +++ b/ee/tabby-ui/app/playground/components/edit-chat-title-dialog.tsx @@ -1,23 +1,23 @@ 'use client' import React from 'react' + +import { updateChat } from '@/lib/stores/chat-actions' +import { Button } from '@/components/ui/button' import { Dialog, DialogContent, + DialogDescription, DialogHeader, - DialogTitle, - DialogDescription + DialogTitle } from '@/components/ui/dialog' +import { IconArrowElbow, IconEdit, IconTrash } from '@/components/ui/icons' +import { Input } from '@/components/ui/input' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { IconArrowElbow, IconEdit, IconTrash } from '@/components/ui/icons' - -import { Input } from '@/components/ui/input' -import { updateChat } from '@/lib/stores/chat-actions' -import { Button } from '@/components/ui/button' interface EditChatTitleDialogProps { initialValue: string | undefined diff --git a/ee/tabby-ui/app/playground/page.tsx b/ee/tabby-ui/app/playground/page.tsx index 759b975..c267a1b 100644 --- a/ee/tabby-ui/app/playground/page.tsx +++ b/ee/tabby-ui/app/playground/page.tsx @@ -1,7 +1,9 @@ import { Metadata } from 'next' -import Chats from './components/chats' + import { Header } from '@/components/header' +import Chats from './components/chats' + export const metadata: Metadata = { title: 'Playground' } diff --git a/ee/tabby-ui/components/button-scroll-to-bottom.tsx b/ee/tabby-ui/components/button-scroll-to-bottom.tsx index 436a6c0..7b1e362 100644 --- a/ee/tabby-ui/components/button-scroll-to-bottom.tsx +++ b/ee/tabby-ui/components/button-scroll-to-bottom.tsx @@ -2,8 +2,8 @@ import * as React from 'react' -import { cn } from '@/lib/utils' import { useAtBottom } from '@/lib/hooks/use-at-bottom' +import { cn } from '@/lib/utils' import { Button, type ButtonProps } from '@/components/ui/button' import { IconArrowDown } from '@/components/ui/icons' diff --git a/ee/tabby-ui/components/chat-list.tsx b/ee/tabby-ui/components/chat-list.tsx index 01a2be0..06dfdf4 100644 --- a/ee/tabby-ui/components/chat-list.tsx +++ b/ee/tabby-ui/components/chat-list.tsx @@ -1,8 +1,8 @@ import { type Message } from 'ai' +import { MessageActionType } from '@/lib/types' import { Separator } from '@/components/ui/separator' import { ChatMessage } from '@/components/chat-message' -import { MessageActionType } from '@/lib/types' export interface ChatList { messages: Message[] diff --git a/ee/tabby-ui/components/chat-message-actions.tsx b/ee/tabby-ui/components/chat-message-actions.tsx index 92966a8..5351a4e 100644 --- a/ee/tabby-ui/components/chat-message-actions.tsx +++ b/ee/tabby-ui/components/chat-message-actions.tsx @@ -2,10 +2,10 @@ import { type Message } from 'ai' +import { MessageActionType } from '@/lib/types' +import { cn } from '@/lib/utils' import { Button } from '@/components/ui/button' import { IconEdit, IconRefresh, IconTrash } from '@/components/ui/icons' -import { cn } from '@/lib/utils' -import { MessageActionType } from '@/lib/types' import { CopyButton } from '@/components/copy-button' interface ChatMessageActionsProps extends React.ComponentProps<'div'> { diff --git a/ee/tabby-ui/components/chat-message.tsx b/ee/tabby-ui/components/chat-message.tsx index 192d131..9745aa4 100644 --- a/ee/tabby-ui/components/chat-message.tsx +++ b/ee/tabby-ui/components/chat-message.tsx @@ -1,17 +1,17 @@ // Inspired by Chatbot-UI and modified to fit the needs of this project // @see https://github.com/mckaywrigley/chatbot-ui/blob/main/components/Chat/ChatMessage.tsx +import Image from 'next/image' import { Message } from 'ai' import remarkGfm from 'remark-gfm' import remarkMath from 'remark-math' +import { MessageActionType } from '@/lib/types' import { cn } from '@/lib/utils' import { CodeBlock } from '@/components/ui/codeblock' -import { MemoizedReactMarkdown } from '@/components/markdown' import { IconUser } from '@/components/ui/icons' -import Image from 'next/image' import { ChatMessageActions } from '@/components/chat-message-actions' -import { MessageActionType } from '@/lib/types' +import { MemoizedReactMarkdown } from '@/components/markdown' export interface ChatMessageProps { message: Message diff --git a/ee/tabby-ui/components/chat-panel.tsx b/ee/tabby-ui/components/chat-panel.tsx index 35975b2..63479e2 100644 --- a/ee/tabby-ui/components/chat-panel.tsx +++ b/ee/tabby-ui/components/chat-panel.tsx @@ -1,12 +1,13 @@ import React from 'react' -import { Button } from '@/components/ui/button' -import { PromptForm, PromptFormRef } from '@/components/prompt-form' -import { ButtonScrollToBottom } from '@/components/button-scroll-to-bottom' -import { IconRefresh, IconStop } from '@/components/ui/icons' -import { FooterText } from '@/components/footer' -import { cn } from '@/lib/utils' import type { UseChatHelpers } from 'ai/react' +import { cn } from '@/lib/utils' +import { Button } from '@/components/ui/button' +import { IconRefresh, IconStop } from '@/components/ui/icons' +import { ButtonScrollToBottom } from '@/components/button-scroll-to-bottom' +import { FooterText } from '@/components/footer' +import { PromptForm, PromptFormRef } from '@/components/prompt-form' + export interface ChatPanelProps extends Pick< UseChatHelpers, diff --git a/ee/tabby-ui/components/chat.tsx b/ee/tabby-ui/components/chat.tsx index ef81831..87454c8 100644 --- a/ee/tabby-ui/components/chat.tsx +++ b/ee/tabby-ui/components/chat.tsx @@ -2,20 +2,21 @@ import React from 'react' import { useChat } from 'ai/react' +import type { Message } from 'ai/react' +import { find, findIndex } from 'lodash-es' +import { toast } from 'react-hot-toast' + +import { usePatchFetch } from '@/lib/hooks/use-patch-fetch' +import { useStore } from '@/lib/hooks/use-store' +import { addChat, updateMessages } from '@/lib/stores/chat-actions' +import { useChatStore } from '@/lib/stores/chat-store' +import type { MessageActionType } from '@/lib/types' import { cn, nanoid, truncateText } from '@/lib/utils' import { ChatList } from '@/components/chat-list' import { ChatPanel } from '@/components/chat-panel' -import { EmptyScreen } from '@/components/empty-screen' import { ChatScrollAnchor } from '@/components/chat-scroll-anchor' -import { toast } from 'react-hot-toast' -import { usePatchFetch } from '@/lib/hooks/use-patch-fetch' -import { addChat, updateMessages } from '@/lib/stores/chat-actions' -import { find, findIndex } from 'lodash-es' -import { useStore } from '@/lib/hooks/use-store' -import { useChatStore } from '@/lib/stores/chat-store' +import { EmptyScreen } from '@/components/empty-screen' import { ListSkeleton } from '@/components/skeleton' -import type { MessageActionType } from '@/lib/types' -import type { Message } from 'ai/react' export interface ChatProps extends React.ComponentProps<'div'> { initialMessages?: Message[] diff --git a/ee/tabby-ui/components/clear-history.tsx b/ee/tabby-ui/components/clear-history.tsx index 16e3643..338cce2 100644 --- a/ee/tabby-ui/components/clear-history.tsx +++ b/ee/tabby-ui/components/clear-history.tsx @@ -5,7 +5,6 @@ import { useRouter } from 'next/navigation' import { toast } from 'react-hot-toast' import { ServerActionResult } from '@/lib/types' -import { Button } from '@/components/ui/button' import { AlertDialog, AlertDialogAction, @@ -17,6 +16,7 @@ import { AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog' +import { Button } from '@/components/ui/button' import { IconSpinner } from '@/components/ui/icons' interface ClearHistoryProps { diff --git a/ee/tabby-ui/components/copy-button.tsx b/ee/tabby-ui/components/copy-button.tsx index de5282c..a242bdb 100644 --- a/ee/tabby-ui/components/copy-button.tsx +++ b/ee/tabby-ui/components/copy-button.tsx @@ -2,9 +2,10 @@ import * as React from 'react' -import { Button, type ButtonProps } from '@/components/ui/button' -import { IconCheck, IconCopy } from './ui/icons' import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard' +import { Button, type ButtonProps } from '@/components/ui/button' + +import { IconCheck, IconCopy } from './ui/icons' interface CopyButtonProps extends ButtonProps { value: string diff --git a/ee/tabby-ui/components/header.tsx b/ee/tabby-ui/components/header.tsx index 28f59f7..760b1e9 100644 --- a/ee/tabby-ui/components/header.tsx +++ b/ee/tabby-ui/components/header.tsx @@ -1,16 +1,18 @@ 'use client' import * as React from 'react' +import Link from 'next/link' +import { compare } from 'compare-versions' +import { has } from 'lodash-es' + +import { WorkerKind } from '@/lib/gql/generates/graphql' +import { useHealth } from '@/lib/hooks/use-health' +import { ReleaseInfo, useLatestRelease } from '@/lib/hooks/use-latest-release' +import { useWorkers } from '@/lib/hooks/use-workers' import { cn } from '@/lib/utils' import { buttonVariants } from '@/components/ui/button' import { IconGitHub, IconNotice } from '@/components/ui/icons' -import Link from 'next/link' -import { useHealth } from '@/lib/hooks/use-health' -import { ReleaseInfo, useLatestRelease } from '@/lib/hooks/use-latest-release' -import { compare } from 'compare-versions' -import { useWorkers } from '@/lib/hooks/use-workers' -import { WorkerKind } from '@/lib/gql/generates/graphql' -import { has } from 'lodash-es' + import { ThemeToggle } from './theme-toggle' export function Header() { diff --git a/ee/tabby-ui/components/prompt-form.tsx b/ee/tabby-ui/components/prompt-form.tsx index 90a48e4..7b29e11 100644 --- a/ee/tabby-ui/components/prompt-form.tsx +++ b/ee/tabby-ui/components/prompt-form.tsx @@ -1,17 +1,13 @@ -import { UseChatHelpers } from 'ai/react' import * as React from 'react' +import { UseChatHelpers } from 'ai/react' +import { debounce, has } from 'lodash-es' import useSWR from 'swr' + +import { useEnterSubmit } from '@/lib/hooks/use-enter-submit' +import fetcher from '@/lib/tabby/fetcher' +import type { ISearchHit, SearchReponse } from '@/lib/types' +import { cn } from '@/lib/utils' import { Button, buttonVariants } from '@/components/ui/button' -import { - IconArrowElbow, - IconEdit, - IconSymbolFunction -} from '@/components/ui/icons' -import { - Tooltip, - TooltipContent, - TooltipTrigger -} from '@/components/ui/tooltip' import { Combobox, ComboboxAnchor, @@ -19,12 +15,17 @@ import { ComboboxOption, ComboboxTextarea } from '@/components/ui/combobox' +import { + IconArrowElbow, + IconEdit, + IconSymbolFunction +} from '@/components/ui/icons' import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover' -import { useEnterSubmit } from '@/lib/hooks/use-enter-submit' -import { cn } from '@/lib/utils' -import fetcher from '@/lib/tabby/fetcher' -import { debounce, has } from 'lodash-es' -import type { ISearchHit, SearchReponse } from '@/lib/types' +import { + Tooltip, + TooltipContent, + TooltipTrigger +} from '@/components/ui/tooltip' export interface PromptProps extends Pick { diff --git a/ee/tabby-ui/components/providers.tsx b/ee/tabby-ui/components/providers.tsx index f26ea99..0fe8bb2 100644 --- a/ee/tabby-ui/components/providers.tsx +++ b/ee/tabby-ui/components/providers.tsx @@ -4,8 +4,8 @@ import * as React from 'react' import { ThemeProvider as NextThemesProvider } from 'next-themes' import { ThemeProviderProps } from 'next-themes/dist/types' -import { TooltipProvider } from '@/components/ui/tooltip' import { AuthProvider } from '@/lib/tabby/auth' +import { TooltipProvider } from '@/components/ui/tooltip' export function Providers({ children, ...props }: ThemeProviderProps) { return ( diff --git a/ee/tabby-ui/components/ui/codeblock.tsx b/ee/tabby-ui/components/ui/codeblock.tsx index 8b7c25f..ce9781b 100644 --- a/ee/tabby-ui/components/ui/codeblock.tsx +++ b/ee/tabby-ui/components/ui/codeblock.tsx @@ -8,8 +8,8 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism' import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard' -import { IconCheck, IconCopy, IconDownload } from '@/components/ui/icons' import { Button } from '@/components/ui/button' +import { IconCheck, IconCopy, IconDownload } from '@/components/ui/icons' interface Props { language: string diff --git a/ee/tabby-ui/components/ui/combobox.tsx b/ee/tabby-ui/components/ui/combobox.tsx index a227236..a312e59 100644 --- a/ee/tabby-ui/components/ui/combobox.tsx +++ b/ee/tabby-ui/components/ui/combobox.tsx @@ -1,20 +1,21 @@ import * as React from 'react' -import { - Popover, - PopoverAnchor, - PopoverPortal, - PopoverContent, - PopoverClose -} from '@/components/ui/popover' -import { cn } from '@/lib/utils' import { useCombobox } from 'downshift' import type { UseComboboxReturnValue, UseComboboxState, UseComboboxStateChangeOptions } from 'downshift' -import Textarea from 'react-textarea-autosize' import { isNil, omitBy } from 'lodash-es' +import Textarea from 'react-textarea-autosize' + +import { cn } from '@/lib/utils' +import { + Popover, + PopoverAnchor, + PopoverClose, + PopoverContent, + PopoverPortal +} from '@/components/ui/popover' interface ComboboxContextValue extends UseComboboxReturnValue { open: boolean diff --git a/ee/tabby-ui/components/user-panel.tsx b/ee/tabby-ui/components/user-panel.tsx index 9a7b111..a0f2b70 100644 --- a/ee/tabby-ui/components/user-panel.tsx +++ b/ee/tabby-ui/components/user-panel.tsx @@ -1,3 +1,6 @@ +import React from 'react' +import Link from 'next/link' + import { useAuthenticatedSession, useIsAdminInitialized, @@ -5,9 +8,8 @@ import { useSignOut } from '@/lib/tabby/auth' import { cn } from '@/lib/utils' + import { IconLogout, IconUnlock } from './ui/icons' -import Link from 'next/link' -import React from 'react' export default function UserPanel() { const isAdminInitialized = useIsAdminInitialized() diff --git a/ee/tabby-ui/lib/gql/generates/gql.ts b/ee/tabby-ui/lib/gql/generates/gql.ts index 5a44e75..b22704e 100644 --- a/ee/tabby-ui/lib/gql/generates/gql.ts +++ b/ee/tabby-ui/lib/gql/generates/gql.ts @@ -1,7 +1,8 @@ /* eslint-disable */ -import * as types from './graphql' import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' +import * as types from './graphql' + /** * Map of all GraphQL operations in the project. * diff --git a/ee/tabby-ui/lib/gql/generates/graphql.ts b/ee/tabby-ui/lib/gql/generates/graphql.ts index 6b9d6c2..417e2ad 100644 --- a/ee/tabby-ui/lib/gql/generates/graphql.ts +++ b/ee/tabby-ui/lib/gql/generates/graphql.ts @@ -1,5 +1,6 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' + export type Maybe = T | null export type InputMaybe = Maybe export type Exact = { diff --git a/ee/tabby-ui/lib/hooks/use-health.tsx b/ee/tabby-ui/lib/hooks/use-health.tsx index 60b76ed..459dcb6 100644 --- a/ee/tabby-ui/lib/hooks/use-health.tsx +++ b/ee/tabby-ui/lib/hooks/use-health.tsx @@ -1,7 +1,8 @@ 'use client' -import useSWRImmutable from 'swr/immutable' import { SWRResponse } from 'swr' +import useSWRImmutable from 'swr/immutable' + import fetcher from '@/lib/tabby/fetcher' export interface HealthInfo { diff --git a/ee/tabby-ui/lib/hooks/use-latest-release.tsx b/ee/tabby-ui/lib/hooks/use-latest-release.tsx index cd69246..9ff8079 100644 --- a/ee/tabby-ui/lib/hooks/use-latest-release.tsx +++ b/ee/tabby-ui/lib/hooks/use-latest-release.tsx @@ -1,7 +1,7 @@ 'use client' -import useSWRImmutable from 'swr/immutable' import { SWRResponse } from 'swr' +import useSWRImmutable from 'swr/immutable' export interface ReleaseInfo { name: string diff --git a/ee/tabby-ui/lib/hooks/use-patch-fetch.ts b/ee/tabby-ui/lib/hooks/use-patch-fetch.ts index 38e56ba..408f4bc 100644 --- a/ee/tabby-ui/lib/hooks/use-patch-fetch.ts +++ b/ee/tabby-ui/lib/hooks/use-patch-fetch.ts @@ -1,10 +1,10 @@ -import { - type AIStreamCallbacksAndOptions, - createCallbacksTransformer, - createStreamDataTransformer -} from 'ai' -import { StreamingTextResponse } from 'ai' import { useEffect } from 'react' +import { + createCallbacksTransformer, + createStreamDataTransformer, + StreamingTextResponse, + type AIStreamCallbacksAndOptions +} from 'ai' const serverUrl = process.env.NEXT_PUBLIC_TABBY_SERVER_URL || '' diff --git a/ee/tabby-ui/lib/hooks/use-store.ts b/ee/tabby-ui/lib/hooks/use-store.ts index d8e712b..b42640c 100644 --- a/ee/tabby-ui/lib/hooks/use-store.ts +++ b/ee/tabby-ui/lib/hooks/use-store.ts @@ -1,4 +1,5 @@ import React from 'react' + import { useHydrated } from './use-hydration' export const useStore = ( diff --git a/ee/tabby-ui/lib/hooks/use-workers.ts b/ee/tabby-ui/lib/hooks/use-workers.ts index e810dda..42c92cf 100644 --- a/ee/tabby-ui/lib/hooks/use-workers.ts +++ b/ee/tabby-ui/lib/hooks/use-workers.ts @@ -1,10 +1,12 @@ import React from 'react' -import { groupBy, findIndex, slice } from 'lodash-es' -import { Worker, WorkerKind } from '@/lib/gql/generates/graphql' -import type { HealthInfo } from './use-health' +import { findIndex, groupBy, slice } from 'lodash-es' + import { graphql } from '@/lib/gql/generates' +import { Worker, WorkerKind } from '@/lib/gql/generates/graphql' import { useGraphQLQuery } from '@/lib/tabby/gql' +import type { HealthInfo } from './use-health' + const modelNameMap: Record = { [WorkerKind.Chat]: 'chat_model', [WorkerKind.Completion]: 'model' diff --git a/ee/tabby-ui/lib/stores/chat-actions.ts b/ee/tabby-ui/lib/stores/chat-actions.ts index b4cdb31..f958357 100644 --- a/ee/tabby-ui/lib/stores/chat-actions.ts +++ b/ee/tabby-ui/lib/stores/chat-actions.ts @@ -1,6 +1,8 @@ import { Message } from 'ai' -import { nanoid } from '@/lib/utils' + import type { Chat } from '@/lib/types' +import { nanoid } from '@/lib/utils' + import { useChatStore } from './chat-store' const get = useChatStore.getState diff --git a/ee/tabby-ui/lib/stores/chat-store.ts b/ee/tabby-ui/lib/stores/chat-store.ts index ce2db87..f616866 100644 --- a/ee/tabby-ui/lib/stores/chat-store.ts +++ b/ee/tabby-ui/lib/stores/chat-store.ts @@ -1,6 +1,7 @@ -import { Chat } from '@/lib/types' import { create } from 'zustand' import { persist } from 'zustand/middleware' + +import { Chat } from '@/lib/types' import { nanoid } from '@/lib/utils' const excludeFromState = ['_hasHydrated', 'setHasHydrated', 'activeChatId'] diff --git a/ee/tabby-ui/lib/tabby/auth.tsx b/ee/tabby-ui/lib/tabby/auth.tsx index b627c5a..43261c6 100644 --- a/ee/tabby-ui/lib/tabby/auth.tsx +++ b/ee/tabby-ui/lib/tabby/auth.tsx @@ -1,9 +1,10 @@ import * as React from 'react' +import { useRouter } from 'next/navigation' +import { jwtDecode } from 'jwt-decode' + import { graphql } from '@/lib/gql/generates' import useInterval from '@/lib/hooks/use-interval' import { gqlClient, useGraphQLQuery } from '@/lib/tabby/gql' -import { jwtDecode } from 'jwt-decode' -import { useRouter } from 'next/navigation' interface AuthData { accessToken: string diff --git a/ee/tabby-ui/lib/tabby/gql.ts b/ee/tabby-ui/lib/tabby/gql.ts index 1e6aedc..bfe74a8 100644 --- a/ee/tabby-ui/lib/tabby/gql.ts +++ b/ee/tabby-ui/lib/tabby/gql.ts @@ -1,7 +1,7 @@ -import useSWR, { SWRResponse, SWRConfiguration } from 'swr' -import { GraphQLClient, Variables } from 'graphql-request' import { TypedDocumentNode } from '@graphql-typed-document-node/core' +import { GraphQLClient, Variables } from 'graphql-request' import { GraphQLResponse } from 'graphql-request/build/esm/types' +import useSWR, { SWRConfiguration, SWRResponse } from 'swr' export const gqlClient = new GraphQLClient( `${process.env.NEXT_PUBLIC_TABBY_SERVER_URL ?? ''}/graphql` diff --git a/ee/tabby-ui/package.json b/ee/tabby-ui/package.json index 73cfd1f..15f64ce 100644 --- a/ee/tabby-ui/package.json +++ b/ee/tabby-ui/package.json @@ -64,6 +64,7 @@ "devDependencies": { "@graphql-codegen/cli": "5.0.0", "@graphql-codegen/client-preset": "4.1.0", + "@ianvs/prettier-plugin-sort-imports": "^4.1.1", "@parcel/watcher": "^2.3.0", "@tailwindcss/typography": "^0.5.9", "@types/lodash-es": "^4.17.10", @@ -81,6 +82,7 @@ "npm-run-all": "^4.1.5", "postcss": "^8.4.21", "prettier": "^2.7.1", + "prettier-plugin-organize-imports": "^3.2.4", "tailwind-merge": "^1.12.0", "tailwindcss": "^3.3.1", "tailwindcss-animate": "^1.0.5", diff --git a/ee/tabby-ui/prettier.config.cjs b/ee/tabby-ui/prettier.config.cjs index 842ca6b..c949c3a 100644 --- a/ee/tabby-ui/prettier.config.cjs +++ b/ee/tabby-ui/prettier.config.cjs @@ -25,10 +25,5 @@ module.exports = { '', '^[./]' ], - importOrderSeparation: false, - importOrderSortSpecifiers: true, - importOrderBuiltinModulesToTop: true, importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'], - importOrderMergeDuplicateImports: true, - importOrderCombineTypeAndValueImports: true } diff --git a/ee/tabby-ui/yarn.lock b/ee/tabby-ui/yarn.lock index 75a488a..70f3dd4 100644 --- a/ee/tabby-ui/yarn.lock +++ b/ee/tabby-ui/yarn.lock @@ -58,6 +58,14 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.9": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.3.tgz#3febd552541e62b5e883a25eb3effd7c7379db11" @@ -84,6 +92,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.21.8": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.5.tgz#6e23f2acbcb77ad283c5ed141f824fd9f70101c7" + integrity sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.5" + "@babel/parser" "^7.23.5" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.3.tgz#86e6e83d95903fbe7613f448613b8b319f330a8e" @@ -94,6 +123,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.21.5", "@babel/generator@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.5.tgz#17d0a1ea6b62f351d281350a5f80b87a810c4755" + integrity sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA== + dependencies: + "@babel/types" "^7.23.5" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -219,6 +258,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + "@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" @@ -238,6 +282,15 @@ "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" +"@babel/helpers@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.5.tgz#52f522840df8f1a848d06ea6a79b79eefa72401e" + integrity sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + "@babel/highlight@^7.22.13": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" @@ -247,11 +300,25 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.22.15", "@babel/parser@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.3.tgz#0ce0be31a4ca4f1884b5786057cadcb6c3be58f9" integrity sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw== +"@babel/parser@^7.21.8", "@babel/parser@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563" + integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== + "@babel/plugin-proposal-class-properties@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" @@ -505,6 +572,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.21.5", "@babel/traverse@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.5.tgz#f546bf9aba9ef2b042c0e00d245990c15508e7ec" + integrity sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.5" + "@babel/types" "^7.23.5" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.3.tgz#d5ea892c07f2ec371ac704420f4dcdb07b5f9598" @@ -514,6 +597,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.21.5", "@babel/types@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.5.tgz#48d730a00c95109fa4393352705954d74fb5b602" + integrity sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -1034,6 +1126,18 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@ianvs/prettier-plugin-sort-imports@^4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@ianvs/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.1.1.tgz#364fb49c4104d577c80750dcc27a7bae4338095d" + integrity sha512-kJhXq63ngpTQ2dxgf5GasbPJWsJA3LgoOdd7WGhpUSzLgLgI4IsIzYkbJf9kmpOHe7Vdm/o3PcRA3jmizXUuAQ== + dependencies: + "@babel/core" "^7.21.8" + "@babel/generator" "^7.21.5" + "@babel/parser" "^7.21.8" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" + semver "^7.5.2" + "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" @@ -5711,6 +5815,11 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-plugin-organize-imports@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz#77967f69d335e9c8e6e5d224074609309c62845e" + integrity sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog== + prettier@^2.7.1: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" @@ -6192,7 +6301,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7: +semver@^7.3.7, semver@^7.5.2: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==