fix: restore stable canvas page hooks
This commit is contained in:
parent
176fc94293
commit
3bd022fc15
@ -800,6 +800,19 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const resolvedWorkflowUiConfig = useMemo(
|
||||||
|
() => normalizeAgentWorkflowUiConfig(siteSettingsData?.agentWorkflowUiConfig),
|
||||||
|
[siteSettingsData?.agentWorkflowUiConfig]
|
||||||
|
);
|
||||||
|
|
||||||
|
const workflowContext = useMemo<AgentWorkflowComposerContext | null>(() => {
|
||||||
|
return buildAgentWorkflowComposerContext({
|
||||||
|
config: resolvedWorkflowUiConfig || defaultAgentWorkflowUiConfig,
|
||||||
|
inputs: workflowInputs,
|
||||||
|
selections: workflowSelections,
|
||||||
|
});
|
||||||
|
}, [resolvedWorkflowUiConfig, workflowInputs, workflowSelections]);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<div className="h-full flex items-center justify-center bg-muted/30">
|
<div className="h-full flex items-center justify-center bg-muted/30">
|
||||||
@ -844,18 +857,6 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null;
|
) : null;
|
||||||
const resolvedWorkflowUiConfig = useMemo(
|
|
||||||
() => normalizeAgentWorkflowUiConfig(siteSettingsData?.agentWorkflowUiConfig),
|
|
||||||
[siteSettingsData?.agentWorkflowUiConfig]
|
|
||||||
);
|
|
||||||
|
|
||||||
const workflowContext = useMemo<AgentWorkflowComposerContext | null>(() => {
|
|
||||||
return buildAgentWorkflowComposerContext({
|
|
||||||
config: resolvedWorkflowUiConfig || defaultAgentWorkflowUiConfig,
|
|
||||||
inputs: workflowInputs,
|
|
||||||
selections: workflowSelections,
|
|
||||||
});
|
|
||||||
}, [resolvedWorkflowUiConfig, workflowInputs, workflowSelections]);
|
|
||||||
|
|
||||||
if (isAgentMode) {
|
if (isAgentMode) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user