@@ -17,6 +17,7 @@ import { selectFrom } from '../../shared/utilities/tsUtils'
1717import { checkLeftContextKeywordsForJson } from './commonUtil'
1818import { CodeWhispererSupplementalContext } from '../models/model'
1919import { getOptOutPreference } from '../../shared/telemetry/util'
20+ import { indent } from '../../shared'
2021
2122let tabSize : number = getTabSizeSetting ( )
2223
@@ -202,18 +203,26 @@ function logSupplementalContext(supplementalContext: CodeWhispererSupplementalCo
202203 return
203204 }
204205
205- let logString = `CodeWhispererSupplementalContext:
206- isUtg: ${ supplementalContext . isUtg } ,
207- isProcessTimeout: ${ supplementalContext . isProcessTimeout } ,
208- contentsLength: ${ supplementalContext . contentsLength } ,
209- latency: ${ supplementalContext . latency } ,
210- `
206+ let logString = indent (
207+ `CodeWhispererSupplementalContext:
208+ isUtg: ${ supplementalContext . isUtg } ,
209+ isProcessTimeout: ${ supplementalContext . isProcessTimeout } ,
210+ contentsLength: ${ supplementalContext . contentsLength } ,
211+ latency: ${ supplementalContext . latency } ` ,
212+ 4 ,
213+ true
214+ ) . trimStart ( )
215+
211216 supplementalContext . supplementalContextItems . forEach ( ( context , index ) => {
212- logString += `Chunk ${ index } :
213- Path: ${ context . filePath }
214- Content: ${ index } :${ context . content }
215- Score: ${ context . score }
216- -----------------------------------------------`
217+ logString += indent (
218+ `\nChunk ${ index } :
219+ Path: ${ context . filePath }
220+ Length: ${ context . content }
221+ Score: ${ context . score }
222+ -----------------------------------------------` ,
223+ 8 ,
224+ true
225+ )
217226 } )
218227
219228 getLogger ( ) . debug ( logString )
0 commit comments