Commit 1bf69fe
authored
feat(copilot): add chat skills, instructions and when-gates for language model tools (#1643)
- Gate all 10 language model tools with `when` clauses so they only register
when the Java Language Server is ready, and (for active-debug-session-only
tools) when an active `java` debug session is in progress. This avoids
loading failures and reduces the noise Copilot sees from this extension's
tool catalog when the tools cannot actually run.
- Contribute a `chatInstructions` file (`javaDebugContext.instructions.md`)
with a keyword-rich, on-demand description (no `applyTo`, to avoid burning
context on every Java edit) that tells Copilot to activate the deferred
Java debug tools via `tool_search_tool_regex` and routes the user request
to one of the two skills below.
- Contribute two `chatSkills`, split by user-habit telemetry (launch/stop is
~52% of tool usage; inspection/step is ~28%):
- `java-launch-troubleshooting` — start/stop a Java program and diagnose
launch failures (mainClass missing, classpath, build errors, project
not detected). Gated by `javaLSReady` so it is discoverable any time
in a Java workspace.
- `java-debug-inspection` — inspect variables, walk the stack, list
threads, evaluate expressions, step in/over/out, continue, and manage
breakpoints in an active Java debug session. Gated by
`javaLSReady && inDebugMode && debugType == 'java'` so it only appears
once a Java debug session is alive — keeping it reactive, not proactive.1 parent da84f11 commit 1bf69fe
4 files changed
Lines changed: 150 additions & 0 deletions
File tree
- resources
- instruments
- skills
- java-debug-inspection
- java-launch-troubleshooting
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| 1014 | + | |
1014 | 1015 | | |
1015 | 1016 | | |
1016 | 1017 | | |
| |||
1062 | 1063 | | |
1063 | 1064 | | |
1064 | 1065 | | |
| 1066 | + | |
1065 | 1067 | | |
1066 | 1068 | | |
1067 | 1069 | | |
| |||
1105 | 1107 | | |
1106 | 1108 | | |
1107 | 1109 | | |
| 1110 | + | |
1108 | 1111 | | |
1109 | 1112 | | |
1110 | 1113 | | |
| |||
1142 | 1145 | | |
1143 | 1146 | | |
1144 | 1147 | | |
| 1148 | + | |
1145 | 1149 | | |
1146 | 1150 | | |
1147 | 1151 | | |
| |||
1183 | 1187 | | |
1184 | 1188 | | |
1185 | 1189 | | |
| 1190 | + | |
1186 | 1191 | | |
1187 | 1192 | | |
1188 | 1193 | | |
| |||
1212 | 1217 | | |
1213 | 1218 | | |
1214 | 1219 | | |
| 1220 | + | |
1215 | 1221 | | |
1216 | 1222 | | |
1217 | 1223 | | |
| |||
1257 | 1263 | | |
1258 | 1264 | | |
1259 | 1265 | | |
| 1266 | + | |
1260 | 1267 | | |
1261 | 1268 | | |
1262 | 1269 | | |
| |||
1275 | 1282 | | |
1276 | 1283 | | |
1277 | 1284 | | |
| 1285 | + | |
1278 | 1286 | | |
1279 | 1287 | | |
1280 | 1288 | | |
| |||
1303 | 1311 | | |
1304 | 1312 | | |
1305 | 1313 | | |
| 1314 | + | |
1306 | 1315 | | |
1307 | 1316 | | |
1308 | 1317 | | |
| |||
1330 | 1339 | | |
1331 | 1340 | | |
1332 | 1341 | | |
| 1342 | + | |
1333 | 1343 | | |
1334 | 1344 | | |
1335 | 1345 | | |
1336 | 1346 | | |
1337 | 1347 | | |
1338 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1339 | 1365 | | |
1340 | 1366 | | |
1341 | 1367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments