diff --git a/desktop/src/components/chat/LocalSlashCommandPanel.tsx b/desktop/src/components/chat/LocalSlashCommandPanel.tsx index 3f7b83f0..71fc6408 100644 --- a/desktop/src/components/chat/LocalSlashCommandPanel.tsx +++ b/desktop/src/components/chat/LocalSlashCommandPanel.tsx @@ -375,36 +375,37 @@ function CategoryBreakdown({ categories, rawMaxTokens, t }: { categories: Contex
{t('slash.inspector.context.categoryTitle')}
- {visibleCategories.map((category) => { - const percent = rawMaxTokens > 0 ? (category.tokens / rawMaxTokens) * 100 : 0 - const muted = isCapacityCategory(category) - return ( -
-
-
- - {category.name} - + {visibleCategories.map((category) => { + const percent = rawMaxTokens > 0 ? (category.tokens / rawMaxTokens) * 100 : 0 + const muted = isCapacityCategory(category) + return ( +
+
+
+ + {category.name} + +
+
+
{formatNumber(category.tokens)}
+
{formatPercent(percent)}
+
-
-
{formatNumber(category.tokens)}
+
+
-
-
-
-
- ) - })} + ) + })}
) @@ -459,6 +460,7 @@ function McpServerIcon({ status }: { status: string }) { function ContextOverview({ context, categories, t }: { context: SessionContextSnapshot; categories: ContextCategory[]; t: Translate }) { const usedPercent = Math.min(100, Math.max(0, context.percentage)) const freeTokens = Math.max(0, context.rawMaxTokens - context.totalTokens) + const freePercent = context.rawMaxTokens > 0 ? (freeTokens / context.rawMaxTokens) * 100 : 0 return (
@@ -476,7 +478,7 @@ function ContextOverview({ context, categories, t }: { context: SessionContextSn
- +