mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:14:58 +00:00
refactor(config): unify streaming config across channels
This commit is contained in:
@@ -68,6 +68,42 @@ describe("doctor config flow", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves discord streaming intent while stripping unsupported keys on repair", async () => {
|
||||
const result = await runDoctorConfigWithInput({
|
||||
repair: true,
|
||||
config: {
|
||||
channels: {
|
||||
discord: {
|
||||
streaming: true,
|
||||
lifecycle: {
|
||||
enabled: true,
|
||||
reactions: {
|
||||
queued: "⏳",
|
||||
thinking: "🧠",
|
||||
tool: "🔧",
|
||||
done: "✅",
|
||||
error: "❌",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const cfg = result.cfg as {
|
||||
channels: {
|
||||
discord: {
|
||||
streamMode?: string;
|
||||
streaming?: string;
|
||||
lifecycle?: unknown;
|
||||
};
|
||||
};
|
||||
};
|
||||
expect(cfg.channels.discord.streaming).toBe("partial");
|
||||
expect(cfg.channels.discord.streamMode).toBeUndefined();
|
||||
expect(cfg.channels.discord.lifecycle).toBeUndefined();
|
||||
});
|
||||
|
||||
it("resolves Telegram @username allowFrom entries to numeric IDs on repair", async () => {
|
||||
const fetchSpy = vi.fn(async (url: string) => {
|
||||
const u = String(url);
|
||||
|
||||
Reference in New Issue
Block a user