@@ -15,7 +15,6 @@ import { range, shuffle, uniq } from 'lodash'
1515import { CustomFilePickerConfigSchema } from './custom-file-picker-config'
1616import { promptFlashWithFallbacks } from '../llm-apis/gemini-with-fallbacks'
1717import { promptAiSdk } from '../llm-apis/vercel-ai-sdk/ai-sdk'
18- import type { Logger } from '@codebuff/types/logger'
1918import {
2019 castAssistantMessage ,
2120 messagesWithSystem ,
@@ -31,6 +30,7 @@ import type {
3130} from '@codebuff/bigquery'
3231import type { Message } from '@codebuff/common/types/messages/codebuff-message'
3332import type { ProjectFileContext } from '@codebuff/common/util/file'
33+ import type { Logger } from '@codebuff/types/logger'
3434
3535const NUMBER_OF_EXAMPLE_FILES = 100
3636const MAX_FILES_PER_REQUEST = 30
@@ -356,7 +356,10 @@ async function getRelevantFiles(params: {
356356 logger,
357357 } )
358358 const start = performance . now ( )
359- let codebuffMessages = messagesWithSystem ( { messages : messagesWithPrompt , system } )
359+ let codebuffMessages = messagesWithSystem ( {
360+ messages : messagesWithPrompt ,
361+ system,
362+ } )
360363
361364 // Converts assistant messages to user messages for finetuned model
362365 codebuffMessages = codebuffMessages
@@ -370,13 +373,15 @@ async function getRelevantFiles(params: {
370373 . filter ( ( msg ) => msg !== null )
371374 const finetunedModel = modelId ?? finetunedVertexModels . ft_filepicker_010
372375
373- let response = await promptFlashWithFallbacks ( codebuffMessages , {
376+ let response = await promptFlashWithFallbacks ( {
377+ messages : codebuffMessages ,
374378 clientSessionId,
375379 userInputId,
376380 model : models . openrouter_gemini2_5_flash ,
377381 userId,
378382 useFinetunedModel : finetunedModel ,
379383 fingerprintId,
384+ logger,
380385 } )
381386 const end = performance . now ( )
382387 const duration = end - start
@@ -528,7 +533,10 @@ function generateNonObviousRequestFilesPrompt(
528533 fileContext : ProjectFileContext ,
529534 count : number ,
530535) : string {
531- const exampleFiles = getExampleFileList ( { fileContext, count : NUMBER_OF_EXAMPLE_FILES } )
536+ const exampleFiles = getExampleFileList ( {
537+ fileContext,
538+ count : NUMBER_OF_EXAMPLE_FILES ,
539+ } )
532540 return `
533541Your task is to find the second-order relevant files for the following user request (in quotes).
534542
@@ -583,7 +591,10 @@ function generateKeyRequestFilesPrompt(
583591 fileContext : ProjectFileContext ,
584592 count : number ,
585593) : string {
586- const exampleFiles = getExampleFileList ( { fileContext, count : NUMBER_OF_EXAMPLE_FILES } )
594+ const exampleFiles = getExampleFileList ( {
595+ fileContext,
596+ count : NUMBER_OF_EXAMPLE_FILES ,
597+ } )
587598
588599 return `
589600Your task is to find the most relevant files for the following user request (in quotes).
0 commit comments