@@ -106,7 +106,11 @@ describe("subagent traits", () => {
106106 ) . toBe ( "" ) ;
107107 } ) ;
108108 it ( "shows the agent's saved effort and speed, including model display names" , ( ) => {
109- expect ( resolveSubagentTraits ( { subagent, provider } ) . traits ) . toBe ( "High · Fast" ) ;
109+ expect ( resolveSubagentTraits ( { subagent, provider } ) ) . toEqual ( {
110+ traits : "High" ,
111+ speedIcon : "fast" ,
112+ providerInstanceId : instanceId ,
113+ } ) ;
110114 } ) ;
111115
112116 it ( "uses an app-owned child's selection when the agent has no saved selection" , ( ) => {
@@ -116,7 +120,7 @@ describe("subagent traits", () => {
116120 provider,
117121 childThread : { providerInstanceId : instanceId , modelSelection : selection } ,
118122 } ) . traits ,
119- ) . toBe ( "High · Fast " ) ;
123+ ) . toBe ( "High" ) ;
120124 } ) ;
121125
122126 it ( "does not use a provider-managed child's selection" , ( ) => {
@@ -157,7 +161,7 @@ describe("subagent traits", () => {
157161 modelSelection : { ...selection , options : [ { id : "reasoningEffort" , value : "low" } ] } ,
158162 } ,
159163 } ) . traits ,
160- ) . toBe ( "High · Fast " ) ;
164+ ) . toBe ( "High" ) ;
161165 } ) ;
162166
163167 it ( "shows Claude effort and boolean fast mode" , ( ) => {
@@ -194,23 +198,23 @@ describe("subagent traits", () => {
194198 ] ,
195199 } ,
196200 } ) . traits ,
197- ) . toBe ( "Max · Fast " ) ;
201+ ) . toBe ( "Max" ) ;
198202 } ) ;
199203
200204 it . each ( [
201- [ "ultra" , "Ultrafast " ] ,
202- [ "default" , "Normal" ] ,
203- [ "removed" , "" ] ,
204- ] ) ( "shows only known saved speed values : %s" , ( value , label ) => {
205+ [ "ultra" , "ultrafast " ] ,
206+ [ "default" , null ] ,
207+ [ "removed" , null ] ,
208+ ] ) ( "shows only known saved speed icons : %s" , ( value , icon ) => {
205209 expect (
206210 resolveSubagentTraits ( {
207211 subagent : {
208212 ...subagent ,
209213 modelSelection : { ...selection , options : [ { id : "serviceTier" , value } ] } ,
210214 } ,
211215 provider,
212- } ) . traits ,
213- ) . toBe ( label ) ;
216+ } ) . speedIcon ,
217+ ) . toBe ( icon ) ;
214218 } ) ;
215219
216220 it ( "uses a validated app-owned child's provider for cross-provider workflow traits" , ( ) => {
@@ -252,11 +256,13 @@ describe("subagent traits", () => {
252256 childThread : { providerInstanceId : childInstanceId , modelSelection : childSelection } ,
253257 } ;
254258 expect ( resolveSubagentTraits ( input ) ) . toEqual ( {
255- traits : "Max · Fast" ,
259+ traits : "Max" ,
260+ speedIcon : "fast" ,
256261 providerInstanceId : childInstanceId ,
257262 } ) ;
258263 expect ( resolveSubagentTraits ( { ...input , subagent } ) ) . toEqual ( {
259- traits : "High · Fast" ,
264+ traits : "High" ,
265+ speedIcon : "fast" ,
260266 providerInstanceId : instanceId ,
261267 } ) ;
262268 expect (
@@ -278,7 +284,7 @@ describe("subagent traits", () => {
278284 ) . toBe ( "" ) ;
279285 expect (
280286 resolveSubagentTraits ( { ...input , subagent : { ...input . subagent , model : "another-model" } } ) ,
281- ) . toEqual ( { traits : "" , providerInstanceId : instanceId } ) ;
287+ ) . toEqual ( { traits : "" , speedIcon : null , providerInstanceId : instanceId } ) ;
282288 expect (
283289 resolveSubagentTraits ( {
284290 subagent : { ...subagent , modelSelection : undefined } ,
0 commit comments