File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -173,16 +173,16 @@ export class ChatWidget extends Disposable implements IChatWidget {
173
173
if ( ! items ) {
174
174
return ;
175
175
}
176
- const focusedElement = items . find ( i => i . id === id ) ;
177
- if ( ! focusedElement ) {
176
+ const targetElement = items . find ( i => i . id === id ) ;
177
+ if ( ! targetElement ) {
178
178
return ;
179
179
}
180
180
const responseItems = items . filter ( i => isResponseVM ( i ) ) ;
181
- const currentlyFocusedIndex = responseItems . indexOf ( focusedElement ) ;
182
- if ( currentlyFocusedIndex === undefined || ! responseItems ) {
181
+ const targetIndex = responseItems . indexOf ( targetElement ) ;
182
+ if ( targetIndex === undefined || ! responseItems ) {
183
183
return ;
184
184
}
185
- const indexToFocus = type === 'next' ? currentlyFocusedIndex + 1 : currentlyFocusedIndex - 1 ;
185
+ const indexToFocus = type === 'next' ? targetIndex + 1 : targetIndex - 1 ;
186
186
if ( indexToFocus < 0 || indexToFocus === responseItems . length - 1 ) {
187
187
return ;
188
188
}
You can’t perform that action at this time.
0 commit comments