feat: seal isolated worker recovery, parent integration and review console

This commit is contained in:
Agent Workbench Dev
2026-10-31 02:02:06 +08:00
parent 3abc0e8595
commit 2ada7b899f
34 changed files with 2877 additions and 64 deletions
+2 -1
View File
@@ -127,7 +127,7 @@ export function searchFiles(project, args) {
scope: '有数量/体积上限的文本搜索;无结果不表示所有文件都已搜索。' };
}
export function proposeFile(store, session, args, { patch = null } = {}) {
export function proposeFile(store, session, args, { patch = null, sourceBinding = null } = {}) {
assertWorkersResolved(store, session.projectId);
assertWorkerWriteScope(store, session, args.path);
assertMcpResolved(store, session.projectId);
@@ -150,6 +150,7 @@ export function proposeFile(store, session, args, { patch = null } = {}) {
id: randomUUID(), path: args.path, reason: String(args.reason ?? '建议修改').slice(0, 600), status: 'pending',
baseExists: !!original, baseSha256: original?.sha256 ?? null, baseContent,
...(patch ? { editKind: 'exact-patch', patch } : {}),
...(sourceBinding ? { sourceBinding: structuredClone(sourceBinding) } : {}),
content, sha256: hash(Buffer.from(content, 'utf8')), diff: parts, createdAt: now(),
additions: parts.filter(part => part.added).reduce((sum, part) => sum + (part.count ?? 0), 0),
deletions: parts.filter(part => part.removed).reduce((sum, part) => sum + (part.count ?? 0), 0),