mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
improvement(subblock-defaults): custom defaults for subblocks if needed (#1298)
This commit is contained in:
committed by
GitHub
parent
8f7b11f089
commit
c48039f97f
@@ -175,6 +175,7 @@ Create a system prompt appropriately detailed for the request, using clear langu
|
||||
layout: 'half',
|
||||
min: 0,
|
||||
max: 1,
|
||||
defaultValue: 0.5,
|
||||
condition: () => ({
|
||||
field: 'model',
|
||||
value: (() => {
|
||||
@@ -192,6 +193,7 @@ Create a system prompt appropriately detailed for the request, using clear langu
|
||||
layout: 'half',
|
||||
min: 0,
|
||||
max: 2,
|
||||
defaultValue: 1,
|
||||
condition: () => ({
|
||||
field: 'model',
|
||||
value: (() => {
|
||||
@@ -289,6 +291,7 @@ Create a system prompt appropriately detailed for the request, using clear langu
|
||||
title: 'Tools',
|
||||
type: 'tool-input',
|
||||
layout: 'full',
|
||||
defaultValue: [],
|
||||
},
|
||||
{
|
||||
id: 'responseFormat',
|
||||
|
||||
@@ -103,6 +103,7 @@ export interface SubBlockConfig {
|
||||
mode?: 'basic' | 'advanced' | 'both' // Default is 'both' if not specified
|
||||
canonicalParamId?: string
|
||||
required?: boolean
|
||||
defaultValue?: string | number | boolean | Record<string, unknown> | Array<unknown>
|
||||
options?:
|
||||
| { label: string; id: string; icon?: React.ComponentType<{ className?: string }> }[]
|
||||
| (() => { label: string; id: string; icon?: React.ComponentType<{ className?: string }> }[])
|
||||
|
||||
@@ -634,7 +634,7 @@ export function useCollaborativeWorkflow() {
|
||||
subBlocks[subBlock.id] = {
|
||||
id: subBlock.id,
|
||||
type: subBlock.type,
|
||||
value: null,
|
||||
value: subBlock.defaultValue ?? null,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user