Skip to content

Commit 3597fbe

Browse files
committed
Rename the code-completions feature to code-at-cursor throughout the application and documentation
1 parent af5a089 commit 3597fbe

14 files changed

Lines changed: 28 additions & 28 deletions

File tree

apps/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "Connect VS Code with chatbots (CWC)",
5-
"version": "1.771.0",
5+
"version": "1.772.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

apps/editor/src/views/i18n/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const translations = {
88
'settings.sidebar.model-providers': 'Model Providers',
99
'settings.sidebar.api-tools': 'API Tools',
1010
'settings.sidebar.edit-context': 'Edit Context',
11-
'settings.sidebar.code-completions': 'Code Completions',
11+
'settings.sidebar.code-at-cursor': 'Code at Cursor',
1212
'settings.sidebar.intelligent-update': 'Intelligent Update',
1313
'settings.sidebar.prune-context': 'Prune Context',
1414
'settings.sidebar.commit-messages': 'Commit Messages'

apps/editor/src/views/panel/backend/panel-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
771771
} else if (message.command == 'UPSERT_CONFIGURATION') {
772772
const tool_type_map: Record<string, string> = {
773773
'edit-context': 'edit-context',
774-
'code-at-cursor': 'code-completions',
774+
'code-at-cursor': 'code-at-cursor',
775775
'prune-context': 'prune-context'
776776
}
777777
await upsert_configuration({
@@ -784,7 +784,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
784784
} else if (message.command == 'DELETE_CONFIGURATION') {
785785
const tool_type_map: Record<string, any> = {
786786
'edit-context': 'edit-context',
787-
'code-at-cursor': 'code-completions',
787+
'code-at-cursor': 'code-at-cursor',
788788
'prune-context': 'prune-context'
789789
}
790790
await delete_configuration(

apps/editor/src/views/settings/backend/message-handlers/handle-delete-configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const handle_delete_configuration = async (
55
provider: SettingsProvider,
66
configuration_id: string,
77
type:
8-
| 'code-completions'
8+
| 'code-at-cursor'
99
| 'edit-context'
1010
| 'intelligent-update'
1111
| 'commit-messages'

apps/editor/src/views/settings/backend/message-handlers/handle-get-configurations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const create_description = (config: ToolConfig): string => {
2020
export const handle_get_configurations = async (
2121
provider: SettingsProvider,
2222
type:
23-
| 'code-completions'
23+
| 'code-at-cursor'
2424
| 'edit-context'
2525
| 'intelligent-update'
2626
| 'commit-messages'
@@ -33,7 +33,7 @@ export const handle_get_configurations = async (
3333
let command: string
3434

3535
switch (type) {
36-
case 'code-completions':
36+
case 'code-at-cursor':
3737
saved_configs =
3838
await providers_manager.get_code_completions_tool_configs()
3939
default_config =

apps/editor/src/views/settings/backend/message-handlers/handle-reorder-configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const handle_reorder_configuration = async (
99
provider: SettingsProvider,
1010
configurations: { id: string }[],
1111
type:
12-
| 'code-completions'
12+
| 'code-at-cursor'
1313
| 'edit-context'
1414
| 'intelligent-update'
1515
| 'commit-messages'
@@ -21,7 +21,7 @@ export const handle_reorder_configuration = async (
2121
let save_configs: (configs: ToolConfig[]) => Promise<void>
2222

2323
switch (type) {
24-
case 'code-completions':
24+
case 'code-at-cursor':
2525
get_configs = () => providers_manager.get_code_completions_tool_configs()
2626
save_configs = (c) =>
2727
providers_manager.save_code_completions_tool_configs(c)

apps/editor/src/views/settings/backend/message-handlers/handle-set-default-configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const handle_set_default_configuration = async (
99
provider: SettingsProvider,
1010
configuration_id: string | null,
1111
type:
12-
| 'code-completions'
12+
| 'code-at-cursor'
1313
| 'intelligent-update'
1414
| 'commit-messages'
1515
| 'prune-context'
@@ -20,7 +20,7 @@ export const handle_set_default_configuration = async (
2020
let set_default_config: (config: ToolConfig | null) => Promise<void>
2121

2222
switch (type) {
23-
case 'code-completions':
23+
case 'code-at-cursor':
2424
get_configs = () => providers_manager.get_code_completions_tool_configs()
2525
set_default_config = (c) =>
2626
providers_manager.set_default_code_completions_config(c)

apps/editor/src/views/settings/backend/settings-provider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,28 +121,28 @@ export class SettingsProvider {
121121
} else if (message.command == 'CHANGE_MODEL_PROVIDER_KEY') {
122122
await handle_change_model_provider_key(this, message)
123123
} else if (message.command == 'GET_CODE_COMPLETIONS_CONFIGURATIONS') {
124-
await handle_get_configurations(this, 'code-completions')
124+
await handle_get_configurations(this, 'code-at-cursor')
125125
} else if (
126126
message.command == 'REORDER_CODE_COMPLETIONS_CONFIGURATIONS'
127127
) {
128128
await handle_reorder_configuration(
129129
this,
130130
message.configurations,
131-
'code-completions'
131+
'code-at-cursor'
132132
)
133133
} else if (message.command == 'DELETE_CODE_COMPLETIONS_CONFIGURATION') {
134134
await handle_delete_configuration(
135135
this,
136136
message.configuration_id,
137-
'code-completions'
137+
'code-at-cursor'
138138
)
139139
} else if (
140140
message.command == 'SET_DEFAULT_CODE_COMPLETIONS_CONFIGURATION'
141141
) {
142142
await handle_set_default_configuration(
143143
this,
144144
message.configuration_id,
145-
'code-completions'
145+
'code-at-cursor'
146146
)
147147
} else if (message.command == 'GET_EDIT_CONTEXT_CONFIGURATIONS') {
148148
await handle_get_configurations(this, 'edit-context')
@@ -304,7 +304,7 @@ export class SettingsProvider {
304304
vscode.workspace.onDidChangeConfiguration((e) => {
305305
if (e.affectsConfiguration('codeWebChat')) {
306306
void handle_get_model_providers(this)
307-
void handle_get_configurations(this, 'code-completions')
307+
void handle_get_configurations(this, 'code-at-cursor')
308308
void handle_get_configurations(this, 'commit-messages')
309309
void handle_get_configurations(this, 'edit-context')
310310
void handle_get_edit_context_system_instructions(this)

apps/editor/src/views/settings/frontend/Home/Home.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type NavItem =
2222
| 'general'
2323
| 'model-providers'
2424
| 'edit-context'
25-
| 'code-completions'
25+
| 'code-at-cursor'
2626
| 'intelligent-update'
2727
| 'prune-context'
2828
| 'commit-messages'
@@ -56,8 +56,8 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
5656
},
5757
{
5858
type: 'item',
59-
id: 'code-completions',
60-
label: 'settings.sidebar.code-completions'
59+
id: 'code-at-cursor',
60+
label: 'settings.sidebar.code-at-cursor'
6161
},
6262
{
6363
type: 'item',
@@ -144,7 +144,7 @@ export const Home: React.FC<Props> = (props) => {
144144
'edit-context': null,
145145
'intelligent-update': null,
146146
'prune-context': null,
147-
'code-completions': null,
147+
'code-at-cursor': null,
148148
'commit-messages': null
149149
})
150150
const [commit_instructions, set_commit_instructions] = useState('')
@@ -185,7 +185,7 @@ export const Home: React.FC<Props> = (props) => {
185185
[handle_stuck_change]
186186
)
187187
const code_completions_on_stuck_change = useCallback(
188-
(is_stuck: boolean) => handle_stuck_change('code-completions', is_stuck),
188+
(is_stuck: boolean) => handle_stuck_change('code-at-cursor', is_stuck),
189189
[handle_stuck_change]
190190
)
191191
const intelligent_update_on_stuck_change = useCallback(
@@ -466,7 +466,7 @@ export const Home: React.FC<Props> = (props) => {
466466
</Group>
467467
</Section>
468468
<Section
469-
ref={(el) => (section_refs.current['code-completions'] = el)}
469+
ref={(el) => (section_refs.current['code-at-cursor'] = el)}
470470
group="API Tool"
471471
title="Code at Cursor"
472472
subtitle="Get accurate inline suggestions from state-of-the-art models."

apps/editor/src/views/settings/frontend/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Home } from './Home/Home'
77
type NavItem =
88
| 'general'
99
| 'model-providers'
10-
| 'code-completions'
10+
| 'code-at-cursor'
1111
| 'edit-context'
1212
| 'intelligent-update'
1313
| 'prune-context'

0 commit comments

Comments
 (0)