Skip to content

Commit 384b8f1

Browse files
committed
Add undo functionality to deletion actions for templates, model providers, API configurations, and web configurations
- when a template gets deleted, show notification allowing 'undo' action - before a template gets deleted, show confirmation dialog - implement 'undo' notification when deleting provider or configuration └── apps └── editor └── src ├── commands │ └── history-command │ └── actions │ └── delete-checkpoint-with-undo.ts ├── i18n │ └── translations │ └── views │ ├── prompt │ │ └── handlers │ │ └── handle-undo.ts │ ├── settings │ │ ├── handlers │ │ │ ├── handle-create-template.ts │ │ │ ├── handle-delete-model-provider.ts │ │ │ ├── handle-delete-template.ts │ │ │ ├── handle-pick-api-reasoning-effort.ts │ │ │ ├── index.ts │ │ │ ├── open-allow-patterns-settings.ts │ │ │ ├── open-ignore-patterns-settings.ts │ │ │ └── select-default-api-configuration.ts │ │ └── index.ts │ └── shared │ ├── actions │ │ ├── api │ │ │ ├── common.ts │ │ │ ├── create │ │ │ │ ├── create.ts │ │ │ │ ├── index.ts │ │ │ │ └── interactions │ │ │ │ ├── index.ts │ │ │ │ ├── initial-select-model.ts │ │ │ │ ├── initial-select-provider.ts │ │ │ │ └── verify-model.ts │ │ │ ├── delete.ts │ │ │ ├── index.ts │ │ │ ├── pick-reasoning-effort.ts │ │ │ ├── update │ │ │ │ ├── index.ts │ │ │ │ └── interactions │ │ │ │ ├── edit-model-for-api-config.ts │ │ │ │ ├── edit-reasoning-effort-for-api-config.ts │ │ │ │ └── index.ts │ │ │ └── upsert-provider.ts │ │ ├── index.ts │ │ └── web │ │ ├── create.ts │ │ ├── delete.ts │ │ ├── index.ts │ │ ├── pick-chatbot.ts │ │ ├── pick-model.ts │ │ └── update.ts │ └── index.ts └── views ├── settings │ ├── backend │ │ ├── message-handlers │ │ │ ├── handle-add-model-provider.ts │ │ │ ├── handle-create-api-configuration.ts │ │ │ ├── handle-create-template.ts │ │ │ ├── handle-create-web-configuration.ts │ │ │ ├── handle-delete-api-configuration.ts │ │ │ ├── handle-delete-model-provider.ts │ │ │ ├── handle-delete-template.ts │ │ │ ├── handle-delete-web-configuration.ts │ │ │ ├── handle-get-ai-studio-user-id.ts │ │ │ ├── handle-get-api-configurations.ts │ │ │ ├── handle-get-are-automatic-checkpoints-disabled.ts │ │ │ ├── handle-get-attach-ascii-tree-of-context.ts │ │ │ ├── handle-get-auto-run-intelligent-update.ts │ │ │ ├── handle-get-check-new-files.ts │ │ │ ├── handle-get-checkpoint-lifespan.ts │ │ │ ├── handle-get-clear-checks-in-workspace-behavior.ts │ │ │ ├── handle-get-commit-message-instructions.ts │ │ │ ├── handle-get-context-size-warning-threshold.ts │ │ │ ├── handle-get-edit-files-system-instructions.ts │ │ │ ├── handle-get-gemini-user-id.ts │ │ │ ├── handle-get-include-prompts-in-commit-messages.ts │ │ │ ├── handle-get-intelligent-file-search-instructions.ts │ │ │ ├── handle-get-limit-semantic-search-results.ts │ │ │ ├── handle-get-model-providers.ts │ │ │ ├── handle-get-reuse-last-tab.ts │ │ │ ├── handle-get-send-with-shift-enter.ts │ │ │ ├── handle-get-synchronize-edit-format-between-modes.ts │ │ │ ├── handle-get-templates.ts │ │ │ ├── handle-open-allow-patterns-settings.ts │ │ │ ├── handle-open-external-url.ts │ │ │ ├── handle-open-ignore-patterns-settings.ts │ │ │ ├── handle-open-keybindings.ts │ │ │ ├── handle-pick-api-model.ts │ │ │ ├── handle-pick-api-reasoning-effort.ts │ │ │ ├── handle-pick-chatbot.ts │ │ │ ├── handle-pick-model-provider.ts │ │ │ ├── handle-pick-model.ts │ │ │ ├── handle-pick-reasoning-effort.ts │ │ │ ├── handle-reorder-api-configurations.ts │ │ │ ├── handle-reorder-model-providers.ts │ │ │ ├── handle-reorder-web-configurations.ts │ │ │ ├── handle-select-default-api-configuration.ts │ │ │ ├── handle-set-default-api-configuration.ts │ │ │ ├── handle-update-ai-studio-user-id.ts │ │ │ ├── handle-update-api-configuration.ts │ │ │ ├── handle-update-are-automatic-checkpoints-disabled.ts │ │ │ ├── handle-update-attach-ascii-tree-of-context.ts │ │ │ ├── handle-update-auto-run-intelligent-update.ts │ │ │ ├── handle-update-check-new-files.ts │ │ │ ├── handle-update-checkpoint-lifespan.ts │ │ │ ├── handle-update-clear-checks-in-workspace-behavior.ts │ │ │ ├── handle-update-commit-message-instructions.ts │ │ │ ├── handle-update-context-size-warning-threshold.ts │ │ │ ├── handle-update-edit-files-system-instructions.ts │ │ │ ├── handle-update-gemini-user-id.ts │ │ │ ├── handle-update-include-prompts-in-commit-messages.ts │ │ │ ├── handle-update-intelligent-file-search-instructions.ts │ │ │ ├── handle-update-limit-semantic-search-results.ts │ │ │ ├── handle-update-model-provider.ts │ │ │ ├── handle-update-reuse-last-tab.ts │ │ │ ├── handle-update-send-with-shift-enter.ts │ │ │ ├── handle-update-synchronize-edit-format-between-modes.ts │ │ │ ├── handle-update-templates.ts │ │ │ ├── handle-update-web-configuration.ts │ │ │ └── index.ts │ │ └── settings-view-provider.ts │ ├── frontend │ │ ├── App.tsx │ │ ├── Home │ │ │ ├── Home.tsx │ │ │ ├── index.ts │ │ │ └── sections │ │ │ ├── ApiConfigurationsSection.tsx │ │ │ ├── GeneralSection.tsx │ │ │ ├── ModelProvidersSection.tsx │ │ │ └── WebConfigurationsSection.tsx │ │ ├── Settings.tsx │ │ ├── forms │ │ │ ├── EditModelProviderForm │ │ │ │ ├── EditModelProviderForm.module.scss │ │ │ │ ├── EditModelProviderForm.tsx │ │ │ │ └── index.ts │ │ │ └── EditTemplateForm │ │ │ ├── EditTemplateForm.module.scss │ │ │ ├── EditTemplateForm.tsx │ │ │ └── index.ts │ │ ├── hooks │ │ │ ├── use-api-configuration-editing.ts │ │ │ ├── use-model-provider-editing.ts │ │ │ ├── use-settings.ts │ │ │ └── use-web-configuration-editing.ts │ │ ├── i18n │ │ │ ├── translations │ │ │ │ ├── actions.ts │ │ │ │ ├── api-calls.ts │ │ │ │ ├── chatbots.ts │ │ │ │ ├── common.ts │ │ │ │ ├── edit-model-provider-form.ts │ │ │ │ ├── edit-template-form.ts │ │ │ │ ├── general.ts │ │ │ │ ├── index.ts │ │ │ │ └── sections.ts │ │ │ └── use-translation.tsx │ │ └── utils │ │ └── post-message.ts │ └── types │ └── messages.ts └── shared ├── actions │ ├── api │ │ ├── create │ │ │ ├── create.ts │ │ │ └── interactions │ │ │ ├── index.ts │ │ │ ├── initial-select-model.ts │ │ │ ├── initial-select-provider.ts │ │ │ ├── verify-model.ts │ │ │ └── verify-reasoning-effort.ts │ │ ├── delete.ts │ │ ├── pick-reasoning-effort.ts │ │ ├── reorder.ts │ │ ├── update │ │ │ ├── interactions │ │ │ │ ├── edit-model-for-api-config.ts │ │ │ │ ├── edit-provider-for-api-config.ts │ │ │ │ ├── edit-reasoning-effort-for-api-config.ts │ │ │ │ └── index.ts │ │ │ └── update.ts │ │ └── upsert-provider.ts │ └── web │ ├── create.ts │ ├── delete.ts │ ├── pick-chatbot.ts │ ├── pick-model.ts │ ├── reorder.ts │ ├── toggle-pinned.ts │ └── update.ts ├── forms │ ├── EditApiConfigurationForm │ │ ├── EditApiConfigurationForm.module.scss │ │ ├── EditApiConfigurationForm.tsx │ │ └── index.ts │ └── EditWebConfigurationForm │ ├── EditWebConfigurationForm.module.scss │ ├── EditWebConfigurationForm.tsx │ └── index.ts ├── hooks │ └── use-translation.tsx ├── i18n │ ├── translations │ │ ├── common.ts │ │ ├── edit-api-configuration-form.ts │ │ ├── edit-web-configuration-form.ts │ │ └── index.ts │ └── use-translation.tsx ├── types │ ├── api-features.ts │ └── messages.ts └── utils ├── generate-unique-name.ts └── webview-html.ts
1 parent 15563e4 commit 384b8f1

17 files changed

Lines changed: 364 additions & 11 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export const translations = {
2+
'views.settings.handlers.handle-delete-model-provider.deleted': {
3+
en: 'Model provider deleted.',
4+
pl: 'Dostawca modelu usunięty.',
5+
'zh-cn': '模型提供商已删除。',
6+
ja: 'モデルプロバイダーが削除されました。',
7+
'zh-tw': '模型供應商已刪除。',
8+
de: 'Modellanbieter gelöscht.',
9+
es: 'Proveedor de modelos eliminado.',
10+
fr: 'Fournisseur de modèles supprimé.',
11+
'pt-br': 'Provedor de modelo excluído.',
12+
ru: 'Провайдер моделей удален.',
13+
ko: '모델 제공자가 삭제되었습니다.',
14+
it: 'Fornitore di modelli eliminato.',
15+
tr: 'Model sağlayıcı silindi.',
16+
cs: 'Poskytovatel modelu smazán.',
17+
hu: 'Modellszolgáltató törölve.',
18+
bg: 'Доставчикът на модел е изтрит.'
19+
},
20+
'views.settings.handlers.handle-delete-model-provider.undo': {
21+
en: 'Undo',
22+
pl: 'Cofnij',
23+
'zh-cn': '撤销',
24+
ja: '元に戻す',
25+
'zh-tw': '復原',
26+
de: 'Rückgängig machen',
27+
es: 'Deshacer',
28+
fr: 'Annuler',
29+
'pt-br': 'Desfazer',
30+
ru: 'Отменить',
31+
ko: '실행 취소',
32+
it: 'Annulla',
33+
tr: 'Geri Al',
34+
cs: 'Zpět',
35+
hu: 'Visszavonás',
36+
bg: 'Отмяна'
37+
}
38+
} as const
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
export const translations = {
2+
'views.settings.handlers.handle-delete-template.confirm-title': {
3+
en: 'Please confirm',
4+
pl: 'Proszę potwierdzić',
5+
'zh-cn': '请确认',
6+
ja: '確認してください',
7+
'zh-tw': '請確認',
8+
de: 'Bitte bestätigen',
9+
es: 'Por favor, confirme',
10+
fr: 'Veuillez confirmer',
11+
'pt-br': 'Por favor, confirme',
12+
ru: 'Пожалуйста, подтвердите',
13+
ko: '확인해 주세요',
14+
it: 'Si prega di confermare',
15+
tr: 'Lütfen onaylayın',
16+
cs: 'Prosím potvrďte',
17+
hu: 'Kérjük, erősítse meg',
18+
bg: 'Моля, потвърдете'
19+
},
20+
'views.settings.handlers.handle-delete-template.confirm-detail': {
21+
en: 'Are you sure you want to delete this template?',
22+
pl: 'Czy na pewno chcesz usunąć ten szablon?',
23+
'zh-cn': '您确定要删除此模板吗?',
24+
ja: 'このテンプレートを削除してもよろしいですか?',
25+
'zh-tw': '您確定要刪除此模板嗎?',
26+
de: 'Möchten Sie diese Vorlage wirklich löschen?',
27+
es: '¿Estás seguro de que quieres eliminar esta plantilla?',
28+
fr: 'Êtes-vous sûr de vouloir supprimer ce modèle ?',
29+
'pt-br': 'Tem certeza de que deseja excluir este modelo?',
30+
ru: 'Вы уверены, что хотите удалить этот шаблон?',
31+
ko: '이 템플릿을 삭제하시겠습니까?',
32+
it: 'Sei sicuro di voler eliminare questo modello?',
33+
tr: 'Bu şablonu silmek istediğinizden emin misiniz?',
34+
cs: 'Opravdu chcete tuto šablonu smazat?',
35+
hu: 'Biztosan törölni szeretné ezt a sablont?',
36+
bg: 'Сигурни ли сте, че искате да изтриете този шаблон?'
37+
},
38+
'views.settings.handlers.handle-delete-template.action.delete': {
39+
en: 'Delete',
40+
pl: 'Usuń',
41+
'zh-cn': '删除',
42+
ja: '削除',
43+
'zh-tw': '刪除',
44+
de: 'Löschen',
45+
es: 'Eliminar',
46+
fr: 'Supprimer',
47+
'pt-br': 'Excluir',
48+
ru: 'Удалить',
49+
ko: '삭제',
50+
it: 'Elimina',
51+
tr: 'Sil',
52+
cs: 'Smazat',
53+
hu: 'Törlés',
54+
bg: 'Изтрий'
55+
},
56+
'views.settings.handlers.handle-delete-template.deleted': {
57+
en: 'Template deleted.',
58+
pl: 'Szablon usunięty.',
59+
'zh-cn': '模板已删除。',
60+
ja: 'テンプレートが削除されました。',
61+
'zh-tw': '模板已刪除。',
62+
de: 'Vorlage gelöscht.',
63+
es: 'Plantilla eliminada.',
64+
fr: 'Modèle supprimé.',
65+
'pt-br': 'Modelo excluído.',
66+
ru: 'Шаблон удален.',
67+
ko: '템플릿이 삭제되었습니다.',
68+
it: 'Modello eliminato.',
69+
tr: 'Şablon silindi.',
70+
cs: 'Šablona smazána.',
71+
hu: 'Sablon törölve.',
72+
bg: 'Шаблонът е изтрит.'
73+
},
74+
'views.settings.handlers.handle-delete-template.undo': {
75+
en: 'Undo',
76+
pl: 'Cofnij',
77+
'zh-cn': '撤销',
78+
ja: '元に戻す',
79+
'zh-tw': '復原',
80+
de: 'Rückgängig machen',
81+
es: 'Deshacer',
82+
fr: 'Annuler',
83+
'pt-br': 'Desfazer',
84+
ru: 'Отменить',
85+
ko: '실행 취소',
86+
it: 'Annulla',
87+
tr: 'Geri Al',
88+
cs: 'Zpět',
89+
hu: 'Visszavonás',
90+
bg: 'Отмяна'
91+
}
92+
} as const

‎apps/editor/src/i18n/translations/views/settings/handlers/index.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ import { translations as open_ignore_patterns_settings } from './open-ignore-pat
33
import { translations as select_default_api_configuration } from './select-default-api-configuration'
44
import { translations as handle_pick_api_reasoning_effort } from './handle-pick-api-reasoning-effort'
55
import { translations as handle_create_template } from './handle-create-template'
6+
import { translations as handle_delete_template } from './handle-delete-template'
7+
import { translations as handle_delete_model_provider } from './handle-delete-model-provider'
68

79
export const translations = {
810
...open_allow_patterns_settings,
911
...open_ignore_patterns_settings,
1012
...select_default_api_configuration,
1113
...handle_pick_api_reasoning_effort,
12-
...handle_create_template
14+
...handle_create_template,
15+
...handle_delete_template,
16+
...handle_delete_model_provider
1317
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export const translations = {
2+
'views.shared.actions.api.delete.deleted': {
3+
en: 'API configuration deleted.',
4+
pl: 'Konfiguracja API usunięta.',
5+
'zh-cn': 'API 配置已删除。',
6+
ja: 'API 構成が削除されました。',
7+
'zh-tw': 'API 配置已刪除。',
8+
de: 'API-Konfiguration gelöscht.',
9+
es: 'Configuración de API eliminada.',
10+
fr: "Configuration de l'API supprimée.",
11+
'pt-br': 'Configuração de API excluída.',
12+
ru: 'Конфигурация API удалена.',
13+
ko: 'API 구성이 삭제되었습니다.',
14+
it: 'Configurazione API eliminata.',
15+
tr: 'API yapılandırması silindi.',
16+
cs: 'Konfigurace API smazána.',
17+
hu: 'API konfiguráció törölve.',
18+
bg: 'API конфигурацията е изтрита.'
19+
},
20+
'views.shared.actions.api.delete.undo': {
21+
en: 'Undo',
22+
pl: 'Cofnij',
23+
'zh-cn': '撤销',
24+
ja: '元に戻す',
25+
'zh-tw': '復原',
26+
de: 'Rückgängig machen',
27+
es: 'Deshacer',
28+
fr: 'Annuler',
29+
'pt-br': 'Desfazer',
30+
ru: 'Отменить',
31+
ko: '실행 취소',
32+
it: 'Annulla',
33+
tr: 'Geri Al',
34+
cs: 'Zpět',
35+
hu: 'Visszavonás',
36+
bg: 'Отмяна'
37+
}
38+
} as const

‎apps/editor/src/i18n/translations/views/shared/actions/api/index.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import { translations as create } from './create'
33
import { translations as pick_reasoning_effort } from './pick-reasoning-effort'
44
import { translations as update } from './update'
55
import { translations as upsert_provider } from './upsert-provider'
6+
import { translations as delete_translations } from './delete'
67

78
export const translations = {
89
...common,
910
...create,
1011
...pick_reasoning_effort,
1112
...update,
12-
...upsert_provider
13+
...upsert_provider,
14+
...delete_translations
1315
}

‎apps/editor/src/i18n/translations/views/shared/actions/web/delete.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,41 @@ export const translations = {
1616
cs: 'Bez názvu',
1717
hu: 'Névtelen',
1818
bg: 'Без име'
19+
},
20+
'views.shared.actions.web.delete.deleted': {
21+
en: 'Web configuration deleted.',
22+
pl: 'Konfiguracja sieci Web usunięta.',
23+
'zh-cn': 'Web 配置已删除。',
24+
ja: 'Web構成が削除されました。',
25+
'zh-tw': 'Web 配置已刪除。',
26+
de: 'Web-Konfiguration gelöscht.',
27+
es: 'Configuración web eliminada.',
28+
fr: 'Configuration web supprimée.',
29+
'pt-br': 'Configuração web excluída.',
30+
ru: 'Веб-конфигурация удалена.',
31+
ko: '웹 구성이 삭제되었습니다.',
32+
it: 'Configurazione web eliminata.',
33+
tr: 'Web yapılandırması silindi.',
34+
cs: 'Webová konfigurace smazána.',
35+
hu: 'Webes konfiguráció törölve.',
36+
bg: 'Уеб конфигурацията е изтрита.'
37+
},
38+
'views.shared.actions.web.delete.undo': {
39+
en: 'Undo',
40+
pl: 'Cofnij',
41+
'zh-cn': '撤销',
42+
ja: '元に戻す',
43+
'zh-tw': '復原',
44+
de: 'Rückgängig machen',
45+
es: 'Deshacer',
46+
fr: 'Annuler',
47+
'pt-br': 'Desfazer',
48+
ru: 'Отменить',
49+
ko: '실행 취소',
50+
it: 'Annulla',
51+
tr: 'Geri Al',
52+
cs: 'Zpět',
53+
hu: 'Visszavonás',
54+
bg: 'Отмяна'
1955
}
2056
} as const

‎apps/editor/src/views/settings/backend/message-handlers/handle-delete-model-provider.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,33 @@ export const handle_delete_model_provider = async (
3030
}
3131

3232
const original_model_providers = await providers_manager.get_model_providers()
33+
const deleted_provider_index = original_model_providers.findIndex(
34+
(p) => p.name == model_provider_name_to_delete
35+
)
36+
37+
if (deleted_provider_index === -1) {
38+
return
39+
}
40+
41+
const deleted_provider = original_model_providers[deleted_provider_index]
42+
3343
const updated_model_providers = original_model_providers.filter(
3444
(p) => p.name != model_provider_name_to_delete
3545
)
3646
await providers_manager.save_model_providers(updated_model_providers)
47+
48+
const undo_action = t(
49+
'views.settings.handlers.handle-delete-model-provider.undo'
50+
)
51+
const choice = await vscode.window.showInformationMessage(
52+
t('views.settings.handlers.handle-delete-model-provider.deleted'),
53+
undo_action
54+
)
55+
56+
if (choice === undo_action) {
57+
const current_model_providers =
58+
await providers_manager.get_model_providers()
59+
current_model_providers.splice(deleted_provider_index, 0, deleted_provider)
60+
await providers_manager.save_model_providers(current_model_providers)
61+
}
3762
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import * as vscode from 'vscode'
2+
import { DeleteTemplateMessage } from '@/views/settings/types/messages'
3+
import { SettingsViewProvider } from '../settings-view-provider'
4+
import { t } from '@/i18n'
5+
6+
export const handle_delete_template = async (
7+
provider: SettingsViewProvider,
8+
message: DeleteTemplateMessage
9+
): Promise<void> => {
10+
const config = vscode.workspace.getConfiguration('codeWebChat')
11+
const templates = config.get<any[]>(message.templates_key, [])
12+
13+
if (message.index < 0 || message.index >= templates.length) {
14+
return
15+
}
16+
17+
const delete_action = t(
18+
'views.settings.handlers.handle-delete-template.action.delete'
19+
)
20+
const confirmation = await vscode.window.showWarningMessage(
21+
t('views.settings.handlers.handle-delete-template.confirm-title'),
22+
{
23+
modal: true,
24+
detail: t('views.settings.handlers.handle-delete-template.confirm-detail')
25+
},
26+
delete_action
27+
)
28+
29+
if (confirmation !== delete_action) {
30+
return
31+
}
32+
33+
const deleted_template = templates[message.index]
34+
const new_templates = templates.filter((_, i) => i !== message.index)
35+
36+
await config.update(
37+
message.templates_key,
38+
new_templates,
39+
vscode.ConfigurationTarget.Global
40+
)
41+
42+
const undo_action = t('views.settings.handlers.handle-delete-template.undo')
43+
const choice = await vscode.window.showInformationMessage(
44+
t('views.settings.handlers.handle-delete-template.deleted'),
45+
undo_action
46+
)
47+
48+
if (choice === undo_action) {
49+
const current_config = vscode.workspace.getConfiguration('codeWebChat')
50+
const current_templates = current_config.get<any[]>(
51+
message.templates_key,
52+
[]
53+
)
54+
current_templates.splice(message.index, 0, deleted_template)
55+
await current_config.update(
56+
message.templates_key,
57+
current_templates,
58+
vscode.ConfigurationTarget.Global
59+
)
60+
}
61+
}

‎apps/editor/src/views/settings/backend/message-handlers/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export * from './handle-update-intelligent-file-search-instructions'
33
export * from './handle-get-templates'
44
export * from './handle-update-templates'
55
export * from './handle-create-template'
6+
export * from './handle-delete-template'
67
export * from './handle-add-model-provider'
78
export * from './handle-update-model-provider'
89
export * from './handle-get-model-providers'

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ import {
6666
handle_update_intelligent_file_search_instructions,
6767
handle_get_templates,
6868
handle_update_templates,
69-
handle_create_template
69+
handle_create_template,
70+
handle_delete_template
7071
} from './message-handlers'
7172
import { config_web_configuration_to_ui_format } from '@/utils/web-configuration-format-converters'
7273
import { webview_html } from '@/views/shared/utils/webview-html'
@@ -169,6 +170,8 @@ export class SettingsViewProvider {
169170
await handle_update_templates(message)
170171
} else if (message.command == 'CREATE_TEMPLATE') {
171172
await handle_create_template(this, message)
173+
} else if (message.command == 'DELETE_TEMPLATE') {
174+
await handle_delete_template(this, message)
172175
} else if (message.command == 'GET_API_CONFIGURATIONS') {
173176
await handle_get_api_configurations(this)
174177
} else if (

0 commit comments

Comments
 (0)