From 51b0f7901e42128121d27f456d6203561547efce Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Wed, 30 Apr 2025 23:36:49 +0530 Subject: [PATCH] move streaming api routes --- .../api/{v1 => }/copilot-stream-response/[streamId]/route.ts | 0 .../app/api/{v1 => }/stream-response/[streamId]/route.ts | 0 apps/rowboat/app/projects/[projectId]/copilot/use-copilot.tsx | 2 +- .../app/projects/[projectId]/playground/components/chat.tsx | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename apps/rowboat/app/api/{v1 => }/copilot-stream-response/[streamId]/route.ts (100%) rename apps/rowboat/app/api/{v1 => }/stream-response/[streamId]/route.ts (100%) diff --git a/apps/rowboat/app/api/v1/copilot-stream-response/[streamId]/route.ts b/apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts similarity index 100% rename from apps/rowboat/app/api/v1/copilot-stream-response/[streamId]/route.ts rename to apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts diff --git a/apps/rowboat/app/api/v1/stream-response/[streamId]/route.ts b/apps/rowboat/app/api/stream-response/[streamId]/route.ts similarity index 100% rename from apps/rowboat/app/api/v1/stream-response/[streamId]/route.ts rename to apps/rowboat/app/api/stream-response/[streamId]/route.ts diff --git a/apps/rowboat/app/projects/[projectId]/copilot/use-copilot.tsx b/apps/rowboat/app/projects/[projectId]/copilot/use-copilot.tsx index 7817346e..b36fcb27 100644 --- a/apps/rowboat/app/projects/[projectId]/copilot/use-copilot.tsx +++ b/apps/rowboat/app/projects/[projectId]/copilot/use-copilot.tsx @@ -42,7 +42,7 @@ export function useCopilot({ projectId, workflow, context }: UseCopilotParams): try { 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) => { try { diff --git a/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx b/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx index 14347e08..68845b6a 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/components/chat.tsx @@ -164,7 +164,7 @@ export function Chat({ return; } - eventSource = new EventSource(`/api/v1/stream-response/${streamId}`); + eventSource = new EventSource(`/api/stream-response/${streamId}`); eventSource.addEventListener("message", (event) => { if (ignore) {