dsh-vscode-mode 0.19.1 → 0.19.2

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/README.md CHANGED
@@ -460,18 +460,18 @@ DSH 每次启动监听随机端口,`http://127.0.0.1:<port>` 就是浏览器 o
460
460
 
461
461
  官方 `dsh plugin` 方式,三选一。下面以 `web` profile 为例;Desktop 或其他命名
462
462
  profile 请替换为实际目标,不要把示例目录当成当前运行 profile。升级前可阅读
463
- [0.19.1 更新摘要](#更新日志)(浏览器安全随机 ID 兼容、界面状态镜像卸载清理、FPGA 语言映射及编辑器默认字号跟随;字号在编辑器创建时读取,真实 pocket/LAN 环境尚未验收;升级后须重启 Host 并强制刷新页面);从 0.14.2 或更旧版本升级还须阅读
463
+ [0.19.2 发布说明](docs/release-0.19.2.md)(修复已删除目录的历史展开记录导致「目录不存在」常驻,子目录错误附带相对路径;本次真实 GUI 尚未验收,用户接受该发布缺口;升级后请强制刷新页面);从 0.14.2 或更旧版本升级还须阅读
464
464
  [0.14.3 数据迁移与回退说明](docs/release-0.14.3.md)。
465
465
 
466
466
  ```bash
467
467
  # ① Git 安装(clone + prepare 构建;推荐打固定 tag)
468
- dsh plugin --profile web add github:Lenonss/DSH_VsCodeMode#v0.19.1
468
+ dsh plugin --profile web add github:Lenonss/DSH_VsCodeMode#v0.19.2
469
469
 
470
470
  # ② npm 注册表(发布到 npm 后)
471
- dsh plugin --profile web add dsh-vscode-mode@0.19.1
471
+ dsh plugin --profile web add dsh-vscode-mode@0.19.2
472
472
 
473
473
  # ③ GitHub Release tgz 直装(Release asset 可用后)
474
- dsh plugin --profile web add https://github.com/Lenonss/DSH_VsCodeMode/releases/download/v0.19.1/dsh-vscode-mode-0.19.1.tgz
474
+ dsh plugin --profile web add https://github.com/Lenonss/DSH_VsCodeMode/releases/download/v0.19.2/dsh-vscode-mode-0.19.2.tgz
475
475
  ```
476
476
 
477
477
  > **DSH 版本政策(0.17.0 起)**:六项 DSH peer 仍统一声明为 `*`,另以
@@ -812,6 +812,8 @@ Keep All / Undo All 却是亮的。修复:单文件 Keep / Undo 覆盖冲突
812
812
  完整变更见 [GitHub Releases](https://github.com/Lenonss/DSH_VsCodeMode/releases)。
813
813
  近期关键版本:
814
814
 
815
+ - **v0.19.2**:**资源管理器缺失目录自愈**——无可用缓存的子目录返回「目录不存在」时,移除其历史展开记录并经现有防抖持久化,避免红条常驻及跟随刷新重复请求;保留根目录缺失和权限错误,子目录错误显示相对路径。不修改请求 token,确保加载态正常清理,目录重建后可手动展开。有缓存时保持原有降级行为。本次真实 GUI 尚未验收,用户接受该发布缺口;不自动安装或重启当前实例。详见 [0.19.2 发布说明](docs/release-0.19.2.md)。
816
+
815
817
  - **v0.19.1**:**浏览器兼容与编辑器默认值修复**——外部打开与编辑器回执优先使用 `crypto.randomUUID()`,不可用或抛错时回落安全的 `getRandomValues()` UUID;无安全随机源时停用对应能力,不拖垮插件启动。界面状态镜像卸载时清理定时器、存储包装与页面监听,阻止迟到水合回填及卸载后重试。补全 Verilog/SystemVerilog 与 Tcl/FPGA 约束扩展名映射和片段语言目录。焦点与被动编辑器创建时统一读取宿主正文字号,非法或不可用时回退 16px,行高保持原比例;不实时修改已创建实例。已在当前本地 Web 验证受影响入口,真实 pocket/LAN 环境仍未验收。升级须重启 DSH Host 并强制刷新页面;发布不自动安装或重启当前实例。
816
818
 
817
819
  - **v0.19.0**:**侧栏可靠性与大工作区读取**——扩展面板渲染、图标、可见性及徽标异常隔离;规则与调试面板按需加载并复用根模块单例。目录树采用完整逻辑索引与窗口化 DOM,缓存采用独立 LRU 和不续期的 60 秒硬 TTL,修正不完整持久化快照的命中;修复侧栏拖动清理及 SVN 配对请求过期结果。超出整读限制的文本可显式进入只读 UTF-8 分页,通过官方 `readByteRange/stat` 能力读取,不创建可保存的部分文档;旧宿主能力缺失时明确提示不支持。按需加载要求宿主提供 `require.async`。真实 GUI、HTTP 资源及浏览器滚动验收尚未完成,用户接受该发布缺口;发布不自动安装或重启当前实例。详见 [扩展与读取契约](docs/sidebar-extension-contract.md)。
package/lib/client.js CHANGED
@@ -33948,6 +33948,8 @@ window.__ModuleLoader__.load({
33948
33948
  ]);
33949
33949
  /** 外部文件变化重列去抖:一轮外部批量写入(如 agent 连写多文件)合并为一次重列。 */
33950
33950
  const FILE_CHANGE_DEBOUNCE_MS = 400;
33951
+ /** 兼容 host 返回裸文案或附带路径的缺失目录错误。 */
33952
+ const MISSING_DIR_PREFIX = "目录不存在";
33951
33953
  /**
33952
33954
  * 目录图标元素(官方 IconFolderOpen16/Close16)。
33953
33955
  * @author ddj 2026年09月10号
@@ -34043,6 +34045,22 @@ window.__ModuleLoader__.load({
34043
34045
  const changedRelRef = react.default.useRef(/* @__PURE__ */ new Set());
34044
34046
  /** 渲染取数:内存态 → 本地条目缓存 → null(显示加载态)。 */
34045
34047
  const entriesOf = (rel) => dirsRef.current[rel] ?? entriesCacheGet(scope, rel) ?? null;
34048
+ /**
34049
+ * @private
34050
+ * @author ddj 2026年10月23号
34051
+ * @description 移除已删除目录的展开记录,经现有防抖持久化自愈;不改请求 token,保留 finally 的加载态清理。
34052
+ * @param rel 已确认缺失的非根相对目录
34053
+ */
34054
+ function dropDeadDir(rel) {
34055
+ setExpanded(removeExpansion);
34056
+ /** @private @author ddj 2026年10月23号 @param prev 当前展开映射。 @returns 移除失效目录后的展开映射。 */
34057
+ function removeExpansion(prev) {
34058
+ if (prev[rel] !== true) return prev;
34059
+ const next = Object.assign({}, prev);
34060
+ delete next[rel];
34061
+ return next;
34062
+ }
34063
+ }
34046
34064
  /** 预取子目录:≤4 个、排除重型目录、缓存新鲜跳过、已加载跳过、不级联。 */
34047
34065
  const prefetchDirs = (rel, entries) => {
34048
34066
  const want = [];
@@ -34086,7 +34104,14 @@ window.__ModuleLoader__.load({
34086
34104
  if (res.root) setRoot((prev) => prev || res.root);
34087
34105
  entriesCachePut(scope, rel, res.entries);
34088
34106
  if (doPrefetch) prefetchDirs(rel, res.entries);
34089
- } else if (!entriesOf(rel)) setErrors((prev) => Object.assign({}, prev, { [rel]: res?.error ? String(res.error) : "读取目录失败" }));
34107
+ } else if (!entriesOf(rel)) {
34108
+ const message = res?.error ? String(res.error) : "读取目录失败";
34109
+ if (rel && message.startsWith(MISSING_DIR_PREFIX)) {
34110
+ dropDeadDir(rel);
34111
+ return;
34112
+ }
34113
+ setErrors((prev) => Object.assign({}, prev, { [rel]: message }));
34114
+ }
34090
34115
  }).catch((e) => {
34091
34116
  if (scopeRef.current !== scope || tokensRef.current !== tokens || tokens[rel] !== token) return;
34092
34117
  if (!entriesOf(rel)) setErrors((prev) => Object.assign({}, prev, { [rel]: "读取目录异常:" + String(e) }));
@@ -34450,7 +34475,12 @@ window.__ModuleLoader__.load({
34450
34475
  }
34451
34476
  const updateHint = !ctx?.svn?.svnCli ? "SVN CLI 不可用" : !ctx?.openSvnUpdate ? "SVN 更新窗口不可用" : "更新项目(打开 SVN 更新窗口)";
34452
34477
  const errorList = Object.entries(errors);
34453
- const rawErrorText = errorList.length ? errorList[0][1] : null;
34478
+ let rawErrorText = null;
34479
+ if (errorList.length) {
34480
+ const [errorRel, message] = errorList[0];
34481
+ rawErrorText = message;
34482
+ if (errorRel && !message.endsWith(":" + errorRel)) rawErrorText += ":" + errorRel;
34483
+ }
34454
34484
  const sessionMissing = isSessionMissingError(rawErrorText);
34455
34485
  const errorText = rawErrorText === null ? null : sessionMissing ? sessionMissingTitle() + ":" + sessionMissingDetail() : rawErrorText;
34456
34486
  return react.default.createElement("div", {