feat: default telegram reaction level minimal
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user