11'use client'
22
3- import type { ContentBlock , OptionItem , SubagentName , ToolCallData } from '../../types'
4- import { SUBAGENT_LABELS , TOOL_UI_METADATA } from '../../types'
53import { resolveToolDisplay } from '@/lib/copilot/store-utils'
64import { ClientToolCallState } from '@/lib/copilot/tools/client/tool-display-registry'
5+ import type { ContentBlock , OptionItem , SubagentName , ToolCallData } from '../../types'
6+ import { SUBAGENT_LABELS , TOOL_UI_METADATA } from '../../types'
77import type { AgentGroupItem } from './components'
88import { AgentGroup , ChatContent , CircleStop , Options , PendingTagIndicator } from './components'
99
@@ -55,7 +55,9 @@ function resolveAgentLabel(key: string): string {
5555 return SUBAGENT_LABELS [ key as SubagentName ] ?? formatToolName ( key )
5656}
5757
58- function mapToolStatusToClientState ( status : ContentBlock [ 'toolCall' ] extends { status : infer T } ? T : string ) {
58+ function mapToolStatusToClientState (
59+ status : ContentBlock [ 'toolCall' ] extends { status : infer T } ? T : string
60+ ) {
5961 switch ( status ) {
6062 case 'success' :
6163 return ClientToolCallState . success
@@ -70,7 +72,8 @@ function mapToolStatusToClientState(status: ContentBlock['toolCall'] extends { s
7072
7173function getOverrideDisplayTitle ( tc : NonNullable < ContentBlock [ 'toolCall' ] > ) : string | undefined {
7274 if ( tc . name === 'read' || tc . name . endsWith ( '_respond' ) ) {
73- return resolveToolDisplay ( tc . name , mapToolStatusToClientState ( tc . status ) , tc . id , tc . params ) ?. text
75+ return resolveToolDisplay ( tc . name , mapToolStatusToClientState ( tc . status ) , tc . id , tc . params )
76+ ?. text
7477 }
7578 return undefined
7679}
0 commit comments