File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
packages/core/src/codewhisperer Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export class PredictionTracker {
7272 const size = Buffer . byteLength ( content , 'utf8' )
7373
7474 const timestamp = Date . now ( )
75- const storageKey = `${ filePath } -${ timestamp } `
75+ const storageKey = `${ filePath . replace ( / \/ / g , '__' ) } -${ timestamp } `
7676
7777 const snapshot : FileSnapshot = {
7878 filePath,
@@ -337,7 +337,9 @@ export class PredictionTracker {
337337 const storageKey = filename . substring ( 0 , filename . length - snapshotFileSuffix . length )
338338 const parts = storageKey . split ( '-' )
339339 const timestamp = parseInt ( parts [ parts . length - 1 ] , 10 )
340- const originalFilename = parts . slice ( 0 , parts . length - 1 ) . join ( '-' )
340+ // Rejoin to get file path without timestamp
341+ const sanitizedFilename = parts . slice ( 0 , parts . length - 1 ) . join ( '-' )
342+ const originalFilename = sanitizedFilename . replace ( / _ _ / g, '/' )
341343 const contentPath = this . getSnapshotFilePath ( storageKey )
342344
343345 try {
Original file line number Diff line number Diff line change @@ -156,8 +156,6 @@ export async function buildListRecommendationRequest(
156156 } ,
157157 }
158158
159- const predictionTypes = [ 'EDITS' ]
160-
161159 // Combine inline and prediction supplemental contexts
162160 const finalSupplementalContext = inlineSupplementalContext . concat ( predictionSupplementalContext )
163161
@@ -170,7 +168,6 @@ export async function buildListRecommendationRequest(
170168 } ,
171169 supplementalContexts : finalSupplementalContext ,
172170 editorState : editorState ,
173- predictionTypes : predictionTypes ,
174171 maxResults : CodeWhispererConstants . maxRecommendations ,
175172 customizationArn : selectedCustomization . arn === '' ? undefined : selectedCustomization . arn ,
176173 optOutPreference : getOptOutPreference ( ) ,
You can’t perform that action at this time.
0 commit comments