Skip to content

Commit e6cae87

Browse files
Merge remote-tracking branch 'origin/develop' into develop.next
2 parents 593a143 + 0fee3d4 commit e6cae87

File tree

14 files changed

+80
-55
lines changed

14 files changed

+80
-55
lines changed

.azure-pipelines/release-stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extends:
4343
targetPath: '$(Build.SourcesDirectory)'
4444
steps:
4545
- task: Bash@3
46-
displayName: Build Toolkit Libs@$(TOOLKIT_BRANCH)
46+
displayName: release to stable channel
4747
inputs:
4848
targetType: inline
4949
script: |-

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in this file.
44

55
- [Change Log](#change-log)
6-
- [3.96.0](#3960)
6+
- [3.96.1](#3961)
77
- [3.95.0](#3950)
88
- [3.94.0](#3940)
99
- [3.93.0](#3930)
@@ -118,9 +118,10 @@ All notable changes to "Azure Toolkit for IntelliJ IDEA" will be documented in t
118118
- [3.0.7](#307)
119119
- [3.0.6](#306)
120120

121-
## 3.96.0
121+
## 3.96.1
122+
- Configure Azure MCP server for GitHub Copilot
122123
- Integrate azd to Azure Explorer
123-
- Fix some known issues.
124+
- Fix some known issues
124125

125126
## 3.95.0
126127
- Update function cdn uri

PluginsAndFeatures/AddLibrary/AzureLibraries/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<parent>
2828
<groupId>com.microsoft.azuretools</groupId>
2929
<artifactId>utils</artifactId>
30-
<version>3.96.0</version>
30+
<version>3.96.1</version>
3131
</parent>
3232
<groupId>com.microsoft.azuretools</groupId>
3333
<artifactId>com.microsoft.azuretools.sdk.lib</artifactId>
@@ -39,7 +39,7 @@
3939
</organization>
4040

4141
<properties>
42-
<azuretool.version>3.96.0</azuretool.version>
42+
<azuretool.version>3.96.1</azuretool.version>
4343
<azuretool.sdk.version>3.32.0.qualifier</azuretool.sdk.version>
4444
<azure.toolkit-lib.version>0.52.2</azure.toolkit-lib.version>
4545
</properties>

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-azuremcp/src/main/java/com/microsoft/azure/toolkit/intellij/azuremcp/AzureMcpPackageManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public synchronized File getAzureMcpExecutable() {
7777
}
7878
}
7979
} catch (final IOException e) {
80-
System.err.println("Error reading Azure MCP Server version: " + e.getMessage());
80+
log.error("Error getting Azure MCP executable: " + e.getMessage());
81+
AzureMcpUtils.logErrorTelemetryEvent("azmcp-get-executable", e);
8182
}
8283
return null;
8384
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.microsoft.azure.toolkit.intellij.azuremcp;
2+
3+
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
4+
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemeter;
5+
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetry;
6+
import org.apache.commons.lang3.exception.ExceptionUtils;
7+
8+
import java.util.Map;
9+
10+
public final class AzureMcpUtils {
11+
12+
private static final String GHCP_MCP_INITIALIZER = "GHCP_MCP_INITIALIZER";
13+
14+
private AzureMcpUtils() {
15+
}
16+
17+
public static void logTelemetryEvent(String eventName) {
18+
Map<String, String> properties = Map.of(
19+
AzureTelemeter.OP_NAME, eventName,
20+
AzureTelemeter.OP_PARENT_ID, GHCP_MCP_INITIALIZER,
21+
AzureTelemeter.OPERATION_NAME, eventName, // what's the difference between OP_NAME and OPERATION_NAME?
22+
AzureTelemeter.SERVICE_NAME, GHCP_MCP_INITIALIZER
23+
);
24+
AzureTaskManager.getInstance().runLater(() -> {
25+
AzureTelemeter.log(AzureTelemetry.Type.INFO, properties);
26+
});
27+
}
28+
29+
public static void logErrorTelemetryEvent(String eventName, Exception ex) {
30+
Map<String, String> properties = Map.of(
31+
AzureTelemeter.OP_NAME, eventName,
32+
AzureTelemeter.OP_PARENT_ID, GHCP_MCP_INITIALIZER,
33+
AzureTelemeter.OPERATION_NAME, eventName, // what's the difference between OP_NAME and OPERATION_NAME?
34+
AzureTelemeter.SERVICE_NAME, GHCP_MCP_INITIALIZER,
35+
AzureTelemeter.ERROR_STACKTRACE, ExceptionUtils.getStackTrace(ex)
36+
);
37+
AzureTaskManager.getInstance().runLater(() -> {
38+
AzureTelemeter.log(AzureTelemetry.Type.ERROR, properties);
39+
});
40+
}
41+
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-azuremcp/src/main/java/com/microsoft/azure/toolkit/intellij/azuremcp/GithubCopilotMcpInitializer.java

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@
1313
import com.intellij.openapi.startup.ProjectActivity;
1414
import com.intellij.openapi.util.SystemInfo;
1515
import com.intellij.openapi.util.registry.Registry;
16-
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager;
17-
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemeter;
18-
import com.microsoft.azure.toolkit.lib.common.telemetry.AzureTelemetry;
1916
import kotlin.Unit;
2017
import kotlin.coroutines.Continuation;
2118
import lombok.extern.slf4j.Slf4j;
22-
import org.apache.commons.lang3.exception.ExceptionUtils;
2319
import org.apache.maven.artifact.versioning.ComparableVersion;
2420
import org.jetbrains.annotations.NotNull;
2521

@@ -30,6 +26,9 @@
3026
import java.util.HashMap;
3127
import java.util.Map;
3228

29+
import static com.microsoft.azure.toolkit.intellij.azuremcp.AzureMcpUtils.logErrorTelemetryEvent;
30+
import static com.microsoft.azure.toolkit.intellij.azuremcp.AzureMcpUtils.logTelemetryEvent;
31+
3332
@Slf4j
3433
public class GithubCopilotMcpInitializer implements ProjectActivity, DumbAware, ProjectManagerListener {
3534
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
@@ -39,7 +38,6 @@ public class GithubCopilotMcpInitializer implements ProjectActivity, DumbAware,
3938
.enable(SerializationFeature.INDENT_OUTPUT);
4039

4140
private static final ComparableVersion LOWEST_SUPPORTED_COPILOT_VERSION = new ComparableVersion("1.5.50");
42-
private static final String GHCP_MCP_INITIALIZER = "GitHubCopilotMcpInitializer";
4341
private static final String COPILOT_PLUGIN_ID = "com.github.copilot";
4442
private final AzureMcpPackageManager azureMcpPackageManager;
4543

@@ -71,7 +69,7 @@ public Object execute(@NotNull Project project, @NotNull Continuation<? super Un
7169
private boolean isCopilotMcpSupported() {
7270
// Get all installed plugins
7371
final IdeaPluginDescriptor[] installedPlugins = PluginManagerCore.getPlugins();
74-
boolean copilotMcpSupported = Arrays.stream(installedPlugins)
72+
final boolean copilotMcpSupported = Arrays.stream(installedPlugins)
7573
.anyMatch(plugin -> {
7674
final boolean copilotPluginInstalled = COPILOT_PLUGIN_ID.equals(plugin.getPluginId().getIdString());
7775
return copilotPluginInstalled && isMcpSupported(plugin.getVersion());
@@ -115,7 +113,10 @@ private void configureMcpServer(File azMcpExe) throws Exception {
115113
final McpServer azureMcpServer = new McpServer();
116114
azureMcpServer.setCommand(azMcpExe.getAbsolutePath());
117115
azureMcpServer.setArgs(Arrays.asList("server", "start"));
118-
servers.put("Azure MCP Server", azureMcpServer);
116+
if (servers.containsKey("Azure MCP Server")) {
117+
servers.remove("Azure MCP Server");
118+
}
119+
servers.put("Azure MCP Server IntelliJ", azureMcpServer);
119120
Files.writeString(mcpConfigPath, OBJECT_MAPPER.writeValueAsString(mcpConfig));
120121
logTelemetryEvent("azmcp-copilot-initialization-success");
121122
}
@@ -156,29 +157,4 @@ private File getConfigPath() {
156157
}
157158
return configPath;
158159
}
159-
160-
public static void logTelemetryEvent(String eventName) {
161-
Map<String, String> properties = Map.of(
162-
AzureTelemeter.OP_NAME, eventName,
163-
AzureTelemeter.OP_PARENT_ID, GHCP_MCP_INITIALIZER,
164-
AzureTelemeter.OPERATION_NAME, eventName, // what's the difference between OP_NAME and OPERATION_NAME?
165-
AzureTelemeter.SERVICE_NAME, GHCP_MCP_INITIALIZER
166-
);
167-
AzureTaskManager.getInstance().runLater(() -> {
168-
AzureTelemeter.log(AzureTelemetry.Type.INFO, properties);
169-
});
170-
}
171-
172-
public static void logErrorTelemetryEvent(String eventName, Exception ex) {
173-
Map<String, String> properties = Map.of(
174-
AzureTelemeter.OP_NAME, eventName,
175-
AzureTelemeter.OP_PARENT_ID, GHCP_MCP_INITIALIZER,
176-
AzureTelemeter.OPERATION_NAME, eventName, // what's the difference between OP_NAME and OPERATION_NAME?
177-
AzureTelemeter.SERVICE_NAME, GHCP_MCP_INITIALIZER,
178-
AzureTelemeter.ERROR_STACKTRACE, ExceptionUtils.getStackTrace(ex)
179-
);
180-
AzureTaskManager.getInstance().runLater(() -> {
181-
AzureTelemeter.log(AzureTelemetry.Type.ERROR, properties);
182-
});
183-
}
184160
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pluginVersion=3.96.0
1+
pluginVersion=3.96.1
22
intellijDisplayVersion=2024.2
33
intellij_version=IU-242-EAP-SNAPSHOT
44
scala_plugin=org.intellij.scala:2024.2.5

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-base/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:xi="http://www.w3.org/2001/XInclude">
33
<id>com.microsoft.tooling.msservices.intellij.azure</id>
44
<name>Azure Toolkit</name>
5-
<version>3.96.0</version>
5+
<version>3.96.1</version>
66
<vendor email="[email protected]" url="http://www.microsoft.com">Microsoft</vendor>
77

88
<description>

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-java-sdk/src/main/java/com/microsoft/azure/toolkit/intellij/java/sdk/MavenProjectReportGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public MavenProjectReportGenerator() {
8383
@Nullable
8484
@Override
8585
public Object execute(@Nonnull Project project, @Nonnull Continuation<? super Unit> continuation) {
86-
scheduledExecutor.schedule(() -> generateReport(project), INITIAL_DELAY_IN_MINUTES, TimeUnit.MINUTES);
86+
scheduledExecutor.schedule(() -> ApplicationManager.getApplication().runReadAction(() -> generateReport(project)),
87+
INITIAL_DELAY_IN_MINUTES, TimeUnit.MINUTES);
8788
return null;
8889
}
8990

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib-java/src/main/resources/whatsnew.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<!-- Version: 3.88.0 -->
22
# What's new in Azure Toolkit for IntelliJ
33

4-
## 3.96.0
4+
## 3.96.1
5+
- Configure Azure MCP server for GitHub Copilot
56
- Integrate azd to Azure Explorer
6-
- Fix some known issues.
7+
- Fix some known issues
78

89
## 3.95.0
910
- Update function cdn uri

0 commit comments

Comments
 (0)