-
Notifications
You must be signed in to change notification settings - Fork 67
Add initial basic version of MI Copilot agent mode #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mi-agent-mode
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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-panel→ai-featuresto better organize existing AI functionality - New
agent-modemodule implementing agent-based interactions with streaming tool execution - Removal of the suggestion/question generation system in favor of direct agent interaction
- Addition of
ToolCallSegmentcomponent to visualize agent tool usage in the UI - Split RPC clients:
MiAiPanelRpcClientfor AI features andMiAgentPanelRpcClientfor 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({ |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable response.
|
|
||
| export class AgentEventHandler { | ||
|
|
||
| constructor(private projectUri: string) { |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
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.
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