Skip to content

Commit 66ccbf7

Browse files
committed
feat: remove verbose logging
1 parent 564519b commit 66ccbf7

4 files changed

Lines changed: 9 additions & 20 deletions

File tree

bun.lock

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@
4343
"@echristian/eslint-config": "^0.0.18",
4444
"@types/bun": "latest",
4545
"bumpp": "^10.0.2",
46-
"eslint": "^9.19.0",
46+
"eslint": "^9.20.0",
4747
"knip": "^5.43.6",
4848
"tsup": "^8.3.6"
4949
},
5050
"peerDependencies": {
5151
"typescript": "^5.0.0"
52-
},
53-
"packageManager": "pnpm@10.2.1"
52+
}
5453
}

src/routes/chat-completions/handler-streaming.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Context } from "hono"
22

3-
import consola from "consola"
43
import { streamSSE, type SSEMessage } from "hono/streaming"
54

65
import type { ChatCompletionsPayload } from "~/services/copilot/chat-completions/types"
@@ -24,16 +23,7 @@ export async function handlerStreaming(c: Context) {
2423
const response = await chatCompletionsStream(payload)
2524

2625
return streamSSE(c, async (stream) => {
27-
let index = 0
2826
for await (const chunk of response) {
29-
if (index === 0) {
30-
consola.info(
31-
`Streaming response, first chunk: ${JSON.stringify(chunk)}`,
32-
)
33-
}
34-
35-
index++
36-
3727
await stream.writeSSE(chunk as SSEMessage)
3828
}
3929
})

src/routes/chat-completions/handler.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export async function handler(c: Context) {
3838

3939
chunks.push(createFinalChunk(response, payload.model))
4040

41-
consola.info(
42-
`Streaming response, first chunk: ${JSON.stringify(chunks.at(0))}`,
43-
)
44-
4541
return streamSSE(c, async (stream) => {
4642
for (const chunk of chunks) {
4743
await stream.writeSSE({

0 commit comments

Comments
 (0)