File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
apps/array/src/renderer/features/task-detail/stores Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff 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 ( {
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments