diff --git a/ui/src/components/ChatInterface.tsx b/ui/src/components/ChatInterface.tsx index 9ad2333762f9b4e2152564349f70eaf9a2b24189..37be15e72b6f363a73bf8993303b6d1db7e87ef2 100644 --- a/ui/src/components/ChatInterface.tsx +++ b/ui/src/components/ChatInterface.tsx @@ -37,6 +37,7 @@ function ContextUsageBar({ contextWindowSize, maxContextTokens }: ContextUsageBa const percentage = maxContextTokens > 0 ? (contextWindowSize / maxContextTokens) * 100 : 0; const clampedPercentage = Math.min(percentage, 100); + const showLongConversationWarning = contextWindowSize >= 100000; const getBarColor = () => { if (percentage >= 90) return "var(--error-text)"; @@ -104,20 +105,37 @@ function ContextUsageBar({ contextWindowSize, maxContextTokens }: ContextUsageBa > {formatTokens(contextWindowSize)} / {formatTokens(maxContextTokens)} ( {percentage.toFixed(1)}%) tokens used + {showLongConversationWarning && ( +