File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
terminalContrib/chat/browser Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -460,6 +460,10 @@ export class InlineChatWidget {
460
460
return tail ( requests ) ?. response ?. response . asString ( ) ;
461
461
}
462
462
463
+ get usesDefaultChatModel ( ) : boolean {
464
+ return this . getChatModel ( ) === this . _defaultChatModel ;
465
+ }
466
+
463
467
getChatModel ( ) : IChatModel {
464
468
return this . _chatWidget . viewModel ?. model ?? this . _defaultChatModel ;
465
469
}
Original file line number Diff line number Diff line change @@ -128,10 +128,16 @@ export class TerminalChatController extends Disposable implements ITerminalContr
128
128
// a default chat model (unless configured) and feedback is reported against that one. This
129
129
// code forwards the feedback to an actual registered provider
130
130
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
+ }
135
141
}
136
142
} ) ) ;
137
143
}
You can’t perform that action at this time.
0 commit comments