Skip to content

Commit 967151f

Browse files
authored
1.4.4 (#156)
* 1.4.4 * Update PlanAheadAction.kt
1 parent 4c9fd68 commit 967151f

File tree

5 files changed

+22
-114
lines changed

5 files changed

+22
-114
lines changed

build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ repositories {
2626
val kotlin_version = "2.0.0-Beta5"
2727
val jetty_version = "11.0.18"
2828
val slf4j_version = "2.0.9"
29-
val skyenet_version = "1.0.63"
29+
val skyenet_version = "1.0.64"
3030
val remoterobot_version = "0.11.21"
31+
val jackson_version = "2.17.0"
32+
3133
dependencies {
3234

3335
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
@@ -39,7 +41,7 @@ dependencies {
3941
exclude(group = "org.jetbrains.kotlin", module = "")
4042
}
4143

42-
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.52")
44+
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.53")
4345
{
4446
exclude(group = "org.jetbrains.kotlin", module = "")
4547
}
@@ -59,6 +61,10 @@ dependencies {
5961
exclude(group = "org.jetbrains.kotlin", module = "")
6062
}
6163

64+
implementation(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = jackson_version)
65+
implementation(group = "com.fasterxml.jackson.core", name = "jackson-annotations", version = jackson_version)
66+
implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version = jackson_version)
67+
6268
implementation(group = "com.vladsch.flexmark", name = "flexmark-all", version = "0.64.8")
6369
implementation("com.googlecode.java-diff-utils:diffutils:1.3.0")
6470
implementation(group = "org.apache.httpcomponents.client5", name = "httpclient5", version = "5.2.3")

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.4.3
3+
pluginVersion=1.4.4
44

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

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

Lines changed: 0 additions & 96 deletions
This file was deleted.

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class PlanAheadAction : BaseAction() {
6161
getModuleRootForFile(UITools.getSelectedFile(e)?.parent?.toFile ?: throw RuntimeException(""))
6262
}
6363
DataStorage.sessionPaths[session] = root
64-
TaskRunnerApp.agents[session] = TaskRunnerApp(event = e, root = root)
64+
PlanAheadApp.agents[session] = PlanAheadApp(event = e, root = root)
6565
val server = AppServer.getServer(e.project)
66-
val app = TaskRunnerApp.initApp(server, path)
66+
val app = PlanAheadApp.initApp(server, path)
6767
app.sessions[session] = app.newSession(null, session)
6868
Thread {
6969
Thread.sleep(500)
@@ -76,7 +76,7 @@ class PlanAheadAction : BaseAction() {
7676
}
7777
}
7878

79-
class TaskRunnerApp(
79+
class PlanAheadApp(
8080
applicationName: String = "Task Planning v1.0",
8181
path: String = "/taskDev",
8282
val event: AnActionEvent,
@@ -110,7 +110,7 @@ class TaskRunnerApp(
110110
try {
111111
val settings = getSettings<Settings>(session, user)
112112
if (api is ClientManager.MonitoredClient) api.budget = settings?.budget ?: 2.0
113-
TaskRunnerAgent(
113+
PlanAheadAgent(
114114
user = user,
115115
session = session,
116116
dataStorage = dataStorage,
@@ -146,12 +146,12 @@ class TaskRunnerApp(
146146
return socketServer
147147
}
148148

149-
private val log = LoggerFactory.getLogger(TaskRunnerApp::class.java)
150-
val agents = mutableMapOf<Session, TaskRunnerApp>()
149+
val agents = mutableMapOf<Session, PlanAheadApp>()
150+
private val log = LoggerFactory.getLogger(PlanAheadApp::class.java)
151151
}
152152
}
153153

154-
class TaskRunnerAgent(
154+
class PlanAheadAgent(
155155
user: User?,
156156
session: Session,
157157
dataStorage: StorageInterface,
@@ -168,6 +168,7 @@ class TaskRunnerAgent(
168168
val command: List<String> = listOf(language),
169169
val actorMap: Map<ActorTypes, BaseActor<*, *>> = mapOf(
170170
ActorTypes.TaskBreakdown to ParsedActor(
171+
name = "TaskBreakdown",
171172
resultClass = TaskBreakdownResult::class.java,
172173
prompt = """
173174
|Given a user request, identify and list smaller, actionable tasks that can be directly implemented in code.
@@ -320,7 +321,7 @@ class TaskRunnerAgent(
320321

321322
val event: AnActionEvent,
322323
val root: Path
323-
) : ActorSystem<TaskRunnerAgent.Companion.ActorTypes>(
324+
) : ActorSystem<PlanAheadAgent.Companion.ActorTypes>(
324325
actorMap.map { it.key.name to it.value }.toMap(),
325326
dataStorage,
326327
user,
@@ -522,7 +523,9 @@ class TaskRunnerAgent(
522523
userMessage = userMessage,
523524
highLevelPlan = highLevelPlan,
524525
genState = genState,
525-
task = genState.uitaskMap.get(taskId) ?: ui.newTask(false),
526+
task = genState.uitaskMap.get(taskId) ?: ui.newTask(false).apply {
527+
taskTabs[taskId] = placeholder
528+
},
526529
taskTabs = taskTabs
527530
)
528531
}
@@ -1137,7 +1140,7 @@ class TaskRunnerAgent(
11371140
.let { '"' + it + '"' }
11381141

11391142
companion object {
1140-
private val log = LoggerFactory.getLogger(TaskRunnerAgent::class.java)
1143+
private val log = LoggerFactory.getLogger(PlanAheadAgent::class.java)
11411144

11421145
enum class ActorTypes {
11431146
TaskBreakdown,

src/main/resources/META-INF/plugin.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
description="Start a chat session with an AI to discuss code or get assistance">
3737
<add-to-group group-id="com.github.simiacryptus.aicoder.ui.MainMenu" anchor="last"/>
3838
</action>
39-
<action id="DebugChat" class="com.github.simiacryptus.aicoder.actions.generic.DebugChatAction"
40-
text="Discuss Debug Session"
41-
description="Start a chat session with an AI to discuss code or get assistance">
42-
<add-to-group group-id="com.github.simiacryptus.aicoder.ui.MainMenu" anchor="last"/>
43-
</action>
4439

4540
<group id="com.github.simiacryptus.aicoder.ui.EditorMenu"
4641
class="com.github.simiacryptus.aicoder.ui.EditorMenu"

0 commit comments

Comments
 (0)