File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 340340 "title" : " Open in Integrated Terminal" ,
341341 "category" : " Code Web Chat" ,
342342 "icon" : " $(terminal)"
343+ },
344+ {
345+ "command" : " codeWebChat.removeFolderFromWorkspace" ,
346+ "title" : " Remove Folder from Workspace" ,
347+ "category" : " Code Web Chat" ,
348+ "icon" : " $(close)"
343349 }
344350 ],
345351 "submenus" : [
505511 {
506512 "command" : " codeWebChat.checkReferencingFilesForContext" ,
507513 "when" : " false"
514+ },
515+ {
516+ "command" : " codeWebChat.removeFolderFromWorkspace" ,
517+ "when" : " false"
508518 }
509519 ],
510520 "view/title" : [
667677 "when" : " view == codeWebChatViewWorkspace && (viewItem == workspaceRoot || viewItem == directory)" ,
668678 "group" : " 1_modification@7"
669679 },
680+ {
681+ "command" : " codeWebChat.removeFolderFromWorkspace" ,
682+ "when" : " (view == codeWebChatViewWorkspace || view == codeWebChatViewContext) && (viewItem == workspaceRoot || viewItem == contextWorkspaceRoot) && workspaceFolderCount > 1" ,
683+ "group" : " 1_modification@8"
684+ },
670685 {
671686 "command" : " codeWebChat.newFile" ,
672687 "when" : " view == codeWebChatViewWorkspace && viewItem == directory" ,
Original file line number Diff line number Diff line change @@ -372,6 +372,17 @@ export const context_initialization = async (
372372 await open_editors_provider ! . check_all ( )
373373 }
374374 ) ,
375+ vscode . commands . registerCommand (
376+ 'codeWebChat.removeFolderFromWorkspace' ,
377+ async ( item : FileItem ) => {
378+ if ( ! item ?. resourceUri ) return
379+
380+ const folder = vscode . workspace . getWorkspaceFolder ( item . resourceUri )
381+ if ( folder ) {
382+ vscode . workspace . updateWorkspaceFolders ( folder . index , 1 )
383+ }
384+ }
385+ ) ,
375386 apply_context_command (
376387 workspace_provider ,
377388 ( ) => {
You can’t perform that action at this time.
0 commit comments