Skip to content

Commit a17d35c

Browse files
authored
Revert "change active file context limit to 40000(20k before & after) (#5262)" (#5277)
This reverts commit 72577ef.
1 parent 7348c17 commit a17d35c

File tree

1 file changed

+2
-2
lines changed
  • plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/focusArea

1 file changed

+2
-2
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/focusArea/FocusAreaContextExtractor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class FocusAreaContextExtractor(private val fqnWebviewAdapter: FqnWebviewAdapter
180180
val startOffset = 0.coerceAtLeast(offset - halfMaxCharacters)
181181
val endOffset = fileText.length.coerceAtMost(offset + halfMaxCharacters)
182182

183-
// Adjust the start and end offsets if necessary to ensure a total of 40k characters
183+
// Adjust the start and end offsets if necessary to ensure a total of 10k characters
184184
val excessCharacters = maxCharacters - (endOffset - startOffset)
185185
val adjustedStartOffset = 0.coerceAtLeast(startOffset - excessCharacters)
186186
val adjustedEndOffset = fileText.length.coerceAtMost(endOffset + excessCharacters)
@@ -198,7 +198,7 @@ class FocusAreaContextExtractor(private val fqnWebviewAdapter: FqnWebviewAdapter
198198
}
199199

200200
companion object {
201-
const val MAX_LENGTH = 40000
201+
const val MAX_LENGTH = 10000
202202
}
203203
}
204204

0 commit comments

Comments
 (0)