Skip to content

Commit d967ccf

Browse files
committed
pass in item
1 parent 98d3303 commit d967ccf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ class ChatAccessibleViewContribution extends Disposable {
179179
}
180180
},
181181
next() {
182-
verifiedWidget.moveFocus(focusedItem.id, 'next');
182+
verifiedWidget.moveFocus(focusedItem, 'next');
183183
renderAccessibleView(accessibleViewService, widgetService, codeEditorService);
184184
},
185185
previous() {
186-
verifiedWidget.moveFocus(focusedItem.id, 'previous');
186+
verifiedWidget.moveFocus(focusedItem, 'previous');
187187
renderAccessibleView(accessibleViewService, widgetService, codeEditorService);
188188
},
189189
options: { ariaLabel: nls.localize('chatAccessibleView', "Chat Accessible View"), language: 'typescript', type: AccessibleViewType.View }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface IChatWidget {
5656

5757
reveal(item: ChatTreeItem): void;
5858
focus(item: ChatTreeItem): void;
59-
moveFocus(id: string, type: 'next' | 'previous'): void;
59+
moveFocus(item: ChatTreeItem, type: 'next' | 'previous'): void;
6060
getFocus(): ChatTreeItem | undefined;
6161
acceptInput(query?: string): void;
6262
focusLastMessage(): void;

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ export class ChatWidget extends Disposable implements IChatWidget {
168168
this.inputPart.focus();
169169
}
170170

171-
moveFocus(id: string, type: 'next' | 'previous'): void {
171+
moveFocus(item: ChatTreeItem, type: 'next' | 'previous'): void {
172172
const items = this.viewModel?.getItems();
173173
if (!items) {
174174
return;
175175
}
176-
const targetElement = items.find(i => i.id === id);
176+
const targetElement = items.find(i => i.id === item.id);
177177
if (!targetElement) {
178178
return;
179179
}

0 commit comments

Comments
 (0)