Skip to content

Commit 152e39b

Browse files
fix(ui): scope opacity to subagent groups, lowercase fallback error label
1 parent eda7304 commit 152e39b

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export function AgentGroup({
4242
}: AgentGroupProps) {
4343
const AgentIcon = getAgentIcon(agentName)
4444
const hasItems = items.length > 0
45+
const isSubagent = agentName !== 'mothership'
4546
const toolItems = items.filter(
4647
(item): item is Extract<AgentGroupItem, { type: 'tool' }> => item.type === 'tool'
4748
)
@@ -112,7 +113,7 @@ export function AgentGroup({
112113
<Expandable expanded={expanded}>
113114
<ExpandableContent>
114115
<BoundedViewport isStreaming={isStreaming}>
115-
<div className='flex flex-col gap-1.5 py-0.5'>
116+
<div className={cn('flex flex-col gap-1.5 py-0.5', isSubagent && 'opacity-60')}>
116117
{items.map((item, idx) => {
117118
if (item.type === 'tool') {
118119
return (
@@ -128,7 +129,7 @@ export function AgentGroup({
128129
return (
129130
<span
130131
key={`text-${idx}`}
131-
className='pl-6 font-base text-[13px] text-[var(--text-secondary)] leading-[18px] opacity-60'
132+
className='pl-6 font-base text-[13px] text-[var(--text-secondary)] leading-[18px]'
132133
>
133134
{item.content.trim()}
134135
</span>

apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function ToolCallItem({ toolName, displayTitle, status, streamingArgs }:
9494
}, [toolName, streamingArgs])
9595

9696
return (
97-
<div className='flex items-center gap-[8px] pl-[24px] opacity-60'>
97+
<div className='flex items-center gap-[8px] pl-[24px]'>
9898
<div className='flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center'>
9999
<StatusIcon status={status} toolName={toolName} />
100100
</div>

apps/sim/lib/copilot/tools/client/store-utils.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,16 @@ function humanizedFallback(
127127
toolName: string,
128128
state: ClientToolCallState
129129
): ClientToolDisplay | undefined {
130-
const formattedName = toolName.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
130+
const titleCaseName = toolName.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
131+
if (state === ClientToolCallState.error) {
132+
const lowerCaseName = toolName.replace(/_/g, ' ').toLowerCase()
133+
return { text: `Attempted to ${lowerCaseName}`, icon: Loader }
134+
}
131135
const stateVerb =
132136
state === ClientToolCallState.success
133137
? 'Executed'
134-
: state === ClientToolCallState.error
135-
? 'Attempted to'
136-
: state === ClientToolCallState.rejected || state === ClientToolCallState.aborted
137-
? 'Skipped'
138-
: 'Executing'
139-
return { text: `${stateVerb} ${formattedName}`, icon: Loader }
138+
: state === ClientToolCallState.rejected || state === ClientToolCallState.aborted
139+
? 'Skipped'
140+
: 'Executing'
141+
return { text: `${stateVerb} ${titleCaseName}`, icon: Loader }
140142
}

0 commit comments

Comments
 (0)