fix(custom-tool): fix textarea, param dropdown for available params, … · simstudioai/sim@730164a · GitHub
Skip to content

Commit 730164a

Browse files
fix(custom-tool): fix textarea, param dropdown for available params, validation for invalid schemas, variable resolution in custom tools and subflow tags (#1117)
* fix(custom-tools): fix text area for custom tools * added param dropdown in agent custom tool * add syntax highlighting for params, fix dropdown styling * ux * add tooltip to prevent indicate invalid json schema on schema and code tabs * feat(custom-tool): added stricter JSON schema validation and error when saving json schema for custom tools * fix(custom-tool): allow variable resolution in custom tools * fix variable resolution in subflow tags * refactored function execution to use helpers * cleanup * fix block variable resolution to inject at runtime * fix highlighting code --------- Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
1 parent 25b2c45 commit 730164a

26 files changed

Lines changed: 687 additions & 243 deletions

File tree

‎apps/sim/app/api/function/execute/route.ts‎

Lines changed: 124 additions & 15 deletions

‎apps/sim/app/api/providers/route.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export async function POST(request: NextRequest) {
3939
stream,
4040
messages,
4141
environmentVariables,
42+
workflowVariables,
43+
blockData,
44+
blockNameMapping,
4245
reasoningEffort,
4346
verbosity,
4447
} = body
@@ -60,6 +63,7 @@ export async function POST(request: NextRequest) {
6063
messageCount: messages?.length || 0,
6164
hasEnvironmentVariables:
6265
!!environmentVariables && Object.keys(environmentVariables).length > 0,
66+
hasWorkflowVariables: !!workflowVariables && Object.keys(workflowVariables).length > 0,
6367
reasoningEffort,
6468
verbosity,
6569
})
@@ -103,6 +107,9 @@ export async function POST(request: NextRequest) {
103107
stream,
104108
messages,
105109
environmentVariables,
110+
workflowVariables,
111+
blockData,
112+
blockNameMapping,
106113
reasoningEffort,
107114
verbosity,
108115
})

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx‎

Lines changed: 77 additions & 15 deletions

0 commit comments

Comments
 (0)