Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: live-test-results
path: |
build/reports/tests/liveTest/
.cache/opencode-test/runs/
path: build/reports/tests/liveTest/
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Run_Plugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

## [Unreleased]

<p><strong>Added</strong></p>
<ul>
<li>Add the Reworked Terminal as an optional embedded TUI engine on IntelliJ Platform 2026.2 and newer, with feature parity for clipboard integration, file drag and drop, and file navigation.</li>
</ul>

<p><strong>Breaking Changes</strong></p>
<ul>
<li>Drop support for IntelliJ Platform versions earlier than 2025.3.</li>
</ul>

<p><strong>Changed</strong></p>
<ul>
<li>Standardize generated IDE file references on project-relative <code>./path/to/File.kt:line</code> syntax.</li>
</ul>

<p><strong>Fixed</strong></p>
<ul>
<li>Improve embedded terminal cleanup and restart behavior when startup fails, a session terminates, or the terminal engine changes.</li>
<li>Send selected folders as <code>@path/</code> and multi-line editor selections as <code>@path#Lstart-end</code> so OpenCode recognizes them correctly.</li>
</ul>

## [2.2.0] - 2026-06-25

<p><strong>Fixed</strong></p>
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ it.

### Permission prompts

When any agent requests permission, a prompt appears at the bottom of
the panel with three choices:
When any agent requests permission, a prompt appears at the bottom of the panel with three choices:

- **Allow** — permit this one request
- **Allow Always** — permit this type of request for the rest of the session
Expand All @@ -114,7 +113,7 @@ Responses are sent back to the server immediately.

## Requirements

- A JetBrains IDE based on IntelliJ Platform 2024.3.7 or later
- A JetBrains IDE based on IntelliJ Platform 2025.3 or later
- [OpenCode CLI](https://opencode.ai/docs) version `1.16.0+` installed and on `PATH` (or the path configured in
settings)

Expand All @@ -126,8 +125,7 @@ OpenCode Relay will warn you when JetBrains MCP is disabled or when a running Op

To enable JetBrains MCP:

1. Open **Settings | Tools | MCP Server** in your JetBrains
IDE and enable the server.
1. Open **Settings | Tools | MCP Server** in your JetBrains IDE and enable the server.
2. Note the MCP server URL or port shown in the IDE settings.
3. Add a `jetbrains` MCP server to your `opencode.json`.
4. Restart the OpenCode server so it reloads the config.
Expand All @@ -147,8 +145,8 @@ Basic `opencode.json` example:
}
```

Edit `url` to match the host, port, and path from **Settings | Tools | MCP Server**. If your IDE shows a different
port, replace `64342` with that port.
Edit `url` to match the host, port, and path from **Settings | Tools | MCP Server**. If your IDE shows a different port,
replace `64342` with that port.

### MCP Tips

Expand Down
29 changes: 21 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ val liveTest by sourceSets.creating {

dependencies {
intellijPlatform {
intellijIdea("2024.3.7")
intellijIdea("2025.3.3")
pluginVerifier()
bundledPlugin("org.jetbrains.plugins.terminal")
compatiblePlugin("com.intellij.mcpServer")
Expand All @@ -66,6 +66,8 @@ configurations[liveTest.implementationConfigurationName].extendsFrom(configurati
configurations[liveTest.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get())

intellijPlatform {
instrumentCode = false

pluginConfiguration {
id = "com.ashotn.opencode-relay"
name = "OpenCode Relay"
Expand All @@ -80,14 +82,14 @@ intellijPlatform {
}

ideaVersion {
sinceBuild = "243"
sinceBuild = "253"
untilBuild = provider { null }
}
}

pluginVerification {
ides {
create(org.jetbrains.intellij.platform.gradle.IntelliJPlatformType.IntellijIdea, "2024.3.7")
create(org.jetbrains.intellij.platform.gradle.IntelliJPlatformType.IntellijIdea, "2025.3.3")
}
}

Expand All @@ -101,6 +103,22 @@ intellijPlatform {
}

val sandboxProject = layout.buildDirectory.dir("sandbox-project").get().asFile
val idea262Home = providers.gradleProperty("idea262Home")
.orElse(providers.environmentVariable("IDEA_262_HOME"))
.orElse(providers.provider {
"${System.getProperty("user.home")}/.local/share/JetBrains/Toolbox/apps/intellij-idea"
})

val runIde262 by intellijPlatformTesting.runIde.registering {
localPath = layout.dir(idea262Home.map(::file))
sandboxDirectory = layout.buildDirectory.dir("idea-sandbox-262")

task {
description = "Runs the plugin in a local IntelliJ IDEA 2026.2 sandbox."
doFirst { sandboxProject.mkdirs() }
args(sandboxProject.absolutePath)
}
}

fun mainOutputFriendPaths(): String =
sourceSets["main"].output.classesDirs.files.joinToString(",") { it.absolutePath }
Expand Down Expand Up @@ -154,9 +172,4 @@ tasks {

kotlin {
jvmToolchain(21)

sourceSets.named("main") {
kotlin.exclude("com/ashotn/opencode/relay/terminal/ReworkedTuiPanel.kt")
kotlin.exclude("com/ashotn/opencode/relay/terminal/NewSessionTerminalAllowedActionsProvider.kt")
}
}
6 changes: 0 additions & 6 deletions opencode.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,5 @@
"permission": {
"jetbrains_execute_terminal_command": "ask",
"jetbrains_execute_run_configuration": "allow"
},
"agent": {
"explore": {
"mode": "subagent",
"model": "openai/gpt-5.4-mini"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ class OpenCodeTestEnvironment(

private val healthApiClient = HealthApiClient()
private var server: OpenCodeTestServer? = null
private var preserveOnClose = false

fun startServer(timeoutMs: Long = 15_000): OpenCodeTestServer {
check(server == null) { "Scenario environment already has a running server" }
Expand Down Expand Up @@ -217,13 +216,7 @@ class OpenCodeTestEnvironment(
override fun close() {
server?.close()
server = null
if (!preserveOnClose) {
scenarioRoot.deleteRecursively()
}
}

fun preserveForDiagnostics() {
preserveOnClose = true
scenarioRoot.deleteRecursively()
}

fun diagnosticsSummary(maxLogLines: Int = 40): String = buildString {
Expand Down
Loading
Loading