Skip to content

Commit fd27e7a

Browse files
committed
Remove the context size warning threshold feature and related dictionary entries
1 parent d8e6ae0 commit fd27e7a

4 files changed

Lines changed: 2 additions & 38 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="https://marketplace.visualstudio.com/items?itemName=robertpiosik.gemini-coder" target="_blank"><img src="https://img.shields.io/badge/Install-VS_Code_Marketplace-blue" alt="Get from Visual Studio Code Marketplace" /></a> <a href="https://open-vsx.org/extension/robertpiosik/gemini-coder" target="_blank"><img src="https://img.shields.io/badge/Install-Open_VSX_Registry-a60ee5" alt="Get from Open VSX Registry" /></a> <a href="https://github.com/robertpiosik/CodeWebChat/blob/dev/LICENSE" target="_blank"><img src="https://img.shields.io/badge/License-GPL--3.0-green.svg" alt="GPL-3.0 license" /></a>
44

5-
CWC is a free AI coding extension for VS Code, Cursor, etc.
5+
CWC is a non-agentic AI coding extension for VS Code, Cursor, and others.
66

77
✅ **Send messages anywhere**
88

‎packages/shared/src/constants/dictionary.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ export const dictionary = {
152152
'Another checkpoint operation is currently in progress. Please wait for it to complete.',
153153
URL_OVERRIDE_DIFFERENT_DOMAIN: (preset_name: string) =>
154154
`URL override for preset "${preset_name}" was discarded because it uses a different domain.`,
155-
CONTEXT_SIZE_WARNING: (threshold: string, percentage: number) =>
156-
`Context exceeds threshold of ${threshold} tokens by ${percentage}%. Excessive context size affects accuracy and cost-efficiency.`,
157155
COULD_NOT_DELETE_CHECKPOINT_FILES: (message: string) =>
158156
`Could not delete checkpoint files: ${message}`,
159157
FAILED_TO_CREATE_FILE: (file_path: string) =>

‎packages/vscode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
4-
"description": "Initialize free chatbots with CWC",
4+
"description": "CWC initializes chatbots and makes API calls",
55
"version": "1.601.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",

‎packages/vscode/src/context/context-initialization.ts‎

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ export const context_initialization = async (
9797
}> => {
9898
await restore_duplicated_workspace_context(context)
9999

100-
let was_above_threshold = false
101-
102100
const workspace_folders = vscode.workspace.workspaceFolders ?? []
103101

104102
let workspace_view: vscode.TreeView<FileItem>
@@ -135,39 +133,7 @@ export const context_initialization = async (
135133
}
136134
context_view.badge = undefined
137135
}
138-
139-
let websites_token_count = 0
140-
if (websites_provider) {
141-
websites_token_count =
142-
websites_provider.get_checked_websites_token_count()
143-
}
144136
token_count_emitter.emit('token-count-updated')
145-
146-
const total_token_count = context_token_count + websites_token_count
147-
const config = vscode.workspace.getConfiguration('codeWebChat')
148-
const threshold = config.get<number>('contextSizeWarningThreshold')
149-
150-
if (threshold && threshold > 0) {
151-
const is_above_threshold = total_token_count > threshold
152-
if (is_above_threshold && !was_above_threshold) {
153-
const percentage_over = Math.round(
154-
((total_token_count - threshold) / threshold) * 100
155-
)
156-
const formatted_threshold =
157-
threshold >= 1000
158-
? `${Math.round(threshold / 1000)}K`
159-
: `${threshold}`
160-
vscode.window.showWarningMessage(
161-
dictionary.warning_message.CONTEXT_SIZE_WARNING(
162-
formatted_threshold,
163-
percentage_over
164-
)
165-
)
166-
}
167-
was_above_threshold = is_above_threshold
168-
} else {
169-
was_above_threshold = false
170-
}
171137
}
172138

173139
const shared_state = SharedFileState.get_instance()

0 commit comments

Comments
 (0)