fix: normalize heartbeat targets

This commit is contained in:
Peter Steinberger
2026-01-24 13:17:02 +00:00
parent 9d742ba51f
commit ef7971e3a4
13 changed files with 163 additions and 42 deletions

View File

@@ -84,4 +84,22 @@ describe("config schema", () => {
const channelProps = channelSchema?.properties as Record<string, unknown> | undefined;
expect(channelProps?.accessToken).toBeTruthy();
});
it("adds heartbeat target hints with dynamic channels", () => {
const res = buildConfigSchema({
channels: [
{
id: "bluebubbles",
label: "BlueBubbles",
configSchema: { type: "object" },
},
],
});
const defaultsHint = res.uiHints["agents.defaults.heartbeat.target"];
const listHint = res.uiHints["agents.list.*.heartbeat.target"];
expect(defaultsHint?.help).toContain("bluebubbles");
expect(defaultsHint?.help).toContain("last");
expect(listHint?.help).toContain("bluebubbles");
});
});