mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
This commit is contained in:
parent
ecf68e69fc
commit
9e1974682e
|
@ -460,6 +460,10 @@ export class InlineChatWidget {
|
|||
return tail(requests)?.response?.response.asString();
|
||||
}
|
||||
|
||||
get usesDefaultChatModel(): boolean {
|
||||
return this.getChatModel() === this._defaultChatModel;
|
||||
}
|
||||
|
||||
getChatModel(): IChatModel {
|
||||
return this._chatWidget.viewModel?.model ?? this._defaultChatModel;
|
||||
}
|
||||
|
|
|
@ -128,11 +128,17 @@ export class TerminalChatController extends Disposable implements ITerminalContr
|
|||
// a default chat model (unless configured) and feedback is reported against that one. This
|
||||
// code forwards the feedback to an actual registered provider
|
||||
this._register(this._chatService.onDidPerformUserAction(e => {
|
||||
// only forward feedback from the inline chat widget default model
|
||||
if (
|
||||
this._chatWidget?.rawValue?.inlineChatWidget.usesDefaultChatModel
|
||||
&& e.sessionId === this._chatWidget?.rawValue?.inlineChatWidget.getChatModel().sessionId
|
||||
) {
|
||||
if (e.action.kind === 'bug') {
|
||||
this.acceptFeedback(undefined);
|
||||
} else if (e.action.kind === 'vote') {
|
||||
this.acceptFeedback(e.action.direction === InteractiveSessionVoteDirection.Up);
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue