Skip to content

chore: release new version for VSCode && IDEA#482

Merged
phodal merged 6 commits intophodal:masterfrom
unit-mesh:master
Dec 4, 2025
Merged

chore: release new version for VSCode && IDEA#482
phodal merged 6 commits intophodal:masterfrom
unit-mesh:master

Conversation

@phodal
Copy link
Owner

@phodal phodal commented Dec 4, 2025

Summary by CodeRabbit

  • Documentation

    • Updated platform documentation with VSCode plugin sections and Kotlin Multiplatform ecosystem details
  • Chores

    • Renamed plugin to "AutoDev Experiment"
    • Updated version to 0.3.4
    • Added VSCode extension publishing guide

✏️ Tip: You can customize this high-level summary in your review settings.

Add PUBLISH.md with steps and guidelines for publishing the VSCode extension.
Renames the plugin to "AutoDev Experiment", sets version to 0.3.5, and adds plugin verification and publishing token configuration.
Replace RxJava-based SSE streaming with kotlinx.coroutines Flow and ProducerScope for improved async handling and code simplification. Also remove deprecated AsyncFileEditorProvider usage. Bump mppVersion to 0.3.6.
Replaces Internal API calls with public alternatives and reflection where necessary to improve compatibility and stability. Also updates progress indicator handling and ensures temp files are properly deleted after shell execution.
- Add comprehensive module breakdown (Core, Clients, Server & Tools)
- Include platform support and status for each module
- Add current version information
- Translate section to English
- Add new IntelliJ plugin experimental link
- Update mpp-web status to In Progress
Copilot AI review requested due to automatic review settings December 4, 2025 14:34
@phodal phodal merged commit ce48f7c into phodal:master Dec 4, 2025
4 of 5 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR migrates SSE streaming from RxJava Flowable to Kotlin coroutines, removes AsyncFileEditorProvider from preview editors, updates action invocation to use ActionUtil, replaces internal API usage with alternatives, and updates plugin configuration, versioning, and documentation.

Changes

Cohort / File(s) Summary
RxJava to Coroutines Migration
core/src/main/kotlin/cc/unitmesh/devti/llms/custom/CustomSSEProcessor.kt, core/src/main/kotlin/cc/unitmesh/devti/llms/custom/ResponseBodyCallback.kt
Replaced Flowable-based SSE streaming with coroutines callbackFlow and ProducerScope. Changed emission methods (onNext→trySend, onComplete→close, isCancelled→isClosedForSend) and exception handling flow.
AsyncFileEditorProvider Removal
core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpPreviewEditorProvider.kt, exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/debugger/editor/ShirePreviewEditorProvider.kt
Removed AsyncFileEditorProvider base class and createEditorAsync overrides from preview editor providers, retaining synchronous createEditor paths.
Action Invocation Refactoring
core/src/main/kotlin/cc/unitmesh/devti/mcp/host/BuiltinMcpTools.kt, exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/vcs/CommitInsCommand.kt
Replaced direct actionPerformed calls with ActionUtil.performActionDumbAwareWithCallbacks and ActionUtil-based updates for proper action invocation handling. Modified GetProgressIndicatorsTool to report single current indicator instead of list.
Internal API Replacements
core/src/main/kotlin/cc/unitmesh/devti/observer/test/RunTestUtil.kt, core/src/main/kotlin/cc/unitmesh/devti/sketch/run/ProcessExecutor.kt, exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/processor/shell/ShireShellCommandRunner.kt
Replaced direct API access with reflective access (RunTestUtil), replaced startProcessWithPty with explicit process creation via withExePath/createProcess (ProcessExecutor), and replaced internal delete-on-termination with try/finally cleanup (ShireShellCommandRunner).
Plugin Configuration & Versioning
mpp-idea/build.gradle.kts, mpp-idea/gradle.properties, mpp-idea/src/main/resources/META-INF/plugin.xml
Renamed plugin from "AutoDev Compose UI" / "AutoDev Next" to "AutoDev Experiment", added pluginVerification and publishing blocks to build.gradle.kts, and bumped mppVersion to 0.3.4.
Documentation Updates
AGENTS.md, README.md, mpp-vscode/PUBLISH.md
Reorganized AGENTS.md with VSCode and Desktop release sections, replaced AutoDev 3.0 narrative in README.md with Multiplatform Revolution (KMP ecosystem with module tables), and added new VSCode extension publishing guide.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

  • CustomSSEProcessor.kt and ResponseBodyCallback.kt: Verify RxJava→coroutines migration preserves SSE parsing, error handling, and cancellation semantics; ensure ProducerScope lifecycle and exception propagation are correct.
  • BuiltinMcpTools.kt: Confirm GetProgressIndicatorsTool correctly returns single indicator and ActionUtil invocations handle dumb mode and callbacks appropriately.
  • ProcessExecutor.kt: Validate process creation via withExePath/createProcess maintains feature parity with startProcessWithPty.
  • Internal API replacements: Ensure reflective access fallbacks, try/finally cleanup, and new process invocation patterns do not introduce race conditions or resource leaks.

Possibly related PRs

Poem

🐰 Streams now flow with coroutine grace,
RxJava's legacy finds its place,
AsyncEditors fade to sync,
ActionUtil helps us rethink,
Experiment blooms in plugin space!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb1588a and c1855b4.

📒 Files selected for processing (15)
  • AGENTS.md (1 hunks)
  • README.md (1 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/llms/custom/CustomSSEProcessor.kt (4 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/llms/custom/ResponseBodyCallback.kt (8 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpPreviewEditorProvider.kt (1 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/mcp/host/BuiltinMcpTools.kt (5 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/observer/test/RunTestUtil.kt (1 hunks)
  • core/src/main/kotlin/cc/unitmesh/devti/sketch/run/ProcessExecutor.kt (2 hunks)
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/vcs/CommitInsCommand.kt (2 hunks)
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/debugger/editor/ShirePreviewEditorProvider.kt (1 hunks)
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/processor/shell/ShireShellCommandRunner.kt (2 hunks)
  • mpp-idea/build.gradle.kts (1 hunks)
  • mpp-idea/gradle.properties (1 hunks)
  • mpp-idea/src/main/resources/META-INF/plugin.xml (1 hunks)
  • mpp-vscode/PUBLISH.md (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares release v0.3.4 for both VSCode extension and IntelliJ IDEA plugin, with significant refactoring to avoid IntelliJ internal APIs and migrate from RxJava to Kotlin Coroutines.

Key Changes:

  • Migrates SSE streaming from RxJava (FlowableEmitter) to Kotlin Coroutines (ProducerScope/callbackFlow)
  • Refactors IntelliJ API usage to avoid internal APIs: ActionUtil for action invocation, removes AsyncFileEditorProvider, updates ProgressManager usage
  • Adds comprehensive publishing documentation (PUBLISH.md) and updates README with multiplatform architecture details

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
mpp-vscode/PUBLISH.md New comprehensive publishing guide for VSCode extension with deployment instructions
mpp-idea/src/main/resources/META-INF/plugin.xml Updates plugin name from "AutoDev Next" to "AutoDev Experiment"
mpp-idea/gradle.properties Adds mppVersion property (0.3.4) for version management
mpp-idea/build.gradle.kts Updates plugin name, adds plugin verification and publishing configuration
exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/processor/shell/ShireShellCommandRunner.kt Improves temp file cleanup with deleteOnExit fallback and explicit deletion logic
exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/debugger/editor/ShirePreviewEditorProvider.kt Removes AsyncFileEditorProvider implementation, keeping only WeighedFileEditorProvider
exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/vcs/CommitInsCommand.kt Switches from direct actionPerformed() to ActionUtil.performActionDumbAwareWithCallbacks()
core/src/main/kotlin/cc/unitmesh/devti/sketch/run/ProcessExecutor.kt Replaces startProcessWithPty() with createProcess() to avoid internal API
core/src/main/kotlin/cc/unitmesh/devti/observer/test/RunTestUtil.kt Uses reflection to access BuildView.consoleView instead of direct property access
core/src/main/kotlin/cc/unitmesh/devti/mcp/host/BuiltinMcpTools.kt Updates ActionUtil usage for action invocation and switches from CoreProgressManager to ProgressManager
core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpPreviewEditorProvider.kt Removes AsyncFileEditorProvider implementation
core/src/main/kotlin/cc/unitmesh/devti/llms/custom/ResponseBodyCallback.kt Migrates from FlowableEmitter (RxJava) to ProducerScope (Kotlin Coroutines) for SSE streaming
core/src/main/kotlin/cc/unitmesh/devti/llms/custom/CustomSSEProcessor.kt Migrates from Flowable (RxJava) to callbackFlow (Kotlin Coroutines) for SSE processing
README.md Major update with comprehensive multiplatform architecture documentation and current version info
AGENTS.md Simplifies documentation, removes Swing/Compose z-index solution details, clarifies release process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +78 to +83
// Ensure temp file is deleted even on error
try {
tempFile.delete()
} catch (deleteException: Exception) {
logger<ShireShellCommandRunner>().warn("Failed to delete temporary file after error: ${tempFile.path}", deleteException)
}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temp file deletion in this catch block is redundant and potentially problematic. If the exception occurs in future.get(), the file has already been deleted in the finally block of the pooled thread execution (lines 64-71). This creates a race condition where the same file might be deleted twice, and the second deletion could fail or log a spurious warning.

Suggested change
// Ensure temp file is deleted even on error
try {
tempFile.delete()
} catch (deleteException: Exception) {
logger<ShireShellCommandRunner>().warn("Failed to delete temporary file after error: ${tempFile.path}", deleteException)
}

Copilot uses AI. Check for mistakes.
Comment on lines +125 to +128
// Use createProcess instead of startProcessWithPty to avoid Internal API
return commandLine.withExePath(commands[0])
.withParameters(commands.drop(1))
.createProcess()
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement of startProcessWithPty() with createProcess() changes the process creation behavior. startProcessWithPty() creates a pseudo-terminal (PTY) process, which is essential for interactive shells. Using createProcess() instead creates a regular process without PTY support, which may break shell interactivity, job control, and terminal-specific features. This could cause issues with the interactive process functionality.

Suggested change
// Use createProcess instead of startProcessWithPty to avoid Internal API
return commandLine.withExePath(commands[0])
.withParameters(commands.drop(1))
.createProcess()
// Use startProcessWithPty for interactive shell support (PTY required)
return commandLine.withExePath(commands[0])
.withParameters(commands.drop(1))
.startProcessWithPty()

Copilot uses AI. Check for mistakes.
Comment on lines +156 to +159
// Use createProcess instead of startProcessWithPty to avoid Internal API
return commandLine.withExePath(commands[0])
.withParameters(commands.drop(1))
.createProcess()
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The replacement of startProcessWithPty() with createProcess() changes the process creation behavior. startProcessWithPty() creates a pseudo-terminal (PTY) process, which is essential for interactive shells. Using createProcess() instead creates a regular process without PTY support, which may break shell interactivity, job control, and terminal-specific features. This could cause issues with the shell command execution.

Copilot uses AI. Check for mistakes.
Comment on lines +118 to 131
// Use reflection to access internal consoleView to avoid using Internal API
try {
val consoleViewField = BuildView::class.java.getDeclaredField("consoleView")
consoleViewField.isAccessible = true
val consoleView = consoleViewField.get(executionConsole)
when (consoleView) {
is SMTRunnerConsoleView -> {
return getTestView(consoleView)
}
}
} catch (e: Exception) {
// Fallback: return null if reflection fails
return null
}
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using reflection to access internal fields breaks API stability and could fail in future IntelliJ versions. While the fallback of returning null is good, the code now uses an unstable internal API through reflection instead of the stable internal API it was using before. Consider checking if there's a public API alternative in the target IntelliJ version, or if the internal API usage was acceptable for this plugin's version constraints.

Suggested change
// Use reflection to access internal consoleView to avoid using Internal API
try {
val consoleViewField = BuildView::class.java.getDeclaredField("consoleView")
consoleViewField.isAccessible = true
val consoleView = consoleViewField.get(executionConsole)
when (consoleView) {
is SMTRunnerConsoleView -> {
return getTestView(consoleView)
}
}
} catch (e: Exception) {
// Fallback: return null if reflection fails
return null
}
// No public API to access ConsoleViewImpl from BuildView.
// If a public method becomes available in future, use it here.
// For now, we cannot support extracting ConsoleViewImpl from BuildView safely.
return null

Copilot uses AI. Check for mistakes.
line.startsWith("{") && line.endsWith("}") -> {
emitter.onNext(SSE(line))
emitter.onComplete()
emitter.trySend(SSE(line))
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using trySend() without checking the result can silently drop messages if the channel buffer is full. Unlike RxJava's onNext() which would handle backpressure, trySend() returns a ChannelResult that should be checked. Consider using send() (which suspends) or handling the trySend() result to detect message loss.

Suggested change
emitter.trySend(SSE(line))
val sendResult = emitter.trySend(SSE(line))
if (!sendResult.isSuccess) {
logger.error("Failed to send SSE event: $line. Reason: ${sendResult.exceptionOrNull()}")
}

Copilot uses AI. Check for mistakes.

**Current Versions**:
- IntelliJ Plugin: `v2.4.6`
- New Intellij Plugin: https://plugins.jetbrains.com/plugin/29223-autodev-experiment
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: "Intellij" should be "IntelliJ" (with capital J) to match JetBrains' official product naming.

Suggested change
- New Intellij Plugin: https://plugins.jetbrains.com/plugin/29223-autodev-experiment
- New IntelliJ Plugin: https://plugins.jetbrains.com/plugin/29223-autodev-experiment

Copilot uses AI. Check for mistakes.
break
}
emitter.onNext(sse)
emitter.trySend(sse)
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using trySend() without checking the result can silently drop messages if the channel buffer is full. Unlike RxJava's onNext() which would handle backpressure, trySend() returns a ChannelResult that should be checked. Consider using send() (which suspends) or handling the trySend() result to detect message loss, especially for critical SSE events.

Suggested change
emitter.trySend(sse)
val result = emitter.trySend(sse)
if (!result.isSuccess) {
logger.warn("SSE message dropped: $sse (reason: ${result.exceptionOrNull()?.message})")
}

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +85
emitter.trySend(sse ?: SSE(""))
emitter.trySend(sse ?: SSE(""))
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using trySend() without checking the result can silently drop messages if the channel buffer is full. Unlike RxJava's onNext() which would handle backpressure, trySend() returns a ChannelResult that should be checked. Consider using send() (which suspends) or handling the trySend() result to detect message loss.

Copilot uses AI. Check for mistakes.

2. **Publish**
```bash
cd /Volumes/source/ai/autocrud/mpp-vscode
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hardcoded absolute path /Volumes/source/ai/autocrud/mpp-vscode appears to be developer-specific and should be replaced with a relative path like cd mpp-vscode or removed entirely since users should already be in the appropriate directory.

Suggested change
cd /Volumes/source/ai/autocrud/mpp-vscode
cd mpp-vscode

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments