From aeee8284919fe8ce52abcc72873aa6a5830f0f07 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 29 Nov 2024 13:34:32 +0100 Subject: [PATCH] only range --- src/participant/participant.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/participant/participant.ts b/src/participant/participant.ts index 02ebb395e..670636fae 100644 --- a/src/participant/participant.ts +++ b/src/participant/participant.ts @@ -236,14 +236,15 @@ export default class ParticipantController { message: `I want to ask questions about the \`${databaseName}\` database.`, isNewChat: true, }); - } - if (treeItem instanceof CollectionTreeItem) { + } else if (treeItem instanceof CollectionTreeItem) { const { databaseName, collectionName } = treeItem; await this.sendMessageToParticipant({ message: `I want to ask questions about the \`${databaseName}\` database's \`${collectionName}\` collection.`, isNewChat: true, }); + } else { + throw new Error('Unsupported tree item type'); } await this.sendMessageToParticipant({