mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-26 00:21:59 +00:00
fix(config): align array schema docs with wildcard hints
This commit is contained in:
@@ -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];
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user