fix(regression): preserve numeric session thread ids

This commit is contained in:
Tak Hoffman
2026-03-27 20:02:22 -05:00
parent 1efa81bcab
commit d604ce9950

View File

@@ -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 () => {