diff --git a/CHANGELOG.md b/CHANGELOG.md index c04ed7651c..86e66bd907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Docs: https://docs.openclaw.ai - Clawdock: avoid Zsh readonly variable collisions in helper scripts. (#15501) Thanks @nkelner. - Discord: route autoThread replies to existing threads instead of the root channel. (#8302) Thanks @gavinbmoore, @thewilloftheshadow. - Discord/Agents: apply channel/group `historyLimit` during embedded-runner history compaction to prevent long-running channel sessions from bypassing truncation and overflowing context windows. (#11224) Thanks @shadril238. +- Telegram: scope skill commands to the resolved agent for default accounts so `setMyCommands` no longer triggers `BOT_COMMANDS_TOO_MUCH` when multiple agents are configured. (#15599) - Agents/Image tool: cap image-analysis completion `maxTokens` by model capability (`min(4096, model.maxTokens)`) to avoid over-limit provider failures while still preventing truncation. (#11770) Thanks @detecti1. - TUI/Streaming: preserve richer streamed assistant text when final payload drops pre-tool-call text blocks, while keeping non-empty final payload authoritative for plain-text updates. (#15452) Thanks @TsekaLuk. - Inbound/Web UI: preserve literal `\n` sequences when normalizing inbound text so Windows paths like `C:\\Work\\nxxx\\README.md` are not corrupted. (#11547) Thanks @mcaxtr. diff --git a/src/telegram/bot-native-commands.test.ts b/src/telegram/bot-native-commands.test.ts index 2c0ce29d71..4f1f6f3078 100644 --- a/src/telegram/bot-native-commands.test.ts +++ b/src/telegram/bot-native-commands.test.ts @@ -67,7 +67,7 @@ describe("registerTelegramNativeCommands", () => { }); }); - it("keeps skill commands unscoped without a matching binding", () => { + it("scopes skill commands to default agent without a matching binding (#15599)", () => { const cfg: OpenClawConfig = { agents: { list: [{ id: "main", default: true }, { id: "butler" }], @@ -76,7 +76,10 @@ describe("registerTelegramNativeCommands", () => { registerTelegramNativeCommands(buildParams(cfg, "bot-a")); - expect(listSkillCommandsForAgents).toHaveBeenCalledWith({ cfg }); + expect(listSkillCommandsForAgents).toHaveBeenCalledWith({ + cfg, + agentIds: ["main"], + }); }); it("truncates Telegram command registration to 100 commands", () => { diff --git a/src/telegram/bot-native-commands.ts b/src/telegram/bot-native-commands.ts index c6c6aea4f3..b15a761ffd 100644 --- a/src/telegram/bot-native-commands.ts +++ b/src/telegram/bot-native-commands.ts @@ -295,8 +295,7 @@ export const registerTelegramNativeCommands = ({ nativeEnabled && nativeSkillsEnabled ? resolveAgentRoute({ cfg, channel: "telegram", accountId }) : null; - const boundAgentIds = - boundRoute && boundRoute.matchedBy.startsWith("binding.") ? [boundRoute.agentId] : null; + const boundAgentIds = boundRoute ? [boundRoute.agentId] : null; const skillCommands = nativeEnabled && nativeSkillsEnabled ? listSkillCommandsForAgents(boundAgentIds ? { cfg, agentIds: boundAgentIds } : { cfg })