mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
Fixed small bug that didn't render tools in agent blocks
This commit is contained in:
@@ -84,7 +84,17 @@ export const useWorkflowStore = create<WorkflowStoreWithHistory>()(
|
||||
...block.subBlocks,
|
||||
[subBlockId]: {
|
||||
...block.subBlocks[subBlockId],
|
||||
value: typeof value === 'string' ? value : JSON.stringify(value, null, 2),
|
||||
value:
|
||||
// Keep tools as arrays
|
||||
subBlockId === 'tools' && Array.isArray(value)
|
||||
? value
|
||||
: // Keep responseFormat as string
|
||||
subBlockId === 'responseFormat'
|
||||
? value
|
||||
: // For all other values, use the previous logic of stringifying
|
||||
typeof value === 'string'
|
||||
? value
|
||||
: JSON.stringify(value, null, 2),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user