@@ -64,7 +64,7 @@ test("model dropdown offers all reasoning effort levels", () => {
6464 assert . equal ( getThinkingOptionIndex ( { thinkingEnabled : true , reasoningEffort : "low" } ) , 2 ) ;
6565} ) ;
6666
67- test ( "model scope selector is gray, retains the model cursor and carries the destination to thinking confirmation " , async ( t ) => {
67+ test ( "model scope selector is only active on thinking confirmation and retains the thinking cursor " , async ( t ) => {
6868 const inkRequire = createRequire ( createRequire ( import . meta. url ) . resolve ( "ink" ) ) ;
6969 const { default : chalk } = await import ( pathToFileURL ( inkRequire . resolve ( "chalk" ) ) . href ) ;
7070 const level = chalk . level ;
@@ -73,29 +73,38 @@ test("model scope selector is gray, retains the model cursor and carries the des
7373 chalk . level = level ;
7474 } ) ;
7575 const h = await editor ( t , true ) ;
76+ assert . doesNotMatch ( h . frame ( ) , / R e m e m b e r t h i s c h o i c e | A l l P r o j e c t s | T h i s P r o j e c t / ) ;
77+ await h . send ( DOWN ) ;
78+ await h . send ( LEFT ) ; // Scope cannot change while hidden.
79+ assert . match ( h . frame ( ) , / > ○ d e e p s e e k - v 4 - p r o / ) ;
80+ assert . deepEqual ( h . saves , [ ] ) ;
81+ await h . send ( ENTER ) ;
82+ assert . match ( h . frame ( ) , / S e l e c t T h i n k i n g M o d e / ) ;
7683 assert . match ( h . frame ( ) , / A l l P r o j e c t s + \[ T h i s P r o j e c t \] / ) ;
7784 assert . match ( h . rawFrame ( ) , / \u001b \[ 9 0 m R e m e m b e r t h i s c h o i c e f o r { 2 } \( ← → t o s w i t c h \) / ) ;
78- assert . ok ( h . frame ( ) . indexOf ( "Remember this choice" ) < h . frame ( ) . indexOf ( "Space/Enter select model " ) ) ;
85+ assert . ok ( h . frame ( ) . indexOf ( "Remember this choice" ) < h . frame ( ) . indexOf ( "Space/Enter apply " ) ) ;
7986 await h . send ( DOWN ) ;
8087 await h . send ( LEFT ) ;
8188 assert . match ( h . frame ( ) , / \[ A l l P r o j e c t s \] + T h i s P r o j e c t / ) ;
82- assert . match ( h . frame ( ) , / > ○ d e e p s e e k - v 4 - p r o / ) ;
89+ assert . match ( h . frame ( ) , / > ○ T h i n k i n g m o d e \[ l o w \] / ) ;
90+ await h . send ( RIGHT ) ;
91+ assert . match ( h . frame ( ) , / A l l P r o j e c t s + \[ T h i s P r o j e c t \] / ) ;
92+ assert . match ( h . frame ( ) , / > ○ T h i n k i n g m o d e \[ l o w \] / ) ;
93+ await h . send ( LEFT ) ;
8394 await h . send ( LEFT ) ;
8495 assert . match ( h . frame ( ) , / \[ A l l P r o j e c t s \] / ) ;
8596 assert . deepEqual ( h . saves , [ ] ) ;
8697 await h . send ( ENTER ) ;
87- assert . match ( h . frame ( ) , / S e l e c t T h i n k i n g M o d e / ) ;
88- assert . doesNotMatch ( h . frame ( ) , / R e m e m b e r t h i s c h o i c e / ) ;
89- await h . send ( RIGHT ) ; // Scope cannot change while hidden.
90- await h . send ( DOWN ) ;
91- await h . send ( ENTER ) ;
9298 assert . deepEqual ( h . saves , [
9399 { selection : { model : "deepseek-v4-pro" , thinkingEnabled : true , reasoningEffort : "low" } , target : "user" } ,
94100 ] ) ;
95101} ) ;
96102
97103test ( "missing project settings default to all projects and cancellation saves nothing" , async ( t ) => {
98104 const h = await editor ( t , false , 36 ) ;
105+ assert . doesNotMatch ( h . frame ( ) , / R e m e m b e r t h i s c h o i c e | A l l P r o j e c t s | T h i s P r o j e c t / ) ;
106+ await h . send ( RIGHT ) ; // Scope cannot change while hidden.
107+ await h . send ( ENTER ) ;
99108 assert . match ( h . frame ( ) , / \[ A l l P r o j e c t s \] + T h i s P r o j e c t / ) ;
100109 // The shared scope control must fit inside the narrow dialog.
101110 const scopeLines = h
@@ -112,8 +121,8 @@ test("missing project settings default to all projects and cancellation saves no
112121
113122test ( "reopening recomputes the default destination and thinking cancellation does not save" , async ( t ) => {
114123 const h = await editor ( t ) ;
115- await h . send ( RIGHT ) ;
116124 await h . send ( ENTER ) ;
125+ await h . send ( RIGHT ) ;
117126 await h . send ( ESC ) ;
118127 assert . deepEqual ( h . saves , [ ] ) ;
119128 h . rerender ( React . createElement ( Text , null , "closed" ) ) ;
@@ -122,8 +131,9 @@ test("reopening recomputes the default destination and thinking cancellation doe
122131 fs . writeFileSync ( h . projectFile , "{}" ) ;
123132 h . rerender ( React . createElement ( h . Probe ) ) ;
124133 await h . send ( "" ) ;
125- assert . match ( h . frame ( ) , / A l l P r o j e c t s + \[ T h i s P r o j e c t \] / ) ;
134+ assert . doesNotMatch ( h . frame ( ) , / R e m e m b e r t h i s c h o i c e | A l l P r o j e c t s | T h i s P r o j e c t / ) ;
126135 await h . send ( ENTER ) ;
136+ assert . match ( h . frame ( ) , / A l l P r o j e c t s + \[ T h i s P r o j e c t \] / ) ;
127137 await h . send ( ENTER ) ;
128138 assert . deepEqual ( h . saves , [ { selection : current , target : "project" } ] ) ;
129139} ) ;
0 commit comments