Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4.4 #156

Merged
merged 2 commits into from
Apr 23, 2024
Merged

1.4.4 #156

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ 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.63"
val skyenet_version = "1.0.64"
val remoterobot_version = "0.11.21"
val jackson_version = "2.17.0"

dependencies {

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

implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.52")
implementation(group = "com.simiacryptus", name = "jo-penai", version = "1.0.53")
{
exclude(group = "org.jetbrains.kotlin", module = "")
}
Expand All @@ -59,6 +61,10 @@ dependencies {
exclude(group = "org.jetbrains.kotlin", module = "")
}

implementation(group = "com.fasterxml.jackson.core", name = "jackson-databind", version = jackson_version)
implementation(group = "com.fasterxml.jackson.core", name = "jackson-annotations", version = jackson_version)
implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version = jackson_version)

implementation(group = "com.vladsch.flexmark", name = "flexmark-all", version = "0.64.8")
implementation("com.googlecode.java-diff-utils:diffutils:1.3.0")
implementation(group = "org.apache.httpcomponents.client5", name = "httpclient5", version = "5.2.3")
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.4.3
pluginVersion=1.4.4

jvmArgs=-Xmx8g
org.gradle.jvmargs=-Xmx8g
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ class PlanAheadAction : BaseAction() {
getModuleRootForFile(UITools.getSelectedFile(e)?.parent?.toFile ?: throw RuntimeException(""))
}
DataStorage.sessionPaths[session] = root
TaskRunnerApp.agents[session] = TaskRunnerApp(event = e, root = root)
PlanAheadApp.agents[session] = PlanAheadApp(event = e, root = root)
val server = AppServer.getServer(e.project)
val app = TaskRunnerApp.initApp(server, path)
val app = PlanAheadApp.initApp(server, path)
app.sessions[session] = app.newSession(null, session)
Thread {
Thread.sleep(500)
Expand All @@ -76,7 +76,7 @@ class PlanAheadAction : BaseAction() {
}
}

class TaskRunnerApp(
class PlanAheadApp(
applicationName: String = "Task Planning v1.0",
path: String = "/taskDev",
val event: AnActionEvent,
Expand Down Expand Up @@ -110,7 +110,7 @@ class TaskRunnerApp(
try {
val settings = getSettings<Settings>(session, user)
if (api is ClientManager.MonitoredClient) api.budget = settings?.budget ?: 2.0
TaskRunnerAgent(
PlanAheadAgent(
user = user,
session = session,
dataStorage = dataStorage,
Expand Down Expand Up @@ -146,12 +146,12 @@ class TaskRunnerApp(
return socketServer
}

private val log = LoggerFactory.getLogger(TaskRunnerApp::class.java)
val agents = mutableMapOf<Session, TaskRunnerApp>()
val agents = mutableMapOf<Session, PlanAheadApp>()
private val log = LoggerFactory.getLogger(PlanAheadApp::class.java)
}
}

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

val event: AnActionEvent,
val root: Path
) : ActorSystem<TaskRunnerAgent.Companion.ActorTypes>(
) : ActorSystem<PlanAheadAgent.Companion.ActorTypes>(
actorMap.map { it.key.name to it.value }.toMap(),
dataStorage,
user,
Expand Down Expand Up @@ -522,7 +523,9 @@ class TaskRunnerAgent(
userMessage = userMessage,
highLevelPlan = highLevelPlan,
genState = genState,
task = genState.uitaskMap.get(taskId) ?: ui.newTask(false),
task = genState.uitaskMap.get(taskId) ?: ui.newTask(false).apply {
taskTabs[taskId] = placeholder
},
taskTabs = taskTabs
)
}
Expand Down Expand Up @@ -1137,7 +1140,7 @@ class TaskRunnerAgent(
.let { '"' + it + '"' }

companion object {
private val log = LoggerFactory.getLogger(TaskRunnerAgent::class.java)
private val log = LoggerFactory.getLogger(PlanAheadAgent::class.java)

enum class ActorTypes {
TaskBreakdown,
Expand Down
5 changes: 0 additions & 5 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
description="Start a chat session with an AI to discuss code or get assistance">
<add-to-group group-id="com.github.simiacryptus.aicoder.ui.MainMenu" anchor="last"/>
</action>
<action id="DebugChat" class="com.github.simiacryptus.aicoder.actions.generic.DebugChatAction"
text="Discuss Debug Session"
description="Start a chat session with an AI to discuss code or get assistance">
<add-to-group group-id="com.github.simiacryptus.aicoder.ui.MainMenu" anchor="last"/>
</action>

<group id="com.github.simiacryptus.aicoder.ui.EditorMenu"
class="com.github.simiacryptus.aicoder.ui.EditorMenu"
Expand Down
Loading