Accept cell chat response before running follow up (#203271)

This commit is contained in:
Peng Lyu 2024-01-23 17:02:49 -08:00 committed by GitHub
parent 82d1ae423e
commit c77b63e865
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -379,11 +379,12 @@ export class NotebookCellChatController extends Disposable {
const followups = await this._activeSession.provider.provideFollowups(this._activeSession.session, replyResponse.raw, followupCts.token);
if (followups && this._widget) {
const widget = this._widget;
widget.updateFollowUps(followups, followup => {
widget.updateFollowUps(followups, async followup => {
if (followup.kind === 'reply') {
widget.value = followup.message;
this.acceptInput();
} else {
await this.acceptSession();
this._commandService.executeCommand(followup.commandId, ...(followup.args ?? []));
}
});