Skip to content

Commit 9499511

Browse files
authored
1.2.30 (#135)
* wip * docs * wip * wip * Update gradle.properties * wip * fixed refs * wip * 1.3.0
1 parent 5bd2bc3 commit 9499511

24 files changed

+3459
-296
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44

55
## [Unreleased]
66

7+
## [1.3.0]
8+
9+
### Added
10+
11+
- `DiffChatAction`: A new action for engaging in a chat session to generate and apply code diffs directly within the IDE.
12+
- `MultiDiffChatAction`: Allows for collaborative code review and diff generation across multiple files.
13+
- `AutoDevAction`: Automates development tasks by translating user directives into actionable development tasks and code modifications.
14+
- Support for models from https://www.perplexity.ai/, https://console.groq.com/, and https://modelslab.com/dashboard/, enhancing the plugin's versatility and performance in code generation and analysis.
15+
16+
### Improved
17+
18+
- General performance improvements and bug fixes.
19+
- Enhanced UI for better user experience.
20+
721
## [1.2.24]
822

923
### Improved

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Fully customizable actions in Groovy, including the ability to create your own actions.
1616
* Toolbar UI for quick configuration of temperature/model and display of current token count
1717
* Ability to intercept, edit, and log API requests
18+
* Now with added support for models from https://www.perplexity.ai/, https://console.groq.com/, and https://modelslab.com/dashboard/, expanding the plugin's capabilities in code generation and analysis.
1819

1920
**NOTE**: This project is not affiliated with OpenAI, JetBrains, or any other corporation or organization.
2021
It is provided free of charge, as-is, with no warranty or guarantee of any kind.
@@ -23,13 +24,20 @@ It is provided free of charge, as-is, with no warranty or guarantee of any kind.
2324

2425
To begin with AI Coding Assistant, you will need an [OpenAI access token](https://platform.openai.com/account/api-keys).
2526
After obtaining your OpenAI token, input it into the appropriate field in the plugin's settings panel.
27+
Now, you can also configure the plugin to use models from Perplexity AI, Groq Console, and Models Lab for enhanced coding assistance.
2628

2729
## **Usage Overview**
2830

2931
AI Coding Assistant offers a variety of actions, which are tools specifically designed to simplify and speed up your
3032
coding process. These are not passively triggered by your typing but are invoked on command, giving you full control
3133
over when and how to use them. You can access these actions via the context menu within an editor or in the project view.
3234

35+
### **New in Version 1.3.0**
36+
37+
* **DiffChatAction**: Engage in a chat session to generate and apply code diffs directly within the IDE, streamlining the code review and modification process.
38+
* **MultiDiffChatAction**: Facilitates collaborative code review and diff generation across multiple files, enhancing team productivity.
39+
* **AutoDevAction**: Translates user directives into actionable development tasks and code modifications, automating parts of the development workflow.
40+
3341
## **Action Customization**
3442

3543
In our latest version, we provide the capability to tailor actions to your coding habits and project requirements.

action_documentation.md

Lines changed: 1730 additions & 0 deletions
Large diffs are not rendered by default.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repositories {
2626
val kotlin_version = "1.9.21"
2727
val jetty_version = "11.0.18"
2828
val slf4j_version = "2.0.9"
29-
val skyenet_version = "1.0.49"
29+
val skyenet_version = "1.0.50"
3030
val remoterobot_version = "0.11.21"
3131
dependencies {
3232

@@ -37,7 +37,7 @@ dependencies {
3737
exclude(group = "org.jetbrains.kotlin", module = "")
3838
}
3939

40-
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.44")
40+
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.45")
4141
{
4242
exclude(group = "org.jetbrains.kotlin", module = "")
4343
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginName=intellij-aicoder
22
pluginRepositoryUrl=https://github.com/SimiaCryptus/intellij-aicoder
3-
pluginVersion=1.2.29
3+
pluginVersion=1.3.0
44

55
jvmArgs=-Xmx8g
66
org.gradle.jvmargs=-Xmx8g

src/main/kotlin/com/github/simiacryptus/aicoder/actions/dev/InternalCoderAction.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class InternalCoderAction : BaseAction() {
5151
interpreter = IdeaKotlinInterpreter::class,
5252
symbols = symbols,
5353
temperature = 0.1,
54-
details = "Ensure that responses are printed; this is not a REPL."
54+
details = "Ensure that responses are printed; this is not a REPL.",
55+
model = AppSettingsState.instance.defaultChatModel(),
5556
)
5657

5758
Thread {

src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/AutoDevAction.kt

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ package com.github.simiacryptus.aicoder.actions.generic
33
import com.github.simiacryptus.aicoder.ApplicationEvents
44
import com.github.simiacryptus.aicoder.actions.BaseAction
55
import com.github.simiacryptus.aicoder.actions.dev.AppServer
6-
import com.github.simiacryptus.aicoder.util.ComputerLanguage
76
import com.github.simiacryptus.aicoder.util.UITools
87
import com.github.simiacryptus.aicoder.util.addApplyDiffLinks
98
import com.intellij.openapi.actionSystem.AnActionEvent
10-
import com.intellij.openapi.actionSystem.PlatformDataKeys
119
import com.simiacryptus.jopenai.API
1210
import com.simiacryptus.jopenai.describe.Description
1311
import com.simiacryptus.jopenai.models.ChatModels
@@ -23,7 +21,7 @@ import com.simiacryptus.skyenet.core.platform.file.DataStorage
2321
import com.simiacryptus.skyenet.webui.application.ApplicationInterface
2422
import com.simiacryptus.skyenet.webui.application.ApplicationServer
2523
import com.simiacryptus.skyenet.webui.chat.ChatServer
26-
import com.simiacryptus.skyenet.webui.util.MarkdownUtil
24+
import com.simiacryptus.skyenet.webui.util.MarkdownUtil.renderMarkdown
2725
import org.slf4j.LoggerFactory
2826
import java.awt.Desktop
2927
import java.io.File
@@ -103,7 +101,7 @@ class AutoDevAction : BaseAction() {
103101
session: Session,
104102
user: User?,
105103
val ui: ApplicationInterface,
106-
val model: ChatModels = ChatModels.GPT35Turbo,
104+
val model: ChatModels,
107105
val tools: List<String> = emptyList(),
108106
val actorMap: Map<ActorTypes, BaseActor<*, *>> = mapOf(
109107
ActorTypes.DesignActor to ParsedActor(
@@ -153,31 +151,13 @@ class AutoDevAction : BaseAction() {
153151
fun start(
154152
userMessage: String,
155153
) {
156-
val dataContext = event.dataContext
157-
val virtualFiles = PlatformDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext)
158-
val languages =
159-
virtualFiles?.associate { it to ComputerLanguage.findByExtension(it.extension ?: "")?.name } ?: mapOf()
160-
val virtualFileMap = virtualFiles?.associate { it.toNioPath() to it } ?: mapOf()
161154
val codeFiles = mutableMapOf<String, String>()
162-
val root = virtualFiles?.map { file ->
163-
file.toNioPath()
164-
}?.toTypedArray()?.commonRoot()!!
165-
val paths = virtualFiles.associate { file ->
166-
val relative = root.relativize(file.toNioPath())
167-
val path = relative.toString()
168-
val language = languages[file] ?: "plaintext"
169-
val code = file.contentsToByteArray().toString(Charsets.UTF_8)
170-
codeFiles[path] = code
171-
path to language
172-
}
173-
174155
fun codeSummary() = codeFiles.entries.joinToString("\n\n") { (path, code) ->
175156
"# $path\n```${
176157
path.split('.').last()
177158
}\n$code\n```"
178159
}
179160

180-
181161
val architectureResponse = AgentPatterns.iterate(
182162
input = userMessage,
183163
heading = userMessage,
@@ -186,19 +166,18 @@ class AutoDevAction : BaseAction() {
186166
api = api,
187167
ui = ui,
188168
outputFn = { task, design ->
189-
task.add(MarkdownUtil.renderMarkdown("${design.text}\n\n```json\n${JsonUtil.toJson(design.obj)}\n```"))
169+
task.add(renderMarkdown("${design.text}\n\n```json\n${JsonUtil.toJson(design.obj)}\n```"))
190170
}
191171
)
192172

193-
194173
val task = ui.newTask()
195174
try {
196175
architectureResponse.obj.tasks.forEach { (paths, description) ->
197-
task.complete(ui.hrefLink("Task: $description") {
176+
task.complete(ui.hrefLink(renderMarkdown("Task: $description")) {
198177
val task = ui.newTask()
199178
task.header("Task: $description")
200-
task.complete(
201-
MarkdownUtil.renderMarkdown(
179+
AgentPatterns.retryable(ui,task) {
180+
renderMarkdown(
202181
ui.socketManager.addApplyDiffLinks(
203182
codeFiles.filter { (path, _) -> paths?.contains(path) == true },
204183
taskActor.answer(listOf(
@@ -225,17 +204,14 @@ class AutoDevAction : BaseAction() {
225204
}
226205
}
227206
})
228-
)
207+
}
229208
})
230-
231209
}
232210
} catch (e: Throwable) {
233211
log.warn("Error", e)
234212
task.error(ui, e)
235213
}
236214
}
237-
238-
239215
}
240216

241217
companion object {
@@ -270,7 +246,9 @@ class AutoDevAction : BaseAction() {
270246
}
271247

272248
data class Task(
249+
@Description("List of paths involved in the task. This should include all files to be modified, and can include other files whose content will be informative in writing the changes.")
273250
val paths: List<String>? = null,
251+
@Description("Detailed description of the changes to be made. Markdown format is supported.")
274252
val description: String? = null
275253
) : ValidatedObject {
276254
override fun validate(): String? = when {

src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/CodeChatAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CodeChatAction : BaseAction() {
6565
val socketServer = object : ApplicationServer(applicationName = "Code Chat", path = path) {
6666
override val singleInput = false
6767
override val stickyInput = true
68-
override fun newSession(user: User?, session: Session) = agents[session]!!
68+
override fun newSession(user: User?, session: Session) = agents[session] ?: throw IllegalArgumentException("Unknown session: $session")
6969
}
7070
server.addApp(path, socketServer)
7171
return socketServer

src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/MultiDiffChatAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import java.nio.file.Path
2626

2727
class MultiDiffChatAction : BaseAction() {
2828

29-
val path = "/diffChat"
29+
val path = "/multiDiffChat"
3030

3131
override fun handle(e: AnActionEvent) {
3232

src/main/kotlin/com/github/simiacryptus/aicoder/actions/generic/WebDevAction.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class WebDevAction : BaseAction() {
112112
session: Session,
113113
user: User?,
114114
val ui: ApplicationInterface,
115-
val model: ChatModels = ChatModels.GPT35Turbo,
115+
val model: ChatModels,
116116
val tools: List<String> = emptyList(),
117117
val actorMap: Map<ActorTypes, BaseActor<*, *>> = mapOf(
118118
ActorTypes.HtmlCodingActor to SimpleActor(
@@ -142,7 +142,8 @@ class WebDevAction : BaseAction() {
142142
Identify coding styles and patterns to be used.
143143
List all files to be created, and for each file, describe the public interface / purpose / content summary.
144144
""".trimIndent(),
145-
model = model
145+
model = model,
146+
parsingModel = model,
146147
),
147148
ActorTypes.CodeReviewer to SimpleActor(
148149
prompt = """

0 commit comments

Comments
 (0)