feat(KB-176): complete Step 4 — update executor system prompt and task_done tool

This commit is contained in:
gsxdsm
2026-03-30 19:02:04 -07:00
parent 11b19f7aa2
commit 29ca64b50f
3 changed files with 24 additions and 5 deletions

View File

@@ -550,7 +550,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
async updateTask(
id: string,
updates: { title?: string; description?: string; prompt?: string; worktree?: string; status?: string | null; dependencies?: string[]; blockedBy?: string | null; paused?: boolean; baseBranch?: string; size?: "S" | "M" | "L"; reviewLevel?: number; mergeRetries?: number; modelProvider?: string | null; modelId?: string | null; validatorModelProvider?: string | null; validatorModelId?: string | null; error?: string | null },
updates: { title?: string; description?: string; prompt?: string; worktree?: string; status?: string | null; dependencies?: string[]; blockedBy?: string | null; paused?: boolean; baseBranch?: string; size?: "S" | "M" | "L"; reviewLevel?: number; mergeRetries?: number; modelProvider?: string | null; modelId?: string | null; validatorModelProvider?: string | null; validatorModelId?: string | null; error?: string | null; summary?: string | null },
): Promise<Task> {
return this.withTaskLock(id, async () => {
const dir = this.taskDir(id);
@@ -623,6 +623,11 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
} else if (updates.error !== undefined) {
task.error = updates.error;
}
if (updates.summary === null) {
task.summary = undefined;
} else if (updates.summary !== undefined) {
task.summary = updates.summary;
}
task.updatedAt = new Date().toISOString();
await this.atomicWriteTaskJson(dir, task);