File tree Expand file tree Collapse file tree
WorkspaceLauncherForVSCode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,4 +138,30 @@ public void SetVSCodeMetadata()
138138 public static void SetVSMetadata ( )
139139 {
140140 }
141+
142+ public string GetWorkspaceName ( )
143+ {
144+ string workspaceName ;
145+ if ( VisualStudioCodeRemoteUri is null )
146+ {
147+ return WorkspaceName ;
148+ }
149+ switch ( VisualStudioCodeRemoteUri . Type )
150+ {
151+ case VisualStudioCodeRemoteType . DevContainer :
152+ if ( string . IsNullOrEmpty ( WindowsPath ) || VisualStudioCodeRemoteUri . IsVisualStudioCodeRemoteUri ( WindowsPath ) )
153+ {
154+ workspaceName = WorkspaceName ;
155+ }
156+ else
157+ {
158+ workspaceName = System . IO . Path . GetFileName ( WindowsPath ) ?? WorkspaceName ;
159+ }
160+ break ;
161+ default :
162+ workspaceName = WorkspaceName ;
163+ break ;
164+ }
165+ return workspaceName ;
166+ }
141167}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public static ListItem Create(
7878 icon = Classes . Icon . VisualStudioCode ;
7979 details = new Details
8080 {
81- Title = workspace . WorkspaceName ,
81+ Title = workspace . GetWorkspaceName ( ) ,
8282 HeroImage = icon ,
8383 } ;
8484 if ( settingsManager . TagTypes . HasFlag ( TagType . Type ) )
You can’t perform that action at this time.
0 commit comments