feat: default telegram reaction level minimal

This commit is contained in:
Peter Steinberger
2026-01-16 20:35:43 +00:00
parent aaa310c047
commit 470add877c
5 changed files with 9 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ describe("handleTelegramAction", () => {
).rejects.toThrow(/Telegram agent reactions disabled.*reactionLevel="off"/);
});
it("blocks reactions when reactionLevel is ack (default)", async () => {
it("blocks reactions when reactionLevel is ack", async () => {
const cfg = {
channels: { telegram: { botToken: "tok", reactionLevel: "ack" } },
} as ClawdbotConfig;

View File

@@ -18,16 +18,16 @@ describe("resolveTelegramReactionLevel", () => {
}
});
it("defaults to ack level when reactionLevel is not set", () => {
it("defaults to minimal level when reactionLevel is not set", () => {
const cfg: ClawdbotConfig = {
channels: { telegram: {} },
};
const result = resolveTelegramReactionLevel({ cfg });
expect(result.level).toBe("ack");
expect(result.ackEnabled).toBe(true);
expect(result.agentReactionsEnabled).toBe(false);
expect(result.agentReactionGuidance).toBeUndefined();
expect(result.level).toBe("minimal");
expect(result.ackEnabled).toBe(false);
expect(result.agentReactionsEnabled).toBe(true);
expect(result.agentReactionGuidance).toBe("minimal");
});
it("returns off level with no reactions enabled", () => {

View File

@@ -24,7 +24,7 @@ export function resolveTelegramReactionLevel(params: {
cfg: params.cfg,
accountId: params.accountId,
});
const level = (account.config.reactionLevel ?? "ack") as TelegramReactionLevel;
const level = (account.config.reactionLevel ?? "minimal") as TelegramReactionLevel;
switch (level) {
case "off":