Mid turn fix
This commit is contained in:
Vendored
-5
@@ -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 } });
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -215,11 +215,6 @@ function fixButton(taskId: string, r: Review, f: Record<string, unknown>, 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 } });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user