Skip to content

Commit b634e84

Browse files
committed
Rename "code-completions" to "code-at-cursor" and "ask" to "ask-about-context" across all related types, variables, and UI elements
1 parent 615268f commit b634e84

46 files changed

Lines changed: 201 additions & 287 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/browser/src/content-scripts/send-prompt-content-script/send-prompt-content-script.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ const main = async () => {
197197
raw_instructions?: string
198198
edit_format?: string
199199
mode?:
200-
| 'ask'
200+
| 'ask-about-context'
201201
| 'edit-context'
202-
| 'code-completions'
202+
| 'code-at-cursor'
203203
| 'no-context'
204204
| 'prune-context'
205205
}
@@ -236,7 +236,7 @@ const main = async () => {
236236
if (
237237
chatbot?.inject_apply_response_button &&
238238
(stored_data.mode == 'edit-context' ||
239-
stored_data.mode == 'code-completions' ||
239+
stored_data.mode == 'code-at-cursor' ||
240240
stored_data.mode == 'prune-context')
241241
) {
242242
sessionStorage.setItem(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export type SupportedTool =
2-
| 'code-completions'
2+
| 'code-at-cursor'
33
| 'edit-context'
44
| 'intelligent-update'
55
| 'commit-messages'
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
export type WebPromptType =
2-
| 'ask'
2+
| 'ask-about-context'
33
| 'edit-context'
4-
| 'code-completions'
4+
| 'code-at-cursor'
55
| 'no-context'
66
| 'prune-context'
77

8-
export type ApiPromptType =
9-
| 'edit-context'
10-
| 'code-completions'
11-
| 'prune-context'
8+
export type ApiPromptType = 'edit-context' | 'code-at-cursor' | 'prune-context'

‎packages/ui/src/components/editor/panel/Configurations/Configurations.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export namespace Configurations {
1616
}
1717

1818
export type Props = {
19-
api_prompt_type: 'edit-context' | 'code-completions' | 'prune-context'
19+
api_prompt_type: 'edit-context' | 'code-at-cursor' | 'prune-context'
2020
configurations: Configuration[]
2121
on_configuration_click: (id: string) => void
2222
on_reorder?: (configurations: Configuration[]) => void

‎packages/ui/src/components/editor/panel/Presets/Presets.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export namespace Presets {
4444

4545
export type Props = {
4646
web_prompt_type:
47-
| 'ask'
47+
| 'ask-about-context'
4848
| 'edit-context'
49-
| 'code-completions'
49+
| 'code-at-cursor'
5050
| 'no-context'
5151
| 'prune-context'
5252
is_connected: boolean

‎packages/vscode/src/commands/code-completion-commands.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const get_code_completion_config = async (
228228
if (panel_provider) {
229229
panel_provider.send_message({
230230
command: 'SELECTED_CONFIGURATION_CHANGED',
231-
mode: 'code-completions',
231+
mode: 'code-at-cursor',
232232
id: selected.id
233233
})
234234
}

‎packages/vscode/src/views/panel/backend/message-handlers/handle-at-sign-quick-pick/handle-at-sign-quick-pick.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,13 @@ export const handle_at_sign_quick_pick = async (
278278
panel_provider.mode == MODE.WEB
279279
? panel_provider.web_prompt_type
280280
: panel_provider.api_prompt_type
281-
if (mode == 'ask') {
281+
if (mode == 'ask-about-context') {
282282
current_text = panel_provider.ask_about_context_instructions
283283
} else if (mode == 'edit-context') {
284284
current_text = panel_provider.edit_context_instructions
285285
} else if (mode == 'no-context') {
286286
current_text = panel_provider.no_context_instructions
287-
} else if (mode == 'code-completions') {
287+
} else if (mode == 'code-at-cursor') {
288288
current_text = panel_provider.code_at_cursor_instructions
289289
} else if (mode == 'prune-context') {
290290
current_text = panel_provider.prune_context_instructions

‎packages/vscode/src/views/panel/backend/message-handlers/handle-code-completion.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const get_code_completion_config = async (
6060
if (panel_provider) {
6161
panel_provider.send_message({
6262
command: 'SELECTED_CONFIGURATION_CHANGED',
63-
mode: 'code-completions',
63+
mode: 'code-at-cursor',
6464
id: config_id
6565
})
6666
}
@@ -209,7 +209,7 @@ const get_code_completion_config = async (
209209
if (panel_provider) {
210210
panel_provider.send_message({
211211
command: 'SELECTED_CONFIGURATION_CHANGED',
212-
mode: 'code-completions',
212+
mode: 'code-at-cursor',
213213
id: selected.id
214214
})
215215
}

‎packages/vscode/src/views/panel/backend/message-handlers/handle-copy-prompt.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export const handle_copy_prompt = async (params: {
4747

4848
const is_in_code_completions_prompt_type =
4949
(params.panel_provider.mode == MODE.WEB &&
50-
params.panel_provider.web_prompt_type == 'code-completions') ||
50+
params.panel_provider.web_prompt_type == 'code-at-cursor') ||
5151
(params.panel_provider.mode == MODE.API &&
52-
params.panel_provider.api_prompt_type == 'code-completions')
52+
params.panel_provider.api_prompt_type == 'code-at-cursor')
5353

5454
if (
5555
is_in_code_completions_prompt_type &&

packages/vscode/src/views/panel/backend/message-handlers/handle-get-mode-api.ts renamed to packages/vscode/src/views/panel/backend/message-handlers/handle-get-api-prompt-type.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { PanelProvider } from '@/views/panel/backend/panel-provider'
22

3-
export const handle_get_mode_api = (panel_provider: PanelProvider): void => {
3+
export const handle_get_api_prompt_type = (
4+
panel_provider: PanelProvider
5+
): void => {
46
panel_provider.send_message({
57
command: 'API_PROMPT_TYPE',
68
mode: panel_provider.api_prompt_type

0 commit comments

Comments
 (0)