|
|
@@ -6,7 +6,7 @@ import { useTranslation } from "react-i18next"
|
|
|
import { vscode } from "@/utils/vscode"
|
|
|
import { formatLargeNumber } from "@/utils/format"
|
|
|
import { calculateTokenDistribution, getMaxTokensForModel } from "@/utils/model-utils"
|
|
|
-import { Button, Badge } from "@/components/ui"
|
|
|
+import { Button } from "@/components/ui"
|
|
|
|
|
|
import { ClineMessage } from "../../../../src/shared/ExtensionMessage"
|
|
|
import { mentionRegexGlobal } from "../../../../src/shared/context-mentions"
|
|
|
@@ -17,6 +17,7 @@ import Thumbnails from "../common/Thumbnails"
|
|
|
import { normalizeApiConfiguration } from "../settings/ApiOptions"
|
|
|
import { DeleteTaskDialog } from "../history/DeleteTaskDialog"
|
|
|
import { cn } from "@/lib/utils"
|
|
|
+import { VSCodeBadge } from "@vscode/webview-ui-toolkit/react"
|
|
|
|
|
|
interface TaskHeaderProps {
|
|
|
task: ClineMessage
|
|
|
@@ -95,7 +96,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
|
|
|
contextTokens={contextTokens || 0}
|
|
|
maxTokens={getMaxTokensForModel(selectedModelInfo, apiConfiguration)}
|
|
|
/>
|
|
|
- {!!totalCost && <Badge>${totalCost.toFixed(2)}</Badge>}
|
|
|
+ {!!totalCost && <VSCodeBadge>${totalCost.toFixed(2)}</VSCodeBadge>}
|
|
|
</div>
|
|
|
)}
|
|
|
{/* Expanded state: Show task text and images */}
|
|
|
@@ -278,7 +279,7 @@ const ContextWindowProgress = ({ contextWindow, contextTokens, maxTokens }: Cont
|
|
|
/>
|
|
|
|
|
|
{/* Main progress bar container */}
|
|
|
- <div className="flex items-center h-1 rounded-[2px] overflow-hidden w-full bg-[color-mix(in_srgb,var(--vscode-badge-foreground)_20%,transparent)]">
|
|
|
+ <div className="flex items-center h-1 rounded-[2px] overflow-hidden w-full bg-[color-mix(in_srgb,var(--vscode-foreground)_20%,transparent)]">
|
|
|
{/* Current tokens container */}
|
|
|
<div className="relative h-full" style={{ width: `${currentPercent}%` }}>
|
|
|
{/* Invisible overlay for current tokens section */}
|
|
|
@@ -291,7 +292,7 @@ const ContextWindowProgress = ({ contextWindow, contextTokens, maxTokens }: Cont
|
|
|
data-testid="context-tokens-used"
|
|
|
/>
|
|
|
{/* Current tokens used - darkest */}
|
|
|
- <div className="h-full w-full bg-[var(--vscode-badge-foreground)] transition-width duration-300 ease-out" />
|
|
|
+ <div className="h-full w-full bg-[var(--vscode-foreground)] transition-width duration-300 ease-out" />
|
|
|
</div>
|
|
|
|
|
|
{/* Container for reserved tokens */}
|
|
|
@@ -305,7 +306,7 @@ const ContextWindowProgress = ({ contextWindow, contextTokens, maxTokens }: Cont
|
|
|
data-testid="context-reserved-tokens"
|
|
|
/>
|
|
|
{/* Reserved for output section - medium gray */}
|
|
|
- <div className="h-full w-full bg-[color-mix(in_srgb,var(--vscode-badge-foreground)_30%,transparent)] transition-width duration-300 ease-out" />
|
|
|
+ <div className="h-full w-full bg-[color-mix(in_srgb,var(--vscode-foreground)_30%,transparent)] transition-width duration-300 ease-out" />
|
|
|
</div>
|
|
|
|
|
|
{/* Empty section (if any) */}
|