Skip to content

Commit de08a66

Browse files
committed
chore: update
1 parent 8dc14c3 commit de08a66

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ export namespace Commands {
132132

133133
export const JAVA_UPDATE_DEPRECATED_TASK = "java.updateDeprecatedTask";
134134

135+
export const JAVA_PROJECT_CHECK_IMPORT_STATUS = "java.project.checkImportStatus";
136+
135137
export const JAVA_PROJECT_GET_IMPORT_CLASS_CONTENT = "java.project.getImportClassContent";
136138

137139
export const JAVA_PROJECT_GET_DEPENDENCIES = "java.project.getDependencies";

src/copilot/copilotHelper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { commands, Uri, CancellationToken } from "vscode";
55
import { sendError } from "vscode-extension-telemetry-wrapper";
66
import { GetImportClassContentError, GetProjectDependenciesError } from "./utils";
7-
7+
import { Commands } from '../commands';
88
export interface INodeImportClass {
99
uri: string;
1010
value: string; // Changed from 'class' to 'className' to match Java code
@@ -57,7 +57,7 @@ export namespace CopilotHelper {
5757

5858
try {
5959
// Use the new command with error reason support
60-
const commandPromise = commands.executeCommand("java.execute.workspaceCommand", "java.project.getImportClassContent", fileUri.toString()) as Promise<IImportClassContentResult>;
60+
const commandPromise = commands.executeCommand(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.JAVA_PROJECT_GET_IMPORT_CLASS_CONTENT, fileUri.toString()) as Promise<IImportClassContentResult>;
6161

6262
if (cancellationToken) {
6363
const result = await Promise.race([
@@ -165,7 +165,7 @@ export namespace CopilotHelper {
165165

166166
try {
167167
// Use the new command with error reason support
168-
const commandPromise = commands.executeCommand("java.execute.workspaceCommand", "java.project.getDependencies", projectUri.toString()) as Promise<IProjectDependenciesResult>;
168+
const commandPromise = commands.executeCommand(Commands.EXECUTE_WORKSPACE_COMMAND, Commands.JAVA_PROJECT_GET_DEPENDENCIES, projectUri.toString()) as Promise<IProjectDependenciesResult>;
169169

170170
if (cancellationToken) {
171171
const result = await Promise.race([

0 commit comments

Comments
 (0)