@@ -276,22 +276,25 @@ function renderChat() {
276276 process . stdout . write (
277277 '\n' + ' ' . repeat ( sidePadding ) + gray ( '─' . repeat ( contentWidth ) ) ,
278278 )
279+ // Show placeholder or user input
280+ if ( currentInput . length === 0 ) {
281+ // Show dimmed placeholder when no input
282+ const placeholder = `\x1b[2m${ gray ( 'Type your message...' ) } \x1b[22m`
283+ process . stdout . write ( `\n${ ' ' . repeat ( sidePadding ) } ${ placeholder } ` )
284+ } else {
285+ // Show user input with cursor when typing
286+ const cursor = gray ( '|' )
287+ const inputWithCursor = currentInput + cursor
288+ const wrappedInputLines = wrapLine ( inputWithCursor , contentWidth )
279289
280- const prompt = bold ( 'Type your message: ' )
281- const cursor = currentInput . length === 0 ? gray ( '|' ) : ''
282- process . stdout . write (
283- `\n${ ' ' . repeat ( sidePadding ) } ${ prompt } ${ currentInput } ${ cursor } ` ,
284- )
290+ wrappedInputLines . forEach ( ( line , index ) => {
291+ process . stdout . write ( `\n${ ' ' . repeat ( sidePadding ) } ${ line } ` )
292+ } )
293+ }
285294
286295 // Status line with side padding
287296 let statusText = gray ( 'Enter to send • ↑/↓ to scroll • ESC or Ctrl+C to exit' )
288297
289- if ( messageQueue . length > 0 ) {
290- statusText += gray (
291- ` • ${ messageQueue . length } message${ messageQueue . length === 1 ? '' : 's' } queued` ,
292- )
293- }
294-
295298 process . stdout . write ( `\n${ ' ' . repeat ( sidePadding ) } ${ statusText } ` )
296299
297300 process . stdout . write ( HIDE_CURSOR )
0 commit comments