mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 07:51:26 +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
@@ -3,7 +3,7 @@ import type { OpenClawConfig } from "../../config/config.js";
|
||||
import type { AnyAgentTool } from "./common.js";
|
||||
import { normalizeGroupActivation } from "../../auto-reply/group-activation.js";
|
||||
import { getFollowupQueueDepth, resolveQueueSettings } from "../../auto-reply/reply/queue.js";
|
||||
import { buildStatusMessage } from "../../auto-reply/status.js";
|
||||
import { buildStatusMessage, getTranscriptInfo } from "../../auto-reply/status.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
@@ -458,6 +458,13 @@ export function createSessionStatusTool(opts?: {
|
||||
showDetails: queueOverrides,
|
||||
},
|
||||
includeTranscriptUsage: false,
|
||||
transcriptInfo: getTranscriptInfo({
|
||||
sessionId: resolved.entry?.sessionId,
|
||||
sessionEntry: resolved.entry,
|
||||
agentId,
|
||||
sessionKey: resolved.key,
|
||||
storePath,
|
||||
}),
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user