Skip to content

Commit b751fd5

Browse files
committed
fix: use environment variable for API URL in ChatInterface
1 parent dd48aeb commit b751fd5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

web-ui/src/components/ChatInterface.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export default function ChatInterface({ projectId, agentStatus = 'idle' }: ChatI
3535
const { data: historyData, error: historyError } = useSWR(
3636
`/projects/${projectId}/chat/history`,
3737
async () => {
38-
const response = await fetch(`http://localhost:8080/api/projects/${projectId}/chat/history`);
39-
if (!response.ok) throw new Error('Failed to load chat history');
40-
return response.json();
38+
const response = await chatApi.getHistory(projectId);
39+
return response.data;
4140
},
4241
{
4342
revalidateOnFocus: false,

0 commit comments

Comments
 (0)