Skip to content
Draft
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
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export namespace Commands {
/**
* Commands from Java Upgrade Tool
*/
export const GOTO_AGENT_MODE = "javaupgrade.gotoAgentMode";
export const GOTO_AGENT_MODE = "appmod.javaUpgrade.gotoAgentMode";

/**
* Get the project settings
Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export namespace Explorer {
export namespace ExtensionName {
export const JAVA_LANGUAGE_SUPPORT: string = "redhat.java";
export const APP_MODERNIZATION_FOR_JAVA = "vscjava.migrate-java-to-azure";
export const APP_MODERNIZATION_UPGRADE_FOR_JAVA = "vscjava.vscode-java-upgrade";
// Java upgarde extension is merged into app modernization extension
export const APP_MODERNIZATION_UPGRADE_FOR_JAVA = "vscjava.migrate-java-to-azure";
export const APP_MODERNIZATION_EXTENSION_NAME = "GitHub Copilot app modernization";
}

Expand Down
2 changes: 1 addition & 1 deletion src/upgrade/upgradeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UpgradeManager {
context.subscriptions.push(instrumentOperationAsVsCodeCommand(Commands.JAVA_UPGRADE_WITH_COPILOT, async (promptText?: string) => {
await checkOrInstallAppModExtensionForUpgrade(ExtensionName.APP_MODERNIZATION_UPGRADE_FOR_JAVA);
const promptToUse = promptText ?? DEFAULT_UPGRADE_PROMPT;
await commands.executeCommand(Commands.GOTO_AGENT_MODE, { prompt: promptToUse });
await commands.executeCommand(Commands.GOTO_AGENT_MODE, { prompt: promptToUse, useCustomAgent: true });
}));

// Show modernization view
Expand Down
6 changes: 3 additions & 3 deletions src/upgrade/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ export function buildFixPrompt(issue: UpgradeIssue): string {
switch (reason) {
case UpgradeReason.JRE_TOO_OLD: {
const { suggestedVersion: { name: suggestedVersionName } } = issue;
return `upgrade java runtime to the LTS version ${suggestedVersionName} using java upgrade tools by invoking #generate_upgrade_plan`;
return `upgrade java runtime to the LTS version ${suggestedVersionName}`;
}
case UpgradeReason.END_OF_LIFE:
case UpgradeReason.DEPRECATED: {
const { suggestedVersion: { name: suggestedVersionName } } = issue;
return `upgrade ${packageDisplayName} to ${suggestedVersionName} using java upgrade tools by invoking #generate_upgrade_plan`;
return `upgrade ${packageDisplayName} to ${suggestedVersionName}`;
}
case UpgradeReason.CVE: {
return `fix all critical and high-severity CVE vulnerabilities in this project by invoking #validate_cves_for_java`;
return `fix all critical and high-severity CVE vulnerabilities in this project by invoking #appmod-validate-cves-for-java`;
}
}
}
Expand Down
Loading