Skip to content

Commit cd564ff

Browse files
committed
switch prompt log
1 parent 87feba4 commit cd564ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/src/websockets/websocket-action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
88
import db from '@codebuff/common/db/index'
99
import * as schema from '@codebuff/common/db/schema'
10+
import { getErrorObject } from '@codebuff/common/util/error'
1011
import { ensureEndsWithNewline } from '@codebuff/common/util/file'
1112
import { generateCompactId } from '@codebuff/common/util/string'
1213
import { eq } from 'drizzle-orm'
@@ -31,7 +32,6 @@ import type {
3132
} from '@codebuff/common/actions'
3233
import type { ClientMessage } from '@codebuff/common/websockets/websocket-schema'
3334
import type { WebSocket } from 'ws'
34-
import { getErrorObject } from '@codebuff/common/util/error'
3535

3636
/**
3737
* Sends an action to the client via WebSocket
@@ -147,7 +147,7 @@ const onPrompt = async (
147147
}
148148

149149
if (prompt) {
150-
logger.info(`USER INPUT: ${prompt}`)
150+
logger.info({ prompt }, `USER INPUT: ${prompt.slice(0, 100)}`)
151151
trackEvent(AnalyticsEvent.USER_INPUT, userId, {
152152
prompt,
153153
promptId,

0 commit comments

Comments
 (0)