Skip to content

Commit 9e19746

Browse files
authored
1 parent ecf68e6 commit 9e19746

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ export class InlineChatWidget {
460460
return tail(requests)?.response?.response.asString();
461461
}
462462

463+
get usesDefaultChatModel(): boolean {
464+
return this.getChatModel() === this._defaultChatModel;
465+
}
466+
463467
getChatModel(): IChatModel {
464468
return this._chatWidget.viewModel?.model ?? this._defaultChatModel;
465469
}

src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,16 @@ export class TerminalChatController extends Disposable implements ITerminalContr
128128
// a default chat model (unless configured) and feedback is reported against that one. This
129129
// code forwards the feedback to an actual registered provider
130130
this._register(this._chatService.onDidPerformUserAction(e => {
131-
if (e.action.kind === 'bug') {
132-
this.acceptFeedback(undefined);
133-
} else if (e.action.kind === 'vote') {
134-
this.acceptFeedback(e.action.direction === InteractiveSessionVoteDirection.Up);
131+
// only forward feedback from the inline chat widget default model
132+
if (
133+
this._chatWidget?.rawValue?.inlineChatWidget.usesDefaultChatModel
134+
&& e.sessionId === this._chatWidget?.rawValue?.inlineChatWidget.getChatModel().sessionId
135+
) {
136+
if (e.action.kind === 'bug') {
137+
this.acceptFeedback(undefined);
138+
} else if (e.action.kind === 'vote') {
139+
this.acceptFeedback(e.action.direction === InteractiveSessionVoteDirection.Up);
140+
}
135141
}
136142
}));
137143
}

0 commit comments

Comments
 (0)