@@ -127,12 +127,19 @@ test("renderMessageToStdout shows (no content) for empty user messages", () => {
127127} ) ;
128128
129129test ( "MessageView echoes submitted user prompts with live prompt wrapping width" , ( ) => {
130- assert . equal ( getPromptEchoContentWidth ( 8 ) , 6 ) ;
130+ assert . equal ( getPromptEchoContentWidth ( 8 ) , 5 ) ;
131131
132132 const msg = makeSessionMessage ( { role : "user" , content : "abcdefg" } ) ;
133133 const output = renderToString ( React . createElement ( MessageView , { message : msg , width : 8 } ) , { columns : 8 } ) ;
134134
135- assert . equal ( stripAnsi ( output ) , " > abcdef\n g\n" ) ;
135+ const text = stripAnsi ( output ) ;
136+ assert . equal ( text , " > abcde\n fg\n" ) ;
137+ assert . ok (
138+ text
139+ . trimEnd ( )
140+ . split ( "\n" )
141+ . every ( ( line ) => line . length <= 8 )
142+ ) ;
136143} ) ;
137144
138145test ( "MessageView echoes model changes with submitted prompt wrapping" , ( ) => {
@@ -143,7 +150,14 @@ test("MessageView echoes model changes with submitted prompt wrapping", () => {
143150 } ) ;
144151 const output = renderToString ( React . createElement ( MessageView , { message : msg , width : 8 } ) , { columns : 8 } ) ;
145152
146- assert . equal ( stripAnsi ( output ) , " > abcdef\n gh\n" ) ;
153+ const text = stripAnsi ( output ) ;
154+ assert . equal ( text , " > abcde\n fgh\n" ) ;
155+ assert . ok (
156+ text
157+ . trimEnd ( )
158+ . split ( "\n" )
159+ . every ( ( line ) => line . length <= 8 )
160+ ) ;
147161} ) ;
148162
149163test ( "renderMessageToStdout renders assistant non-thinking messages with ✦" , ( ) => {
0 commit comments