Skip to content

Conversation

@IsuruMaduranga
Copy link
Contributor

Purpose

This PR adds the intial working version of MI Copilot Agent Moode. This will act as the base for further development.

Fixes wso2/mi-vscode#1367

Copilot AI review requested due to automatic review settings December 17, 2025 05:44
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces the initial working version of MI Copilot Agent Mode, representing a significant architectural shift from the previous question-suggestion based approach to an agent-based interaction model with tool calling capabilities. The changes include:

  • Major refactoring: renamed ai-panelai-features to better organize existing AI functionality
  • New agent-mode module implementing agent-based interactions with streaming tool execution
  • Removal of the suggestion/question generation system in favor of direct agent interaction
  • Addition of ToolCallSegment component to visualize agent tool usage in the UI
  • Split RPC clients: MiAiPanelRpcClient for AI features and MiAgentPanelRpcClient for agent mode

Reviewed changes

Copilot reviewed 44 out of 86 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
workspaces/mi/mi-visualizer/src/views/AIPanel/utils.ts Added ContentSegment interface and enhanced splitContent() to parse <toolcall> tags with loading states
workspaces/mi/mi-visualizer/src/views/AIPanel/component/ToolCallSegment.tsx New component to display tool calls with loading/success/failure states
workspaces/mi/mi-visualizer/src/views/AIPanel/component/MICopilotContext.tsx Removed questions/suggestions state management
workspaces/mi/mi-visualizer/src/views/AIPanel/component/AIChatMessage.tsx Added rendering logic for tool call segments
workspaces/mi/mi-visualizer/src/views/AIPanel/component/AIChatFooter.tsx Replaced code generation logic with agent event handling, removed suggestions UI
workspaces/mi/mi-visualizer/src/Visualizer.tsx Added "agent" mode support
workspaces/mi/mi-rpc-client/src/rpc-clients/ai-features/* Split AI features into separate RPC client
workspaces/mi/mi-rpc-client/src/rpc-clients/agent-mode/* New RPC client for agent mode operations
workspaces/mi/mi-rpc-client/src/RpcClient.ts Added agent panel RPC client and event listener
workspaces/mi/mi-extension/src/ai-features/* Renamed from ai-panel to better reflect purpose
workspaces/mi/mi-extension/src/rpc-managers/agent-mode/* New RPC manager for agent operations with event streaming
workspaces/mi/mi-extension/src/constants/index.ts Added OPEN_AGENT_PANEL command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};

// Start streaming
const { fullStream, response } = streamText({
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

Unused variable response.

Copilot uses AI. Check for mistakes.

export class AgentEventHandler {

constructor(private projectUri: string) {
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

This write to property 'projectUri' is useless, since another property write always overrides it.

Copilot uses AI. Check for mistakes.
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.

1 participant