diff --git a/src/agents/tools/sessions-list-tool.test.ts b/src/agents/tools/sessions-list-tool.test.ts index 5786aa095f6..f5d5db3cc24 100644 --- a/src/agents/tools/sessions-list-tool.test.ts +++ b/src/agents/tools/sessions-list-tool.test.ts @@ -23,6 +23,17 @@ describe("sessions-list-tool", () => { threadId: "thread-1", }, }, + { + key: "agent:main:telegram:topic", + kind: "direct", + sessionId: "sess-telegram-topic", + deliveryContext: { + channel: "telegram", + to: "telegram:topic", + accountId: "acct-2", + threadId: 271, + }, + }, ], }; } @@ -61,7 +72,7 @@ describe("sessions-list-tool", () => { channel?: string; to?: string; accountId?: string; - threadId?: string; + threadId?: string | number; }; }>; }; @@ -72,6 +83,12 @@ describe("sessions-list-tool", () => { accountId: "acct-1", threadId: "thread-1", }); + expect(details.sessions?.[1]?.deliveryContext).toEqual({ + channel: "telegram", + to: "telegram:topic", + accountId: "acct-2", + threadId: 271, + }); }); it("keeps numeric deliveryContext.threadId in sessions_list results", async () => {