From 917f0ef591593b9b2cc23b5349889af97e768fc5 Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Wed, 18 Mar 2026 12:03:36 +0800 Subject: [PATCH] style: prettier --- .../app/workspace/chats/[thread_id]/page.tsx | 53 +++++++---- .../components/ai-elements/prompt-input.tsx | 38 ++++---- .../src/components/ai-elements/suggestion.tsx | 2 +- frontend/src/components/ui/sonner.tsx | 9 +- .../workspace/chats/use-thread-chat.ts | 87 ++++++++++++++----- .../workspace/messages/message-list-item.tsx | 8 +- frontend/src/core/skills/api.ts | 22 ++++- frontend/src/core/threads/hooks.ts | 22 ++++- frontend/src/core/uploads/api.ts | 6 +- frontend/src/styles/globals.css | 3 +- 10 files changed, 174 insertions(+), 76 deletions(-) diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx index 0277cbab..e6170b31 100644 --- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx +++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx @@ -82,7 +82,9 @@ export default function ChatPage() { console.log("[ChatPage] skillBootstrap:", skillBootstrap); if (!threadId || !skillBootstrap?.contentId) { - console.log("[ChatPage] skillBootstrap: skipping (no threadId or no contentId)"); + console.log( + "[ChatPage] skillBootstrap: skipping (no threadId or no contentId)", + ); setIsSkillBootstrapping(false); return; } @@ -91,7 +93,10 @@ export default function ChatPage() { const initKey = `${threadId}:${skillBootstrap.contentId}:${languageType}`; console.log("[ChatPage] initKey:", initKey); - console.log("[ChatPage] alreadyBootstrapped:", skillBootstrappedKeyRef.current); + console.log( + "[ChatPage] alreadyBootstrapped:", + skillBootstrappedKeyRef.current, + ); if (skillBootstrappedKeyRef.current === initKey) { console.log("[ChatPage] skillBootstrap already done for key:", initKey); @@ -130,21 +135,29 @@ export default function ChatPage() { if (!cancelled) { skillBootstrappedKeyRef.current = initKey; setIsSkillBootstrapping(false); - console.log("[ChatPage] ========== SKILL BOOTSTRAP SUCCESS =========="); + console.log( + "[ChatPage] ========== SKILL BOOTSTRAP SUCCESS ==========", + ); // 使用 toast 显示成功状态 - toast.success(`已加载 Skill #${skillBootstrap.contentId}大模型将根据情况触发此 Skill`, { - id: toastId, - icon: false, - }); + toast.success( + `已加载 Skill #${skillBootstrap.contentId}大模型将根据情况触发此 Skill`, + { + id: toastId, + icon: false, + }, + ); } else { console.log("[ChatPage] bootstrap cancelled, not updating state"); toast.dismiss(toastId); } } catch (error) { - console.error("[ChatPage] ========== SKILL BOOTSTRAP FAILED =========="); + console.error( + "[ChatPage] ========== SKILL BOOTSTRAP FAILED ==========", + ); if (!cancelled) { - const message = error instanceof Error ? error.message : "Skill 初始化失败"; + const message = + error instanceof Error ? error.message : "Skill 初始化失败"; console.error("[ChatPage] error message:", message); setIsSkillBootstrapping(false); @@ -205,7 +218,9 @@ export default function ChatPage() { // [移植自 main 分支 ef9a071] skill 初始化中禁止提交 if (isSkillBootstrapping) { - console.log("[ChatPage] handleSubmit BLOCKED: skill bootstrapping in progress"); + console.log( + "[ChatPage] handleSubmit BLOCKED: skill bootstrapping in progress", + ); return; } @@ -222,16 +237,18 @@ export default function ChatPage() { return ( -
+
{/* 返回查看结果左箭头 - 新会话时隐藏 */} @@ -313,7 +330,7 @@ export default function ChatPage() { > Skill 初始化失败 -

- {errorMessage} -

+

{errorMessage}