move streaming api routes

This commit is contained in:
Ramnique Singh 2025-04-30 23:36:49 +05:30
parent 82069bdc53
commit 51b0f7901e
4 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ export function useCopilot({ projectId, workflow, context }: UseCopilotParams):
try { try {
const res = await getCopilotResponseStream(projectId, messages, workflow, context || null); const res = await getCopilotResponseStream(projectId, messages, workflow, context || null);
const eventSource = new EventSource(`/api/v1/copilot-stream-response/${res.streamId}`); const eventSource = new EventSource(`/api/copilot-stream-response/${res.streamId}`);
eventSource.onmessage = (event) => { eventSource.onmessage = (event) => {
try { try {

View file

@ -164,7 +164,7 @@ export function Chat({
return; return;
} }
eventSource = new EventSource(`/api/v1/stream-response/${streamId}`); eventSource = new EventSource(`/api/stream-response/${streamId}`);
eventSource.addEventListener("message", (event) => { eventSource.addEventListener("message", (event) => {
if (ignore) { if (ignore) {