Skip to content

Commit 508fa77

Browse files
committed
Add toggle expand command to workspace root and directory tree items
1 parent 03345ce commit 508fa77

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎apps/editor/src/context/providers/workspace/workspace-provider.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,9 +1673,17 @@ export class FileItem extends vscode.TreeItem {
16731673

16741674
if (this.isWorkspaceRoot) {
16751675
this.contextValue = 'workspaceRoot'
1676+
this.command = {
1677+
command: 'list.toggleExpand',
1678+
title: 'Toggle Expand'
1679+
}
16761680
} else if (this.isDirectory) {
16771681
this.iconPath = new vscode.ThemeIcon('folder')
16781682
this.contextValue = 'directory'
1683+
this.command = {
1684+
command: 'list.toggleExpand',
1685+
title: 'Toggle Expand'
1686+
}
16791687
} else {
16801688
this.iconPath = new vscode.ThemeIcon('file')
16811689
this.contextValue = 'file'

0 commit comments

Comments
 (0)