@@ -136,11 +136,11 @@ public CompletableFuture<Object[]> getConversationContext(ConversationContextPar
136136 public CompletableFuture <Object > invokeClientTool (InvokeClientToolParams params ) {
137137 return CompletableFuture .supplyAsync (() -> {
138138 try {
139- CompletableFuture <LanguageModelToolResult []> toolFuture =
140- CopilotCore . getPlugin (). getChatEventsManager () .invokeAgentTool (params );
139+ CompletableFuture <LanguageModelToolResult []> toolFuture = CopilotCore . getPlugin (). getChatEventsManager ()
140+ .invokeAgentTool (params );
141141 if (toolFuture == null ) {
142- CopilotCore .LOGGER . error (
143- new IllegalStateException ("invokeAgentTool returned null for tool: " + params .getName ()));
142+ CopilotCore .LOGGER
143+ . error ( new IllegalStateException ("invokeAgentTool returned null for tool: " + params .getName ()));
144144 LanguageModelToolResult errorResult = new LanguageModelToolResult ();
145145 errorResult .addContent ("Failed to invoke the tool: tool invocation returned null" );
146146 errorResult .setStatus (ToolInvocationStatus .error );
@@ -178,6 +178,8 @@ public CompletableFuture<Object[]> confirmClientTool(InvokeClientToolConfirmatio
178178 });
179179 }
180180
181+ // TODO: Should remove workspace-root folder as the projects are not directly under it in Eclipse, and can cause
182+ // confusion in CLS.
181183 @ Override
182184 public CompletableFuture <List <WorkspaceFolder >> workspaceFolders () {
183185 // Ideally, we should return each IProject as a workspace folder, but given that when
@@ -277,9 +279,8 @@ private void notifyCustomizationFilesChanged() {
277279 }
278280
279281 /**
280- * Handles the Dynamic OAuth request for MCP.
281- * Shows a dialog with multiple input fields and returns the user's input values.
282- * Returns null if the user cancels the request.
282+ * Handles the Dynamic OAuth request for MCP. Shows a dialog with multiple input fields and returns the user's input
283+ * values. Returns null if the user cancels the request.
283284 */
284285 @ JsonRequest ("copilot/dynamicOAuth" )
285286 public CompletableFuture <Map <String , String >> mcpOauth (McpOauthRequest request ) {
@@ -325,13 +326,11 @@ public void onDidChangePolicy(DidChangePolicyParams params) {
325326 }
326327 if (flags .isSubAgentPolicyEnabled () != params .isSubAgentEnabled ()) {
327328 flags .setSubAgentPolicyEnabled (params .isSubAgentEnabled ());
328- eventBroker .post (CopilotEventConstants .TOPIC_DID_CHANGE_SUB_AGENT_POLICY ,
329- params .isSubAgentEnabled ());
329+ eventBroker .post (CopilotEventConstants .TOPIC_DID_CHANGE_SUB_AGENT_POLICY , params .isSubAgentEnabled ());
330330 }
331331 if (flags .isCustomAgentPolicyEnabled () != params .isCustomAgentEnabled ()) {
332332 flags .setCustomAgentPolicyEnabled (params .isCustomAgentEnabled ());
333- eventBroker .post (CopilotEventConstants .TOPIC_DID_CHANGE_CUSTOM_AGENT_POLICY ,
334- params .isCustomAgentEnabled ());
333+ eventBroker .post (CopilotEventConstants .TOPIC_DID_CHANGE_CUSTOM_AGENT_POLICY , params .isCustomAgentEnabled ());
335334 }
336335 }
337336 }
0 commit comments