Skip to content

Commit ff1e8ac

Browse files
SannidhyaSahmrubensdaniel-lxs
authored
fix: remove context size from environment details (RooCodeInc#5165) (RooCodeInc#5312)
Co-authored-by: Matt Rubens <[email protected]> Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Daniel <[email protected]>
1 parent 781beeb commit ff1e8ac

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/core/environment/__tests__/getEnvironmentDetails.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ describe("getEnvironmentDetails", () => {
146146
expect(result).toContain("# VSCode Visible Files")
147147
expect(result).toContain("# VSCode Open Tabs")
148148
expect(result).toContain("# Current Time")
149-
expect(result).toContain("# Current Context Size (Tokens)")
150149
expect(result).toContain("# Current Cost")
151150
expect(result).toContain("# Current Mode")
152151
expect(result).toContain("<model>test-model</model>")

src/core/environment/getEnvironmentDetails.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,8 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
197197

198198
// Add context tokens information.
199199
const { contextTokens, totalCost } = getApiMetrics(cline.clineMessages)
200-
const { id: modelId, info: modelInfo } = cline.api.getModel()
201-
const contextWindow = modelInfo.contextWindow
200+
const { id: modelId } = cline.api.getModel()
202201

203-
const contextPercentage =
204-
contextTokens && contextWindow ? Math.round((contextTokens / contextWindow) * 100) : undefined
205-
206-
details += `\n\n# Current Context Size (Tokens)\n${contextTokens ? `${contextTokens.toLocaleString()} (${contextPercentage}%)` : "(Not available)"}`
207202
details += `\n\n# Current Cost\n${totalCost !== null ? `$${totalCost.toFixed(2)}` : "(Not available)"}`
208203

209204
// Add current mode and any mode-specific warnings.

0 commit comments

Comments
 (0)