feat: default telegram reaction level minimal
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
- Browser: increase remote CDP reachability timeouts + add `remoteCdpTimeoutMs`/`remoteCdpHandshakeTimeoutMs`.
|
- Browser: increase remote CDP reachability timeouts + add `remoteCdpTimeoutMs`/`remoteCdpHandshakeTimeoutMs`.
|
||||||
- Browser: preserve auth/query tokens for remote CDP endpoints and pass Basic auth for CDP HTTP/WS. (#895) — thanks @mukhtharcm.
|
- Browser: preserve auth/query tokens for remote CDP endpoints and pass Basic auth for CDP HTTP/WS. (#895) — thanks @mukhtharcm.
|
||||||
- Telegram: add bidirectional reaction support with configurable notifications and agent guidance. (#964) — thanks @bohdanpodvirnyi.
|
- Telegram: add bidirectional reaction support with configurable notifications and agent guidance. (#964) — thanks @bohdanpodvirnyi.
|
||||||
|
- Telegram: default reaction level to minimal for more delightful baseline reactions.
|
||||||
- Telegram: allow custom commands in the bot menu (merged with native; conflicts ignored). (#860) — thanks @nachoiacovino.
|
- Telegram: allow custom commands in the bot menu (merged with native; conflicts ignored). (#860) — thanks @nachoiacovino.
|
||||||
- Discord: allow allowlisted guilds without channel lists to receive messages when `groupPolicy="allowlist"`. — thanks @thewilloftheshadow.
|
- Discord: allow allowlisted guilds without channel lists to receive messages when `groupPolicy="allowlist"`. — thanks @thewilloftheshadow.
|
||||||
- Discord: allow emoji/sticker uploads + channel actions in config defaults. (#870) — thanks @JDIVE.
|
- Discord: allow emoji/sticker uploads + channel actions in config defaults. (#870) — thanks @JDIVE.
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ Provider options:
|
|||||||
- `channels.telegram.actions.sendMessage`: gate Telegram tool message sends.
|
- `channels.telegram.actions.sendMessage`: gate Telegram tool message sends.
|
||||||
- `channels.telegram.actions.deleteMessage`: gate Telegram tool message deletes.
|
- `channels.telegram.actions.deleteMessage`: gate Telegram tool message deletes.
|
||||||
- `channels.telegram.reactionNotifications`: `off | own | all` — control which reactions trigger system events (default: `off` when not set).
|
- `channels.telegram.reactionNotifications`: `off | own | all` — control which reactions trigger system events (default: `off` when not set).
|
||||||
- `channels.telegram.reactionLevel`: `off | ack | minimal | extensive` — control agent's reaction capability (default: `ack` when not set).
|
- `channels.telegram.reactionLevel`: `off | ack | minimal | extensive` — control agent's reaction capability (default: `minimal` when not set).
|
||||||
|
|
||||||
Related global options:
|
Related global options:
|
||||||
- `agents.list[].groupChat.mentionPatterns` (mention gating patterns).
|
- `agents.list[].groupChat.mentionPatterns` (mention gating patterns).
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ describe("handleTelegramAction", () => {
|
|||||||
).rejects.toThrow(/Telegram agent reactions disabled.*reactionLevel="off"/);
|
).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 = {
|
const cfg = {
|
||||||
channels: { telegram: { botToken: "tok", reactionLevel: "ack" } },
|
channels: { telegram: { botToken: "tok", reactionLevel: "ack" } },
|
||||||
} as ClawdbotConfig;
|
} 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 = {
|
const cfg: ClawdbotConfig = {
|
||||||
channels: { telegram: {} },
|
channels: { telegram: {} },
|
||||||
};
|
};
|
||||||
|
|
||||||
const result = resolveTelegramReactionLevel({ cfg });
|
const result = resolveTelegramReactionLevel({ cfg });
|
||||||
expect(result.level).toBe("ack");
|
expect(result.level).toBe("minimal");
|
||||||
expect(result.ackEnabled).toBe(true);
|
expect(result.ackEnabled).toBe(false);
|
||||||
expect(result.agentReactionsEnabled).toBe(false);
|
expect(result.agentReactionsEnabled).toBe(true);
|
||||||
expect(result.agentReactionGuidance).toBeUndefined();
|
expect(result.agentReactionGuidance).toBe("minimal");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns off level with no reactions enabled", () => {
|
it("returns off level with no reactions enabled", () => {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function resolveTelegramReactionLevel(params: {
|
|||||||
cfg: params.cfg,
|
cfg: params.cfg,
|
||||||
accountId: params.accountId,
|
accountId: params.accountId,
|
||||||
});
|
});
|
||||||
const level = (account.config.reactionLevel ?? "ack") as TelegramReactionLevel;
|
const level = (account.config.reactionLevel ?? "minimal") as TelegramReactionLevel;
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case "off":
|
case "off":
|
||||||
|
|||||||
Reference in New Issue
Block a user