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