fix: add missing /api prefix in fetchAgentLogsWithMeta causing empty agent logs
fetchAgentLogsWithMeta was calling fetch(url) directly instead of fetch(buildApiUrl(url)), so requests hit the SPA fallback instead of the /api/tasks/:id/logs endpoint, returning HTML that silently failed JSON parsing and resulted in empty agent log entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -420,8 +420,7 @@ export async function fetchAgentLogsWithMeta(
|
||||
const suffix = params.toString() ? `?${params.toString()}` : "";
|
||||
const url = withProjectId(`/tasks/${taskId}/logs${suffix}`, projectId);
|
||||
|
||||
// Call api function to get the fetch-compatible URL
|
||||
const response = await fetch(url);
|
||||
const response = await fetch(buildApiUrl(url));
|
||||
|
||||
if (!response.ok) {
|
||||
const data = await response.json().catch(() => ({ error: "Failed to fetch agent logs" }));
|
||||
|
||||
Reference in New Issue
Block a user