Fix worker

This commit is contained in:
Gabriel Brown
2026-06-23 20:35:01 -04:00
parent 5567a4be95
commit c3d265d428
7 changed files with 249 additions and 35 deletions
@@ -114,9 +114,14 @@ export const AgentWorkspaceShell = ({ jobId }: { jobId: Id<'agentJobs'> }) => {
const response = await fetch(`/api/agent-jobs/${jobId}/agent/status`);
if (!response.ok) {
setAgentTurnActive(false);
const body = await response.text();
if (body.includes('workspace is not active')) {
setWorkspaceError(body);
}
return;
}
const data = (await response.json()) as { active?: boolean };
setWorkspaceError(undefined);
setAgentTurnActive(Boolean(data.active));
}, [jobId]);