Skip to content

Commit 8347312

Browse files
committed
Add option to select another commit or branch after updating context files
- instead of automatically re-opening quick pick upon selection, show button in notification 'Select another', only then re-open like you do now (keep the highlight)
1 parent b7643d0 commit 8347312

2 files changed

Lines changed: 42 additions & 9 deletions

File tree

‎apps/editor/src/commands/select-files-of-commit-command.ts‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,19 @@ export const select_files_of_commit_command = (
600600
)
601601

602602
if (is_identical) {
603-
vscode.window.showInformationMessage(
604-
t('common.info.context-already-set')
603+
const action = await vscode.window.showInformationMessage(
604+
t('common.info.context-already-set'),
605+
t('command.select-files-of-commit-command.select-another')
605606
)
606-
file_action = 'finished'
607-
break
607+
if (
608+
action ===
609+
t('command.select-files-of-commit-command.select-another')
610+
) {
611+
file_action = 'finished'
612+
break
613+
} else {
614+
return
615+
}
608616
}
609617
}
610618

@@ -614,12 +622,19 @@ export const select_files_of_commit_command = (
614622

615623
await workspace_provider.set_selected_files(paths_to_apply)
616624

617-
vscode.window.showInformationMessage(
618-
t('common.success.context-updated')
625+
const action = await vscode.window.showInformationMessage(
626+
t('common.success.context-updated'),
627+
t('command.select-files-of-commit-command.select-another')
619628
)
620-
621-
file_action = 'finished'
622-
break
629+
if (
630+
action ===
631+
t('command.select-files-of-commit-command.select-another')
632+
) {
633+
file_action = 'finished'
634+
break
635+
} else {
636+
return
637+
}
623638
}
624639

625640
if (file_action === 'back') {

‎apps/editor/src/i18n/translations/commands/select-files-of-commit-command.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,23 @@ export const translations = {
178178
cs: 'kontextové soubory',
179179
hu: 'kontextus fájlok',
180180
bg: 'контекстни файлове'
181+
},
182+
'command.select-files-of-commit-command.select-another': {
183+
en: 'Select another',
184+
pl: 'Wybierz inny',
185+
'zh-cn': '选择另一个',
186+
ja: '別のものを選択',
187+
'zh-tw': '選擇另一個',
188+
de: 'Einen anderen auswählen',
189+
es: 'Seleccionar otro',
190+
fr: 'Sélectionner un autre',
191+
'pt-br': 'Selecionar outro',
192+
ru: 'Выбрать другой',
193+
ko: '다른 항목 선택',
194+
it: 'Seleziona un altro',
195+
tr: 'Başka birini seç',
196+
cs: 'Vybrat další',
197+
hu: 'Másik kiválasztása',
198+
bg: 'Изберете друг'
181199
}
182200
} as const

0 commit comments

Comments
 (0)