|
|
@@ -197,13 +197,8 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
|
|
|
|
|
|
// Add context tokens information.
|
|
|
const { contextTokens, totalCost } = getApiMetrics(cline.clineMessages)
|
|
|
- const { id: modelId, info: modelInfo } = cline.api.getModel()
|
|
|
- const contextWindow = modelInfo.contextWindow
|
|
|
+ const { id: modelId } = cline.api.getModel()
|
|
|
|
|
|
- const contextPercentage =
|
|
|
- contextTokens && contextWindow ? Math.round((contextTokens / contextWindow) * 100) : undefined
|
|
|
-
|
|
|
- details += `\n\n# Current Context Size (Tokens)\n${contextTokens ? `${contextTokens.toLocaleString()} (${contextPercentage}%)` : "(Not available)"}`
|
|
|
details += `\n\n# Current Cost\n${totalCost !== null ? `$${totalCost.toFixed(2)}` : "(Not available)"}`
|
|
|
|
|
|
// Add current mode and any mode-specific warnings.
|