Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function AgentGroup({
}: AgentGroupProps) {
const AgentIcon = getAgentIcon(agentName)
const hasItems = items.length > 0
const isSubagent = agentName !== 'mothership'
const toolItems = items.filter(
(item): item is Extract<AgentGroupItem, { type: 'tool' }> => item.type === 'tool'
)
Expand Down Expand Up @@ -112,7 +113,7 @@ export function AgentGroup({
<Expandable expanded={expanded}>
<ExpandableContent>
<BoundedViewport isStreaming={isStreaming}>
<div className='flex flex-col gap-1.5 py-0.5'>
<div className={cn('flex flex-col gap-1.5 py-0.5', isSubagent && 'opacity-60')}>
{items.map((item, idx) => {
if (item.type === 'tool') {
return (
Expand All @@ -128,7 +129,7 @@ export function AgentGroup({
return (
<span
key={`text-${idx}`}
className='pl-6 font-base text-[13px] text-[var(--text-secondary)] leading-[18px] opacity-60'
className='pl-6 font-base text-[13px] text-[var(--text-secondary)] leading-[18px]'
>
{item.content.trim()}
</span>
Expand Down
18 changes: 10 additions & 8 deletions apps/sim/lib/copilot/tools/client/store-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function formatReadingLabel(target: string | undefined, state: ClientToolCallSta
case ClientToolCallState.success:
return `Read${suffix}`
case ClientToolCallState.error:
return `Failed reading${suffix}`
return `Attempted to read${suffix}`
case ClientToolCallState.rejected:
case ClientToolCallState.aborted:
return `Skipped reading${suffix}`
Expand Down Expand Up @@ -127,14 +127,16 @@ function humanizedFallback(
toolName: string,
state: ClientToolCallState
): ClientToolDisplay | undefined {
const formattedName = toolName.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
const titleCaseName = toolName.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
if (state === ClientToolCallState.error) {
const lowerCaseName = toolName.replace(/_/g, ' ').toLowerCase()
return { text: `Attempted to ${lowerCaseName}`, icon: Loader }
}
const stateVerb =
state === ClientToolCallState.success
? 'Executed'
: state === ClientToolCallState.error
? 'Failed'
: state === ClientToolCallState.rejected || state === ClientToolCallState.aborted
? 'Skipped'
: 'Executing'
return { text: `${stateVerb} ${formattedName}`, icon: Loader }
: state === ClientToolCallState.rejected || state === ClientToolCallState.aborted
? 'Skipped'
: 'Executing'
return { text: `${stateVerb} ${titleCaseName}`, icon: Loader }
}
Loading