fix:补上向主页面发送isChatting的逻辑

This commit is contained in:
肖应宇 2026-05-06 13:46:05 +08:00
parent 9b8bc09414
commit 345a143e38
1 changed files with 13 additions and 5 deletions

View File

@ -1271,8 +1271,12 @@ function HistoryButton({
<Tooltip content={t.inputBox.history}>
<WorkspaceToolButton
className={cn("text-ws-base-1 hover:text-ws-interactive-primary", className)}
onClick={() =>
router.replace(`/workspace/chats/${threadId}?is_chatting=true`)
onClick={() =>{
sendToParent({
type: POST_MESSAGE_TYPES.IS_CHATTING,
isChatting: true,
});
router.replace(`/workspace/chats/${threadId}?is_chatting=true`)}
}
>
<svg
@ -1318,9 +1322,13 @@ function ExitChattingButton({
"text-ws-base-1 hover:text-ws-interactive-primary",
className,
)}
onClick={() =>
router.replace(`/workspace/chats/${threadId}?is_chatting=false`)
}
onClick={() => {
sendToParent({
type: POST_MESSAGE_TYPES.IS_CHATTING,
isChatting: false,
});
router.replace(`/workspace/chats/${threadId}?is_chatting=false`);
}}
>
<svg
className="transition-[color] duration-200"