Skip to content

Commit

Permalink
1.5.6 (#168)
Browse files Browse the repository at this point in the history
* 1.5.6

* Update PluginStartupActivity.kt
  • Loading branch information
acharneski authored May 28, 2024
1 parent 3e1f379 commit 1685750
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
val kotlin_version = "2.0.0-Beta5"
val jetty_version = "11.0.18"
val slf4j_version = "2.0.9"
val skyenet_version = "1.0.74"
val skyenet_version = "1.0.75"
val remoterobot_version = "0.11.21"
val jackson_version = "2.17.0"

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginName=intellij-aicoder
pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder
pluginVersion=1.5.5
pluginVersion=1.5.6

jvmArgs=-Xmx8g
org.gradle.jvmargs=-Xmx8g
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.intellij.openapi.util.TextRange
import com.simiacryptus.skyenet.core.platform.ApplicationServices
import com.simiacryptus.skyenet.core.platform.StorageInterface
import com.simiacryptus.skyenet.webui.application.ApplicationInterface
import com.simiacryptus.skyenet.webui.application.ApplicationServer
import com.simiacryptus.skyenet.webui.session.SessionTask
import com.simiacryptus.skyenet.webui.util.MarkdownUtil.renderMarkdown
import org.intellij.lang.annotations.Language
Expand Down Expand Up @@ -48,6 +49,13 @@ class DiffChatAction : BaseAction() {
selectionStart = 0
selectionEnd = rawText.length
}
ApplicationServer.sessionAppInfoMap[session.toString()] = mapOf(
"applicationName" to "Code Chat",
"singleInput" to false,
"stickyInput" to true,
"loadImages" to false,
"showMenubar" to false,
)
SessionProxyServer.agents[session] = object : CodeChatSocketManager(
session = session,
language = language,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class PlanAheadAgent(
try {
val tasksByID =
plan.obj.tasksByID?.entries?.toTypedArray()?.associate { it.key to it.value } ?: mapOf()
val pool: ThreadPoolExecutor = clientManager.getPool(session, user, dataStorage)
val pool: ThreadPoolExecutor = clientManager.getPool(session, user)
val genState = GenState(tasksByID.toMutableMap())
val diagramTask = ui.newTask(false).apply { task.add(placeholder) }
val diagramBuffer =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ class WebDevelopmentAssistantAction : BaseAction() {

override fun handle(e: AnActionEvent) {
val session = StorageInterface.newGlobalID()
// val storage = ApplicationServices.dataStorageFactory(DiffChatAction.root) as DataStorage?
val selectedFile = UITools.getSelectedFolder(e)
if (/*null != storage &&*/ null != selectedFile) {
if (null != selectedFile) {
DataStorage.sessionPaths[session] = selectedFile.toFile
}
SessionProxyServer.chats[session] = WebDevApp(root = selectedFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ data class AppSettingsState(
var apiThreads: Int = 4,
var apiBase: Map<String, String>? = mapOf("OpenAI" to "https://api.openai.com/v1"),
var apiKey: Map<String, String>? = mapOf("OpenAI" to ""),
// var tokenCounter: Int = 0,
var modalTasks: Boolean = false,
var suppressErrors: Boolean = false,
var apiLog: Boolean = false,
Expand All @@ -38,7 +37,6 @@ data class AppSettingsState(
if (logPath == null) {
logPath = System.getProperty("user.home")
}

File(logPath, "AICodingAsst")
},
var showWelcomeScreen: Boolean = true,
Expand Down Expand Up @@ -72,10 +70,6 @@ data class AppSettingsState(
XmlSerializerUtil.copyBean(fromJson, this)
recentCommands.clear()
recentCommands.putAll(fromJson.recentCommands)
// editorActions.actionSettings.clear();
// editorActions.actionSettings.putAll(fromJson.editorActions.actionSettings)
// fileActions.actionSettings.clear();
// fileActions.actionSettings.putAll(fromJson.fileActions.actionSettings)
notifySettingsLoaded()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.intellij.openapi.startup.ProjectActivity
import com.intellij.openapi.vfs.VirtualFileManager
import com.simiacryptus.skyenet.core.OutputInterceptor
import com.simiacryptus.skyenet.core.platform.*
import com.simiacryptus.skyenet.core.platform.file.DataStorage
import com.simiacryptus.skyenet.core.platform.ApplicationServicesConfig.isLocked
import com.simiacryptus.skyenet.core.platform.file.UsageManager
import java.io.File
import java.util.concurrent.atomic.AtomicBoolean
Expand All @@ -20,6 +20,7 @@ class PluginStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
// Check if this is the first run after installation
try {
ApplicationServicesConfig.dataStorageRoot = ApplicationServicesConfig.dataStorageRoot.resolve("intellij")
val currentThread = Thread.currentThread()
val prevClassLoader = currentThread.contextClassLoader
try {
Expand Down Expand Up @@ -85,7 +86,7 @@ class PluginStartupActivity : ProjectActivity {
if (isInitialized.getAndSet(true)) return
OutputInterceptor.setupInterceptor()
ApplicationServices.clientManager = object : ClientManager() {
override fun createClient(session: Session, user: User?, dataStorage: StorageInterface?) =
override fun createClient(session: Session, user: User?) =
IdeaOpenAIClient.instance
}
ApplicationServices.usageManager = UsageManager(File(AppSettingsState.instance.pluginHome, "usage"))
Expand All @@ -101,7 +102,7 @@ class PluginStartupActivity : ProjectActivity {
override fun putUser(accessToken: String, user: User) = user
override fun logout(accessToken: String, user: User) {}
}
ApplicationServices.isLocked = true
isLocked = true
val resolve = AppSettingsState.instance.pluginHome.resolve(".skyenet")
}

Expand Down

0 comments on commit 1685750

Please sign in to comment.