Skip to content

Commit f696be9

Browse files
committed
fix(gateway): keep runtime metadata on session rows
1 parent 22748b1 commit f696be9

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai
2323
- Control UI/WebChat: explain compaction boundaries in chat history and link directly to session checkpoint controls so pre-compaction turns no longer look silently lost after refresh. Fixes #76415. Thanks @BunsDev.
2424
- Channels/WhatsApp: attach native outbound mention metadata for group text and media captions by resolving `@+<digits>` and `@<digits>` tokens against WhatsApp participant data, including LID groups. Fixes #39879; carries forward #56863. Thanks @kengi1437, @joe2643, and @fridayck.
2525
- Gateway/sessions: keep async `sessions.list` title and preview hydration bounded to transcript head/tail reads so Control UI polling cannot full-scan large session transcripts every refresh. Thanks @vincentkoc.
26+
- Gateway/sessions: keep agent runtime metadata on lightweight `sessions.list` rows so model-only session patches do not make Control UI lose runtime identity. Thanks @vincentkoc.
2627
- Gateway/sessions: keep bulk `sessions.list` rows lightweight by skipping per-row transcript usage fallback, display model inference, and plugin projection, avoiding event-loop stalls in large session stores. Thanks @Marvinthebored and @vincentkoc.
2728
- CLI/plugins: reject missing plugin ids before config writes in `plugins enable` and `plugins disable` so a typo no longer persists a stale config entry. (#73554) Thanks @ai-hpc.
2829
- Agents/sessions: preserve delivered trailing assistant replies during session-file repair so Telegram/WebChat history is not rewritten to drop already-delivered responses. Fixes #76329. Thanks @obviyus.

src/gateway/session-utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ describe("listSessionsFromStore selected model display", () => {
11431143
lastMessagePreview: "last 0",
11441144
}),
11451145
);
1146-
expect(listed.sessions[0]?.agentRuntime).toBeUndefined();
1146+
expect(listed.sessions[0]?.agentRuntime).toEqual({ id: "pi", source: "implicit" });
11471147
expect(listed.sessions[0]?.thinkingOptions).toEqual([]);
11481148
} finally {
11491149
fs.rmSync(tmpDir, { recursive: true, force: true });

src/gateway/session-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ export function buildGatewaySessionRow(params: {
15821582
const latestCompactionCheckpoint = buildCompactionCheckpointPreview(
15831583
resolveLatestCompactionCheckpoint(entry),
15841584
);
1585-
const agentRuntime = lightweight ? undefined : resolveAgentRuntimeMetadata(cfg, sessionAgentId);
1585+
const agentRuntime = resolveAgentRuntimeMetadata(cfg, sessionAgentId);
15861586
const selectedOrRuntimeModelProvider = selectedModel?.provider ?? modelProvider;
15871587
const selectedOrRuntimeModel = selectedModel?.model ?? model;
15881588
const rowModelIdentity = lightweight

0 commit comments

Comments
 (0)