Skip to content

Commit e43a7df

Browse files
committed
Rename Edit Context to Edit Files in README, dictionary, and handler logic
- rename 'edit context' to 'edit files'
1 parent b79d0b2 commit e43a7df

3 files changed

Lines changed: 25 additions & 28 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Install the [browser extension](https://github.com/robertpiosik/CodeWebChat/tree
145145
All the essential API tools to get the job done. Bring Your Own Key (BYOK) for a model provider of choice. Use self-hosted model provider like [Ollama](https://ollama.com/search) or [LM Studio](https://lmstudio.ai/).
146146

147147
- **Intelligent Update**—Integrate changes from malformed responses.
148-
- **Edit Context**—Pair-programming using natural language instructions.
148+
- **Edit Files**—Pair-programming using natural language instructions.
149149
- **Code at Cursor**—Accurate inline code from reasoning models.
150150
- **Find Relevant Files**—Find files using natural language description.
151151
- **Commit Messages**—Meaningful summaries of changes in your style.

‎apps/editor/src/views/panel/backend/message-handlers/handle-edit-files.ts‎

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const get_edit_files_api_configuration = async (params: {
3838
| { model_provider: ModelProvider; api_configuration: ApiConfiguration }
3939
| undefined
4040
> => {
41-
const edit_context_api_configurations =
41+
const edit_files_api_configurations =
4242
await params.model_providers_manager.get_api_configurations()
4343

44-
if (edit_context_api_configurations.length == 0) {
44+
if (edit_files_api_configurations.length == 0) {
4545
vscode.commands.executeCommand('codeWebChat.settings')
4646
vscode.window.showInformationMessage(
47-
dictionary.information_message.NO_EDIT_CONTEXT_CONFIGURATIONS_FOUND
47+
dictionary.information_message.NO_EDIT_FILES_CONFIGURATIONS_FOUND
4848
)
4949
return
5050
}
@@ -53,7 +53,7 @@ const get_edit_files_api_configuration = async (params: {
5353

5454
if (params.api_configuration_id !== undefined) {
5555
selected_api_configuration =
56-
edit_context_api_configurations.find(
56+
edit_files_api_configurations.find(
5757
(c) => get_api_configuration_id(c) == params.api_configuration_id
5858
) || null
5959
if (selected_api_configuration) {
@@ -77,7 +77,7 @@ const get_edit_files_api_configuration = async (params: {
7777

7878
if (last_selected_id) {
7979
selected_api_configuration =
80-
edit_context_api_configurations.find(
80+
edit_files_api_configurations.find(
8181
(c) => get_api_configuration_id(c) == last_selected_id
8282
) || null
8383
}
@@ -89,7 +89,7 @@ const get_edit_files_api_configuration = async (params: {
8989
)
9090

9191
const result = await show_api_configuration_quick_pick({
92-
api_configurations: edit_context_api_configurations,
92+
api_configurations: edit_files_api_configurations,
9393
last_selected_id
9494
})
9595

@@ -132,7 +132,7 @@ const get_edit_files_api_configuration = async (params: {
132132
)
133133
Logger.warn({
134134
function_name: 'get_edit_files_api_configuration',
135-
message: 'API provider not found for Edit Context tool.'
135+
message: 'API provider not found for Edit Files tool.'
136136
})
137137
return
138138
}
@@ -205,10 +205,8 @@ export const handle_edit_files = async (
205205
return
206206
}
207207

208-
const {
209-
model_provider,
210-
api_configuration: edit_context_api_configuration
211-
} = api_configuration_result
208+
const { model_provider, api_configuration: edit_files_api_configuration } =
209+
api_configuration_result
212210

213211
const endpoint_url = model_provider.base_url
214212

@@ -280,24 +278,24 @@ export const handle_edit_files = async (
280278
async () => {
281279
const body: { [key: string]: any } = {
282280
messages,
283-
model: edit_context_api_configuration.model,
284-
temperature: edit_context_api_configuration.temperature
281+
model: edit_files_api_configuration.model,
282+
temperature: edit_files_api_configuration.temperature
285283
}
286284

287285
apply_reasoning_effort({
288286
body,
289287
model_provider,
290-
reasoning_effort: edit_context_api_configuration.reasoning_effort
288+
reasoning_effort: edit_files_api_configuration.reasoning_effort
291289
})
292290

293291
try {
294292
const result = await panel_provider.api_manager.get({
295293
endpoint_url,
296294
api_key: model_provider.api_key,
297295
body,
298-
provider_name: edit_context_api_configuration.model_provider_name,
299-
model: edit_context_api_configuration.model,
300-
reasoning_effort: edit_context_api_configuration.reasoning_effort
296+
provider_name: edit_files_api_configuration.model_provider_name,
297+
model: edit_files_api_configuration.model,
298+
reasoning_effort: edit_files_api_configuration.reasoning_effort
301299
})
302300

303301
if (result) {
@@ -307,10 +305,9 @@ export const handle_edit_files = async (
307305
edit_format,
308306
recent_api_configuration: {
309307
model_provider:
310-
edit_context_api_configuration.model_provider_name,
311-
model: edit_context_api_configuration.model,
312-
reasoning_effort:
313-
edit_context_api_configuration.reasoning_effort
308+
edit_files_api_configuration.model_provider_name,
309+
model: edit_files_api_configuration.model,
310+
reasoning_effort: edit_files_api_configuration.reasoning_effort
314311
}
315312
})
316313
return true
@@ -322,12 +319,12 @@ export const handle_edit_files = async (
322319
}
323320
Logger.error({
324321
function_name: 'handle_edit_files',
325-
message: 'edit context task error',
322+
message: 'edit files task error',
326323
data: error
327324
})
328325
if (!error_occurred) {
329326
vscode.window.showErrorMessage(
330-
dictionary.error_message.EDIT_CONTEXT_ERROR
327+
dictionary.error_message.EDIT_FILES_ERROR
331328
)
332329
error_occurred = true
333330
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export const dictionary = {
7676
`No checked files in the "${folder_name}" repository for commit ${commit_hash}.`,
7777
NO_DEFAULT_INTELLIGENT_UPDATE_CONFIGURATION:
7878
'No default "Intelligent Update" configuration found. Please set one as default in the settings.',
79-
NO_EDIT_CONTEXT_CONFIGURATIONS_FOUND:
80-
'No "Edit Context" configurations found. Please add one in settings.',
79+
NO_EDIT_FILES_CONFIGURATIONS_FOUND:
80+
'No "Edit Files" configurations found. Please add one in settings.',
8181
DELETED_CONTEXT_FROM_ALL_ROOTS: 'Deleted context.',
8282
NO_HISTORY_FOR_PROMPT_TYPE:
8383
'No history to show for the current prompt type.',
@@ -362,8 +362,8 @@ export const dictionary = {
362362
API_KEY_MISSING: 'API key is missing. Please add it in the Settings tab.',
363363
CODE_COMPLETION_ERROR:
364364
'An error occurred during code completion. See console for details.',
365-
EDIT_CONTEXT_ERROR:
366-
'An error occurred during context editing. See console for details.',
365+
EDIT_FILES_ERROR:
366+
'An error occurred during file editing. See console for details.',
367367
CONFIGURATION_ALREADY_EXISTS: 'Identical configuration already exists.',
368368
CONFIGURATION_NOT_FOUND: 'Configuration not found.',
369369
APPLYING_CHANGES_GENERIC_ERROR: (msg: string) =>

0 commit comments

Comments
 (0)