@@ -1561,19 +1561,30 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
15611561
15621562 await postToolAsk ( NEW_TASK_ASK )
15631563
1564- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1564+ const select = await waitFor (
1565+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1566+ )
15651567 // Pre-filled with the effort the extension resolved for the new task...
15661568 expect ( select ) . toHaveValue ( "low" )
15671569 // ...and offers exactly the levels the target model supports.
15681570 expect ( Array . from ( select . options ) . map ( ( option ) => option . value ) ) . toEqual ( [ "low" , "medium" , "high" ] )
1571+ // Option labels are bound to the translated level keys (settings:providers.reasoningEffort.*);
1572+ // in this test the effective t() is the identity function, so the raw keys render verbatim.
1573+ expect ( Array . from ( select . options ) . map ( ( option ) => option . textContent ) ) . toEqual ( [
1574+ "settings:providers.reasoningEffort.low" ,
1575+ "settings:providers.reasoningEffort.medium" ,
1576+ "settings:providers.reasoningEffort.high" ,
1577+ ] )
15691578 } )
15701579
15711580 it ( "falls back to the first supported level when the pre-fill is not supported" , async ( ) => {
15721581 const { getByLabelText } = renderChatView ( )
15731582
15741583 await postToolAsk ( { ...NEW_TASK_ASK , thinkingEffort : "xhigh" , supportedThinkingEfforts : [ "low" , "high" ] } )
15751584
1576- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1585+ const select = await waitFor (
1586+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1587+ )
15771588 expect ( select ) . toHaveValue ( "low" )
15781589 } )
15791590
@@ -1586,7 +1597,9 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
15861597 // not the raw payload value the user never saw.
15871598 await postToolAsk ( { ...NEW_TASK_ASK , thinkingEffort : "xhigh" , supportedThinkingEfforts : [ "low" , "high" ] } )
15881599
1589- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1600+ const select = await waitFor (
1601+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1602+ )
15901603 expect ( select ) . toHaveValue ( "low" )
15911604
15921605 await act ( async ( ) => {
@@ -1605,7 +1618,7 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
16051618
16061619 await postToolAsk ( NEW_TASK_ASK )
16071620 await waitFor ( ( ) => {
1608- expect ( getByLabelText ( "Thinking effort " ) ) . toBeInTheDocument ( )
1621+ expect ( getByLabelText ( "settings:providers.reasoningEffort.label " ) ) . toBeInTheDocument ( )
16091622 } )
16101623
16111624 // A subsequent readFile ask must drop the selector: the effort state is
@@ -1618,7 +1631,7 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
16181631 } )
16191632
16201633 await waitFor ( ( ) => {
1621- expect ( queryByLabelText ( "Thinking effort " ) ) . not . toBeInTheDocument ( )
1634+ expect ( queryByLabelText ( "settings:providers.reasoningEffort.label " ) ) . not . toBeInTheDocument ( )
16221635 } )
16231636 } )
16241637
@@ -1631,14 +1644,16 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
16311644 await waitFor ( ( ) => {
16321645 expect ( getByRole ( "button" , { name : "chat:approve.title" } ) ) . toBeInTheDocument ( )
16331646 } )
1634- expect ( queryByLabelText ( "Thinking effort " ) ) . not . toBeInTheDocument ( )
1647+ expect ( queryByLabelText ( "settings:providers.reasoningEffort.label " ) ) . not . toBeInTheDocument ( )
16351648 } )
16361649
16371650 it ( "posts the selected effort when the user approves the newTask ask" , async ( ) => {
16381651 const { getByLabelText, getByRole } = renderChatView ( )
16391652
16401653 await postToolAsk ( NEW_TASK_ASK )
1641- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1654+ const select = await waitFor (
1655+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1656+ )
16421657
16431658 // The user switches the effort before entering the subtask...
16441659 await act ( async ( ) => {
@@ -1661,7 +1676,9 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
16611676 const { getByLabelText, getByRole, getByTestId } = renderChatView ( )
16621677
16631678 await postToolAsk ( NEW_TASK_ASK )
1664- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1679+ const select = await waitFor (
1680+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1681+ )
16651682 await act ( async ( ) => {
16661683 fireEvent . change ( select , { target : { value : "medium" } } )
16671684 } )
@@ -1704,7 +1721,9 @@ describe("ChatView - new_task thinking effort selector (DTE series 5/5)", () =>
17041721 const { getByLabelText, getByTestId } = renderChatView ( )
17051722
17061723 await postToolAsk ( NEW_TASK_ASK )
1707- const select = await waitFor ( ( ) => getByLabelText ( "Thinking effort" ) as HTMLSelectElement )
1724+ const select = await waitFor (
1725+ ( ) => getByLabelText ( "settings:providers.reasoningEffort.label" ) as HTMLSelectElement ,
1726+ )
17081727 await act ( async ( ) => {
17091728 fireEvent . change ( select , { target : { value : "high" } } )
17101729 } )
0 commit comments