Skip to content

Commit edb96c6

Browse files
committed
fix: removing contextLimit test and removing token management in translations
1 parent 7e5a59d commit edb96c6

File tree

3 files changed

+2
-52
lines changed

3 files changed

+2
-52
lines changed

src/api/providers/__tests__/gemini-handler.spec.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
import { describe, it, expect, vi } from "vitest"
22
import { GeminiHandler } from "../gemini"
33
import type { ApiHandlerOptions } from "../../../shared/api"
4-
import type { Anthropic } from "@anthropic-ai/sdk"
54

65
describe("GeminiHandler backend support", () => {
7-
it("slices messages when contextLimit is set", async () => {
8-
const options = { apiProvider: "gemini", contextLimit: 1 } as ApiHandlerOptions
9-
const handler = new GeminiHandler(options)
10-
const stub = vi.fn().mockReturnValue((async function* () {})())
11-
// @ts-ignore access private client
12-
handler["client"].models.generateContentStream = stub
13-
const messages = [
14-
{ role: "user", content: [{ type: "text", text: "first" }] },
15-
{ role: "assistant", content: [{ type: "text", text: "second" }] },
16-
] as Anthropic.Messages.MessageParam[]
17-
for await (const _ of handler.createMessage("instr", messages)) {
18-
}
19-
expect(stub).toHaveBeenCalledOnce()
20-
const params = stub.mock.calls[0][0]
21-
expect(params.contents).toHaveLength(1)
22-
})
23-
246
it("passes maxOutputTokens, topP, topK, and tools for URL context and grounding in config", async () => {
257
const options = {
268
apiProvider: "gemini",

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,7 @@
250250
},
251251
"geminiSections": {
252252
"modelParameters": "Paràmetres del model",
253-
"advancedFeatures": "Funcions avançades",
254-
"geminiTokentManagement": "Gestió de tokens"
255-
},
256-
"geminiTokentManagement": {
257-
"useCustomContextWindow": "Use custom context window limit",
258-
"description": "Override the model's default context window.",
259-
"modelDefault": "Model's default context window",
260-
"condensingThreshold": {
261-
"tokens": "tokens",
262-
"title": "Context Condensing Threshold",
263-
"description": "Set the percentage of context window usage that triggers automatic condensing. Note: If the calculated token limit (after reserving space for output and safety buffers) is lower than this percentage, the token limit will trigger condensing instead.",
264-
"condensingtriggerAt": "Condensing will trigger at",
265-
"tokenLimitTriggered": "due to token limit, not percentage",
266-
"availableContext": "Available context window",
267-
"tokenLimitTrigger": "Token limit trigger (after reserving output tokens and safety buffer)",
268-
"actualTrigger": "Actual trigger (minimum of percentage and token limit)"
269-
}
253+
"advancedFeatures": "Funcions avançades"
270254
},
271255
"googleCloudSetup": {
272256
"title": "Per utilitzar Google Cloud Vertex AI, necessiteu:",
@@ -366,21 +350,6 @@
366350
"pathLabel": "Ruta del Codi Claude",
367351
"description": "Ruta opcional al teu CLI de Claude Code. Per defecte, 'claude' si no s'estableix.",
368352
"placeholder": "Per defecte: claude"
369-
},
370-
"geminiContextManagement": {
371-
"useCustomContextWindow": "Use custom context window limit",
372-
"description": "Override the model's default context window.",
373-
"modelDefault": "Model's default context window",
374-
"condensingThreshold": {
375-
"tokens": "tokens",
376-
"title": "Context Condensing Threshold",
377-
"description": "Set the percentage of context window usage that triggers automatic condensing. Note: If the calculated token limit (after reserving space for output and safety buffers) is lower than this percentage, the token limit will trigger condensing instead.",
378-
"condensingtriggerAt": "Condensing will trigger at",
379-
"tokenLimitTriggered": "due to token limit, not percentage",
380-
"availableContext": "Available context window",
381-
"tokenLimitTrigger": "Token limit trigger (after reserving output tokens and safety buffer)",
382-
"actualTrigger": "Actual trigger (minimum of percentage and token limit)"
383-
}
384353
}
385354
},
386355
"browser": {

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@
224224
"vscodeLmWarning": "Note: This is a very experimental integration and provider support will vary. If you get an error about a model not being supported, that's an issue on the provider's end.",
225225
"geminiSections": {
226226
"modelParameters": "Model Parameters",
227-
"advancedFeatures": "Advanced Features",
228-
"geminiTokentManagement": "Token Management"
227+
"advancedFeatures": "Advanced Features"
229228
},
230229
"geminiParameters": {
231230
"topK": {

0 commit comments

Comments
 (0)