Skip to content

Commit 0d5046b

Browse files
committed
perf: adjust telemetry event
1 parent 8925428 commit 0d5046b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/copilot/tools/javaContextTools.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ interface FileStructureInput {
9393

9494
const fileStructureTool: vscode.LanguageModelTool<FileStructureInput> = {
9595
async invoke(options, _token) {
96-
sendInfo("", { toolName: "lsp_java_getFileStructure", action: "invokeLanguageModelTool" });
96+
sendInfo("", { operationName: "lmTool.getFileStructure" });
9797
const uri = resolveFileUri(options.input.uri);
9898
const symbols = await vscode.commands.executeCommand<vscode.DocumentSymbol[]>(
9999
"vscode.executeDocumentSymbolProvider", uri,
@@ -150,7 +150,7 @@ interface FindSymbolInput {
150150

151151
const findSymbolTool: vscode.LanguageModelTool<FindSymbolInput> = {
152152
async invoke(options, _token) {
153-
sendInfo("", { toolName: "lsp_java_findSymbol", action: "invokeLanguageModelTool" });
153+
sendInfo("", { operationName: "lmTool.findSymbol" });
154154
const symbols = await vscode.commands.executeCommand<vscode.SymbolInformation[]>(
155155
"vscode.executeWorkspaceSymbolProvider", options.input.query,
156156
);
@@ -177,7 +177,7 @@ interface FileImportsInput {
177177

178178
const fileImportsTool: vscode.LanguageModelTool<FileImportsInput> = {
179179
async invoke(options, _token) {
180-
sendInfo("", { toolName: "lsp_java_getFileImports", action: "invokeLanguageModelTool" });
180+
sendInfo("", { operationName: "lmTool.getFileImports" });
181181
const uri = resolveFileUri(options.input.uri);
182182
const result = await vscode.commands.executeCommand(
183183
Commands.EXECUTE_WORKSPACE_COMMAND,
@@ -206,7 +206,7 @@ interface TypeAtPositionInput {
206206

207207
const typeAtPositionTool: vscode.LanguageModelTool<TypeAtPositionInput> = {
208208
async invoke(options, _token) {
209-
sendInfo("", { toolName: "lsp_java_getTypeAtPosition", action: "invokeLanguageModelTool" });
209+
sendInfo("", { operationName: "lmTool.getTypeAtPosition" });
210210
const uri = resolveFileUri(options.input.uri);
211211
const position = new vscode.Position(options.input.line, options.input.character);
212212
const hovers = await vscode.commands.executeCommand<vscode.Hover[]>(
@@ -266,7 +266,7 @@ interface CallHierarchyInput {
266266

267267
const callHierarchyTool: vscode.LanguageModelTool<CallHierarchyInput> = {
268268
async invoke(options, _token) {
269-
sendInfo("", { toolName: "lsp_java_getCallHierarchy", action: "invokeLanguageModelTool" });
269+
sendInfo("", { operationName: "lmTool.getCallHierarchy" });
270270
const uri = resolveFileUri(options.input.uri);
271271
const position = new vscode.Position(options.input.line, options.input.character);
272272

@@ -325,7 +325,7 @@ interface TypeHierarchyInput {
325325

326326
const typeHierarchyTool: vscode.LanguageModelTool<TypeHierarchyInput> = {
327327
async invoke(options, _token) {
328-
sendInfo("", { toolName: "lsp_java_getTypeHierarchy", action: "invokeLanguageModelTool" });
328+
sendInfo("", { operationName: "lmTool.getTypeHierarchy" });
329329
const uri = resolveFileUri(options.input.uri);
330330
const position = new vscode.Position(options.input.line, options.input.character);
331331

@@ -374,7 +374,7 @@ const typeHierarchyTool: vscode.LanguageModelTool<TypeHierarchyInput> = {
374374
// ============================================================
375375

376376
export function registerJavaContextTools(context: vscode.ExtensionContext): void {
377-
sendInfo("", { action: "registerJavaContextTools" });
377+
sendInfo("", { operationName: "lmTool.register" });
378378
context.subscriptions.push(
379379
vscode.lm.registerTool("lsp_java_getFileStructure", fileStructureTool),
380380
vscode.lm.registerTool("lsp_java_findSymbol", findSymbolTool),

0 commit comments

Comments
 (0)