From 7e3901fe21cb0a3f3cedfc901f78dd1e34b11d0b Mon Sep 17 00:00:00 2001
From: MT-Mint <798521692@qq.com>
Date: Tue, 17 Mar 2026 17:05:41 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=85=E9=99=A4header=E7=9A=84?=
=?UTF-8?q?=E9=98=B4=E5=BD=B1=EF=BC=9B=E5=8F=96=E6=B6=88=E5=8F=91=E9=80=81?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84=E7=A9=BA=E5=80=BCdisabled=E6=A3=80?=
=?UTF-8?q?=E6=9F=A5=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4clearSkil?=
=?UTF-8?q?l=EF=BC=8Ctag=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/workspace/chats/[thread_id]/page.tsx | 10 +++++----
.../components/ai-elements/prompt-input.tsx | 21 ++++++++++++-------
.../src/components/workspace/input-box.tsx | 2 +-
frontend/src/core/i18n/locales/en-US.ts | 2 ++
frontend/src/hooks/use-iframe-skill.ts | 6 +++++-
5 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/frontend/src/app/workspace/chats/[thread_id]/page.tsx b/frontend/src/app/workspace/chats/[thread_id]/page.tsx
index 3e24b019..1aefe39f 100644
--- a/frontend/src/app/workspace/chats/[thread_id]/page.tsx
+++ b/frontend/src/app/workspace/chats/[thread_id]/page.tsx
@@ -90,13 +90,15 @@ export default function ChatPage() {
"absolute top-0 right-0 left-0 z-30 mx-[20px] grid h-[58px] shrink-0 grid-cols-3 items-center rounded-t-[20px] border-b py-[15px]",
isNewThread
? "bg-background/0 backdrop-blur-none"
- : "bg-background/80 shadow-xs backdrop-blur",
+ : "bg-background/80 backdrop-blur",
)}
>
{/* 返回查看结果左箭头 */}
diff --git a/frontend/src/components/ai-elements/prompt-input.tsx b/frontend/src/components/ai-elements/prompt-input.tsx
index aa7b766a..5c480557 100644
--- a/frontend/src/components/ai-elements/prompt-input.tsx
+++ b/frontend/src/components/ai-elements/prompt-input.tsx
@@ -1077,18 +1077,23 @@ export const PromptInputSubmit = ({
: false;
// 正在 streaming 时不允许发送
- const isStreaming = status === "streaming" || status === "submitted";
+ // const isStreaming = status === "streaming" || status === "submitted";
- const isDisabled = disabled || !hasContent || isStreaming;
+ // const isDisabled = disabled || !hasContent || isStreaming;
let Icon =
;
+ let text: string = "发送";
+
if (status === "submitted") {
Icon =
;
+ text = "生成中...";
} else if (status === "streaming") {
Icon =
;
+ text = "停止";
} else if (status === "error") {
Icon =
;
+ text = "错误";
}
return (
@@ -1097,19 +1102,19 @@ export const PromptInputSubmit = ({
// 被button{bgc:#fff}覆盖了,只能加"!"
className={cn(
"h-[40px] w-[140px] rounded-[10px] border-0 font-bold transition-all",
- isDisabled
- ? "cursor-not-allowed !bg-gray-200 text-gray-400"
- : "!bg-[#F0E8FB] text-[#8E47F0] hover:!bg-[#8E47F0] hover:text-[#FFFFFF]",
+ // isDisabled
+ // ? "cursor-not-allowed !bg-gray-200 text-gray-400":
+ "!bg-[#F0E8FB] text-[#8E47F0] hover:!bg-[#8E47F0] hover:text-[#FFFFFF]",
className,
)}
size={size}
type="submit"
variant={variant}
- disabled={isDisabled}
+ // disabled={isDisabled}
{...props}
>
- {children ?? Icon}
- 发送
+ {/* {children ?? Icon} */}
+ {text}
);
};
diff --git a/frontend/src/components/workspace/input-box.tsx b/frontend/src/components/workspace/input-box.tsx
index 6317e3e2..e3e1cb95 100644
--- a/frontend/src/components/workspace/input-box.tsx
+++ b/frontend/src/components/workspace/input-box.tsx
@@ -826,7 +826,7 @@ export function InputBox({
variant="outline"
status={status}
/>
- {/* TODO: 神秘空div */}
+ {/* MARK: 神秘空div */}
{/* {!isNewThread && (
)} */}
diff --git a/frontend/src/core/i18n/locales/en-US.ts b/frontend/src/core/i18n/locales/en-US.ts
index 3eb4c997..dc1fb7d7 100644
--- a/frontend/src/core/i18n/locales/en-US.ts
+++ b/frontend/src/core/i18n/locales/en-US.ts
@@ -24,6 +24,8 @@ export const enUS: Translations = {
delete: "Delete",
rename: "Rename",
share: "Share",
+ fullScreen: "fullScreen",
+ closeFullScreen: "closeFullScreen",
openInNewWindow: "Open in new window",
close: "Close",
more: "More",
diff --git a/frontend/src/hooks/use-iframe-skill.ts b/frontend/src/hooks/use-iframe-skill.ts
index d712aad7..d6c0ef4f 100644
--- a/frontend/src/hooks/use-iframe-skill.ts
+++ b/frontend/src/hooks/use-iframe-skill.ts
@@ -60,9 +60,13 @@ export function useIframeSkill(): UseIframeSkillReturn {
window.parent.postMessage(message, "*");
}, []);
- // 清除选中
+ // 清除选中并发送 skill_id=0 给主页
const clearSkill = useCallback(() => {
setSelectedSkill(null);
+ // 发送 skill_id=0 给主页,通知取消选择
+ const message = { type: MESSAGE_TYPES.SELECT_SKILL, skill_id: "0" };
+ console.log("[useIframeSkill] clearSkill, sending skill_id=0:", message);
+ window.parent.postMessage(message, "*");
}, []);
return { selectedSkill, sendSelectSkill, openSkillDialog, clearSkill };