File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,20 @@ export const CompactionWarning: React.FC<{
2121 // At threshold or above, next message will trigger compaction
2222 const willCompactNext = props . usagePercentage >= props . thresholdPercentage ;
2323
24- // Calculate remaining percentage until threshold
25- const remaining = props . thresholdPercentage - props . usagePercentage ;
26-
27- const message = willCompactNext
28- ? "⚠️ Context limit reached. Next message will trigger auto-compaction."
29- : `Context left until Auto-Compact: ${ Math . round ( remaining ) } %` ;
24+ // Urgent warning at/above threshold - prominent blue box
25+ if ( willCompactNext ) {
26+ return (
27+ < div className = "text-plan-mode bg-plan-mode/10 mx-4 my-4 rounded-sm px-4 py-3 text-center text-xs font-medium" >
28+ ⚠️ Context limit reached. Next message will trigger auto-compaction.
29+ </ div >
30+ ) ;
31+ }
3032
33+ // Countdown warning below threshold - subtle grey text, right-aligned
34+ const remaining = props . thresholdPercentage - props . usagePercentage ;
3135 return (
32- < div className = "text-plan-mode bg-plan-mode/10 mx-4 my-4 rounded-sm px-4 py-3 text-center text-xs font-medium " >
33- { message }
36+ < div className = "text-muted mx-4 mt-2 mb-1 text-right text-[10px] " >
37+ Context left until Auto-Compact: { Math . round ( remaining ) } %
3438 </ div >
3539 ) ;
3640} ;
You can’t perform that action at this time.
0 commit comments