chore: run bun format to automatically format the frontend code

This commit is contained in:
t0ng7u
2026-07-01 06:38:41 +08:00
parent e514db20f7
commit 5bf3468362
679 changed files with 2719 additions and 1717 deletions
+2 -1
View File
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
'use client'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Tooltip,
@@ -27,6 +27,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
export type ActionsProps = ComponentProps<'div'>
+3 -2
View File
@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { ComponentProps, HTMLAttributes } from 'react'
import { type LucideIcon, XIcon } from 'lucide-react'
import type { ComponentProps, HTMLAttributes } from 'react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Tooltip,
@@ -29,6 +29,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'
import { cn } from '@/lib/utils'
export type ArtifactProps = HTMLAttributes<HTMLDivElement>
+4 -3
View File
@@ -18,6 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { UIMessage } from 'ai'
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
import {
type ComponentProps,
createContext,
@@ -28,11 +30,10 @@ import {
useMemo,
useState,
} from 'react'
import type { UIMessage } from 'ai'
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
type BranchContextType = {
currentBranch: number
+2 -1
View File
@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { Background, ReactFlow, type ReactFlowProps } from '@xyflow/react'
import type { ReactNode } from 'react'
import '@xyflow/react/dist/style.css'
import { Controls } from './controls'
@@ -18,6 +18,12 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import {
BrainIcon,
ChevronDownIcon,
DotIcon,
type LucideIcon,
} from 'lucide-react'
import {
type ComponentProps,
createContext,
@@ -25,20 +31,15 @@ import {
useContext,
useMemo,
} from 'react'
import {
BrainIcon,
ChevronDownIcon,
DotIcon,
type LucideIcon,
} from 'lucide-react'
import { useControllableState } from '@/lib/use-controllable-state'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge'
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { useControllableState } from '@/lib/use-controllable-state'
import { cn } from '@/lib/utils'
type ChainOfThoughtContextValue = {
isOpen: boolean
+3 -2
View File
@@ -18,16 +18,17 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { ToolUIPart } from 'ai'
import {
type ComponentProps,
createContext,
type ReactNode,
useContext,
} from 'react'
import type { ToolUIPart } from 'ai'
import { cn } from '@/lib/utils'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
// Workaround for missing types in 'ai' package
type ExtendedToolState =
+3 -2
View File
@@ -18,11 +18,11 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { type ComponentProps, createContext, useContext } from 'react'
import type { LanguageModelUsage } from 'ai'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next'
import { getUsage } from 'tokenlens'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
HoverCard,
@@ -30,6 +30,7 @@ import {
HoverCardTrigger,
} from '@/components/ui/hover-card'
import { Progress } from '@/components/ui/progress'
import { cn } from '@/lib/utils'
const PERCENT_MAX = 100
const ICON_RADIUS = 10
+2 -1
View File
@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { ComponentProps } from 'react'
import { Controls as ControlsPrimitive } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
export type ControlsProps = ComponentProps<typeof ControlsPrimitive>
+1
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { Experimental_GeneratedImage } from 'ai'
import { cn } from '@/lib/utils'
export type ImageProps = Experimental_GeneratedImage & {
+3 -2
View File
@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react'
import {
type ComponentProps,
createContext,
@@ -26,9 +27,8 @@ import {
useEffect,
useState,
} from 'react'
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import {
@@ -42,6 +42,7 @@ import {
HoverCardContent,
HoverCardTrigger,
} from '@/components/ui/hover-card'
import { cn } from '@/lib/utils'
export type InlineCitationProps = ComponentProps<'span'>
+1
View File
@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
import type { HTMLAttributes } from 'react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
type LoaderIconProps = {
+3 -2
View File
@@ -16,11 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ComponentProps, HTMLAttributes } from 'react'
import type { UIMessage } from 'ai'
import { cva, type VariantProps } from 'class-variance-authority'
import { cn } from '@/lib/utils'
import type { ComponentProps, HTMLAttributes } from 'react'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { cn } from '@/lib/utils'
export type MessageProps = HTMLAttributes<HTMLDivElement> & {
from: UIMessage['role']
+3 -2
View File
@@ -16,9 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ComponentProps } from 'react'
import { Handle, Position } from '@xyflow/react'
import { cn } from '@/lib/utils'
import type { ComponentProps } from 'react'
import {
Card,
CardAction,
@@ -28,6 +28,7 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card'
import { cn } from '@/lib/utils'
export type NodeProps = ComponentProps<typeof Card> & {
handles: {
+3 -2
View File
@@ -16,14 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { type ComponentProps, createContext, useContext } from 'react'
import {
ChevronDownIcon,
ExternalLinkIcon,
MessageCircleIcon,
} from 'lucide-react'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
DropdownMenu,
@@ -33,6 +33,7 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
import { cn } from '@/lib/utils'
const providers = {
github: {
+2 -1
View File
@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ComponentProps } from 'react'
import { Panel as PanelPrimitive } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
type PanelProps = ComponentProps<typeof PanelPrimitive>
+4 -2
View File
@@ -18,10 +18,10 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { type ComponentProps, createContext, useContext } from 'react'
import { ChevronsUpDownIcon } from 'lucide-react'
import { type ComponentProps, createContext, useContext } from 'react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Card,
@@ -37,6 +37,8 @@ import {
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
import { Shimmer } from './shimmer'
type PlanContextValue = {
+14 -13
View File
@@ -19,6 +19,18 @@ For commercial licensing, please contact support@quantumnous.com
/* eslint-disable react-refresh/only-export-components */
'use client'
import type { ChatStatus, FileUIPart } from 'ai'
import {
ImageIcon,
Loader2Icon,
MicIcon,
PaperclipIcon,
PlusIcon,
SendIcon,
SquareIcon,
XIcon,
} from 'lucide-react'
import { nanoid } from 'nanoid'
import {
type ChangeEvent,
type ChangeEventHandler,
@@ -41,20 +53,8 @@ import {
useRef,
useState,
} from 'react'
import type { ChatStatus, FileUIPart } from 'ai'
import {
ImageIcon,
Loader2Icon,
MicIcon,
PaperclipIcon,
PlusIcon,
SendIcon,
SquareIcon,
XIcon,
} from 'lucide-react'
import { nanoid } from 'nanoid'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Command,
@@ -89,6 +89,7 @@ import {
SelectTrigger,
SelectValue,
} from '@/components/ui/select'
import { cn } from '@/lib/utils'
// ============================================================================
// Provider Context & Types
+3 -2
View File
@@ -18,9 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { ComponentProps } from 'react'
import { ChevronDownIcon, PaperclipIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
import type { ComponentProps } from 'react'
import { Button } from '@/components/ui/button'
import {
Collapsible,
@@ -28,6 +28,7 @@ import {
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { ScrollArea } from '@/components/ui/scroll-area'
import { cn } from '@/lib/utils'
export type QueueMessagePart = {
type: string
@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { BlockquoteNode, ParsedNode } from 'stream-markdown-parser'
import { cn } from '@/lib/utils'
@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { HtmlBlockNode, ParsedNode } from 'stream-markdown-parser'
import { hasParsedChildren, isHtmlBlockNode } from './response-node-guards'
@@ -16,8 +16,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ReactNode } from 'react'
import { t } from 'i18next'
import type { ReactNode } from 'react'
import type { FootnoteNode } from 'stream-markdown-parser'
import type { BlockRendererOptions } from './response-types'
+2 -1
View File
@@ -18,8 +18,9 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { type CSSProperties, type ElementType, memo, useMemo } from 'react'
import { motion } from 'motion/react'
import { type CSSProperties, type ElementType, memo, useMemo } from 'react'
import { cn } from '@/lib/utils'
export type TextShimmerProps = {
+2 -1
View File
@@ -19,9 +19,10 @@ For commercial licensing, please contact support@quantumnous.com
'use client'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area'
import { cn } from '@/lib/utils'
export type SuggestionsProps = ComponentProps<typeof ScrollArea>
+3 -2
View File
@@ -18,14 +18,15 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import type { ComponentProps } from 'react'
import { ChevronDownIcon, SearchIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
import type { ComponentProps } from 'react'
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
export type TaskItemFileProps = ComponentProps<'div'>
+4 -2
View File
@@ -18,7 +18,6 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { type ComponentProps, isValidElement, type ReactNode } from 'react'
import type { ToolUIPart } from 'ai'
import {
CheckCircleIcon,
@@ -28,14 +27,17 @@ import {
WrenchIcon,
XCircleIcon,
} from 'lucide-react'
import { type ComponentProps, isValidElement, type ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import { cn } from '@/lib/utils'
import { Badge } from '@/components/ui/badge'
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '@/components/ui/collapsible'
import { cn } from '@/lib/utils'
import { CodeBlock } from './code-block'
// Workaround for missing types in 'ai' package
+2 -1
View File
@@ -16,8 +16,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import type { ComponentProps } from 'react'
import { NodeToolbar, Position } from '@xyflow/react'
import type { ComponentProps } from 'react'
import { cn } from '@/lib/utils'
type ToolbarProps = ComponentProps<typeof NodeToolbar>
+4 -3
View File
@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
'use client'
import { ChevronDownIcon } from 'lucide-react'
import {
type ComponentProps,
createContext,
@@ -26,10 +27,8 @@ import {
useEffect,
useState,
} from 'react'
import { ChevronDownIcon } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
import { Button } from '@/components/ui/button'
import {
Collapsible,
@@ -43,6 +42,8 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'
import dayjs from '@/lib/dayjs'
import { cn } from '@/lib/utils'
export type WebPreviewContextValue = {
url: string