Allow importing multiple files from the search widget into copilot chat

pull/234208/head
Osvaldo Ortega 2024-11-25 17:13:58 -08:00
parent ca57f6428f
commit 90d883f193
No known key found for this signature in database
GPG Key ID: 0A4DC252500D55B1
1 changed files with 8 additions and 2 deletions

View File

@ -971,12 +971,18 @@ export class SearchView extends ViewPane {
e.browserEvent.preventDefault();
e.browserEvent.stopPropagation();
const context = this.tree.getSelection() || e.element;
let arg;
if (context && context.length > 0) {
arg = e.element;
}
this.contextMenuService.showContextMenu({
menuId: MenuId.SearchContext,
menuActionOptions: { shouldForwardArgs: true },
menuActionOptions: { shouldForwardArgs: true, arg },
contextKeyService: this.contextKeyService,
getAnchor: () => e.anchor,
getActionsContext: () => e.element,
getActionsContext: () => context,
});
}