tools and skills, etc in the containers

This commit is contained in:
2026-02-24 01:24:28 +00:00
parent 071e2decc3
commit d6ffe43a11
16 changed files with 996 additions and 66 deletions
+8 -1
View File
@@ -114,7 +114,14 @@ function buildSchema(inputs: Record<string, ToolParam>): TSchema {
switch (param.type) {
case 'enum': {
const values = param.values ?? [];
// values can be a string[] from deeper YAML parsing,
// or a comma-separated string like "single,batch" from flat YAML
const raw = param.values;
const values = Array.isArray(raw)
? raw
: typeof raw === 'string'
? raw.split(',').map((v) => v.trim())
: [];
schema = Type.Union(values.map((v) => Type.Literal(v)), {
description: param.description,
});