mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 23:20:22 +00:00
fix: preserve session thread ids in chat session snapshots
This commit is contained in:
@@ -764,6 +764,7 @@ describe("agent event handler", () => {
|
||||
totalTokensFresh: true,
|
||||
contextTokens: 21,
|
||||
estimatedCostUsd: 0.12,
|
||||
lastThreadId: 42,
|
||||
status: "running",
|
||||
startedAt: 900,
|
||||
runtimeMs: 750,
|
||||
@@ -805,6 +806,7 @@ describe("agent event handler", () => {
|
||||
totalTokensFresh: true,
|
||||
contextTokens: 21,
|
||||
estimatedCostUsd: 0.12,
|
||||
lastThreadId: 42,
|
||||
}),
|
||||
new Set(["conn-session"]),
|
||||
{ dropIfSlow: true },
|
||||
|
||||
@@ -511,6 +511,7 @@ export function createAgentEventHandler({
|
||||
lastChannel: row?.lastChannel,
|
||||
lastTo: row?.lastTo,
|
||||
lastAccountId: row?.lastAccountId,
|
||||
lastThreadId: row?.lastThreadId,
|
||||
totalTokens: row?.totalTokens,
|
||||
totalTokensFresh: row?.totalTokensFresh,
|
||||
contextTokens: row?.contextTokens,
|
||||
|
||||
@@ -1234,6 +1234,7 @@ export function buildGatewaySessionRow(params: {
|
||||
lastChannel: deliveryFields.lastChannel ?? entry?.lastChannel,
|
||||
lastTo: deliveryFields.lastTo ?? entry?.lastTo,
|
||||
lastAccountId: deliveryFields.lastAccountId ?? entry?.lastAccountId,
|
||||
lastThreadId: deliveryFields.lastThreadId ?? entry?.lastThreadId,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ export type GatewaySessionRow = {
|
||||
lastChannel?: SessionEntry["lastChannel"];
|
||||
lastTo?: string;
|
||||
lastAccountId?: string;
|
||||
lastThreadId?: SessionEntry["lastThreadId"];
|
||||
};
|
||||
|
||||
export type GatewayAgentRow = SharedGatewayAgentRow;
|
||||
|
||||
Reference in New Issue
Block a user