Support define is tool logic function (#17926)
- supports isTool and timeout settings in defineLogicFunction in apps and in setting tabs definition - compute for all toolInputSchema for logic funciton, in settings and in code steps <img width="991" height="802" alt="image" src="https://github.com/user-attachments/assets/05dc1221-cac9-45a3-87b0-3b13161446fd" />
This commit is contained in:
+4
-4
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { DEFAULT_TOOL_INPUT_SCHEMA } from 'twenty-shared/logic-function';
|
||||
|
||||
import {
|
||||
type GenerateDescriptorOptions,
|
||||
@@ -68,10 +69,9 @@ export class LogicFunctionToolProvider implements ToolProvider {
|
||||
|
||||
if (includeSchemas) {
|
||||
// Logic functions already store JSON Schema -- use it directly
|
||||
const inputSchema = (logicFunction.toolInputSchema as object) ?? {
|
||||
type: 'object',
|
||||
properties: {},
|
||||
};
|
||||
const inputSchema =
|
||||
(logicFunction.toolInputSchema as object) ??
|
||||
DEFAULT_TOOL_INPUT_SCHEMA;
|
||||
|
||||
descriptors.push({ ...base, inputSchema });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user