dsh-recall-plugin 2.4.14 → 2.4.15
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/CHANGELOG.md +10 -0
- package/lib/index.js +2 -20
- package/lib/root-ready.js +27 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
|
|
4
4
|
|
|
5
|
+
## [2.4.15] - 2026-10-18
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- **构建产物工作区根在启动预热时仍被建仓/列 tag(issue #24 报告者指出的边角)**:`captureSnapshot` 与 init/snapshot-info 早已对「产物 root」(`dist/`、`…/target/debug` 等)停用快照,但预热链入口没有同一道判断——工作区开在 `dist/`、`build/` 里时每次启动都会白付 `resolveStore + ensureGit + rebuildOrphans` 的进程开销。判据与 `captureSnapshot` 同源,补单测(含 POSIX 大小写敏感语义)。
|
|
10
|
+
|
|
11
|
+
### 变更
|
|
12
|
+
|
|
13
|
+
- 根就绪链(预热与 init 共享、in-flight 去重)从 `index.ts` 闭包迁到独立模块 `src/host/root-ready.ts`:入口早退分支与幂等契约可被单测直接钉住,`index.ts` 只留装配。
|
|
14
|
+
|
|
5
15
|
## [2.4.14] - 2026-10-18
|
|
6
16
|
|
|
7
17
|
### 修复
|
package/lib/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createSessionInfo, titleFromEvents, messageTextFromEvents } from "./ses
|
|
|
8
8
|
import { createRoutesCore } from "./routes-core.js";
|
|
9
9
|
import { createRoutesManage } from "./routes-manage.js";
|
|
10
10
|
import { createIntentJournal } from "./intent-journal.js";
|
|
11
|
+
import { createEnsureRootReady } from "./root-ready.js";
|
|
11
12
|
import * as dshSettings from "@deepseek-ai/dsh-settings";
|
|
12
13
|
import * as E from "./errors.js";
|
|
13
14
|
const name = "dsh-recall-plugin";
|
|
@@ -236,26 +237,7 @@ function apply(ctx, config) {
|
|
|
236
237
|
},
|
|
237
238
|
agentBusy: (root) => agentBusy(null, root)
|
|
238
239
|
});
|
|
239
|
-
const
|
|
240
|
-
function ensureRootReady(root, sessionId) {
|
|
241
|
-
const cached = rootReady.get(root);
|
|
242
|
-
if (cached) return cached;
|
|
243
|
-
const task = (async () => {
|
|
244
|
-
let store = await rt.resolveStore(root);
|
|
245
|
-
store = await rt.tryUpgradeToHome(root);
|
|
246
|
-
await rt.ensureGit(root, store);
|
|
247
|
-
await snaps.loadIndex(root, sessionId);
|
|
248
|
-
await snaps.rebuildOrphans(root, sessionId || "");
|
|
249
|
-
if (await snaps.guardStoreFormat(store)) await intentJournal.recover(store);
|
|
250
|
-
rt.cleanupLegacy(root);
|
|
251
|
-
return store;
|
|
252
|
-
})();
|
|
253
|
-
rootReady.set(root, task);
|
|
254
|
-
task.catch(() => {
|
|
255
|
-
rootReady.delete(root);
|
|
256
|
-
});
|
|
257
|
-
return task;
|
|
258
|
-
}
|
|
240
|
+
const ensureRootReady = createEnsureRootReady({ rt, snaps, journal: intentJournal, cfg });
|
|
259
241
|
const deps = {
|
|
260
242
|
ctx,
|
|
261
243
|
rt,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { buildArtifactRootSegment } from "./exclude-patterns.js";
|
|
2
|
+
function createEnsureRootReady({ rt, snaps, journal, cfg }) {
|
|
3
|
+
const ready = /* @__PURE__ */ new Map();
|
|
4
|
+
return function ensureRootReady(root, sessionId) {
|
|
5
|
+
if (buildArtifactRootSegment(root, cfg.baseExcludes, rt.isWin)) return Promise.resolve(null);
|
|
6
|
+
const cached = ready.get(root);
|
|
7
|
+
if (cached) return cached;
|
|
8
|
+
const task = (async () => {
|
|
9
|
+
let store = await rt.resolveStore(root);
|
|
10
|
+
store = await rt.tryUpgradeToHome(root);
|
|
11
|
+
await rt.ensureGit(root, store);
|
|
12
|
+
await snaps.loadIndex(root, sessionId);
|
|
13
|
+
await snaps.rebuildOrphans(root, sessionId || "");
|
|
14
|
+
if (await snaps.guardStoreFormat(store)) await journal.recover(store);
|
|
15
|
+
rt.cleanupLegacy(root);
|
|
16
|
+
return store;
|
|
17
|
+
})();
|
|
18
|
+
ready.set(root, task);
|
|
19
|
+
task.catch(() => {
|
|
20
|
+
ready.delete(root);
|
|
21
|
+
});
|
|
22
|
+
return task;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
createEnsureRootReady
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-recall-plugin",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.15",
|
|
4
4
|
"description": "在 DSH 中撤回自己发过的消息:工作区文件与对话历史一起回到那条消息发出之前,消息的文本与附件自动放回输入框,改完即可重发。文件走独立影子 git 快照(不碰项目自身的 git),对话走官方 sessions.fork,原会话归档可找回。",
|
|
5
5
|
"icon": "assets/icon.svg",
|
|
6
6
|
"type": "module",
|