@@ -877,12 +877,16 @@ function toFeedActivity(
877877 } ;
878878}
879879
880- function singleToolCallLabel ( activity : ThreadFeedActivity , expanded : boolean ) : string {
880+ function singleToolCallLabel (
881+ activity : ThreadFeedActivity ,
882+ expanded : boolean ,
883+ terms : ChangeRequestTerminology ,
884+ ) : string {
881885 if ( activity . workEntry . itemType === "reasoning" )
882886 return expanded
883887 ? "Thought"
884888 : compactWorkEntryText ( activity . workEntry . detail ?? "" ) || "Thought" ;
885- const presentation = resolveWorkEntryToolPresentation ( activity . workEntry , "completed" ) ;
889+ const presentation = resolveWorkEntryToolPresentation ( activity . workEntry , "completed" , terms ) ;
886890 if ( presentation ) return presentation . displayName ;
887891 const command = activity . workEntry . command ?. trim ( ) ;
888892 return command ? truncate ( command , WORK_LOG_LABEL_MAX_LENGTH ) : activity . summary ;
@@ -1930,7 +1934,15 @@ function appendPresentedFeedEntry(
19301934 )
19311935 ) {
19321936 const rows : ThreadFeedEntry [ ] = [ ] ;
1933- appendActivityGroupRows ( rows , entry , expandedWorkGroupIds , activeRunId , isWorking , activeTail ) ;
1937+ appendActivityGroupRows (
1938+ rows ,
1939+ entry ,
1940+ expandedWorkGroupIds ,
1941+ activeRunId ,
1942+ isWorking ,
1943+ activeTail ,
1944+ terms ,
1945+ ) ;
19341946 cached = { terms, activeRunId, isWorking, activeTail, rows } ;
19351947 presentedActivityGroupsCache . set ( entry , cached ) ;
19361948 }
@@ -1946,6 +1958,7 @@ function appendActivityGroupRows(
19461958 activeRunId : RunId | null ,
19471959 isWorking : boolean ,
19481960 activeTail : boolean ,
1961+ terms : ChangeRequestTerminology ,
19491962) : void {
19501963 const groupAnchorIdByActivityId = new Map < string , string > ( ) ;
19511964 let groupAnchorId : string | null = null ;
@@ -1980,6 +1993,7 @@ function appendActivityGroupRows(
19801993 activeRunId ,
19811994 isWorking ,
19821995 activeTail && isTrailingRun ,
1996+ terms ,
19831997 ) ;
19841998 const paths = workEntriesViewedImagePaths ( groupableRun . map ( ( activity ) => activity . workEntry ) ) ;
19851999 if ( paths . length > 0 ) {
@@ -2021,6 +2035,7 @@ function appendToolGroupRows(
20212035 activeRunId : RunId | null ,
20222036 isWorking : boolean ,
20232037 activeTail : boolean ,
2038+ terms : ChangeRequestTerminology ,
20242039) : void {
20252040 const expanded = expandedWorkGroupIds . has ( groupId ) ;
20262041 const latestActiveActivity = activities . findLast (
@@ -2032,7 +2047,10 @@ function appendToolGroupRows(
20322047 const latestActivity = latestActiveActivity ?? activities . at ( - 1 ) ! ;
20332048 const shimmer = activeTail && ( active || latestActivity . status === "success" ) ;
20342049 const singleActivity = activities . length === 1 ? latestActivity : null ;
2035- const groupSummary = summarizeToolGroup ( activities . map ( ( activity ) => activity . workEntry ) ) ;
2050+ const groupSummary = summarizeToolGroup (
2051+ activities . map ( ( activity ) => activity . workEntry ) ,
2052+ terms ,
2053+ ) ;
20362054 const latestThought =
20372055 live && ! expanded
20382056 ? activities . findLast (
@@ -2047,11 +2065,11 @@ function appendToolGroupRows(
20472065 ? latestActivity . lifecycleStatus === "inProgress"
20482066 ? "Thinking"
20492067 : "Thought"
2050- : liveToolActivitySummary ( latestActivity , live )
2068+ : liveToolActivitySummary ( latestActivity , live , terms )
20512069 : singleActivity !== null &&
20522070 singleActivity . toolLike &&
20532071 toolGroupAction ( singleActivity . workEntry ) !== "edit"
2054- ? singleToolCallLabel ( singleActivity , expanded )
2072+ ? singleToolCallLabel ( singleActivity , expanded , terms )
20552073 : singleActivity !== null && ! singleActivity . toolLike
20562074 ? singleActivity . workEntry . label
20572075 : groupSummary . summary ;
@@ -2091,7 +2109,7 @@ function appendToolGroupRows(
20912109 activities . findLast ( ( activity ) => activity . workEntry . toolIcon !== undefined ) ?. workEntry
20922110 . toolIcon ;
20932111 const summaryToolIcon = live
2094- ? resolveWorkEntryToolPresentation ( latestActivity . workEntry ) ?. icon
2112+ ? resolveWorkEntryToolPresentation ( latestActivity . workEntry , undefined , terms ) ?. icon
20952113 : undefined ;
20962114 result . push ( {
20972115 type : "work-toggle" ,
@@ -2136,17 +2154,25 @@ function appendToolGroupRows(
21362154 } ) ;
21372155}
21382156
2139- function liveToolActivitySummary ( activity : ThreadFeedActivity , presentTense : boolean ) : string {
2157+ function liveToolActivitySummary (
2158+ activity : ThreadFeedActivity ,
2159+ presentTense : boolean ,
2160+ terms : ChangeRequestTerminology ,
2161+ ) : string {
21402162 const status = liveActivityToolStatus ( activity . lifecycleStatus , presentTense ) ;
21412163 if ( activity . workEntry . itemType === "reasoning" ) {
21422164 return compactWorkEntryText (
21432165 activity . workEntry . detail ?. trim ( ) || ( status === "inProgress" ? "Thinking" : "Thought" ) ,
21442166 ) ;
21452167 }
2146- const presentation = resolveWorkEntryToolPresentation ( {
2147- ...activity . workEntry ,
2148- toolLifecycleStatus : status ,
2149- } ) ;
2168+ const presentation = resolveWorkEntryToolPresentation (
2169+ {
2170+ ...activity . workEntry ,
2171+ toolLifecycleStatus : status ,
2172+ } ,
2173+ undefined ,
2174+ terms ,
2175+ ) ;
21502176 if ( presentation ) return presentation . displayName ;
21512177 const command = activity . workEntry . command ?. trim ( ) ;
21522178 if ( command ) {
0 commit comments