fix: resolve ts build errors
This commit is contained in:
@@ -115,7 +115,7 @@ function normalizeToolParameters(tool: AnyAgentTool): AnyAgentTool {
|
|||||||
properties: schema.properties ?? {},
|
properties: schema.properties ?? {},
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
"additionalProperties" in schema ? schema.additionalProperties : true,
|
"additionalProperties" in schema ? schema.additionalProperties : true,
|
||||||
} as TSchema,
|
} as unknown as TSchema,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ export function applyTemplate(str: string | undefined, ctx: TemplateContext) {
|
|||||||
if (!str) return "";
|
if (!str) return "";
|
||||||
return str.replace(/{{\s*(\w+)\s*}}/g, (_, key) => {
|
return str.replace(/{{\s*(\w+)\s*}}/g, (_, key) => {
|
||||||
const value = ctx[key as keyof TemplateContext];
|
const value = ctx[key as keyof TemplateContext];
|
||||||
return value ?? "";
|
return value == null ? "" : String(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user