Enhance MuleSoft tools and UI with DataWeave features and auto-approve#29
Conversation
…ave scripts - Introduced `mule_read_transform` to read DataWeave scripts from `ee:transform` components in Mule XML files. - Introduced `mule_write_transform` to safely update DataWeave scripts in Transform Message components. - Enhanced `MuleTransformSupport` with shared utilities for XML parsing, transform lookup, resource resolution, and serialization. - Updated agent assets to include new tools and ensure proper usage of local and MCP tools. - Improved error handling for transform read/write operations, ensuring clean failures for various edge cases. - Hardened XML handling with secure parser settings to avoid unnecessary churn in XML declarations. - Added comprehensive tests to validate the functionality of the new tools and ensure expected behavior.
…iched tool descriptions, and new context preferences - Expanded six existing prompt files for detailed guidance on Mulesoft best practices, security, performance, deployment, API contract validation, and MUnit testing. - Introduced three new prompt files focusing on DataWeave best practices, connector governance, and logging observability. - Deepened agent instructions to include specific Mulesoft patterns and error handling strategies. - Enriched tool descriptions to provide clearer context on usage and expected outcomes. - Added new preferences for console and transform context in the Chat Preferences page. - Updated preference initializer with default values for new context features. - Introduced a new DataWeave content assist processor for inline completions in .dwl editors. - Documented changes and improvements in MULESOFT_COPILOT_IMPROVEMENTS.md for clarity on enhancements.
- Added a method to refresh the input background in ActionBar to ensure consistent styling. - Introduced CSS class for chat input in ChatInputTextViewer and applied dark mode colors. - Styled text inputs across various preference dialogs using PreferencePageUtils for better UI consistency. - Migrated old MCP tools status preferences to remove plugin display name prefixes from server names in LanguageServerSettingManager. - Documented the structure and styling of chat window containers in new markdown and SVG files for better developer reference.
Enhance MuleSoft tools and UI with new DataWeave features
* feat - LSP data layer + confirmationService skeleton (Auto-approve Part 1 ) (microsoft#132) * feat: Terminal auto-approve with confirmation dialog enhancement (Auto-approve Part 2) (microsoft#171) * revert splitDropdownButton padding change (microsoft#184) * feat: File operation auto-approve with glob pattern rules (Auto-approve Part 3) (microsoft#216) * add file operation approve logic * resolve comments * change default rules color * resolve comments * update test cases * feat: MCP tool auto-approve and global auto-approve (Auto-approve Part 4) (microsoft#218) * add mcp approve support and global approve support * resolve comments * fix test cases * resolve comments and add token/policy check * fix compile error * Fix auto-approve preference page layout instability * fix copilot comments
Dev/anypoint studio
…clipse-anypoint into stage # Conflicts: # com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/CopilotAgentSettings.java # com.microsoft.copilot.eclipse.ui/css/dark.css # com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/AgentToolService.java # com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/LanguageServerSettingManager.java
…for tool migration
There was a problem hiding this comment.
Pull request overview
This PR extends the Eclipse Copilot plugin’s MuleSoft/Anypoint Studio support (DataWeave + Transform Message workflows, richer prompts/assets) and introduces a new tool auto-approval framework (preferences UI + confirmation routing), alongside related UI/theming improvements and console/transform context injection.
Changes:
- Added MuleSoft/DataWeave capabilities: new DWL read/write tools, DataWeave editor/content-type support, and expanded MuleSoft prompt/agent assets.
- Implemented tool auto-approval: new preference page/sections, new confirmation evaluation service + handlers, and policy/feature-flag plumbing.
- Improved chat UX: @console/@Transform context processors, console output summarizers (Maven/Mule), and dark-theme text input styling.
Reviewed changes
Copilot reviewed 150 out of 151 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/DEVELOPER_NOTES_MULESOFT_SUPPORT.md | Developer notes describing MuleSoft hardening and new features |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/utils/PreferencesUtils.java | Adds preference checks + registers Auto Approve preference page |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/SplitDropdownButton.java | Renames/moves dropdown button widget and adds separator color override |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/CssConstants.java | Adds theme-based chat background/foreground color helpers |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/PreferencePageUtils.java | Adds dark-mode styling for Text inputs on preference surfaces |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/messages.properties | Adds strings for console/transform context + auto-approve UI |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/Messages.java | Exposes new preference strings via NLS |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/McpPreferencePage.java | Styles MCP URL fields for dark theme readability |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/GlobalAutoApproveSection.java | Adds global “auto-approve all tools” section with warning dialog |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/GeneralPreferencesPage.java | Styles GHE text field and fixes formatting |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/CustomModesPreferencePage.java | Styles custom mode name input |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/CustomInstructionPreferencePage.java | Styles custom instruction text inputs |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/CopilotPreferencesPage.java | Adds link to Tool Auto Approve preference page |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/CopilotPreferenceInitializer.java | Sets new defaults (workspace/console/transform context + auto-approve prefs) |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/ChatPreferencesPage.java | Adds console/transform context toggles and styles numeric input |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AutoApprovePreferencePage.java | New preference page hosting auto-approve sections |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AddTerminalRuleDialog.java | New dialog to add terminal allow/deny rules |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AddFileOperationRuleDialog.java | New dialog to add file-operation allow/deny rules |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AddByokModelDialog.java | Styles BYOK dialog Text inputs |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/AddApiKeyDialog.java | Styles API key dialog input |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/dialogs/mcp/McpServerItem.java | Switches MCP install dropdown to SplitDropdownButton |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/RunMuleMavenTestsTool.java | Adds optional Maven profile support and improves tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MunitValidateFlowTestsTool.java | Expands tool description for validations/coverage checks |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MunitFullReviewTool.java | Expands tool description for full suite audit |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleToolInputs.java | Adds schemas/fields for transform/DWL tooling + new review inputs |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleSecurityReviewTool.java | Expands security-review tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleProjectSummaryTool.java | Expands summary tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleProjectScanTool.java | Expands scan tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleProjectAnalysis.java | Adds richer scan fields (correlation, schedulers, log level, etc.) |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleDwlWriteTool.java | New tool to write standalone .dwl modules |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleDwlReadTool.java | New tool to read standalone .dwl modules |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/MuleCodeReviewTool.java | Expands code-review tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/ApiSchemaAnalyzeTool.java | Expands API schema analyze tool description |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/UserPreferenceService.java | Reloads built-in modes on status change to mitigate startup race |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/TransformEditorContextPromptProcessor.java | Adds @transform context block injection |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/MuleConsoleParser.java | Adds Mule runtime console parsing/summarization |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/McpExtensionPointManager.java | Adjusts approved MCP server JSON composition |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/McpConfigService.java | Binds MCP observable to new auto-approve section UI |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/MavenConsoleParser.java | Adds Maven console parsing/summarization |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/ConsoleContextPromptProcessor.java | Adds @console context block injection + enrichment |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/messages.properties | Adds confirmation dialog strings |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/Messages.java | Exposes new chat strings via NLS |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/confirmation/FallbackConfirmationHandler.java | Adds default handler for unknown tool types |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/confirmation/ConfirmationService.java | Central confirmation evaluation + dispatch + YOLO handling |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/confirmation/ConfirmationHandler.java | Handler contract + helper utilities for tool type/path normalization |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/confirmation/AttachedFileRegistry.java | Tracks user-attached files (pending + per-conversation) |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatInputTextViewer.java | Dark-theme input styling + CSS class + command parsing updates |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatAssistProcessor.java | Adds completion proposals for @console/@Transform where supported |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidget.java | Switches tool confirmation API to ConfirmationContent; uses requestLayout() |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ActionBar.java | Refreshes input background before redraw on placeholder refresh |
| com.microsoft.copilot.eclipse.ui/plugin.xml | Adds Tool Auto Approve pref page + DataWeave content type/editor/assist |
| com.microsoft.copilot.eclipse.ui/plugin.properties | Adds preference page name + formatting fix |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-security-review.prompt.md | Expands Mule security review workflow/prompts + MCP tools |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-performance-review.prompt.md | Expands performance review prompt; uses mule_read_transform |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-code-review.prompt.md | Expands code review prompt; uses mule_read_transform |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/logging-observability.prompt.md | New logging/observability review prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/generate-munit-tests.prompt.md | Expands MUnit generation prompt + official MCP tool |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/error-handling-contract.prompt.md | New error-handling contract review prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/deployment-readiness.prompt.md | Expands deployment readiness prompt + deployment MCP tools |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/dataweave-optimize.prompt.md | New DataWeave optimization prompt (DWL + transforms) |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/dataweave-best-practices.prompt.md | New DataWeave best-practices prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/connector-governance.prompt.md | New connector governance prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/batch-job-review.prompt.md | New batch job review prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/async-flow-review.prompt.md | New async flow review prompt |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/api-spec-review.prompt.md | Expands API spec review prompt + project scan + MCP tools |
| com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/api-led-architecture-review.prompt.md | New API-led architecture review prompt |
| com.microsoft.copilot.eclipse.ui/META-INF/MANIFEST.MF | Exports confirmation package to ui.test fragment |
| com.microsoft.copilot.eclipse.ui/css/light.css | Updates selector path for confirmation dialog styling |
| com.microsoft.copilot.eclipse.ui/css/dark.css | Adds dark-theme CSS classes for chat input and preference Text |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/preferences/LanguageServerSettingManagerTests.java | Updates expected settings to include auto-approve maps |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/preferences/CopilotPreferenceInitializerTest.java | Adds test for console context default |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/services/MavenConsoleParserTest.java | Adds tests for Maven console enrichment |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/services/ConsoleContextServiceTest.java | Adds tests for capturing console output snapshots |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/services/ConsoleContextPromptProcessorTest.java | Adds tests for @console prompt processing |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/services/ChatCompletionServiceTest.java | Adds tests for @console command availability per mode |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/ChatAssistProcessorTest.java | Adds tests for @console proposal behavior |
| com.microsoft.copilot.eclipse.ui.test/META-INF/MANIFEST.MF | Adds org.eclipse.ui.console dependency for tests |
| com.microsoft.copilot.eclipse.swtbot.test/test-plans/global-auto-approve/global-auto-approve.md | Adds SWTBot test plan for global auto-approve |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ToolAnnotations.java | Adds protocol type for tool annotation hints |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/policy/DidChangePolicyParams.java | Adds policy flag for auto-approval enablement |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/InvokeClientToolConfirmationParams.java | Adds annotations + metadata fields to confirmation params |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/GetDefaultFileSafetyRulesResult.java | Adds protocol result for CLS default file safety rules |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/FileSafetyRuleInfo.java | Adds protocol type for file safety rules |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/DidChangeFeatureFlagsParams.java | Adds feature-flag check for auto-approval |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageServerConnection.java | Adds getDefaultFileSafetyRules() connection API |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageServer.java | Adds getDefaultFileSafetyRules JSON-RPC endpoint |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageClient.java | Propagates auto-approval flags into FeatureFlags |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/format/FormatOptionProvider.java | Adds DataWeave language id mapping for .dwl |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/FeatureFlags.java | Adds combined auto-approval enablement (token + policy) |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/Constants.java | Adds constants for console/transform context + auto-approve prefs |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/TerminalAutoApproveRule.java | Adds model for terminal auto-approve rule |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/FileOperationAutoApproveRule.java | Adds model for file-operation auto-approve rule |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/ConfirmationResult.java | Adds core confirmation evaluation result type |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/ConfirmationHandler.java | Adds core confirmation handler interface |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/ConfirmationContent.java | Adds title/message/actions payload for confirmation UIs |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/ConfirmationActionScope.java | Adds action persistence scopes (once/session/global) |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/ConfirmationAction.java | Adds confirm dialog action model + helpers |
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/BuiltInChatModeManager.java | Adds async reload for built-in chat modes |
| com.microsoft.copilot.eclipse.core/plugin.xml | Maps DataWeave content type to dataweave language id |
| com.microsoft.copilot.eclipse.core.test/src/com/microsoft/copilot/eclipse/core/completion/FormatOptionProviderTests.java | Adds test for .dwl formatting defaults |
| com.microsoft.copilot.eclipse.core.agent.win32/pom.xml | Tycho packaging plugin wiring for agent bundle |
| com.microsoft.copilot.eclipse.core.agent.win32/build.properties | Includes copilot-agent/ in build |
| com.microsoft.copilot.eclipse.core.agent.macosx.x64/pom.xml | Tycho packaging plugin wiring for agent bundle |
| com.microsoft.copilot.eclipse.core.agent.macosx.x64/build.properties | Includes copilot-agent/ in build |
| com.microsoft.copilot.eclipse.core.agent.macosx.aarch64/pom.xml | Tycho packaging plugin wiring for agent bundle |
| com.microsoft.copilot.eclipse.core.agent.macosx.aarch64/build.properties | Includes copilot-agent/ in build |
| com.microsoft.copilot.eclipse.core.agent.linux.x64/pom.xml | Tycho packaging plugin wiring for agent bundle |
| com.microsoft.copilot.eclipse.core.agent.linux.x64/build.properties | Includes copilot-agent/ in build |
| com.microsoft.copilot.eclipse.core.agent.linux.aarch64/pom.xml | Tycho packaging plugin wiring for agent bundle |
| com.microsoft.copilot.eclipse.core.agent.linux.aarch64/build.properties | Includes copilot-agent/ in build |
| com.microsoft.copilot.eclipse.anypoint/templates/copilot-instructions-mule-template.md | Adds Mule project Copilot instructions scaffold |
| com.microsoft.copilot.eclipse.anypoint/src/com/microsoft/copilot/eclipse/anypoint/MuleSoftMcpPreferencePage.java | Changes region input to dropdown; styles text inputs |
| CHANGELOG.md | Documents MuleSoft enhancements and default changes |
| .github/workflows/build-and-package.yml | Adjusts branch trigger set for packaging workflow |
Comments suppressed due to low confidence (1)
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/SplitDropdownButton.java:110
- Javadoc says "Creates a new SplitButton" but the class is SplitDropdownButton. Please update the constructor Javadoc to match the class name to avoid confusion in generated docs/search.
| - Updated [com.microsoft.copilot.eclipse.anypoint/templates/mulesoft-agent.agent.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.anypoint/templates/mulesoft-agent.agent.md) to: | ||
| - keep local MuleSoft tools available | ||
| - register official MCP tools with `mulesoft/` prefixes | ||
| - mention transform read/write workflow explicitly | ||
| - Updated the bundled MuleSoft assets under: | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/agents/mulesoft-engineer.agent.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/agents/mulesoft-engineer.agent.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/api-spec-review.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/api-spec-review.prompt.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/deployment-readiness.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/deployment-readiness.prompt.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/generate-munit-tests.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/generate-munit-tests.prompt.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-code-review.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-code-review.prompt.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-performance-review.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-performance-review.prompt.md) | ||
| - [com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-security-review.prompt.md](/Users/ajaykontham/Work/GitProjects/copilot-for-eclipse/com.microsoft.copilot.eclipse.ui/mulesoft-copilot/.github/prompts/mule-security-review.prompt.md) | ||
|
|
| @Test | ||
| void testInitializeDefaultPreferences_ShouldDisableConsoleContextByDefault() { | ||
| initializer.initializeDefaultPreferences(); | ||
|
|
||
| boolean consoleContextEnabled = CopilotUi.getPlugin().getPreferenceStore() | ||
| .getDefaultBoolean(Constants.CONSOLE_CONTEXT_ENABLED); | ||
| assertFalse(consoleContextEnabled); | ||
| } |
| FeatureFlags flags = CopilotCore.getPlugin().getFeatureFlags(); | ||
| boolean autoApprovalEnabled = flags == null || flags.isAutoApprovalEnabled(); | ||
|
|
||
| if (autoApprovalEnabled && preferenceStore.getBoolean(Constants.AUTO_APPROVE_YOLO_MODE)) { | ||
| return ConfirmationResult.AUTO_APPROVED; | ||
| } |
| Map<String, Object> servers = regInfo.getMcpServers(); | ||
| if (servers != null && !servers.isEmpty()) { | ||
| // Merge all servers into the result map | ||
| servers.forEach((serverName, serverValue) -> { | ||
| String displayServerName = regInfo.getPluginDisplayName() + ": " + serverName; | ||
| allServers.merge(displayServerName, serverValue, | ||
| allServers.merge(serverName, serverValue, | ||
| (existingValue, newValue) -> newValue != null ? newValue : existingValue); | ||
| }); |
| Color background = getDarkInputBackground(textWidget); | ||
| Color foreground = getDarkInputForeground(textWidget); | ||
| parent.setBackground(background); | ||
| textWidget.setBackground(background); | ||
| textWidget.setForeground(foreground); | ||
| } |
| Label commandLabel = new Label(container, SWT.NONE); | ||
| commandLabel.setText( | ||
| Messages.preferences_page_terminal_auto_approve_add_dialog_command + " *"); | ||
| commandText = new Text(container, SWT.BORDER); | ||
| GridData commandData = new GridData(SWT.FILL, SWT.CENTER, true, false); | ||
| commandData.widthHint = 300; | ||
| commandText.setLayoutData(commandData); | ||
| commandText.setMessage(Messages.preferences_page_terminal_auto_approve_add_dialog_placeholder); | ||
| commandText.addModifyListener(e -> updateOkButton()); | ||
|
|
| Label patternLabel = new Label(container, SWT.NONE); | ||
| patternLabel.setText( | ||
| Messages.preferences_page_file_op_auto_approve_add_dialog_pattern | ||
| + " *"); | ||
| patternText = new Text(container, SWT.BORDER); | ||
| GridData patternData = new GridData(SWT.FILL, SWT.CENTER, true, false); | ||
| patternData.widthHint = 300; | ||
| patternText.setLayoutData(patternData); | ||
| patternText.setMessage( | ||
| Messages.preferences_page_file_op_auto_approve_add_dialog_pattern_hint); | ||
| patternText.addModifyListener(e -> updateOkButton()); | ||
|
|
||
| // Description | ||
| Label descLabel = new Label(container, SWT.NONE); | ||
| descLabel.setText( | ||
| Messages.preferences_page_file_op_auto_approve_add_dialog_description); | ||
| descriptionText = new Text(container, SWT.BORDER); | ||
| descriptionText.setMessage( | ||
| Messages.preferences_page_file_op_auto_approve_add_dialog_description_hint); | ||
| descriptionText.setLayoutData( | ||
| new GridData(SWT.FILL, SWT.CENTER, true, false)); | ||
|
|
| public static Color getChatBackgroundColor(Display display) { | ||
| if (UiUtils.isDarkTheme()) { | ||
| return new Color(display, 47, 47, 47); | ||
| // return new Color(display, 222, 225, 229); | ||
| // return new Color(display, 30, 31, 34); | ||
| } | ||
| return new Color(display, 255, 255, 255); |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09eba88d50
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Unmatched workspace file: auto-approve | ||
| return ConfirmationResult.AUTO_APPROVED; |
There was a problem hiding this comment.
Honor disabled auto-approval for workspace file writes
When isAutoApprovalEnabled is false, this handler still returns AUTO_APPROVED for any in-workspace file operation that does not match the small fallback deny list. That bypasses the token/org policy path and allows file writes without an approval dialog, which contradicts the intended "disabled means prompt" behavior used by the other handlers. In environments where auto-approval is turned off by policy, a normal file_write on workspace files will be silently accepted.
Useful? React with 👍 / 👎.
| List<IFile> openFiles = UiUtils.getOpenedFiles(); | ||
| for (IFile openFile : openFiles) { | ||
| if ("dwl".equals(openFile.getFileExtension()) && openFile.exists()) { | ||
| return openFile; | ||
| } |
There was a problem hiding this comment.
Resolve completion file from document instead of first open DWL
If UiUtils.getCurrentFile() is unavailable, this fallback binds completion to the first open .dwl file rather than the file backing the current IDocument. With multiple DWL editors open, content assist can query/combine against the wrong URI, which can produce irrelevant proposals and can also force the 3-second wait path when the response URI no longer matches the chosen file.
Useful? React with 👍 / 👎.
No description provided.