You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererFileContextProvider.kt
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -262,6 +262,14 @@ class DefaultCodeWhispererFileContextProvider(private val project: Project) : Fi
262
262
val projectContext = contexts.find { it.strategy ==CrossFileStrategy.Codemap }
263
263
val openTabsContext = contexts.find { it.strategy ==CrossFileStrategy.OpenTabsBM25 }
264
264
265
+
/**
266
+
* We're using both codemap and opentabs context
267
+
* 1. If both are present, codemap should live in the first of supplemental context list, i.e [codemap, opentabs_0, opentabs_1...] with strategy name codemap
268
+
* 2. If only one is present, return the one present with corresponding strategy name, either codemap or opentabs
269
+
* 3. If none is present, return empty list with strategy name empty
270
+
*
271
+
* Service will throw 400 error when context length is greater than 20480, drop the last chunk until the total length fits in the cap
0 commit comments