dsh-plugin-codegraph-panel 0.6.2 → 0.6.3
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.
- package/lib/client.js +5 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -101,7 +101,11 @@ window.__ModuleLoader__.load({
|
|
|
101
101
|
try {
|
|
102
102
|
if (typeof localStorage === "undefined") return "";
|
|
103
103
|
const value = localStorage.getItem(STORAGE_KEY);
|
|
104
|
-
|
|
104
|
+
if (typeof value !== "string") return "";
|
|
105
|
+
// Only an absolute path can name a workspace. An earlier build stored whatever had been
|
|
106
|
+
// typed, so a profile that once held a relative path (e.g. a folder name) would open this tab
|
|
107
|
+
// on a red "root 必须是一个存在的绝对路径" before the user had touched anything.
|
|
108
|
+
return value.startsWith("/") || /^[A-Za-z]:[\\/]/u.test(value) ? value : "";
|
|
105
109
|
} catch (err) {
|
|
106
110
|
return "";
|
|
107
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-codegraph-panel",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Settings-page panel for dsh-plugin-codegraph: a 代码图谱 tab that shows one workspace's index status and can rebuild it. Browser half only — every number comes from the host's /dsh-plugin-codegraph/api/* routes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|