Mid turn fix

This commit is contained in:
Ian Gulliver
2026-10-15 22:07:44 -07:00
parent f1c8027d9e
commit 6424caaf4b
4 changed files with 2 additions and 12 deletions
-5
View File
@@ -148,11 +148,6 @@ function fixButton(taskId, r, f, where) {
try {
const sessions = await get("/api/tasks/{taskId}/sessions", { path: { taskId } });
const live = sessions.findLast((s) => s.state !== "completed");
if (live && live.state !== "idle") {
button.disabled = false;
void showAlert("The agent is mid-turn. Send this once its turn ends.");
return;
}
if (live) {
await post("/api/sessions/{sessionId}/messages", { path: { sessionId: live.id }, body: { text } });
}
+1 -1
View File
File diff suppressed because one or more lines are too long