@lvce-editor/title-bar-worker 4.19.0 → 4.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2810,7 +2810,12 @@ const startsWithHomeDir = (homeDir, path) => {
2810
2810
  };
2811
2811
  const getPath = uri => {
2812
2812
  if (uri.startsWith(File)) {
2813
- return uri.slice(File.length);
2813
+ const path = uri.slice(File.length);
2814
+ try {
2815
+ return decodeURIComponent(path);
2816
+ } catch {
2817
+ return path;
2818
+ }
2814
2819
  }
2815
2820
  return uri;
2816
2821
  };
@@ -2840,9 +2845,10 @@ const getTitle$1 = (homeDir, uri) => {
2840
2845
  const toMenuItem = folder => {
2841
2846
  const homeDir = getHomeDir(folder);
2842
2847
  const label = getTitle$1(homeDir, folder);
2848
+ const command = folder.includes('://') ? 'Workspace.setUri' : 'Workspace.setPath';
2843
2849
  return {
2844
2850
  args: [folder],
2845
- command: 'Workspace.setPath',
2851
+ command,
2846
2852
  flags: None,
2847
2853
  label
2848
2854
  };
@@ -3980,7 +3986,7 @@ const getTitle = (workspaceUri, titleTemplate, appName) => {
3980
3986
  return appName;
3981
3987
  }
3982
3988
  const remoteSshWorkspace = getRemoteSshWorkspace(workspaceUri);
3983
- const workspacePath = remoteSshWorkspace?.path ?? workspaceUri;
3989
+ const workspacePath = remoteSshWorkspace?.path ?? getPath(workspaceUri);
3984
3990
  const title = getWorkspaceTitle(workspacePath, titleTemplate, appName);
3985
3991
  if (!remoteSshWorkspace) {
3986
3992
  return title || appName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "4.19.0",
3
+ "version": "4.19.1",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",