Skip to content

Conversation

blessing-sanusi
Copy link
Collaborator

Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Contributor

@Copilot 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 implements JSON team configuration upload functionality, allowing users to upload custom team configurations and select teams for plan creation. The feature includes team management UI components, RAI validation for uploaded content, and backend support for team configuration processing.

  • Adds team upload and selection interface with validation
  • Integrates team selection into the plan creation workflow
  • Implements RAI validation for team configuration content

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/frontend/src/services/TeamService.ts New service for team operations (upload, fetch, delete)
src/frontend/src/services/TaskService.tsx Added team_id parameter to plan creation
src/frontend/src/pages/HomePage.tsx Integrated team selection and upload functionality
src/frontend/src/components/common/SettingsButton.tsx New team management UI component
src/frontend/src/models/Team.ts Team data models and interfaces
src/backend/utils_kernel.py RAI validation function for team configurations
src/backend/app_kernel.py Added RAI validation to upload endpoint
Comments suppressed due to low confidence (1)

src/frontend/src/components/common/SettingsButton.tsx:136

  • The agent type name has a typo: "MaintanceKBAgent" should be "MaintenanceKBAgent" (missing 'e' in 'Maintenance')
    setIsOpen(false);

FILE_SURFER = "FileSurfer",
WEB_SURFER = "WebSurfer",
SENSOR_SENTINEL = "SensorSentinel",
MAINTENANCE_KB_AGENT = "MaintanceKBAgent",
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The agent type name has a typo: "MaintanceKBAgent" should be "MaintenanceKBAgent" (missing 'e' in 'Maintenance')

Suggested change
MAINTENANCE_KB_AGENT = "MaintanceKBAgent",
MAINTENANCE_KB_AGENT = "MaintenanceKBAgent",

Copilot uses AI. Check for mistakes.

PLANNER = "Planner_Agent",

// Common uploadable agent types
MAGENTIC_ONE = "MagenticOne",
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The agent type name appears to have a typo: "MagenticOne" should likely be "MagneticOne" (missing 'i' in 'Magnetic')

Suggested change
MAGENTIC_ONE = "MagenticOne",
MAGNETIC_ONE = "MagneticOne",

Copilot uses AI. Check for mistakes.

return 'system';
}

// MagenticOne framework agents
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The comment has a typo: "MagenticOne" should likely be "MagneticOne" (missing 'i' in 'Magnetic')

Suggested change
// MagenticOne framework agents
// MagneticOne framework agents

Copilot uses AI. Check for mistakes.

Comment on lines +96 to +100
// MagenticOne framework agents
if (typeStr === 'MagenticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magentic-one';
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The agent type comparison has a typo: "MagenticOne" should likely be "MagneticOne" (missing 'i' in 'Magnetic')

Suggested change
// MagenticOne framework agents
if (typeStr === 'MagenticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magentic-one';
// MagneticOne framework agents
if (typeStr === 'MagneticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magnetic-one';

Copilot uses AI. Check for mistakes.

Comment on lines +97 to +100
if (typeStr === 'MagenticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magentic-one';
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The category name has a typo: "magentic-one" should likely be "magnetic-one" (missing 'i' in 'magnetic')

Suggested change
if (typeStr === 'MagenticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magentic-one';
if (typeStr === 'MagneticOne' || [
'Coder', 'Executor', 'FileSurfer', 'WebSurfer'
].includes(typeStr)) {
return 'magnetic-one';

Copilot uses AI. Check for mistakes.

switch (category) {
case 'system':
return 'Person';
case 'magentic-one':
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

The category case has a typo: "magentic-one" should likely be "magnetic-one" (missing 'i' in 'magnetic')

Suggested change
case 'magentic-one':
case 'magnetic-one':

Copilot uses AI. Check for mistakes.

Comment on lines +298 to +300
// First, validate the file type
if (!file.name.toLowerCase().endsWith('.json')) {
throw new Error('Please upload a valid JSON file');
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

File type validation relies only on file extension which can be easily bypassed. Consider also validating the actual file content or MIME type for better security.

Suggested change
// First, validate the file type
if (!file.name.toLowerCase().endsWith('.json')) {
throw new Error('Please upload a valid JSON file');
// First, validate the file type by extension and MIME type
const validMimeTypes = ['application/json', 'text/json'];
if (
!file.name.toLowerCase().endsWith('.json') ||
(file.type && !validMimeTypes.includes(file.type))
) {
throw new Error('Please upload a valid JSON file (with .json extension and correct file type)');

Copilot uses AI. Check for mistakes.

Comment on lines +27 to +35
// Check if this is an RAI validation error
const errorDetail = error.response?.data?.detail || error.response?.data;

// If the error message contains "inappropriate content", treat it as RAI error
if (typeof errorDetail === 'string' && errorDetail.includes('inappropriate content')) {
return {
success: false,
raiError: {
error_type: 'RAI_VALIDATION_FAILED',
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

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

Using string matching to detect RAI errors is fragile and could break if error messages change. Consider using structured error codes or types instead.

Suggested change
// Check if this is an RAI validation error
const errorDetail = error.response?.data?.detail || error.response?.data;
// If the error message contains "inappropriate content", treat it as RAI error
if (typeof errorDetail === 'string' && errorDetail.includes('inappropriate content')) {
return {
success: false,
raiError: {
error_type: 'RAI_VALIDATION_FAILED',
// Check if this is an RAI validation error using structured error code
const errorType = error.response?.data?.error_type;
const errorDetail = error.response?.data?.detail || error.response?.data?.message || error.response?.data;
if (errorType === 'RAI_VALIDATION_FAILED') {
return {
success: false,
raiError: {
error_type: errorType,

Copilot uses AI. Check for mistakes.

…e AI Foundry

- Add POST /api/upload_team_config endpoint for team configuration management
- Implement FoundryAgentService for bulk agent creation with error handling
- Add comprehensive RAI validation for all uploaded content
- Add team selection UI with search, delete, and validation features
- Add model deployment and search index validation services
@@ -0,0 +1,103 @@
import { TeamConfig } from '../models/Team';
Copy link
Collaborator

Choose a reason for hiding this comment

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

convert this file to tsx

action: string;
/** Agent assigned to this step */
agent: AgentType;
agent: AgentTypeString;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you put back the AgentType instead of AgentTypeString

}

export const quickTasks: QuickTask[] = [
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

very good

RAG = "RAG",

// Specific agent names (can be any name with any type)
CODER = "Coder",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this are not agent type,
Agent Type can be Custom, RAG, MagenticOne the other are Agent names

raise HTTPException(status_code=500, detail="Internal server error occurred")


@app.post("/api/upload_scenarios")
Copy link
Collaborator

Choose a reason for hiding this comment

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

what are sceenarios?? I don't think we upload scenarios by themselves but as part of the teams only

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

take endpoint out

"""Service for validating model deployments in Azure AI Foundry"""

def __init__(self):
self.subscription_id = os.getenv("AZURE_AI_SUBSCRIPTION_ID")
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should come from the configuration file


def __init__(self):
"""Initialize the search validation service."""
self.search_endpoint = os.getenv("AZURE_SEARCH_ENDPOINT")
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should come from the validation file

export interface Agent {
input_key: string;
type: string;
name: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

they should be tsx extension

PLANNER = "Planner_Agent",

// Common uploadable agent types
MAGENTIC_ONE = "MagenticOne",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Magentic one is not a name of Agent is a Agent Type, however, I think we will review this complete logic because in V3 the agent type are the agent names, and agent type will MagenticOne, Custom, and RAG

blessing-sanusi and others added 3 commits August 12, 2025 17:47
Moved data files to new locations, added new backend app.py, and introduced v3 MCP server modules with supporting services, configuration, and orchestration. Updated documentation for Docker MCP server testing and Azure AI Foundry project reuse. Improved deployment guides and infrastructure outputs for better environment configuration.
@Fr4nc3 Fr4nc3 merged commit e20d063 into macae-v3-dev Aug 13, 2025
2 of 4 checks passed
@Fr4nc3 Fr4nc3 deleted the json-upload-settingPage branch August 14, 2025 15:32
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants