fix: 重置按钮放在头部,返回按钮的逻辑不变
This commit is contained in:
parent
b7f2001914
commit
cb56507767
|
|
@ -368,7 +368,14 @@ export default function ChatPage() {
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="px-[10px] py-[5px] text-sm font-medium text-ws-base-1 hover:text-ws-base-1/80"
|
className="px-[10px] py-[5px] text-sm font-medium text-ws-base-1 hover:text-ws-base-1/80"
|
||||||
disabled={isStreaming}
|
disabled={isStreaming}
|
||||||
onClick={() => setShowExitDialog(true)}
|
onClick={() => {
|
||||||
|
sendToParent({
|
||||||
|
type: POST_MESSAGE_TYPES.IS_CHATTING,
|
||||||
|
isChatting: false,
|
||||||
|
});
|
||||||
|
router.replace(`/workspace/chats/${threadId}?is_chatting=false`)
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
width="20"
|
width="20"
|
||||||
|
|
@ -424,6 +431,20 @@ export default function ChatPage() {
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
|
<Tooltip content={t.common.resetThread}>
|
||||||
|
<Button
|
||||||
|
size="sm"
|
||||||
|
variant="ghost"
|
||||||
|
className="h-full px-[10px] py-[5px] text-sm font-medium text-ws-base-1 hover:text-ws-base-1"
|
||||||
|
disabled={isStreaming}
|
||||||
|
onClick={() => setShowExitDialog(true)}
|
||||||
|
>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
|
||||||
|
<path d="M2 4H6M16 4H12M6 4H12M6 4C6 2.89543 6.89543 2 8 2H10C11.1046 2 12 2.89543 12 4M4 6V14C4 15.1046 4.89543 16 6 16H12C13.1046 16 14 15.1046 14 14V6M7 8V13M11 8V13" stroke="#150033" stroke-linecap="round" />
|
||||||
|
</svg>
|
||||||
|
{t.common.resetThread}
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
{artifacts?.length > 0 && !artifactsOpen && (
|
{artifacts?.length > 0 && !artifactsOpen && (
|
||||||
<Tooltip content={t.chatPage.viewArtifactsTooltip}>
|
<Tooltip content={t.chatPage.viewArtifactsTooltip}>
|
||||||
|
|
@ -436,7 +457,12 @@ export default function ChatPage() {
|
||||||
setSidebarOpen(false);
|
setSidebarOpen(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FilesIcon />
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
|
||||||
|
<path d="M16 7V4C16 2.89543 15.1046 2 14 2H4C2.89543 2 2 2.89543 2 4V14C2 15.1046 2.89543 16 4 16H9" stroke="#150033" stroke-linecap="round" />
|
||||||
|
<path d="M5 5H9M5 8H7" stroke="#150033" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
<circle cx="11.5" cy="10.5" r="3" stroke="#150033" />
|
||||||
|
<path d="M15.5 14.5L14 13" stroke="#150033" stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
</svg>
|
||||||
{t.common.artifacts}
|
{t.common.artifacts}
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
|
||||||
|
|
@ -965,14 +965,14 @@ export function InputBox({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!showWelcomeStyle && (
|
{/* {!showWelcomeStyle && (
|
||||||
<div className="shrink-0 h-full">
|
<div className="shrink-0 h-full">
|
||||||
<ExitChattingButton
|
<ExitChattingButton
|
||||||
router={router}
|
router={router}
|
||||||
threadId={threadIdFromProps}
|
threadId={threadIdFromProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
<div ref={attachmentsButtonTourRef} className="shrink-0 h-full">
|
<div ref={attachmentsButtonTourRef} className="shrink-0 h-full">
|
||||||
<AddAttachmentsButton />
|
<AddAttachmentsButton />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ export const enUS: Translations = {
|
||||||
exportSuccess: "Conversation exported",
|
exportSuccess: "Conversation exported",
|
||||||
removeAttachment: "Remove attachment",
|
removeAttachment: "Remove attachment",
|
||||||
reference: "Reference",
|
reference: "Reference",
|
||||||
|
resetThread: "Reset thread",
|
||||||
},
|
},
|
||||||
|
|
||||||
// Welcome
|
// Welcome
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export interface Translations {
|
||||||
exportSuccess: string;
|
exportSuccess: string;
|
||||||
removeAttachment: string;
|
removeAttachment: string;
|
||||||
reference: string;
|
reference: string;
|
||||||
|
resetThread: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Welcome
|
// Welcome
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ export const zhCN: Translations = {
|
||||||
exportSuccess: "对话已导出",
|
exportSuccess: "对话已导出",
|
||||||
removeAttachment: "移除附件",
|
removeAttachment: "移除附件",
|
||||||
reference: "引用",
|
reference: "引用",
|
||||||
|
resetThread: "重置会话",
|
||||||
},
|
},
|
||||||
|
|
||||||
// Welcome
|
// Welcome
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue