feat(editor): Remember different panel state for sub nodes (#16189)

This commit is contained in:
Suguru Inoue
2025-06-11 14:46:19 +02:00
committed by GitHub
parent 21b84ef4e7
commit b9e03515bd
6 changed files with 100 additions and 11 deletions

View File

@@ -100,8 +100,7 @@ function getChildNodes(
// Get the first level of children
const connectedSubNodes = context.workflow.getParentNodes(node.name, 'ALL_NON_MAIN', 1);
const isExecutionRoot =
treeNode.parent === undefined || treeNode.executionId !== treeNode.parent.executionId;
const isExecutionRoot = !isSubNodeLog(treeNode);
return connectedSubNodes.flatMap((subNodeName) =>
(context.data.resultData.runData[subNodeName] ?? []).flatMap((t, index) => {
@@ -539,3 +538,7 @@ export function restoreChatHistory(
return [...(userMessage ? [userMessage] : []), ...(botMessage ? [botMessage] : [])];
}
export function isSubNodeLog(logEntry: LogEntry): boolean {
return logEntry.parent !== undefined && logEntry.parent.executionId === logEntry.executionId;
}