mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
Fix SessionViewPane leaks (#274239)
* Prevent ChatEditorInput leak * Few minor updates * Revert "Few minor updates" This reverts commit92ecb6728d. * Revert "Prevent ChatEditorInput leak" This reverts commit38f5c83895. * Fix sessionViewPane leak * Simplification based on PR feedback --------- Co-authored-by: vijay upadya <vj@example.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import { $, append } from '../../../../../../base/browser/dom.js';
|
||||
import { IActionViewItem } from '../../../../../../base/browser/ui/actionbar/actionbar.js';
|
||||
import { IBaseActionViewItemOptions } from '../../../../../../base/browser/ui/actionbar/actionViewItems.js';
|
||||
import { ITreeContextMenuEvent } from '../../../../../../base/browser/ui/tree/tree.js';
|
||||
import { Action, IAction } from '../../../../../../base/common/actions.js';
|
||||
import { IAction, toAction } from '../../../../../../base/common/actions.js';
|
||||
import { coalesce } from '../../../../../../base/common/arrays.js';
|
||||
import { Codicon } from '../../../../../../base/common/codicons.js';
|
||||
import { FuzzyScore } from '../../../../../../base/common/filters.js';
|
||||
@@ -143,9 +143,7 @@ export class SessionsViewPane extends ViewPane {
|
||||
icon: Codicon.plus,
|
||||
}, undefined, undefined, undefined, undefined);
|
||||
|
||||
const menu = this.menuService.createMenu(MenuId.ChatSessionsMenu, this.scopedContextKeyService);
|
||||
|
||||
const actions = menu.getActions({ shouldForwardArgs: true });
|
||||
const actions = this.menuService.getMenuActions(MenuId.ChatSessionsMenu, this.scopedContextKeyService, { shouldForwardArgs: true });
|
||||
const primaryActions = getActionBarActions(
|
||||
actions,
|
||||
'submenu',
|
||||
@@ -165,12 +163,12 @@ export class SessionsViewPane extends ViewPane {
|
||||
return;
|
||||
}
|
||||
|
||||
const dropdownAction = new Action(
|
||||
'selectNewChatSessionOption',
|
||||
nls.localize('chatSession.selectOption', 'More...'),
|
||||
'codicon-chevron-down',
|
||||
true
|
||||
);
|
||||
const dropdownAction = toAction({
|
||||
id: 'selectNewChatSessionOption',
|
||||
label: nls.localize('chatSession.selectOption', 'More...'),
|
||||
class: 'codicon-chevron-down',
|
||||
run: () => { }
|
||||
});
|
||||
|
||||
const dropdownActions: IAction[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user