mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:36 +00:00
feat: show transcript file size in session status
Add transcript size monitoring to /status and session_status tool. Displays file size and message count (e.g. '📄 Transcript: 1.2 MB, 627 messages'). Shows ⚠️ warning when transcript exceeds 1 MB, which helps catch sessions approaching the compaction death spiral described in #13624. - getTranscriptInfo() reads JSONL file stat + line count - Wired into both /status command and session_status tool - 8 new tests covering file reading, formatting, and edge cases
This commit is contained in:
committed by
Peter Steinberger
parent
fc6d53c895
commit
15dd2cda20
@@ -28,7 +28,7 @@ import {
|
||||
resolveUsageProviderId,
|
||||
} from "../../infra/provider-usage.js";
|
||||
import { normalizeGroupActivation } from "../group-activation.js";
|
||||
import { buildStatusMessage } from "../status.js";
|
||||
import { buildStatusMessage, getTranscriptInfo } from "../status.js";
|
||||
import { getFollowupQueueDepth, resolveQueueSettings } from "./queue.js";
|
||||
import { resolveSubagentLabel } from "./subagents-utils.js";
|
||||
|
||||
@@ -247,6 +247,13 @@ export async function buildStatusReply(params: {
|
||||
subagentsLine,
|
||||
mediaDecisions: params.mediaDecisions,
|
||||
includeTranscriptUsage: false,
|
||||
transcriptInfo: getTranscriptInfo({
|
||||
sessionId: sessionEntry?.sessionId,
|
||||
sessionEntry,
|
||||
agentId: statusAgentId,
|
||||
sessionKey,
|
||||
storePath,
|
||||
}),
|
||||
});
|
||||
|
||||
return { text: statusText };
|
||||
|
||||
Reference in New Issue
Block a user