From 9eb494b1b4b1a203c4cd836876e69c19ad098f3e Mon Sep 17 00:00:00 2001 From: mt Date: Wed, 10 Jun 2026 17:51:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(brand):=20=E8=81=8A=E5=A4=A9=E9=A1=B5=20sx?= =?UTF-8?q?wz=20=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E5=B7=A6=E7=A7=BB=20172px?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ChatPage 接入 useBrand,brand === 'sxwz' 时主容器和输入框 translate-x-[-172px] - 退出对话回欢迎页时同步关闭 artifacts 面板 --- frontend/src/app/workspace/chats/[thread_id]/page.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx index a3c64be1..65158b4f 100644 --- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx +++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx @@ -28,6 +28,7 @@ import { MessageList } from "@/components/workspace/messages"; import { ThreadContext } from "@/components/workspace/messages/context"; import { Tooltip } from "@/components/workspace/tooltip"; import { useSpecificChatMode } from "@/components/workspace/use-chat-mode"; +import { useBrand } from "@/core/brand/provider"; import { Welcome } from "@/components/workspace/welcome"; import { getAPIClient } from "@/core/api"; import { sanitizeArtifactPaths } from "@/core/artifacts/utils"; @@ -48,6 +49,7 @@ import motivationSlogans from "./motivation-slogans.json"; export default function ChatPage() { const { t } = useI18n(); + const { brand } = useBrand(); useSpecificChatMode(); const [sloganIndex, setSloganIndex] = useState(0); const [settings, setSettings] = useLocalSettings(); @@ -345,6 +347,7 @@ export default function ChatPage() { className={cn( "m-auto flex h-screen min-h-svh overflow-hidden rounded-t-[20px] transition-[width] duration-300 ease-in-out", artifactsOpen ? "w-full" : "w-[70%]", + brand === "sxwz" && artifactsOpen === false && "translate-x-[-172px]", )} >
@@ -374,6 +377,7 @@ export default function ChatPage() { isChatting: false, }); router.replace(`/workspace/chats/${threadId}?is_chatting=false`) + setArtifactsOpen(false); } } > @@ -575,6 +579,7 @@ export default function ChatPage() { className={cn( "pointer-events-auto relative w-full max-w-[720px]", showWelcomeStyle && "-translate-y-[calc(50vh-96px)]", + brand === "sxwz" && "-translate-x-[172px]" )} > {!(showWelcomeStyle && thread.isThreadLoading) ? (