Skip to content

Commit 54885d6

Browse files
committed
Align with broken test
1 parent 274fe17 commit 54885d6

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/participant/participant.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ export default class ParticipantController {
11401140

11411141
// When the last message was asking for a database or collection name,
11421142
// we re-ask the question.
1143-
let databaseName = lastMessage.metadata.databaseName;
1143+
const databaseName = lastMessage.metadata.databaseName;
11441144
if (databaseName) {
11451145
const collections = await this._getCollections({
11461146
stream,
@@ -1169,16 +1169,29 @@ export default class ParticipantController {
11691169
stream,
11701170
});
11711171
} else {
1172+
const databases = await this._getDatabases({
1173+
stream,
1174+
});
1175+
1176+
if (!databases) {
1177+
return namespaceRequestChatResult({
1178+
databaseName,
1179+
collectionName: undefined,
1180+
history: context.history,
1181+
});
1182+
}
1183+
11721184
stream.markdown(
11731185
vscode.l10n.t(
11741186
'Please select a database by either clicking on an item in the list or typing the name manually in the chat.'
11751187
)
11761188
);
11771189

1178-
databaseName = await this._getOrAskForDatabaseName({
1190+
this.renderDatabasesTree({
1191+
databases,
11791192
command,
1180-
stream,
11811193
context,
1194+
stream,
11821195
});
11831196
}
11841197

0 commit comments

Comments
 (0)