fix(config): align array schema docs with wildcard hints

This commit is contained in:
Altay
2026-04-04 21:24:54 +03:00
parent 0f6b6871ae
commit 4ef8806c6a
3 changed files with 7 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ function applyFieldDocumentation(
prefixes.flatMap((prefix) => {
const arrayPath = prefix ? `${prefix}[]` : "[]";
const wildcardAlias = prefix ? `${prefix}.*` : "*";
return wildcardAlias === arrayPath ? [arrayPath] : [arrayPath, wildcardAlias];
return wildcardAlias === arrayPath ? [arrayPath] : [wildcardAlias, arrayPath];
}),
),
);

View File

@@ -5963,9 +5963,9 @@ export const GENERATED_BASE_CONFIG_SCHEMA = {
},
avatar: {
type: "string",
title: "Agent Avatar",
title: "Identity Avatar",
description:
"Avatar image path (relative to the agent workspace only) or a remote URL/data URL.",
"Agent avatar (workspace-relative path, http(s) URL, or data URI).",
},
},
additionalProperties: false,

View File

@@ -351,6 +351,10 @@ describe("config schema", () => {
expect(lookup?.path).toBe("agents.list.0.identity.avatar");
expect(lookup?.hintPath).toBe("agents.list.*.identity.avatar");
expect(lookup?.hint?.help).toContain("workspace-relative path");
expect(lookup?.schema).toMatchObject({
title: "Identity Avatar",
description: expect.stringContaining("Agent avatar"),
});
});
it("normalizes bracketed lookup paths", () => {