Skip to content

Commit e3a24b3

Browse files
committed
Reorder prompt types alphabetically for consistency across all files and UI elements
1 parent 0480e5b commit e3a24b3

10 files changed

Lines changed: 13 additions & 30 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ const main = async () => {
200200
| 'ask-about-context'
201201
| 'edit-context'
202202
| 'code-at-cursor'
203-
| 'no-context'
204203
| 'prune-context'
204+
| 'no-context'
205205
}
206206

207207
if (!stored_data) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export const dictionary = {
8080
PRESET_PREVIEW_SENT_TO_BROWSER:
8181
'Preset preview sent to the connected browser.',
8282
DELETED_CONTEXT_FROM_ALL_ROOTS: 'Deleted context.',
83-
NO_HISTORY_FOR_MODE: 'No history to show for the current mode.',
83+
NO_HISTORY_FOR_PROMPT_TYPE:
84+
'No history to show for the current prompt type.',
8485
NO_TEXT_SELECTED_FOR_SELECTION_PLACEHOLDER:
8586
'No text selected for #Selection placeholder.',
8687
NOTHING_TO_DELETE: 'Nothing to delete.',

‎packages/shared/src/types/prompt-types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export type WebPromptType =
22
| 'ask-about-context'
33
| 'edit-context'
44
| 'code-at-cursor'
5-
| 'no-context'
65
| 'prune-context'
6+
| 'no-context'
77

88
export type ApiPromptType = 'edit-context' | 'code-at-cursor' | 'prune-context'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export namespace Presets {
4747
| 'ask-about-context'
4848
| 'edit-context'
4949
| 'code-at-cursor'
50-
| 'no-context'
5150
| 'prune-context'
51+
| 'no-context'
5252
is_connected: boolean
5353
has_instructions: boolean
5454
is_in_code_completions_mode: boolean

‎packages/ui/src/components/editor/panel/PromptField/utils/get-highlighted-text.tsx‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,6 @@ export const get_highlighted_text = (params: {
175175
const agent = skill_match[1]
176176
const repo = skill_match[2]
177177
const skill_name = skill_match[3]
178-
let title = `Skill: ${skill_name} (${agent})`
179-
180-
if (repo && repo != 'local') {
181-
const parts = repo.split(':')
182-
if (parts.length == 2) {
183-
title = `${parts[0]}/${parts[1]}`
184-
}
185-
}
186178

187179
return `<span class="${cn(
188180
styles['keyword'],
@@ -191,7 +183,7 @@ export const get_highlighted_text = (params: {
191183
agent
192184
)}" data-repo="${escape_html(repo)}" data-skill-name="${escape_html(
193185
skill_name
194-
)}" title="${escape_html(title)}"><span class="${
186+
)}"><span class="${
195187
styles['keyword__icon']
196188
}" data-role="keyword-icon"></span><span class="${
197189
styles['keyword__text']

‎packages/vscode/package.json‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -448,16 +448,6 @@
448448
"when": "view == codeWebChatViewWorkspace",
449449
"group": "navigation@3"
450450
},
451-
{
452-
"command": "codeWebChat.newFile",
453-
"when": "view == codeWebChatViewWorkspace",
454-
"group": "navigation@6"
455-
},
456-
{
457-
"command": "codeWebChat.newFolder",
458-
"when": "view == codeWebChatViewWorkspace",
459-
"group": "navigation@7"
460-
},
461451
{
462452
"command": "codeWebChat.collapseFolders",
463453
"when": "view == codeWebChatViewWorkspace",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const handle_show_history_quick_pick = async (
7373

7474
if (!history.length && !pinned_history.length) {
7575
vscode.window.showInformationMessage(
76-
dictionary.information_message.NO_HISTORY_FOR_MODE,
76+
dictionary.information_message.NO_HISTORY_FOR_PROMPT_TYPE,
7777
{ modal: true }
7878
)
7979
return
@@ -264,7 +264,7 @@ export const handle_show_history_quick_pick = async (
264264
if (updated_history.length == 0 && updated_pinned_history.length == 0) {
265265
quick_pick.hide()
266266
vscode.window.showInformationMessage(
267-
dictionary.information_message.NO_HISTORY_FOR_MODE,
267+
dictionary.information_message.NO_HISTORY_FOR_PROMPT_TYPE,
268268
{ modal: true }
269269
)
270270
return

‎packages/vscode/src/views/panel/backend/panel-provider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,9 @@ export class PanelProvider implements vscode.WebviewViewProvider {
766766
const config = vscode.workspace.getConfiguration('codeWebChat')
767767
const web_prompt_types: WebPromptType[] = [
768768
'ask-about-context',
769+
'prune-context',
769770
'edit-context',
770771
'code-at-cursor',
771-
'prune-context',
772772
'no-context'
773773
]
774774
const mode_to_config_key: Record<WebPromptType, string> = {

‎packages/vscode/src/views/panel/frontend/Main/MainView/prompt-type-labels.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { ApiPromptType, WebPromptType } from '@shared/types/prompt-types'
33
export const web_prompt_type_labels: Record<WebPromptType, string> = {
44
'edit-context': 'Edit context',
55
'ask-about-context': 'Ask about context',
6-
'no-context': 'No context',
6+
'prune-context': 'Prune context',
77
'code-at-cursor': 'Code at cursor',
8-
'prune-context': 'Prune context'
8+
'no-context': 'No context'
99
}
1010
export const WEB_PROMPT_TYPES = Object.keys(
1111
web_prompt_type_labels

‎packages/vscode/src/views/panel/types/messages.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ export interface SaveInstructionsMessage extends BaseMessage {
7070
mode:
7171
| 'ask-about-context'
7272
| 'edit-context'
73-
| 'no-context'
7473
| 'code-at-cursor'
7574
| 'prune-context'
75+
| 'no-context'
7676
}
7777

7878
export interface GetEditFormat extends BaseMessage {
@@ -138,9 +138,9 @@ export interface SaveHistoryMessage extends BaseMessage {
138138
mode:
139139
| 'ask-about-context'
140140
| 'edit-context'
141-
| 'no-context'
142141
| 'code-at-cursor'
143142
| 'prune-context'
143+
| 'no-context'
144144
}
145145

146146
export interface GetContextSizeWarningThresholdMessage extends BaseMessage {

0 commit comments

Comments
 (0)