fix: expose deliveryContext in sessions_list

Co-authored-by: Adam Holt <mail@adamholt.co.nz>
This commit is contained in:
Peter SteinbergerandAdam Holt committed 2026-01-17 06:54:31 +00:00
1 parent 1f3a09b43b
commit a85ddf258c
3 files changed
+11

No files matched your search

+9
View File
@@ -27,6 +27,7 @@ type SessionListRow = {
channel: string;
label?: string;
displayName?: string;
deliveryContext?: { channel?: string; to?: string; accountId?: string };
updatedAt?: number | null;
sessionId?: string;
model?: string;
@@ -201,6 +202,14 @@ export function createSessionsListTool(opts?: {
channel: derivedChannel,
label: typeof entry.label === "string" ? entry.label : undefined,
displayName: typeof entry.displayName === "string" ? entry.displayName : undefined,
deliveryContext:
deliveryChannel || deliveryTo || deliveryAccountId
? {
channel: deliveryChannel,
to: deliveryTo,
accountId: deliveryAccountId,
}
: undefined,
updatedAt: typeof entry.updatedAt === "number" ? entry.updatedAt : undefined,
sessionId,
model: typeof entry.model === "string" ? entry.model : undefined,