diff --git a/app/api/chat-stream/route.ts b/app/api/chat-stream/route.ts index 789a1b91..16c5950c 100644 --- a/app/api/chat-stream/route.ts +++ b/app/api/chat-stream/route.ts @@ -8,8 +8,6 @@ async function createStream(payload: ReadableStream) { const encoder = new TextEncoder(); const decoder = new TextDecoder(); - console.log("[ChatStream]", payload); - const res = await fetch("https://api.openai.com/v1/chat/completions", { headers: { "Content-Type": "application/json", @@ -51,11 +49,10 @@ async function createStream(payload: ReadableStream) { export async function POST(req: NextRequest) { try { - console.log("Request", req); const stream = await createStream(req.body!); return new Response(stream); } catch (error) { - console.error(error); + console.error("[Chat Stream]", error); } } diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 27ce118b..c4e41ca3 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -20,6 +20,7 @@ export async function POST(req: Request) { return new Response(JSON.stringify(completion.data)); } catch (e) { + console.error("[Chat] ", e); return new Response(JSON.stringify(e)); } } diff --git a/app/components/home.module.scss b/app/components/home.module.scss index 3a5365aa..0ef3d75d 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -338,4 +338,10 @@ .export-content { white-space: break-spaces; +} + +.loading-content { + display: flex; + justify-content: center; + align-items: center; } \ No newline at end of file diff --git a/app/favicon.ico b/app/favicon.ico deleted file mode 100644 index 68b7b77f..00000000 Binary files a/app/favicon.ico and /dev/null differ diff --git a/app/layout.tsx b/app/layout.tsx index 6699ad27..d2c8d134 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,5 @@ -import "./globals.scss"; -import "./markdown.scss"; +import "./styles/globals.scss"; +import "./styles/markdown.scss"; export const metadata = { title: "ChatGPT Next Web", diff --git a/app/globals.scss b/app/styles/globals.scss similarity index 100% rename from app/globals.scss rename to app/styles/globals.scss diff --git a/app/markdown.scss b/app/styles/markdown.scss similarity index 100% rename from app/markdown.scss rename to app/styles/markdown.scss