context: format cached context window

This commit is contained in:
Josh Lehman
2026-03-31 21:28:34 -07:00
parent d865a96015
commit c1cae20d69

View File

@@ -192,10 +192,11 @@ export async function buildContextReply(params: HandleCommandsParams): Promise<R
]
: [];
const contextWindowLabel = session.contextTokens != null ? formatInt(session.contextTokens) : "?";
const totalsLine =
cachedContextUsageTokens != null
? `Session tokens (cached): ${formatInt(cachedContextUsageTokens)} total / ctx=${session.contextTokens ?? "?"}`
: `Session tokens (cached): unknown / ctx=${session.contextTokens ?? "?"}`;
? `Session tokens (cached): ${formatInt(cachedContextUsageTokens)} total / ctx=${contextWindowLabel}`
: `Session tokens (cached): unknown / ctx=${contextWindowLabel}`;
const sharedContextLines = [
`Workspace: ${workspaceLabel}`,
`Bootstrap max/file: ${bootstrapMaxLabel}`,