mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-21 04:48:00 -05:00
Compare commits
1 Commits
feat/tools
...
fix/copilo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88b29c9719 |
@@ -557,6 +557,14 @@ export class WorkflowDiffEngine {
|
|||||||
const existingBlock = existingBlockMap[key]?.block
|
const existingBlock = existingBlockMap[key]?.block
|
||||||
|
|
||||||
// Merge with existing block if found, otherwise use proposed
|
// Merge with existing block if found, otherwise use proposed
|
||||||
|
// Deep merge subBlocks to preserve runtime values (webhookId, triggerPath, etc.)
|
||||||
|
const mergedSubBlocks = existingBlock
|
||||||
|
? {
|
||||||
|
...existingBlock.subBlocks,
|
||||||
|
...proposedBlock.subBlocks,
|
||||||
|
}
|
||||||
|
: proposedBlock.subBlocks
|
||||||
|
|
||||||
const finalBlock: BlockState & BlockWithDiff = existingBlock
|
const finalBlock: BlockState & BlockWithDiff = existingBlock
|
||||||
? {
|
? {
|
||||||
...existingBlock,
|
...existingBlock,
|
||||||
@@ -564,6 +572,8 @@ export class WorkflowDiffEngine {
|
|||||||
id: finalId,
|
id: finalId,
|
||||||
// Preserve position from proposed or fallback to existing
|
// Preserve position from proposed or fallback to existing
|
||||||
position: proposedBlock.position || existingBlock.position,
|
position: proposedBlock.position || existingBlock.position,
|
||||||
|
// Use deep-merged subBlocks to preserve runtime values
|
||||||
|
subBlocks: mergedSubBlocks,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
...proposedBlock,
|
...proposedBlock,
|
||||||
|
|||||||
Reference in New Issue
Block a user