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
7 changes: 5 additions & 2 deletions mpp-idea/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ kotlin {
}

repositories {
mavenLocal() // For locally published mpp-ui and mpp-core artifacts
mavenCentral()
google()
// Required for mpp-ui's webview dependencies (jogamp)
Expand All @@ -41,7 +42,9 @@ dependencies {
// Depend on mpp-ui and mpp-core JVM targets for shared UI components and ConfigManager
// For KMP projects, we need to depend on the JVM target specifically
// IMPORTANT: Exclude ALL transitive dependencies that conflict with IntelliJ's bundled libraries
implementation("cc.unitmesh.devins:mpp-ui-jvm") {
// Note: For KMP projects, the module is published as "group:artifact-jvm" but the project
// dependency substitution should map "group:artifact" to the project ":artifact"
implementation("AutoDev-Intellij:mpp-ui:$mppVersion") {
// Exclude all Compose dependencies - IntelliJ provides its own via bundledModules
exclude(group = "org.jetbrains.compose")
exclude(group = "org.jetbrains.compose.runtime")
Expand Down Expand Up @@ -78,7 +81,7 @@ dependencies {
// Exclude SQLDelight - not needed in IntelliJ plugin
exclude(group = "app.cash.sqldelight")
}
implementation("cc.unitmesh.devins:mpp-core-jvm") {
implementation("cc.unitmesh:mpp-core:$mppVersion") {
// Exclude Compose dependencies from mpp-core as well
exclude(group = "org.jetbrains.compose")
exclude(group = "org.jetbrains.compose.runtime")
Expand Down
14 changes: 11 additions & 3 deletions mpp-idea/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ pluginManagement {
}

// Include mpp-ui from parent project for shared UI components and ConfigManager
// For KMP projects, we substitute the JVM target artifacts
// For KMP projects, we substitute the Maven coordinates with local project dependencies
// Note: The group IDs must match what's defined in the respective build.gradle.kts files:
// - mpp-ui: uses root project name "AutoDev-Intellij" as group
// - mpp-core: group = "cc.unitmesh"
// - mpp-codegraph: uses root project name
// - mpp-viewer: group = "cc.unitmesh.viewer"
includeBuild("..") {
dependencySubstitution {
substitute(module("cc.unitmesh.devins:mpp-ui-jvm")).using(project(":mpp-ui"))
substitute(module("cc.unitmesh.devins:mpp-core-jvm")).using(project(":mpp-core"))
// Substitute Maven coordinates with project dependencies
substitute(module("AutoDev-Intellij:mpp-ui")).using(project(":mpp-ui")).because("Using local project")
substitute(module("cc.unitmesh:mpp-core")).using(project(":mpp-core")).because("Using local project")
substitute(module("AutoDev-Intellij:mpp-codegraph")).using(project(":mpp-codegraph")).because("Using local project")
substitute(module("cc.unitmesh.viewer:mpp-viewer")).using(project(":mpp-viewer")).because("Using local project")
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import cc.unitmesh.agent.diff.ChangeType
import cc.unitmesh.devins.ui.compose.agent.codereview.AIAnalysisProgress
import cc.unitmesh.devins.ui.compose.agent.codereview.AnalysisStage
import cc.unitmesh.devins.ui.compose.agent.codereview.CommitInfo
import cc.unitmesh.devins.ui.compose.agent.codereview.DiffFileInfo
import cc.unitmesh.devins.ui.compose.theme.AutoDevColors
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.ui.Orientation
Expand All @@ -36,7 +40,7 @@ fun IdeaCodeReviewContent(viewModel: IdeaCodeReviewViewModel) {
selectedIndices = state.selectedCommitIndices,
isLoading = state.isLoading,
onCommitSelect = { index ->
viewModel.selectCommits(setOf(index))
viewModel.selectCommit(index)
},
modifier = Modifier.width(280.dp).fillMaxHeight()
)
Expand Down Expand Up @@ -67,7 +71,7 @@ fun IdeaCodeReviewContent(viewModel: IdeaCodeReviewViewModel) {

@Composable
private fun CommitListPanel(
commits: List<IdeaCommitInfo>,
commits: List<CommitInfo>,
selectedIndices: Set<Int>,
isLoading: Boolean,
onCommitSelect: (Int) -> Unit,
Expand Down Expand Up @@ -122,7 +126,7 @@ private fun CommitListPanel(

@Composable
private fun CommitItem(
commit: IdeaCommitInfo,
commit: CommitInfo,
isSelected: Boolean,
onClick: () -> Unit
) {
Expand Down Expand Up @@ -172,7 +176,7 @@ private fun CommitItem(

@Composable
private fun DiffViewerPanel(
diffFiles: List<IdeaDiffFileInfo>,
diffFiles: List<DiffFileInfo>,
selectedFileIndex: Int,
isLoading: Boolean,
onFileSelect: (Int) -> Unit,
Expand Down Expand Up @@ -251,7 +255,7 @@ private fun DiffViewerPanel(
}

@Composable
private fun DiffContent(file: IdeaDiffFileInfo) {
private fun DiffContent(file: DiffFileInfo) {
val scrollState = rememberScrollState()

Column(
Expand Down Expand Up @@ -311,7 +315,7 @@ private fun DiffContent(file: IdeaDiffFileInfo) {

@Composable
private fun AIAnalysisPanel(
progress: IdeaAIAnalysisProgress,
progress: AIAnalysisProgress,
error: String?,
onStartAnalysis: () -> Unit,
onCancelAnalysis: () -> Unit,
Expand All @@ -333,7 +337,7 @@ private fun AIAnalysisPanel(
)

when (progress.stage) {
IdeaAnalysisStage.IDLE, IdeaAnalysisStage.COMPLETED, IdeaAnalysisStage.ERROR -> {
AnalysisStage.IDLE, AnalysisStage.COMPLETED, AnalysisStage.ERROR -> {
DefaultButton(onClick = onStartAnalysis) {
Text("Start Analysis")
}
Expand All @@ -355,18 +359,19 @@ private fun AIAnalysisPanel(
verticalAlignment = Alignment.CenterVertically
) {
val (statusText, statusColor) = when (progress.stage) {
IdeaAnalysisStage.IDLE -> "Ready" to JewelTheme.globalColors.text.info
IdeaAnalysisStage.RUNNING_LINT -> "Running lint..." to AutoDevColors.Amber.c400
IdeaAnalysisStage.ANALYZING -> "Analyzing code..." to AutoDevColors.Blue.c400
IdeaAnalysisStage.GENERATING_PLAN -> "Generating plan..." to AutoDevColors.Blue.c400
IdeaAnalysisStage.GENERATING_FIX -> "Generating fixes..." to AutoDevColors.Blue.c400
IdeaAnalysisStage.COMPLETED -> "Completed" to AutoDevColors.Green.c400
IdeaAnalysisStage.ERROR -> "Error" to AutoDevColors.Red.c400
AnalysisStage.IDLE -> "Ready" to JewelTheme.globalColors.text.info
AnalysisStage.RUNNING_LINT -> "Running lint..." to AutoDevColors.Amber.c400
AnalysisStage.ANALYZING_LINT -> "Analyzing code..." to AutoDevColors.Blue.c400
AnalysisStage.GENERATING_PLAN -> "Generating plan..." to AutoDevColors.Blue.c400
AnalysisStage.WAITING_FOR_USER_INPUT -> "Waiting for input..." to AutoDevColors.Amber.c400
AnalysisStage.GENERATING_FIX -> "Generating fixes..." to AutoDevColors.Blue.c400
AnalysisStage.COMPLETED -> "Completed" to AutoDevColors.Green.c400
AnalysisStage.ERROR -> "Error" to AutoDevColors.Red.c400
}

if (progress.stage != IdeaAnalysisStage.IDLE &&
progress.stage != IdeaAnalysisStage.COMPLETED &&
progress.stage != IdeaAnalysisStage.ERROR) {
if (progress.stage != AnalysisStage.IDLE &&
progress.stage != AnalysisStage.COMPLETED &&
progress.stage != AnalysisStage.ERROR) {
CircularProgressIndicator()
}

Expand Down

This file was deleted.

Loading
Loading