@@ -22,7 +22,6 @@ import {
2222 DbListKind ,
2323 LocalDatabaseDbItem ,
2424 LocalListDbItem ,
25- remoteDbKinds ,
2625 RemoteUserDefinedListDbItem ,
2726} from "../db-item" ;
2827import { getDbItemName } from "../db-item-naming" ;
@@ -219,7 +218,7 @@ export class DbPanel extends DisposableObject {
219218 }
220219
221220 private async addNewList ( ) : Promise < void > {
222- const listKind = await this . getAddNewListKind ( ) ;
221+ const listKind = DbListKind . Remote ;
223222
224223 const listName = await window . showInputBox ( {
225224 prompt : "Enter a name for the new list" ,
@@ -237,47 +236,6 @@ export class DbPanel extends DisposableObject {
237236 await this . dbManager . addNewList ( listKind , listName ) ;
238237 }
239238
240- private async getAddNewListKind ( ) : Promise < DbListKind > {
241- const highlightedItem = await this . getHighlightedDbItem ( ) ;
242- if ( highlightedItem ) {
243- return remoteDbKinds . includes ( highlightedItem . kind )
244- ? DbListKind . Remote
245- : DbListKind . Local ;
246- } else {
247- const quickPickItems = [
248- {
249- label : "$(cloud) Variant Analysis" ,
250- detail : "Add a repository from GitHub" ,
251- alwaysShow : true ,
252- kind : DbListKind . Remote ,
253- } ,
254- {
255- label : "$(database) Local" ,
256- detail : "Import a database from the cloud or a local file" ,
257- alwaysShow : true ,
258- kind : DbListKind . Local ,
259- } ,
260- ] ;
261- const selectedOption = await window . showQuickPick < AddListQuickPickItem > (
262- quickPickItems ,
263- {
264- title : "Add a new database" ,
265- ignoreFocusOut : true ,
266- } ,
267- ) ;
268- if ( ! selectedOption ) {
269- // We don't need to display a warning pop-up in this case, since the user just escaped out of the operation.
270- // We set 'true' to make this a silent exception.
271- throw new UserCancellationException (
272- "No database list kind selected" ,
273- true ,
274- ) ;
275- }
276-
277- return selectedOption . kind ;
278- }
279- }
280-
281239 private async setSelectedItem ( treeViewItem : DbTreeViewItem ) : Promise < void > {
282240 if ( treeViewItem . dbItem === undefined ) {
283241 throw new Error (
0 commit comments