@akira-tl/forgerelay 1.3.0 → 1.3.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.
- package/CHANGELOG.md +6 -0
- package/dist/workspaces/sessions.js +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable ForgeRelay changes are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.3.1] - 2026-09-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- 并发的重复 `open_workspace` 现在会按 Workspace 合并 context rebuild,避免重叠请求互相清空或重复追加 Workspace instruction 状态。
|
|
12
|
+
|
|
7
13
|
## [1.3.0] - 2026-09-18
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -21,6 +21,7 @@ export class WorkspaceSessionService {
|
|
|
21
21
|
workspaces;
|
|
22
22
|
context;
|
|
23
23
|
pendingOpens = new Map();
|
|
24
|
+
pendingContextRebuilds = new Map();
|
|
24
25
|
lastWorkspaceGcAt = 0;
|
|
25
26
|
constructor(config, store, workspaces, context) {
|
|
26
27
|
this.config = config;
|
|
@@ -294,6 +295,21 @@ export class WorkspaceSessionService {
|
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
297
|
async reusedWorkspaceContext(workspace) {
|
|
298
|
+
const existing = this.pendingContextRebuilds.get(workspace.id);
|
|
299
|
+
if (existing)
|
|
300
|
+
return existing;
|
|
301
|
+
const rebuild = this.rebuildReusedWorkspaceContext(workspace);
|
|
302
|
+
this.pendingContextRebuilds.set(workspace.id, rebuild);
|
|
303
|
+
try {
|
|
304
|
+
return await rebuild;
|
|
305
|
+
}
|
|
306
|
+
finally {
|
|
307
|
+
if (this.pendingContextRebuilds.get(workspace.id) === rebuild) {
|
|
308
|
+
this.pendingContextRebuilds.delete(workspace.id);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
async rebuildReusedWorkspaceContext(workspace) {
|
|
297
313
|
workspace.project = await resolveProjectContext(this.config.configDir, workspace.root);
|
|
298
314
|
Object.assign(workspace, await this.context.loadContextSourcesForWorkspace(workspace.project, workspace.root));
|
|
299
315
|
workspace.capabilityGuides = loadCapabilityGuides(this.config);
|