Skip to content

Commit a339170

Browse files
committed
Add undo/redo icons and expand tree items by default in context view
1 parent 308937b commit a339170

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@
102102
{
103103
"command": "codeWebChat.undoContextSelection",
104104
"title": "Undo Context Selection",
105-
"category": "Code Web Chat"
105+
"category": "Code Web Chat",
106+
"icon": "$(arrow-left)"
106107
},
107108
{
108109
"command": "codeWebChat.redoContextSelection",
109110
"title": "Redo Context Selection",
110-
"category": "Code Web Chat"
111+
"category": "Code Web Chat",
112+
"icon": "$(arrow-right)"
111113
},
112114
{
113115
"command": "codeWebChat.duplicateWorkspace",
@@ -450,6 +452,16 @@
450452
}
451453
],
452454
"view/title": [
455+
{
456+
"command": "codeWebChat.undoContextSelection",
457+
"when": "view == codeWebChatViewContext",
458+
"group": "navigation@1"
459+
},
460+
{
461+
"command": "codeWebChat.redoContextSelection",
462+
"when": "view == codeWebChatViewContext",
463+
"group": "navigation@2"
464+
},
453465
{
454466
"command": "codeWebChat.checkAll",
455467
"when": "view == codeWebChatViewWorkspace",

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ export class WorkspaceProvider
714714
new FileItem(
715715
name,
716716
uri,
717-
vscode.TreeItemCollapsibleState.Collapsed,
717+
context_view
718+
? vscode.TreeItemCollapsibleState.Expanded
719+
: vscode.TreeItemCollapsibleState.Collapsed,
718720
true,
719721
this._checked_items.get(root) ??
720722
vscode.TreeItemCheckboxState.Unchecked,
@@ -971,7 +973,9 @@ export class WorkspaceProvider
971973
entry.name,
972974
uri,
973975
is_directory
974-
? vscode.TreeItemCollapsibleState.Collapsed
976+
? context_view
977+
? vscode.TreeItemCollapsibleState.Expanded
978+
: vscode.TreeItemCollapsibleState.Collapsed
975979
: vscode.TreeItemCollapsibleState.None,
976980
is_directory,
977981
checkbox_state,

0 commit comments

Comments
 (0)