From d13fea23881a63d75db47bfdfeb74b99f94abf71 Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Wed, 17 Dec 2025 18:10:15 +0000 Subject: [PATCH] feat: add auto-compaction threshold indicator to context bar Shows a small vertical tick mark on the context usage bar at the auto-compaction threshold position. Hidden when disabled. --- .../ContextUsageIndicatorButton.tsx | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/browser/components/ContextUsageIndicatorButton.tsx b/src/browser/components/ContextUsageIndicatorButton.tsx index ec509f1e16..4c2187eee1 100644 --- a/src/browser/components/ContextUsageIndicatorButton.tsx +++ b/src/browser/components/ContextUsageIndicatorButton.tsx @@ -6,6 +6,18 @@ import { TokenMeter } from "./RightSidebar/TokenMeter"; import type { AutoCompactionConfig } from "./RightSidebar/ThresholdSlider"; import { formatTokens, type TokenMeterData } from "@/common/utils/tokens/tokenMeterUtils"; +/** Compact threshold tick mark for the button view */ +const CompactThresholdIndicator: React.FC<{ threshold: number }> = ({ threshold }) => { + if (threshold >= 100) return null; + + return ( +
+ ); +}; + interface ContextUsageIndicatorButtonProps { data: TokenMeterData; autoCompaction?: AutoCompactionConfig; @@ -19,6 +31,8 @@ export const ContextUsageIndicatorButton: React.FC