Fix worker
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user