diff --git a/build.gradle.kts b/build.gradle.kts index d3553d43..c6a8a1d3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,7 +25,7 @@ repositories { val kotlin_version = "1.9.20" val jetty_version = "11.0.18" val slf4j_version = "2.0.9" -val skyenet_version = "1.0.28" +val skyenet_version = "1.0.30" dependencies { implementation(group = "com.simiacryptus", name = "joe-penai", version = "1.0.28") diff --git a/gradle.properties b/gradle.properties index 3ea5fd0b..6ab76bbf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ pluginName=intellij-aicoder pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder # SemVer format -> https://semver.org -pluginVersion=1.2.19 +pluginVersion=1.2.20 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html #pluginSinceBuild = 203 pluginSinceBuild=231 diff --git a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AnalogueFileAction.groovy b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AnalogueFileAction.groovy index ded1b1c6..313275cb 100644 --- a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AnalogueFileAction.groovy +++ b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AnalogueFileAction.groovy @@ -13,7 +13,7 @@ import org.apache.commons.io.IOUtils import javax.swing.* import java.nio.file.Path -class AnalogueFileAction extends FileContextAction { +class AnalogueFileAction extends FileContextAction { private static class ProjectFile { public String path = "" @@ -91,7 +91,7 @@ class AnalogueFileAction extends FileContextAction Paths should be relative to the project root and should not exist. Output the file path using the a line with the format "File: ". Output the file code directly after the header line with no additional decoration. - """.stripIndent() + """.stripIndent(), null ), new ChatMessage( ChatMessage.Role.user, """ @@ -102,7 +102,7 @@ class AnalogueFileAction extends FileContextAction ``` ${baseFile.code} ``` - """.stripIndent() + """.stripIndent(), null ) ] String response = api.chat( diff --git a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AppendAction.groovy b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AppendAction.groovy index 33522b85..8d7c1fa1 100644 --- a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AppendAction.groovy +++ b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/AppendAction.groovy @@ -20,11 +20,11 @@ class AppendAction extends SelectionAction { request.messages = [ new OpenAIClient.ChatMessage( OpenAIClient.ChatMessage.Role.system, - "Append text to the end of the user's prompt" + "Append text to the end of the user's prompt", null ), new OpenAIClient.ChatMessage( OpenAIClient.ChatMessage.Role.user, - state.selectedText.toString() + state.selectedText.toString(), null ) ] def chatResponse = api.chat(request, AppSettingsState.instance.defaultChatModel()) diff --git a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/CreateFileAction.groovy b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/CreateFileAction.groovy index 0f7d37ba..e7013b05 100644 --- a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/CreateFileAction.groovy +++ b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/CreateFileAction.groovy @@ -10,7 +10,7 @@ import com.simiacryptus.openai.OpenAIClient.ChatRequest import javax.swing.* -class CreateFileAction extends FileContextAction { +class CreateFileAction extends FileContextAction { CreateFileAction() { super(false, true) @@ -94,7 +94,7 @@ class CreateFileAction extends FileContextAction { Paths should be relative to the project root and should not exist. Output the file path using the a line with the format "File: ". Output the file code directly after the header line with no additional decoration. - """.stripIndent() + """.stripIndent(), null ), //language=TEXT new ChatMessage( @@ -102,7 +102,7 @@ class CreateFileAction extends FileContextAction { Create a new file based on the following directive: $directive The file location should be based on the selected path `${basePath}` - """.stripIndent() + """.stripIndent(), null ) ] def response = api.chat( @@ -119,7 +119,7 @@ class CreateFileAction extends FileContextAction { def pathPattern = ~"""File(?:name)?: ['`"]?([^'`"]+)['`"]?""" if (header =~ pathPattern) { def match = (header =~ pathPattern)[0] - outputPath = match[1].trim() + outputPath = match[1].toString() } return new ProjectFile( path: outputPath, diff --git a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/GenerateStoryAction.groovy b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/GenerateStoryAction.groovy index 6950f56f..78f77b98 100644 --- a/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/GenerateStoryAction.groovy +++ b/src/main/groovy/com/github/simiacryptus/aicoder/actions/generic/GenerateStoryAction.groovy @@ -11,7 +11,7 @@ import org.apache.commons.io.FileUtils import javax.swing.* -class GenerateStoryAction extends FileContextAction { +class GenerateStoryAction extends FileContextAction { GenerateStoryAction() { super(false, true) @@ -239,7 +239,7 @@ class GenerateStoryAction extends FileContextAction = HashMap() - private val version = 2.0001 + private val version = 2.0002 fun edit(superChildren: Array): Array { val children = superChildren.toList().toMutableList()