@posthog/agent 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -93,12 +93,16 @@ const agent = new Agent({
93
93
  });
94
94
 
95
95
  const poller = setInterval(async () => {
96
- const runs = await agent.getPostHogClient()?.listTaskRuns(taskId);
96
+ const client = agent.getPostHogClient();
97
+ const runs = await client?.listTaskRuns(taskId);
97
98
  const latestRun = runs?.sort((a, b) =>
98
99
  new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
99
100
  )[0];
101
+
100
102
  if (latestRun) {
101
- renderProgress(latestRun.status, latestRun.log);
103
+ // Fetch logs from S3 using presigned URL
104
+ const logs = await client?.fetchTaskRunLogs(latestRun);
105
+ renderProgress(latestRun.status, logs || []);
102
106
  }
103
107
  }, 3000);
104
108