feat: 生成中禁用返回按钮
This commit is contained in:
parent
7bdc9777bf
commit
72023c513b
|
|
@ -193,6 +193,7 @@ export default function ChatPage() {
|
|||
|
||||
const todoListCollapsed = true;
|
||||
const [showExitDialog, setShowExitDialog] = useState(false);
|
||||
const isStreaming = isUploading || thread.isLoading;
|
||||
const handleSubmit = useCallback(
|
||||
(message: Parameters<typeof sendMessage>[1]) => {
|
||||
if (isSelectedSkillBootstrapping) {
|
||||
|
|
@ -225,7 +226,7 @@ export default function ChatPage() {
|
|||
|
||||
|
||||
return (
|
||||
<ThreadContext.Provider value={{ threadId,thread }}>
|
||||
<ThreadContext.Provider value={{ threadId, thread }}>
|
||||
<div
|
||||
className={cn(
|
||||
"m-auto flex h-screen min-h-svh overflow-hidden rounded-t-[20px] transition-[width] duration-300 ease-in-out",
|
||||
|
|
@ -252,6 +253,7 @@ export default function ChatPage() {
|
|||
size="sm"
|
||||
variant="ghost"
|
||||
className="px-[10px] py-[5px] text-sm font-medium text-[#150033] hover:text-[#150033]/80"
|
||||
disabled={isStreaming}
|
||||
onClick={() => setShowExitDialog(true)}
|
||||
>
|
||||
<svg
|
||||
|
|
@ -354,6 +356,7 @@ export default function ChatPage() {
|
|||
<div
|
||||
className={cn(
|
||||
"h-full w-full transition-transform duration-300 ease-in-out",
|
||||
showWelcomeStyle && !hasSubmitted ? "translate-x-0" : "",
|
||||
artifactPanelOpen ? "translate-x-0" : "translate-x-full",
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue