Skip to content

Commit 35900d5

Browse files
authored
Merge pull request microsoft#487 from microsoft/macae-BS-UI-moreChanges
feat: improve UI branding and agent name formatting
2 parents 436f259 + c57d3e5 commit 35900d5

File tree

9 files changed

+69
-17
lines changed

9 files changed

+69
-17
lines changed

src/backend/v3/common/services/team_service.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,14 @@ async def delete_team_configuration(self, team_id: str, user_id: str) -> bool:
317317
def extract_models_from_agent(self, agent: Dict[str, Any]) -> set:
318318
"""
319319
Extract all possible model references from a single agent configuration.
320+
Skip proxy agents as they don't require deployment models.
320321
"""
321322
models = set()
322323

324+
# Skip proxy agents - they don't need deployment models
325+
if agent.get("name", "").lower() == "proxyagent":
326+
return models
327+
323328
if agent.get("deployment_name"):
324329
models.add(str(agent["deployment_name"]).lower())
325330

src/frontend/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="/favicon.ico" />
5+
<link rel="icon" href="/contosoLogo.svg" type="image/svg+xml" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
1010
content="MACAE - Multi-Agent Custom Automation Engine"
1111
/>
12-
<link rel="apple-touch-icon" href="/logo192.png" />
13-
<!-- <link rel="manifest" href="/manifest.json" /> -->
12+
<link rel="apple-touch-icon" href="/contosoLogo.svg" />
13+
<link rel="manifest" href="/manifest.json" />
1414
<title>Multi-Agent - Custom Automation Engine</title>
1515
</head>
1616
<body>
17-
<noscript>You need to enable JavaScript to run this app.</noscript>
17+
<noscript>You need to enable JavaScript to run this app</noscript>
1818
<div id="root"></div>
1919
<script type="module" src="/src/index.tsx"></script>
2020
</body>
21-
</html>
21+
</html>
Lines changed: 10 additions & 0 deletions
Loading

src/frontend/public/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="/favicon.ico" />
5+
<link rel="icon" href="/contosoLogo.svg" type="image/svg+xml" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
1010
content="MACAE - Multi-Agent Custom Automation Engine"
1111
/>
12-
<link rel="apple-touch-icon" href="/logo192.png" />
12+
<link rel="apple-touch-icon" href="/contosoLogo.svg" />
1313
<link rel="manifest" href="/manifest.json" />
1414
<title>MACAE</title>
1515
</head>
@@ -18,4 +18,4 @@
1818
<div id="root"></div>
1919
<script type="module" src="/src/index.tsx"></script>
2020
</body>
21-
</html>
21+
</html>

src/frontend/src/components/content/HomeInput.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ const getIconFromString = (iconString: string | React.ReactNode): React.ReactNod
3333
return iconMap[iconString] || iconMap['default'] || <Clipboard20Regular />;
3434
};
3535

36+
const truncateDescription = (description: string, maxLength: number = 180): string => {
37+
if (!description) return '';
38+
39+
if (description.length <= maxLength) {
40+
return description;
41+
}
42+
43+
// Find the last space before the limit to avoid cutting words
44+
const truncated = description.substring(0, maxLength);
45+
const lastSpaceIndex = truncated.lastIndexOf(' ');
46+
47+
// If there's a space within the last 20 characters, cut there
48+
// Otherwise, cut at the exact limit
49+
const cutPoint = lastSpaceIndex > maxLength - 20 ? lastSpaceIndex : maxLength;
50+
51+
return description.substring(0, cutPoint) + '...';
52+
};
53+
3654
const HomeInput: React.FC<HomeInputProps> = ({
3755
selectedTeam,
3856
}) => {
@@ -152,16 +170,17 @@ const HomeInput: React.FC<HomeInputProps> = ({
152170
return {
153171
id: `team-task-${index}`,
154172
title: task,
155-
description: task,
173+
description: truncateDescription(task),
156174
icon: getIconFromString("📋")
157175
};
158176
} else {
159177
// Handle StartingTask objects
160178
const startingTask = task as any; // Type assertion for now
179+
const taskDescription = startingTask.prompt || startingTask.name || 'Task description';
161180
return {
162181
id: startingTask.id || `team-task-${index}`,
163182
title: startingTask.name || startingTask.prompt || 'Task',
164-
description: startingTask.prompt || startingTask.name || 'Task description',
183+
description: truncateDescription(taskDescription),
165184
icon: getIconFromString(startingTask.logo || "📋")
166185
};
167186
}

src/frontend/src/components/content/streaming/StreamingAgentMessage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const renderAgentMessages = (agentMessages: AgentMessageData[]) => {
205205
appearance="filled"
206206
className={styles.botBadge}
207207
>
208-
BOT
208+
AI Agent
209209
</Tag>
210210
</div>
211211
)}

src/frontend/src/components/content/streaming/StreamingPlanResponse.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ const renderPlanResponse = (
359359
size="small"
360360
className={styles.botBadge}
361361
>
362-
BOT
362+
AI Agent
363363
</Badge>
364364
)}
365365
</div>

src/frontend/src/services/TaskService.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,24 @@ export class TaskService {
144144
*/
145145
static cleanTextToSpaces(text: string): string {
146146
if (!text) return "";
147-
// Replace any non-alphanumeric character with a space
147+
148148
let cleanedText = text
149-
.replace("Hr_Agent", "HR_Agent")
150-
.trim()
151-
.replace(/[^a-zA-Z0-9]/g, " ");
149+
.replace("Hr_Agent", "HR Agent")
150+
.replace("Hr Agent", "HR Agent")
151+
.trim();
152152

153+
// Convert camelCase and PascalCase to spaces
154+
// This regex finds lowercase letter followed by uppercase letter
155+
cleanedText = cleanedText.replace(/([a-z])([A-Z])/g, '$1 $2');
156+
157+
// Replace any remaining non-alphanumeric characters with spaces
158+
cleanedText = cleanedText.replace(/[^a-zA-Z0-9]/g, ' ');
159+
153160
// Clean up multiple spaces and trim
154-
cleanedText = cleanedText.replace(/\s+/g, " ").trim();
161+
cleanedText = cleanedText.replace(/\s+/g, ' ').trim();
162+
163+
// Capitalize each word for better readability
164+
cleanedText = cleanedText.replace(/\b\w/g, (char) => char.toUpperCase());
155165

156166
return cleanedText;
157167
}

src/frontend/src/services/TeamService.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ export class TeamService {
234234
}
235235
}
236236

237+
const isProxyAgent = agent.name && agent.name.toLowerCase() === 'proxyagent';
238+
239+
// Deployment name validation (skip for proxy agents)
240+
if (!isProxyAgent && !agent.deployment_name) {
241+
errors.push(`Agent ${index + 1} (${agent.name}): Missing required field: deployment_name (required for non-proxy agents)`);
242+
}
243+
244+
237245
// RAG agent validation
238246
if (agent.use_rag === true && !agent.index_name) {
239247
errors.push(`Agent ${index + 1} (${agent.name}): RAG agents must have an index_name`);

0 commit comments

Comments
 (0)