4120
title: localize('agentHost.planReview.title', "Review Plan"),
4121
content: data.summary || localize('agentHost.planReview.fallbackSummary', "A plan is ready for review."),
4123
>
canProvideFeedback: true,
4124
>
answerQuestionId: questionId,
4125
>
...(planPath ? { planUri: URI.file(planPath).toString() } : {}),
4126
>
},
4127
>
questions: [{
4128
>
kind: ChatInputQuestionKind.SingleSelect,
4129
>
id: questionId,
4130
>
title: localize('agentHost.planReview.title', "Review Plan"),
4131
>
message: localize('agentHost.planReview.questionMessage', "How would you like to proceed?"),
4132
>
required: true,
4133
>
options,
4134
>
allowFreeformInput: true,
4135
>
}],
4136
>
};
4137
>
4138
>
const deferred = new DeferredPromise<IExitPlanModeResponse>();
4139
>
this._pendingPlanReviews.set(requestId, {
4140
>
actions: data.actions,
4141
>
recommendedAction: data.recommendedAction,
4142
>
questionId,
4143
>
deferred,
4144
>
});
4145
>
4146
>
this._onDidSessionProgress.fire({
4147
>
kind: 'action',
4148
>
resource: this._chatChannelUri,
4149
>
action: {
4150
>
type: ActionType.ChatInputRequested,
4151
>
request: inputRequest,
4152
>
}
4153
>
});
4154
>
4155
>
try {
4156
>
return await deferred.p;
4157
>
} catch (err) {
4158
this._logService.error(err, `[Copilot:${this.sessionId}] exitPlanMode.request handler failed: rpcId=${requestId}`);
4159
return { approved: false };
4160
}
4162
4163
/**