Skip to content

Remove dead code in core and ui.chat - #475

Open
Lars Vogel (vogella) wants to merge 1 commit into
microsoft:mainfrom
vogellacompany:remove-dead-code
Open

Lars Vogel (vogella) wants to merge 1 commit into
microsoft:mainfrom
vogellacompany:remove-dead-code

Conversation

@vogella

@vogella Lars Vogel (vogella) commented Oct 6, 2026 •

Copy link
Copy Markdown

Removes code that nothing references: the private ActionBar.selectFile() method, which has no callers (file selection for chat context is handled by AddContextButton), together with the imports only it used, the unused SEPARATOR_PREFIX constant in CustomChatModeManager, and unused imports in several chat classes. There is no behavior change; the cleanup just makes these classes shorter and easier to read.

Drops the uncalled private ActionBar.selectFile(), an unused constant in CustomChatModeManager and unused imports in several chat classes.

Assisted-by: multiple AI agents and layers of automated tooling 🤖

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

Static reference checks support this behavior-preserving cleanup, with no unresolved findings; builds and tests were not run.

Review effort: Balanced
Findings: None

What changed in this PR

Removes unused code from the core and chat UI components without changing behavior.

Changes:

  • Deletes the unused ActionBar.selectFile() method; file selection remains handled by AddContextButton.
  • Removes an unused constant and unused imports.
File Description
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​tools/​JavaDebuggerToolAdapter.java Removes an unused import.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​services/​ReferencedFileService.java Removes an unused import.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​services/​AgentToolService.java Removes unused imports.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​ModelPickerGroupsBuilder.java Removes unused imports.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​BaseTurnWidget.java Removes unused imports.
com.microsoft.copilot.eclipse.ui/​src/​com/​microsoft/​copilot/​eclipse/​ui/​chat/​ActionBar.java Deletes the unused file picker method and associated imports.
com.microsoft.copilot.eclipse.core/​src/​com/​microsoft/​copilot/​eclipse/​core/​chat/​service/​ICustomModeService.java Removes an unused import.
com.microsoft.copilot.eclipse.core/​src/​com/​microsoft/​copilot/​eclipse/​core/​chat/​CustomChatModeManager.java Removes the unused SEPARATOR_PREFIX constant.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vogella

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants