Skip to content

Commit

Permalink
remove rudimental settings
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Jan 9, 2025
1 parent b9bdbce commit a053152
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@ class InferenceGlobalContext : Disposable {
.astFileLimitChanged(newValue)
}

var astLightMode: Boolean
get() = AppSettingsState.astLightMode
set(newValue) {
if (newValue == astLightMode) return
messageBus
.syncPublisher(InferenceGlobalContextChangedNotifier.TOPIC)
.astLightModeChanged(newValue)
}


var vecdbIsEnabled: Boolean
get() = AppSettingsState.vecdbIsEnabled
set(newValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ interface InferenceGlobalContextChangedNotifier {
fun deploymentModeChanged(newMode: DeploymentMode) {}
fun astFlagChanged(newValue: Boolean) {}
fun astFileLimitChanged(newValue: Int) {}
fun astLightModeChanged(newValue: Boolean) {}
fun vecdbFlagChanged(newValue: Boolean) {}
fun vecdbFileLimitChanged(newValue: Int) {}
fun xDebugLSPPortChanged(newPort: Int?) {}
Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/com/smallcloud/refactai/lsp/LSPConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ data class LSPConfig(
var deployment: DeploymentMode = DeploymentMode.CLOUD,
var ast: Boolean = true,
var astFileLimit: Int? = null,
var astLightMode: Boolean = false,
var vecdb: Boolean = true,
var vecdbFileLimit: Int? = null,
var insecureSSL: Boolean = false,
Expand Down Expand Up @@ -44,9 +43,6 @@ data class LSPConfig(
params.add("--ast-max-files")
params.add("$astFileLimit")
}
if (ast && astLightMode) {
params.add("--ast-light-mode")
}
if (vecdb) {
params.add("--vecdb")
}
Expand All @@ -72,7 +68,6 @@ data class LSPConfig(
if (useTelemetry != other.useTelemetry) return false
if (deployment != other.deployment) return false
if (ast != other.ast) return false
if (astLightMode != other.astLightMode) return false
if (vecdb != other.vecdb) return false
if (astFileLimit != other.astFileLimit) return false
if (vecdbFileLimit != other.vecdbFileLimit) return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ class LSPProcessHolder(val project: Project) : Disposable {
}
}

override fun astLightModeChanged(newValue: Boolean) {
AppExecutorUtil.getAppScheduledExecutorService().submit {
settingsChanged()
}
}

override fun vecdbFlagChanged(newValue: Boolean) {
AppExecutorUtil.getAppScheduledExecutorService().submit {
settingsChanged()
Expand Down Expand Up @@ -192,7 +186,6 @@ class LSPProcessHolder(val project: Project) : Disposable {
deployment = InferenceGlobalContext.deploymentMode,
ast = InferenceGlobalContext.astIsEnabled,
astFileLimit = InferenceGlobalContext.astFileLimit,
astLightMode = InferenceGlobalContext.astLightMode,
vecdb = InferenceGlobalContext.vecdbIsEnabled,
vecdbFileLimit = InferenceGlobalContext.vecdbFileLimit,
insecureSSL = InferenceGlobalContext.insecureSSL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class AppSettingsComponent {
private val myContrastUrlText = JBTextField()
private val myModelText = JBTextField()
private val myAstFileLimitText = JBTextField()
private val myAstLightMode = JCheckBox(RefactAIBundle.message("advancedSettings.useASTLightMode"))
private val myVecdbFileLimitText = JBTextField()
private val insecureSSLCheckBox = JCheckBox(RefactAIBundle.message("advancedSettings.insecureSSL"))
private val telemetrySnippetCheckBox = JCheckBox(RefactAIBundle.message("advancedSettings.telemetryCodeSnippets"))
Expand Down Expand Up @@ -175,15 +174,6 @@ class AppSettingsComponent {
UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER
), 0
)
addComponent(myAstLightMode, UIUtil.LARGE_VGAP)
addComponent(
JBLabel(
RefactAIBundle.message("advancedSettings.useASTLightModeDescription"),
UIUtil.ComponentStyle.SMALL, UIUtil.FontColor.BRIGHTER
).apply {
setCopyable(true)
}, 0
)

addComponent(vecdbCheckbox, UIUtil.LARGE_VGAP)
addComponent(
Expand Down Expand Up @@ -257,11 +247,6 @@ class AppSettingsComponent {
set(newVal) {
myAstFileLimitText.text = newVal.toString()
}
var astLightMode: Boolean
get() = myAstLightMode.isSelected
set(newVal) {
myAstLightMode.isSelected = newVal
}
var vecdbIsEnabled: Boolean
get() = vecdbCheckbox.isSelected
set(newVal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class AppSettingsConfigurable : Configurable {

modified = modified || mySettingsComponent!!.astIsEnabled != InferenceGlobalContext.astIsEnabled
modified = modified || mySettingsComponent!!.astFileLimit != InferenceGlobalContext.astFileLimit
modified = modified || mySettingsComponent!!.astLightMode != InferenceGlobalContext.astLightMode
modified = modified || mySettingsComponent!!.vecdbIsEnabled != InferenceGlobalContext.vecdbIsEnabled
modified = modified || mySettingsComponent!!.vecdbFileLimit != InferenceGlobalContext.vecdbFileLimit

Expand All @@ -83,7 +82,6 @@ class AppSettingsConfigurable : Configurable {
InferenceGlobalContext.xDebugLSPPort = mySettingsComponent!!.xDebugLSPPort
InferenceGlobalContext.astIsEnabled = mySettingsComponent!!.astIsEnabled
InferenceGlobalContext.astFileLimit = mySettingsComponent!!.astFileLimit
InferenceGlobalContext.astLightMode = mySettingsComponent!!.astLightMode
InferenceGlobalContext.vecdbIsEnabled = mySettingsComponent!!.vecdbIsEnabled
InferenceGlobalContext.vecdbFileLimit = mySettingsComponent!!.vecdbFileLimit
InferenceGlobalContext.insecureSSL = mySettingsComponent!!.insecureSSL
Expand All @@ -101,7 +99,6 @@ class AppSettingsConfigurable : Configurable {
mySettingsComponent!!.xDebugLSPPort = InferenceGlobalContext.xDebugLSPPort
mySettingsComponent!!.astIsEnabled = InferenceGlobalContext.astIsEnabled
mySettingsComponent!!.astFileLimit = InferenceGlobalContext.astFileLimit
mySettingsComponent!!.astLightMode = InferenceGlobalContext.astLightMode
mySettingsComponent!!.vecdbIsEnabled = InferenceGlobalContext.vecdbIsEnabled
mySettingsComponent!!.vecdbFileLimit = InferenceGlobalContext.vecdbFileLimit
mySettingsComponent!!.inferenceModel = InferenceGlobalContext.model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class AppSettingsState : PersistentStateComponent<AppSettingsState> {
var vecdbIsEnabledDefaultChanged: Boolean = false
var astFileLimit: Int = 15000
var vecdbFileLimit: Int = 15000
var astLightMode: Boolean = false
var completionMaxTokens: Int = 0
var insecureSSL: Boolean = false
var telemetrySnippetsEnabled: Boolean = false
Expand Down Expand Up @@ -110,9 +109,6 @@ class AppSettingsState : PersistentStateComponent<AppSettingsState> {
override fun astFileLimitChanged(newValue: Int) {
instance.astFileLimit = newValue
}
override fun astLightModeChanged(newValue: Boolean) {
instance.astLightMode = newValue
}
override fun vecdbFileLimitChanged(newValue: Int) {
instance.vecdbFileLimit = newValue
}
Expand Down

0 comments on commit a053152

Please sign in to comment.