Skip to content

Commit 4fb0ae6

Browse files
committed
fix(search): retain bounded provider diagnostics in production
1 parent 722b3a5 commit 4fb0ae6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/sim/lib/sim-search/live/fireflies-mcp.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { boundedMeetingContent } from '@/lib/sim-search/live/meeting-content'
77
import type { NativeDocument, NativePage, NativeSearchInput } from '@/lib/sim-search/live/types'
88

99
const MAX_MEETING_CONTENT = 200_000
10+
const MAX_DIAGNOSTIC_TEXT_LENGTH = 65_536
1011
const UTC_DAY_MS = 86_400_000
11-
const logger = createLogger('FirefliesMcpSearch')
12+
const logger = createLogger('FirefliesMcpSearch', { logLevel: 'WARN' })
1213

1314
/** Only fixed envelope keys and value kinds may enter diagnostics, never provider keys or values. */
1415
function responseShape(value: unknown) {
@@ -35,6 +36,8 @@ function responseShape(value: unknown) {
3536

3637
function responseTextShape(value: unknown) {
3738
if (typeof value !== 'string') return undefined
39+
if (value.length > MAX_DIAGNOSTIC_TEXT_LENGTH)
40+
return { length: value.length, inspection: 'skipped_size_limit' }
3841
const text = value.trim()
3942
const fenced = text.match(/^```(?:json)?\r?\n([\s\S]*)\r?\n```$/i)?.[1]
4043
let jsonShape: ReturnType<typeof responseShape> | undefined

0 commit comments

Comments
 (0)