-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
refactor renaming agent base - 4667 #4669
refactor renaming agent base - 4667 #4669
Conversation
Copilot
AI
left a 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.
Copilot reviewed 5 out of 13 changed files in this pull request and generated 1 suggestion.
Files not reviewed (8)
- dotnet/samples/Hello/HelloAgent/Program.cs: Evaluated as low risk
- dotnet/samples/Hello/HelloAgentState/Program.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/AgentBase.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/AgentBaseExtensions.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/AgentRuntime.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/Agents/AIAgent/InferenceAgent.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/Agents/AIAgent/SKAiAgent.cs: Evaluated as low risk
- dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/IOAgent.cs: Evaluated as low risk
Comments skipped due to low confidence (3)
dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs:21
- [nitpick] The generic type parameter TAgent should be renamed to TAgentBase to reflect the fact that it is constrained to types derived from Agent.
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TAgent>(this IHostApplicationBuilder builder, string typeName) where TAgent : Agent
dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorker.cs:197
- The cast to Agent may cause a runtime error if agentType does not inherit from Agent. Ensure that all agent types in _agentTypes inherit from the Agent class.
agent = (Agent)ActivatorUtilities.CreateInstance(_serviceProvider, agentType, context);
dotnet/src/Microsoft.AutoGen/Agents/Services/AgentWorker.cs:200
- Casting to the new 'Agent' class may cause runtime issues if there are still references to 'AgentBase' elsewhere. Ensure all instances of 'AgentBase' are updated to 'Agent'.
agent = (Agent)ActivatorUtilities.CreateInstance(_serviceProvider, agentType, context);
dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
…ions.cs Co-authored-by: Copilot <[email protected]>
Why are these changes needed?
small refactoring. Doesn't need to be named AgentBase, Its an agent and the class is abstract.
Related issue number
closes #4667
Checks