From 5d35874a62042846d929e50cba3f3bc0865ace29 Mon Sep 17 00:00:00 2001 From: Andrew Charneski Date: Mon, 28 Oct 2024 00:34:58 -0400 Subject: [PATCH] 1.8.2 (#196) * 1.8.2 * 1.8.2 * 1.8.2 * 1.8.2 --- build.gradle.kts | 4 +- gradle.properties | 2 +- .../actions/generic/AutoPlanChatAction.kt | 5 +- .../actions/generic/MassPatchAction.kt | 30 +- .../actions/generic/PlanAheadAction.kt | 5 +- .../aicoder/actions/generic/PlanChatAction.kt | 5 +- .../aicoder/actions/generic/PrePlanAction.kt | 3 + .../aicoder/config/AppSettingsComponent.kt | 22 + .../aicoder/config/AppSettingsState.kt | 39 +- .../config/StaticAppSettingsConfigurable.kt | 44 +- .../simiacryptus/aicoder/ui/EditorMenu.kt | 14 - .../simiacryptus/aicoder/ui/MainMenu.kt | 11 - .../simiacryptus/aicoder/ui/ProjectMenu.kt | 12 - .../github/simiacryptus/aicoder/ui/VcsMenu.kt | 12 - .../aicoder/util/IdeaChatClient.kt | 4 +- src/main/resources/META-INF/plugin.xml | 541 +++++++----------- 16 files changed, 315 insertions(+), 438 deletions(-) delete mode 100644 src/main/kotlin/com/github/simiacryptus/aicoder/ui/EditorMenu.kt delete mode 100644 src/main/kotlin/com/github/simiacryptus/aicoder/ui/MainMenu.kt delete mode 100644 src/main/kotlin/com/github/simiacryptus/aicoder/ui/ProjectMenu.kt delete mode 100644 src/main/kotlin/com/github/simiacryptus/aicoder/ui/VcsMenu.kt diff --git a/build.gradle.kts b/build.gradle.kts index c2c6f8e4..c206dce8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ repositories { val jetty_version = "11.0.24" val slf4j_version = "2.0.16" -val skyenet_version = "1.2.13" +val skyenet_version = "1.2.14" val remoterobot_version = "0.11.23" val jackson_version = "2.17.2" @@ -43,7 +43,7 @@ dependencies { implementation("com.googlecode.java-diff-utils:diffutils:1.3.0") implementation(group = "org.apache.httpcomponents.client5", name = "httpclient5", version = "5.2.3") - implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.1.10") + implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.1.11") implementation(group = "com.simiacryptus.skyenet", name = "kotlin", version = skyenet_version) implementation(group = "com.simiacryptus.skyenet", name = "core", version = skyenet_version) implementation(group = "com.simiacryptus.skyenet", name = "webui", version = skyenet_version) diff --git a/gradle.properties b/gradle.properties index 1268f825..b3b65bfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ pluginName=intellij-aicoder pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder -pluginVersion=1.8.1 +pluginVersion=1.8.2 jvmArgs=-Xmx8g org.gradle.jvmargs=-Xmx8g -XX:MaxMetaspaceSize=1g # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/AutoPlanChatAction.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/AutoPlanChatAction.kt index 3221d31b..406cefb9 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/AutoPlanChatAction.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/AutoPlanChatAction.kt @@ -37,7 +37,10 @@ class AutoPlanChatAction : BaseAction() { ), temperature = AppSettingsState.instance.temperature, workingDir = UITools.getSelectedFolder(e)?.toFile?.absolutePath ?: "", - env = mapOf() + env = mapOf(), + githubToken = AppSettingsState.instance.githubToken, + googleApiKey = AppSettingsState.instance.googleApiKey, + googleSearchEngineId = AppSettingsState.instance.googleSearchEngineId, ) ) if (dialog.showAndGet()) { diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/MassPatchAction.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/MassPatchAction.kt index 4a9388e6..3f9784fd 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/MassPatchAction.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/MassPatchAction.kt @@ -32,7 +32,6 @@ import com.simiacryptus.skyenet.webui.application.AppInfoData import com.simiacryptus.skyenet.webui.application.ApplicationServer import com.simiacryptus.skyenet.webui.application.ApplicationSocketManager import com.simiacryptus.skyenet.webui.session.SocketManager -import com.simiacryptus.skyenet.webui.session.SocketManagerBase import java.awt.BorderLayout import java.awt.Dimension import java.nio.file.Files @@ -47,6 +46,7 @@ import javax.swing.JComboBox import javax.swing.JComponent import javax.swing.JLabel import javax.swing.JPanel +import javax.swing.JCheckBox class MassPatchAction : BaseAction() { override fun getActionUpdateThread() = ActionUpdateThread.BGT @@ -64,17 +64,20 @@ class MassPatchAction : BaseAction() { @Name("Recent Instructions") val recentInstructions = JComboBox() + @Name("Auto Apply") + val autoApply = JCheckBox("Auto Apply Changes") } class UserSettings( var transformationMessage: String = "Review, fix, and improve", var filesToProcess: List = listOf(), + var autoApply: Boolean = false, ) class Settings( val settings: UserSettings? = null, - val project: Project? = null + val project: Project? = null, ) fun getConfig(project: Project?, e: AnActionEvent): Settings? { @@ -89,6 +92,7 @@ class MassPatchAction : BaseAction() { files.forEach { path -> filesToProcess.setItemSelected(path, true) } + autoApply.isSelected = false } val mruPatchInstructions = AppSettingsState.instance.getRecentCommands("PatchInstructions") settingsUI.recentInstructions.model = DefaultComboBoxModel( @@ -121,6 +125,7 @@ class MassPatchAction : BaseAction() { val config = getConfig(project, e) val session = Session.newGlobalID() + SessionProxyServer.chats[session] = MassPatchServer(config=config!!, api=api, autoApply = config.settings?.autoApply ?: false) ApplicationServer.appInfoMap[session] = AppInfoData( applicationName = "Code Chat", singleInput = true, @@ -150,6 +155,7 @@ class MassPatchAction : BaseAction() { this.title = title // Set the default values for the UI elements from userSettings settingsUI.transformationMessage.text = userSettings.transformationMessage + settingsUI.autoApply.isSelected = userSettings.autoApply init() } @@ -168,6 +174,8 @@ class MassPatchAction : BaseAction() { add(Box.createVerticalStrut(10)) add(JLabel("AI Instruction")) add(settingsUI.transformationMessage) + add(Box.createVerticalStrut(10)) + add(settingsUI.autoApply) } add(optionsPanel, BorderLayout.SOUTH) } @@ -179,13 +187,15 @@ class MassPatchAction : BaseAction() { userSettings.transformationMessage = settingsUI.transformationMessage.text userSettings.filesToProcess = settingsUI.filesToProcess.items.filter { path -> settingsUI.filesToProcess.isItemSelected(path) } + userSettings.autoApply = settingsUI.autoApply.isSelected } } } class MassPatchServer( val config: Settings, - val api: ChatClient + val api: ChatClient, + val autoApply: Boolean ) : ApplicationServer( applicationName = "Multi-file Patch Chat", path = "/patchChat", @@ -286,17 +296,18 @@ class MassPatchServer( mainActor.answer(toInput(it), api = api) }, outputFn = { design: String -> - var markdown = (ui as SocketManagerBase).addApplyFileDiffLinks( - root = _root as Path, - response = design as String, + var markdown = ui.socketManager?.addApplyFileDiffLinks( + root = _root, + response = design, handle = { newCodeMap: Map -> newCodeMap.forEach { (path, newCode) -> fileTask.complete("$path Updated") } - } as (Map) -> Unit, + }, ui = ui, api = api as API, - shouldAutoApply = { true } as (Path) -> Boolean, + shouldAutoApply = { autoApply }, + model = AppSettingsState.instance.fastModel.chatModel(), ) """
${renderMarkdown(markdown!!)}
""" }, @@ -318,7 +329,6 @@ class MassPatchServer( } } }, 10, java.util.concurrent.TimeUnit.MILLISECONDS) - } return socketManager } @@ -326,4 +336,4 @@ class MassPatchServer( companion object { val log = org.slf4j.LoggerFactory.getLogger(MassPatchServer::class.java) } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanAheadAction.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanAheadAction.kt index 1faa0b08..982af054 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanAheadAction.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanAheadAction.kt @@ -35,7 +35,10 @@ class PlanAheadAction : BaseAction() { ), temperature = AppSettingsState.instance.temperature, workingDir = UITools.getSelectedFolder(e)?.toFile?.absolutePath ?: "", - env = mapOf() + env = mapOf(), + githubToken = AppSettingsState.instance.githubToken, + googleApiKey = AppSettingsState.instance.googleApiKey, + googleSearchEngineId = AppSettingsState.instance.googleSearchEngineId, ) ) if (dialog.showAndGet()) { diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanChatAction.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanChatAction.kt index 3693025a..6131656c 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanChatAction.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PlanChatAction.kt @@ -33,7 +33,10 @@ class PlanChatAction : BaseAction() { ), temperature = AppSettingsState.instance.temperature, workingDir = UITools.getSelectedFolder(e)?.toFile?.absolutePath ?: "", - env = mapOf() + env = mapOf(), + githubToken = AppSettingsState.instance.githubToken, + googleApiKey = AppSettingsState.instance.googleApiKey, + googleSearchEngineId = AppSettingsState.instance.googleSearchEngineId, ) ) if (dialog.showAndGet()) { diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PrePlanAction.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PrePlanAction.kt index 81badbdb..87a4d927 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PrePlanAction.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/PrePlanAction.kt @@ -64,6 +64,9 @@ class PrePlanAction : BaseAction() { workingDir = root.absolutePath, env = mapOf(), language = if (isWindows) "powershell" else "bash", + githubToken = AppSettingsState.instance.githubToken, + googleApiKey = AppSettingsState.instance.googleApiKey, + googleSearchEngineId = AppSettingsState.instance.googleSearchEngineId, ) planSettings = PlanAheadConfigDialog(e.project, planSettings).let { if (!it.showAndGet()) throw RuntimeException("User cancelled") diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsComponent.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsComponent.kt index 479129c5..98137beb 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsComponent.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsComponent.kt @@ -32,6 +32,24 @@ import javax.swing.table.DefaultTableCellRenderer import javax.swing.table.DefaultTableModel class AppSettingsComponent : com.intellij.openapi.Disposable { + @Suppress("unused") + @Name("GitHub Token") + val githubToken = JBTextField().apply { + toolTipText = "GitHub Personal Access Token" + columns = 30 + } + @Suppress("unused") + @Name("Google API Key") + val googleApiKey = JBTextField().apply { + toolTipText = "Google API Key" + columns = 30 + } + @Suppress("unused") + @Name("Google Search Engine ID") + val googleSearchEngineId = JBTextField().apply { + toolTipText = "Google Search Engine ID" + columns = 30 + } @Suppress("unused") @Name("Store Metadata") val storeMetadata = JTextArea().apply { @@ -268,6 +286,10 @@ class AppSettingsComponent : com.intellij.openapi.Disposable { } init { + // Initialize new fields + githubToken.text = AppSettingsState.instance.githubToken ?: "" + googleApiKey.text = AppSettingsState.instance.googleApiKey ?: "" + googleSearchEngineId.text = AppSettingsState.instance.googleSearchEngineId ?: "" // Initialize executables list setExecutables(AppSettingsState.instance.executables) fun getExecutables(): Set { diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsState.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsState.kt index 4793dabc..8e3d3133 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsState.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/config/AppSettingsState.kt @@ -58,7 +58,10 @@ data class AppSettingsState( var executables: MutableSet = mutableSetOf(), var recentArguments: MutableList = mutableListOf(), val recentCommands: MutableMap = mutableMapOf(), - var userSuppliedModels: MutableList = mutableListOf() + var userSuppliedModels: MutableList = mutableListOf(), + var githubToken: String? = null, + var googleApiKey: String? = null, + var googleSearchEngineId: String? = null ) : PersistentStateComponent { private var onSettingsLoadedListeners = mutableListOf<() -> Unit>() @@ -122,6 +125,9 @@ data class AppSettingsState( if (executables != other.executables) return false //userSuppliedModels if (userSuppliedModels.toTypedArray().contentDeepEquals(other.userSuppliedModels.toTypedArray()).not()) return false + if (googleApiKey != other.googleApiKey) return false + if (googleSearchEngineId != other.googleSearchEngineId) return false + if (githubToken != other.githubToken) return false return true } @@ -151,16 +157,13 @@ data class AppSettingsState( result = 31 * result + enableLegacyActions.hashCode() result = 31 * result + executables.hashCode() result = 31 * result + userSuppliedModels.hashCode() + result = 31 * result + (googleApiKey?.hashCode() ?: 0) + result = 31 * result + (googleSearchEngineId?.hashCode() ?: 0) + result = 31 * result + (githubToken?.hashCode() ?: 0) return result } companion object { - /** - * Gets the instance of AppSettingsState for the current project. - * - * @return The AppSettingsState instance. - */ - val log = LoggerFactory.getLogger(AppSettingsState::class.java) var auxiliaryLog: File? = null const val WELCOME_VERSION: String = "1.5.0" @@ -184,27 +187,5 @@ data class AppSettingsState( var modelId: String = "", var provider: APIProvider = APIProvider.OpenAI ) - /** - * The API key used for authentication with the AI service. - */ - /** - * The selected AI model to be used for code generation and analysis. - */ - /** - * The temperature setting for AI responses (0.0 to 1.0). - */ - /** - * The maximum number of tokens to be used in AI requests. - */ - /** - * Gets the instance of AppSettingsState. - * - * @return The current instance of AppSettingsState. - */ - /** - * Loads the state from the given state object. - * - * @param state The state object to load from. - */ var analyticsEnabled: Boolean = false } \ No newline at end of file diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/config/StaticAppSettingsConfigurable.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/config/StaticAppSettingsConfigurable.kt index 83482ca1..687dba9e 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/config/StaticAppSettingsConfigurable.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/config/StaticAppSettingsConfigurable.kt @@ -36,7 +36,6 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { override fun build(component: AppSettingsComponent): JComponent { val tabbedPane = com.intellij.ui.components.JBTabbedPane() - try {// Basic Settings Tab val basicSettingsPanel = JPanel(BorderLayout()).apply { add(JPanel(BorderLayout()).apply { @@ -50,17 +49,13 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { add(component.fastModel) }) add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { - add(JLabel("Main Image Model:")) + add(JLabel("Image Model:")) add(component.mainImageModel) }) add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { add(JLabel("Temperature:")) add(component.temperature) }) - add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { - add(JLabel("Human Language:")) - add(component.humanLanguage) - }) add(JPanel(BorderLayout()).apply { add(JLabel("API Configurations:"), BorderLayout.NORTH) add(component.apis, BorderLayout.CENTER) @@ -69,6 +64,22 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { add(JLabel("Executables:")) add(component.executablesPanel) }) + add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { + add(JLabel("Human Language:")) + add(component.humanLanguage) + }) + add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { + add(JLabel("GitHub Token:")) + add(component.githubToken) + }) + add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { + add(JLabel("Google API Key:")) + add(component.googleApiKey) + }) + add(JPanel(FlowLayout(FlowLayout.LEFT)).apply { + add(JLabel("Google Search Engine ID:")) + add(component.googleSearchEngineId) + }) }) } tabbedPane.addTab("Basic Settings", basicSettingsPanel) @@ -172,13 +183,13 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { override fun write(settings: AppSettingsState, component: AppSettingsComponent) { try { - // Update the executables in the settings - settings.executables = component.getExecutables().toMutableSet() + component.githubToken.text = settings.githubToken ?: "" + component.googleApiKey.text = settings.googleApiKey ?: "" + component.googleSearchEngineId.text = settings.googleSearchEngineId ?: "" component.humanLanguage.text = settings.humanLanguage component.listeningPort.text = settings.listeningPort.toString() component.listeningEndpoint.text = settings.listeningEndpoint component.suppressErrors.isSelected = settings.suppressErrors -// component.modelName.selectedItem = settings.modelName component.fastModel.selectedItem = settings.fastModel component.smartModel.selectedItem = settings.smartModel component.apiLog.isSelected = settings.apiLog @@ -206,14 +217,14 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { override fun read(component: AppSettingsComponent, settings: AppSettingsState) { try { - // settings.modelName = component.modelName.selectedItem as String - // Update the UI with the executables from the settings + settings.githubToken = component.githubToken.text.takeIf { it.isNotBlank() } + settings.googleApiKey = component.googleApiKey.text.takeIf { it.isNotBlank() } + settings.googleSearchEngineId = component.googleSearchEngineId.text.takeIf { it.isNotBlank() } settings.executables = component.getExecutables().toMutableSet() settings.humanLanguage = component.humanLanguage.text settings.listeningPort = component.listeningPort.text.safeInt() settings.listeningEndpoint = component.listeningEndpoint.text settings.suppressErrors = component.suppressErrors.isSelected - // settings.modelName = component.modelName.selectedItem as String settings.fastModel = component.fastModel.selectedItem as String settings.smartModel = component.smartModel.selectedItem as String settings.apiLog = component.apiLog.isSelected @@ -225,7 +236,6 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { settings.mainImageModel = (component.mainImageModel.selectedItem as String) settings.pluginHome = File(component.pluginHome.text) settings.shellCommand = component.shellCommand.text - // settings.modelName = component.modelName.selectedItem as String settings.enableLegacyActions = component.enableLegacyActions.isSelected val tableModel = component.apis.model as DefaultTableModel @@ -234,17 +244,11 @@ class StaticAppSettingsConfigurable : AppSettingsConfigurable() { val key = tableModel.getValueAt(row, 1) as String val base = tableModel.getValueAt(row, 2) as String if (key.isNotBlank()) { -// settings.apiKey?.put(provider, key) settings.apiKey = settings.apiKey?.toMutableMap()?.apply { put(provider, key) } -// settings.apiBase?.put(provider, base) settings.apiBase = settings.apiBase?.toMutableMap()?.apply { put(provider, base) } } else { -// settings.apiKey.remove(provider) settings.apiKey = settings.apiKey?.toMutableMap()?.apply { remove(provider) } -// settings.apiBase.remove(provider) - settings.apiBase = settings.apiBase?.toMutableMap()?.apply { - remove(provider) - } + settings.apiBase = settings.apiBase?.toMutableMap()?.apply { remove(provider) } } } settings.showWelcomeScreen = component.showWelcomeScreen.isSelected diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/EditorMenu.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/ui/EditorMenu.kt deleted file mode 100644 index 3195d28f..00000000 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/EditorMenu.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.github.simiacryptus.aicoder.ui - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent - -open class EditorMenu : com.intellij.openapi.actionSystem.DefaultActionGroup() { - override fun getChildren(e: AnActionEvent?): Array { - val children = super.getChildren(e) - return children -// return AppSettingsState.instance.editorActions.edit(children) - } -} - - diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/MainMenu.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/ui/MainMenu.kt deleted file mode 100644 index 3b72d4dc..00000000 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/MainMenu.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.github.simiacryptus.aicoder.ui - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent - -open class MainMenu : com.intellij.openapi.actionSystem.DefaultActionGroup() { - override fun getChildren(e: AnActionEvent?): Array { - val children = super.getChildren(e) - return children - } -} \ No newline at end of file diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/ProjectMenu.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/ui/ProjectMenu.kt deleted file mode 100644 index 479be8ff..00000000 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/ProjectMenu.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.simiacryptus.aicoder.ui - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent - -open class ProjectMenu : com.intellij.openapi.actionSystem.DefaultActionGroup() { - override fun getChildren(e: AnActionEvent?): Array { - val children = super.getChildren(e) - return children -// return AppSettingsState.instance.fileActions.edit(children) - } -} \ No newline at end of file diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/VcsMenu.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/ui/VcsMenu.kt deleted file mode 100644 index 2332281f..00000000 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/ui/VcsMenu.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.github.simiacryptus.aicoder.ui - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent - -open class VcsMenu : com.intellij.openapi.actionSystem.DefaultActionGroup() { - override fun getChildren(e: AnActionEvent?): Array { - val children = super.getChildren(e) - return children -// return AppSettingsState.instance.fileActions.edit(children) - } -} \ No newline at end of file diff --git a/src/main/kotlin/com/github/simiacryptus/aicoder/util/IdeaChatClient.kt b/src/main/kotlin/com/github/simiacryptus/aicoder/util/IdeaChatClient.kt index ba9f75bd..89fa6fb0 100644 --- a/src/main/kotlin/com/github/simiacryptus/aicoder/util/IdeaChatClient.kt +++ b/src/main/kotlin/com/github/simiacryptus/aicoder/util/IdeaChatClient.kt @@ -9,7 +9,6 @@ import com.intellij.openapi.ui.DialogWrapper import com.intellij.ui.components.JBScrollPane import com.intellij.util.ui.FormBuilder import com.simiacryptus.jopenai.ChatClient -import com.simiacryptus.jopenai.isSanctioned import com.simiacryptus.jopenai.models.APIProvider import com.simiacryptus.jopenai.models.ApiModel.* import com.simiacryptus.jopenai.models.OpenAIModel @@ -54,7 +53,6 @@ open class IdeaChatClient( apiBase = apiBase ) { override fun log(level: Level, msg: String) { - if (isSanctioned) return super.log(level, msg) inner.log(level, msg) } @@ -88,7 +86,7 @@ open class IdeaChatClient( ): ChatResponse { val storeMetadata = AppSettingsState.instance.storeMetadata var chatRequest = chatRequest.copy( - store = storeMetadata?.let { !isSanctioned && it.isNotBlank() }, + store = storeMetadata?.let { it.isNotBlank() }, metadata = storeMetadata?.let { JsonUtil.fromJson(it, Map::class.java) } ) val lastEvent = lastEvent diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 0b3db459..d9ebfeb8 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,12 +1,10 @@ - com.github.simiacryptus.intellijopenaicodeassist AI Coding Assistant SimiaCryptus Software Code Tools com.intellij.modules.platform com.intellij.modules.lang - Git4Idea @@ -24,349 +22,255 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file