File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
packages/core/src/codewhisperer Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,11 @@ export const vsCodeState: VsCodeState = {
4747 isFreeTierLimitReached : false ,
4848}
4949
50- export type UtgStrategy = 'ByName ' | 'ByContent '
50+ export type UtgStrategy = 'byName ' | 'byContent '
5151
5252export type CrossFileStrategy = 'opentabs' | 'codemap' | 'bm25' | 'default'
5353
54- export type SupplementalContextStrategy = CrossFileStrategy | UtgStrategy | 'Empty '
54+ export type SupplementalContextStrategy = CrossFileStrategy | UtgStrategy | 'empty '
5555
5656export type PatchInfo = {
5757 name : string
Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ export async function fetchSupplementalContextForSrc(
8888 const supContext = ( await opentabsContextPromise ) ?? [ ]
8989 return {
9090 supplementalContextItems : supContext ,
91- strategy : supContext . length === 0 ? 'Empty ' : 'opentabs' ,
91+ strategy : supContext . length === 0 ? 'empty ' : 'opentabs' ,
9292 }
9393 }
9494
9595 // codemap will use opentabs context plus repomap if it's present
9696 if ( supplementalContextConfig === 'codemap' ) {
97- let strategy : SupplementalContextStrategy = 'Empty '
97+ let strategy : SupplementalContextStrategy = 'empty '
9898 let hasCodemap : boolean = false
9999 let hasOpentabs : boolean = false
100100 const opentabsContextAndCodemap = await waitUntil (
@@ -132,7 +132,7 @@ export async function fetchSupplementalContextForSrc(
132132 } else if ( hasOpentabs ) {
133133 strategy = 'opentabs'
134134 } else {
135- strategy = 'Empty '
135+ strategy = 'empty '
136136 }
137137
138138 return {
@@ -161,7 +161,7 @@ export async function fetchSupplementalContextForSrc(
161161 const supContext = opentabsContext ?? [ ]
162162 return {
163163 supplementalContextItems : supContext ,
164- strategy : supContext . length === 0 ? 'Empty ' : 'opentabs' ,
164+ strategy : supContext . length === 0 ? 'empty ' : 'opentabs' ,
165165 }
166166 }
167167
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export async function fetchSupplementalContextForTest(
5454 const shouldProceed = shouldFetchUtgContext ( editor . document . languageId )
5555
5656 if ( ! shouldProceed ) {
57- return shouldProceed === undefined ? undefined : { supplementalContextItems : [ ] , strategy : 'Empty ' }
57+ return shouldProceed === undefined ? undefined : { supplementalContextItems : [ ] , strategy : 'empty ' }
5858 }
5959
6060 const languageConfig = utgLanguageConfigs [ editor . document . languageId ]
@@ -69,10 +69,10 @@ export async function fetchSupplementalContextForTest(
6969 return {
7070 supplementalContextItems : await generateSupplementalContextFromFocalFile (
7171 crossSourceFile ,
72- 'ByName ' ,
72+ 'byName ' ,
7373 cancellationToken
7474 ) ,
75- strategy : 'ByName ' ,
75+ strategy : 'byName ' ,
7676 }
7777 }
7878 throwIfCancelled ( cancellationToken )
@@ -84,18 +84,18 @@ export async function fetchSupplementalContextForTest(
8484 return {
8585 supplementalContextItems : await generateSupplementalContextFromFocalFile (
8686 crossSourceFile ,
87- 'ByContent ' ,
87+ 'byContent ' ,
8888 cancellationToken
8989 ) ,
90- strategy : 'ByContent ' ,
90+ strategy : 'byContent ' ,
9191 }
9292 }
9393
9494 // TODO (Metrics): 4. Failure count - when unable to find focal file (supplemental context empty)
9595 getLogger ( ) . debug ( `CodeWhisperer failed to fetch utg context` )
9696 return {
9797 supplementalContextItems : [ ] ,
98- strategy : 'Empty ' ,
98+ strategy : 'empty ' ,
9999 }
100100}
101101
You can’t perform that action at this time.
0 commit comments