refactor!: rename chat providers to channels

This commit is contained in:
Peter Steinberger
2026-01-13 06:16:43 +00:00
parent 0cd632ba84
commit 90342a4f3a
393 changed files with 8004 additions and 6737 deletions

View File

@@ -126,18 +126,20 @@ describe("resolveTextChunkLimit", () => {
});
it("supports provider overrides", () => {
const cfg = { telegram: { textChunkLimit: 1234 } };
const cfg = { channels: { telegram: { textChunkLimit: 1234 } } };
expect(resolveTextChunkLimit(cfg, "whatsapp")).toBe(4000);
expect(resolveTextChunkLimit(cfg, "telegram")).toBe(1234);
});
it("prefers account overrides when provided", () => {
const cfg = {
telegram: {
textChunkLimit: 2000,
accounts: {
default: { textChunkLimit: 1234 },
primary: { textChunkLimit: 777 },
channels: {
telegram: {
textChunkLimit: 2000,
accounts: {
default: { textChunkLimit: 1234 },
primary: { textChunkLimit: 777 },
},
},
},
};
@@ -147,8 +149,10 @@ describe("resolveTextChunkLimit", () => {
it("uses the matching provider override", () => {
const cfg = {
discord: { textChunkLimit: 111 },
slack: { textChunkLimit: 222 },
channels: {
discord: { textChunkLimit: 111 },
slack: { textChunkLimit: 222 },
},
};
expect(resolveTextChunkLimit(cfg, "discord")).toBe(111);
expect(resolveTextChunkLimit(cfg, "slack")).toBe(222);