Skip to content

Commit

Permalink
codewhisperer: revert 1000 code chunks calculation experiment (#3854)
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-ShaoHua authored Sep 8, 2023
1 parent 8b5738e commit 97cb26f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import com.intellij.openapi.editor.markup.EffectType
import com.intellij.openapi.editor.markup.TextAttributes
import com.intellij.ui.JBColor
import software.amazon.awssdk.regions.Region
import software.aws.toolkits.jetbrains.services.codewhisperer.service.CodeWhispererUserGroup
import software.aws.toolkits.jetbrains.services.codewhisperer.service.CodeWhispererUserGroupSettings
import java.awt.Font
import java.text.SimpleDateFormat
import java.time.format.DateTimeFormatter
Expand Down Expand Up @@ -79,8 +77,7 @@ object CodeWhispererConstants {
}

object CrossFile {
val CHUNK_SIZE
get() = if (CodeWhispererUserGroupSettings.getInstance().getUserGroup() == CodeWhispererUserGroup.Control) 60 else 1000
const val CHUNK_SIZE = 60
}

object Utg {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CodeWhispererFileContextProviderTest {
assertThat(CodeWhispererConstants.CrossFile.CHUNK_SIZE).isEqualTo(60)

whenever(userGroupSetting.getUserGroup()).thenReturn(CodeWhispererUserGroup.CrossFile)
assertThat(CodeWhispererConstants.CrossFile.CHUNK_SIZE).isEqualTo(1000)
assertThat(CodeWhispererConstants.CrossFile.CHUNK_SIZE).isEqualTo(60)
}

@Test
Expand Down

0 comments on commit 97cb26f

Please sign in to comment.