fix(context): expose history tokens and remove leaked state files

Address remaining review feedback: 1) Add HistoryTokens field to ContextUsage/ContextStats, showing history-only token count in /context and frontend UI alongside SummarizeAtTokens so users can see the actual summarization trigger comparison. 2) Remove .codebuddy/github-contribute/ state files accidentally included in the PR.
This commit is contained in:
程智超0668000959 committed 2026-06-06 00:28:32 +08:00
1 parent b6030f054d
commit 7a7e205cc8
15 files changed
+25 -90

No files matched your search

@@ -146,6 +146,14 @@ export function ContextUsageRing({
</div>
<div className="mt-2 space-y-0.5">
{usage.history_tokens != null && usage.history_tokens > 0 && (
<div className="flex items-center justify-between text-[10px]">
<span className="text-muted-foreground">History</span>
<span className="tabular-nums">
{formatTokens(usage.history_tokens)}
</span>
</div>
)}
<div className="flex items-center justify-between text-[10px]">
<span className="text-muted-foreground">{t("chat.contextCompressAt")}</span>
<span className="tabular-nums">