Skip to content

Commit 5ced87e

Browse files
authored
feat: pull latest run, bump agent (#176)
1 parent cf5bdd9 commit 5ced87e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

apps/array/src/renderer/features/task-detail/stores/taskExecutionStore.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,18 @@ export const useTaskExecutionStore = create<TaskExecutionStore>()(
458458
throw new Error("API client not available");
459459
}
460460

461-
await client.runTaskInCloud(taskId);
462-
store.setRunning(taskId, false);
461+
const updatedTask = await client.runTaskInCloud(taskId);
462+
463+
// Get the latest run from the returned task
464+
const latestRun = updatedTask.latest_run;
465+
466+
if (!latestRun) {
467+
throw new Error("No task run returned from cloud run");
468+
}
469+
470+
// Store the progress and start polling logs
471+
store.setProgress(taskId, latestRun);
472+
store.startLogPolling(taskId, latestRun.log_url);
463473
} catch (error) {
464474
log.error("Error starting cloud task", error);
465475
await window.electronAPI.showMessageBox({

packages/agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@posthog/agent",
3-
"version": "1.24.0",
3+
"version": "1.25.0",
44
"description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

0 commit comments

Comments
 (0)