mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: fix artifacts in demo mode
This commit is contained in:
@@ -119,8 +119,8 @@ export default function ChatPage() {
|
||||
<ResizablePanelGroup orientation="horizontal">
|
||||
<ResizablePanel
|
||||
className="relative"
|
||||
defaultSize={artifactsOpen ? 46 : 100}
|
||||
minSize={artifactsOpen ? 30 : 100}
|
||||
defaultSize={artifactsOpen && artifacts?.length > 0 ? 46 : 100}
|
||||
minSize={artifactsOpen && artifacts?.length > 0 ? 30 : 100}
|
||||
>
|
||||
<div className="relative flex size-full min-h-0 justify-between">
|
||||
<header
|
||||
@@ -215,7 +215,9 @@ export default function ChatPage() {
|
||||
<ResizableHandle
|
||||
className={cn(
|
||||
"opacity-33 hover:opacity-100",
|
||||
!artifactsOpen && "pointer-events-none opacity-0",
|
||||
!artifactsOpen &&
|
||||
artifacts?.length > 0 &&
|
||||
"pointer-events-none opacity-0",
|
||||
)}
|
||||
/>
|
||||
<ResizablePanel
|
||||
@@ -223,14 +225,16 @@ export default function ChatPage() {
|
||||
"transition-all duration-300 ease-in-out",
|
||||
!artifactsOpen && "opacity-0",
|
||||
)}
|
||||
defaultSize={artifactsOpen ? 64 : 0}
|
||||
defaultSize={artifactsOpen && artifacts?.length > 0 ? 64 : 0}
|
||||
minSize={0}
|
||||
maxSize={artifactsOpen ? undefined : 0}
|
||||
maxSize={artifactsOpen && artifacts?.length > 0 ? undefined : 0}
|
||||
>
|
||||
<div
|
||||
className={cn(
|
||||
"h-full p-4 transition-transform duration-300 ease-in-out",
|
||||
artifactsOpen ? "translate-x-0" : "translate-x-full",
|
||||
artifactsOpen && artifacts?.length > 0
|
||||
? "translate-x-0"
|
||||
: "translate-x-full",
|
||||
)}
|
||||
>
|
||||
{selectedArtifact ? (
|
||||
|
||||
@@ -90,7 +90,10 @@ export function useSubmitThread({
|
||||
type: fileUIPart.mediaType || blob.type,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`Failed to fetch file ${fileUIPart.filename}:`, error);
|
||||
console.error(
|
||||
`Failed to fetch file ${fileUIPart.filename}:`,
|
||||
error,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +133,7 @@ export function useSubmitThread({
|
||||
streamSubgraphs: true,
|
||||
streamResumable: true,
|
||||
config: {
|
||||
recursion_limit: 100,
|
||||
recursion_limit: 1000,
|
||||
},
|
||||
context: {
|
||||
...threadContext,
|
||||
|
||||
Reference in New Issue
Block a user