Skip to content

Commit 19e6cad

Browse files
committed
perf: update when
1 parent c31745c commit 19e6cad

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,13 +1231,14 @@
12311231
],
12321232
"chatSkills": [
12331233
{
1234-
"path": "./resources/skills/java-lsp-tools/SKILL.md"
1234+
"path": "./resources/skills/java-lsp-tools/SKILL.md",
1235+
"when": "java:lspToolsReady"
12351236
}
12361237
],
12371238
"chatInstructions": [
12381239
{
12391240
"path": "./resources/instruments/loadJavaSkills.md",
1240-
"when": "java:projectManagerActivated"
1241+
"when": "java:lspToolsReady"
12411242
}
12421243
]
12431244
},

src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export namespace Context {
99
export const WORKSPACE_CONTAINS_BUILD_FILES: string = "java:workspaceContainsBuildFiles";
1010
export const RELOAD_PROJECT_ACTIVE: string = "java:reloadProjectActive";
1111
export const SHOW_DEPRECATED_TASKS: string = "java:showDeprecatedTasks";
12+
export const LSP_TOOLS_READY: string = "java:lspToolsReady";
1213
}
1314

1415
export namespace Explorer {

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ async function activateExtension(_operationId: string, context: ExtensionContext
9090
// Register Copilot context providers after Java Language Server is ready
9191
languageServerApiManager.ready().then((isReady) => {
9292
if (isReady) {
93-
registerCopilotContextProviders(context);
9493
registerJavaContextTools(context);
94+
contextManager.setContextValue(Context.LSP_TOOLS_READY, true);
9595
}
9696
});
9797
}

0 commit comments

Comments
 (0)