From bc20208d0f61b2568e58839dc0118e9021952832 Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Tue, 17 Mar 2026 14:46:40 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=BF=90=E8=A1=8C=20prettier=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/mock/api/threads/search/route.ts | 3 +- .../app/workspace/chats/[thread_id]/page.tsx | 64 +++++--- .../src/components/ai-elements/artifact.tsx | 11 +- .../ai-elements/chain-of-thought.tsx | 6 +- .../src/components/ai-elements/checkpoint.tsx | 5 +- .../src/components/ai-elements/context.tsx | 10 +- .../src/components/ai-elements/controls.tsx | 6 +- frontend/src/components/ai-elements/edge.tsx | 10 +- frontend/src/components/ai-elements/image.tsx | 2 +- .../src/components/ai-elements/loader.tsx | 2 +- .../src/components/ai-elements/message.tsx | 4 +- frontend/src/components/ai-elements/node.tsx | 6 +- frontend/src/components/ai-elements/panel.tsx | 4 +- .../components/ai-elements/prompt-input.tsx | 58 +++++-- frontend/src/components/ai-elements/queue.tsx | 28 ++-- .../src/components/ai-elements/reasoning.tsx | 27 ++-- .../src/components/ai-elements/shimmer.tsx | 8 +- .../src/components/ai-elements/sources.tsx | 6 +- frontend/src/components/ai-elements/task.tsx | 12 +- .../src/components/ai-elements/toolbar.tsx | 4 +- .../components/ai-elements/web-preview.tsx | 16 +- frontend/src/components/ui/alert.tsx | 22 +-- frontend/src/components/ui/aurora-text.tsx | 22 +-- frontend/src/components/ui/avatar.tsx | 20 +-- frontend/src/components/ui/badge.tsx | 18 +-- frontend/src/components/ui/breadcrumb.tsx | 30 ++-- frontend/src/components/ui/button-group.tsx | 28 ++-- frontend/src/components/ui/card.tsx | 26 +-- frontend/src/components/ui/carousel.tsx | 136 ++++++++-------- frontend/src/components/ui/command.tsx | 52 +++--- frontend/src/components/ui/dev-dialog.tsx | 44 ++--- frontend/src/components/ui/dialog.tsx | 40 ++--- frontend/src/components/ui/dropdown-menu.tsx | 66 ++++---- .../src/components/ui/dropdown-selector.tsx | 104 ++++++------ frontend/src/components/ui/empty.tsx | 30 ++-- frontend/src/components/ui/hover-card.tsx | 18 +-- frontend/src/components/ui/input-group.tsx | 2 +- frontend/src/components/ui/item.tsx | 52 +++--- frontend/src/components/ui/magic-bento.css | 4 +- frontend/src/components/ui/progress.tsx | 14 +- frontend/src/components/ui/scroll-area.tsx | 16 +- frontend/src/components/ui/separator.tsx | 14 +- frontend/src/components/ui/sheet.tsx | 38 ++--- frontend/src/components/ui/shine-border.tsx | 16 +- frontend/src/components/ui/sidebar.tsx | 4 +- frontend/src/components/ui/skeleton.tsx | 6 +- frontend/src/components/ui/sonner.tsx | 16 +- frontend/src/components/ui/spotlight-card.css | 8 +- frontend/src/components/ui/switch.tsx | 16 +- frontend/src/components/ui/tabs.tsx | 28 ++-- frontend/src/components/ui/toggle.tsx | 18 +-- .../artifacts/artifact-file-detail.tsx | 7 +- .../artifacts/artifact-file-list.tsx | 2 +- .../workspace/artifacts/artifact-trigger.tsx | 2 +- .../components/workspace/chats/chat-box.tsx | 37 +++-- .../workspace/citations/citation-link.tsx | 12 +- .../components/workspace/dev-todo-list.tsx | 9 +- .../src/components/workspace/flip-display.tsx | 2 +- .../src/components/workspace/input-box.tsx | 153 ++++++++++++------ .../workspace/messages/message-group.tsx | 7 +- .../components/workspace/mode-hover-guide.tsx | 5 +- .../components/workspace/settings/about.md | 3 + frontend/src/components/workspace/welcome.tsx | 4 +- frontend/src/core/i18n/locales/en-US.ts | 15 +- frontend/src/core/i18n/locales/types.ts | 2 +- frontend/src/core/i18n/locales/zh-CN.ts | 5 +- frontend/src/core/mcp/api.ts | 14 +- frontend/src/core/threads/hooks.ts | 3 +- frontend/src/hooks/use-iframe-skill.ts | 130 ++++++++------- frontend/src/hooks/use-mobile.ts | 24 +-- frontend/src/styles/globals.css | 23 +-- 71 files changed, 921 insertions(+), 738 deletions(-) diff --git a/frontend/src/app/mock/api/threads/search/route.ts b/frontend/src/app/mock/api/threads/search/route.ts index 74ba79a3..c0ddd840 100644 --- a/frontend/src/app/mock/api/threads/search/route.ts +++ b/frontend/src/app/mock/api/threads/search/route.ts @@ -14,7 +14,8 @@ type MockThreadSearchResult = Record & { }; export async function POST(request: Request) { - const body = ((await request.json().catch(() => ({}))) ?? {}) as ThreadSearchRequest; + const body = ((await request.json().catch(() => ({}))) ?? + {}) as ThreadSearchRequest; const rawLimit = body.limit; let limit = 50; diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx index 1b3ccdce..4b44613f 100644 --- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx +++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx @@ -82,28 +82,42 @@ export default function ChatPage() { return ( -
+
{/* 返回查看结果左箭头 */} -
- -
-
+
-
+
+ } @@ -129,18 +147,20 @@ export default function ChatPage() {
-
+
退出后,当前会话结束并销毁,请先下载保存当前结果!

- - - + diff --git a/frontend/src/components/ai-elements/artifact.tsx b/frontend/src/components/ai-elements/artifact.tsx index 8d84e9bf..4867b22a 100644 --- a/frontend/src/components/ai-elements/artifact.tsx +++ b/frontend/src/components/ai-elements/artifact.tsx @@ -16,7 +16,7 @@ export type ArtifactProps = HTMLAttributes; export const Artifact = ({ className, ...props }: ArtifactProps) => (
(
( -
-
+
+
); diff --git a/frontend/src/components/ai-elements/chain-of-thought.tsx b/frontend/src/components/ai-elements/chain-of-thought.tsx index 752cfc2e..2c385b6e 100644 --- a/frontend/src/components/ai-elements/chain-of-thought.tsx +++ b/frontend/src/components/ai-elements/chain-of-thought.tsx @@ -147,7 +147,11 @@ export const ChainOfThoughtStep = memo( {...props} >
- {isValidElement(Icon) ? Icon : } + {isValidElement(Icon) ? ( + Icon + ) : ( + + )}
diff --git a/frontend/src/components/ai-elements/checkpoint.tsx b/frontend/src/components/ai-elements/checkpoint.tsx index d9a5d326..6d912fec 100644 --- a/frontend/src/components/ai-elements/checkpoint.tsx +++ b/frontend/src/components/ai-elements/checkpoint.tsx @@ -19,7 +19,10 @@ export const Checkpoint = ({ ...props }: CheckpointProps) => (
{children} diff --git a/frontend/src/components/ai-elements/context.tsx b/frontend/src/components/ai-elements/context.tsx index f49d7cae..7385d068 100644 --- a/frontend/src/components/ai-elements/context.tsx +++ b/frontend/src/components/ai-elements/context.tsx @@ -115,7 +115,7 @@ export const ContextTrigger = ({ children, ...props }: ContextTriggerProps) => { {children ?? ( @@ -231,7 +231,7 @@ export const WebPreviewConsole = ({
@@ -244,7 +244,7 @@ export const WebPreviewConsole = ({ "text-xs", log.level === "error" && "text-destructive", log.level === "warn" && "text-yellow-600", - log.level === "log" && "text-foreground" + log.level === "log" && "text-foreground", )} key={`${log.timestamp.getTime()}-${index}`} > diff --git a/frontend/src/components/ui/alert.tsx b/frontend/src/components/ui/alert.tsx index 14213546..aa7de24d 100644 --- a/frontend/src/components/ui/alert.tsx +++ b/frontend/src/components/ui/alert.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const alertVariants = cva( "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", @@ -16,8 +16,8 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); function Alert({ className, @@ -31,7 +31,7 @@ function Alert({ className={cn(alertVariants({ variant }), className)} {...props} /> - ) + ); } function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { @@ -40,11 +40,11 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { data-slot="alert-title" className={cn( "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", - className + className, )} {...props} /> - ) + ); } function AlertDescription({ @@ -56,11 +56,11 @@ function AlertDescription({ data-slot="alert-description" className={cn( "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", - className + className, )} {...props} /> - ) + ); } -export { Alert, AlertTitle, AlertDescription } +export { Alert, AlertTitle, AlertDescription }; diff --git a/frontend/src/components/ui/aurora-text.tsx b/frontend/src/components/ui/aurora-text.tsx index 85857c1a..f8e475a5 100644 --- a/frontend/src/components/ui/aurora-text.tsx +++ b/frontend/src/components/ui/aurora-text.tsx @@ -1,12 +1,12 @@ -"use client" +"use client"; -import React, { memo } from "react" +import React, { memo } from "react"; interface AuroraTextProps { - children: React.ReactNode - className?: string - colors?: string[] - speed?: number + children: React.ReactNode; + className?: string; + colors?: string[]; + speed?: number; } export const AuroraText = memo( @@ -23,7 +23,7 @@ export const AuroraText = memo( WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent", animationDuration: `${10 / speed}s`, - } + }; return ( @@ -36,8 +36,8 @@ export const AuroraText = memo( {children} - ) - } -) + ); + }, +); -AuroraText.displayName = "AuroraText" +AuroraText.displayName = "AuroraText"; diff --git a/frontend/src/components/ui/avatar.tsx b/frontend/src/components/ui/avatar.tsx index 71e428b4..c4475c2e 100644 --- a/frontend/src/components/ui/avatar.tsx +++ b/frontend/src/components/ui/avatar.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as React from "react"; +import * as AvatarPrimitive from "@radix-ui/react-avatar"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; function Avatar({ className, @@ -14,11 +14,11 @@ function Avatar({ data-slot="avatar" className={cn( "relative flex size-8 shrink-0 overflow-hidden rounded-full", - className + className, )} {...props} /> - ) + ); } function AvatarImage({ @@ -31,7 +31,7 @@ function AvatarImage({ className={cn("aspect-square size-full", className)} {...props} /> - ) + ); } function AvatarFallback({ @@ -43,11 +43,11 @@ function AvatarFallback({ data-slot="avatar-fallback" className={cn( "bg-muted flex size-full items-center justify-center rounded-full", - className + className, )} {...props} /> - ) + ); } -export { Avatar, AvatarImage, AvatarFallback } +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/frontend/src/components/ui/badge.tsx b/frontend/src/components/ui/badge.tsx index fd3a406b..55f8352b 100644 --- a/frontend/src/components/ui/badge.tsx +++ b/frontend/src/components/ui/badge.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const badgeVariants = cva( "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", @@ -22,8 +22,8 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); function Badge({ className, @@ -32,7 +32,7 @@ function Badge({ ...props }: React.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span" + const Comp = asChild ? Slot : "span"; return ( - ) + ); } -export { Badge, badgeVariants } +export { Badge, badgeVariants }; diff --git a/frontend/src/components/ui/breadcrumb.tsx b/frontend/src/components/ui/breadcrumb.tsx index eb88f321..f63ae19a 100644 --- a/frontend/src/components/ui/breadcrumb.tsx +++ b/frontend/src/components/ui/breadcrumb.tsx @@ -1,11 +1,11 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { ChevronRight, MoreHorizontal } from "lucide-react" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { ChevronRight, MoreHorizontal } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { - return