Add task summaries, closed-task search and a summary turn before discard
This commit is contained in:
Vendored
+9
@@ -55,6 +55,12 @@ export function currentSession(taskId) {
|
||||
return state.sessions.get(taskId)?.findLast((s) => s.state !== "completed") ?? state.sessions.get(taskId)?.at(-1);
|
||||
}
|
||||
export function taskState(task) {
|
||||
if (task.discarding) {
|
||||
return "discarding";
|
||||
}
|
||||
if (task.merging) {
|
||||
return "merging";
|
||||
}
|
||||
const s = currentSession(task.id)?.state;
|
||||
return s === "idle" && task.reviewing ? "reviewing" : s;
|
||||
}
|
||||
@@ -246,6 +252,9 @@ export function handleEvent(ev) {
|
||||
case "task.merge_title":
|
||||
case "task.merge_queued":
|
||||
case "task.merge_unqueued":
|
||||
case "task.merge_started":
|
||||
case "task.merge_ended":
|
||||
case "task.discard_started":
|
||||
case "task.merged":
|
||||
case "task.discarded":
|
||||
if (ev.project_id) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-1
@@ -112,7 +112,7 @@ function taskHead(rerender) {
|
||||
mergeIn.disabled = false;
|
||||
}
|
||||
};
|
||||
const discard = h("button", { class: "danger", disabled: busy, title: "Delete the worktree and branch without merging" }, "Discard");
|
||||
const discard = h("button", { class: "danger", disabled: busy, title: "The agent writes the task summary, then byre deletes the worktree and branch without merging" }, "Discard");
|
||||
discard.onclick = () => confirmThen(`Discard "${task.title}"?`, "Discard", true, discard, async () => {
|
||||
await post("/api/tasks/{taskId}/discard", { path: { taskId: task.id } });
|
||||
await setFocus({ task_id: null });
|
||||
@@ -944,6 +944,10 @@ function renderEvent(ev, ctx) {
|
||||
}
|
||||
case "task.merged":
|
||||
return h("div", { class: "note" }, `${ev.actor} merged the task${p["commit"] ? ` as ${String(p["commit"]).slice(0, 7)}` : ""}${p["pushed"] ? ` and pushed it to ${String(p["pushed"])}` : ""} `, when);
|
||||
case "task.summary":
|
||||
return h("div", { class: "note" }, `${ev.actor} set the task summary `, when);
|
||||
case "task.discard_started":
|
||||
return h("div", { class: "note" }, `${ev.actor} asked to discard the task; the agent writes the task summary first `, when);
|
||||
case "task.discarded":
|
||||
return h("div", { class: "note" }, `${ev.actor} discarded the task `, when);
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user