File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1581,7 +1581,7 @@ export function AgentUI({
15811581 < SlashCommandDropdown
15821582 suggestions = { slashSuggestions }
15831583 activeIndex = { slashActiveIndex }
1584- visible = { slashVisible && ! state . isWorking }
1584+ visible = { slashVisible && enableQueueInput }
15851585 />
15861586 }
15871587 inputWidth = { inputWidth }
Original file line number Diff line number Diff line change @@ -350,6 +350,38 @@ describe('AgentUI composer suggestions', () => {
350350 expect ( frame ) . toContain ( 'Tab to accept' ) ;
351351 } ) ;
352352
353+ it ( 'renders slash command suggestions while the assistant is working' , async ( ) => {
354+ const state = {
355+ ...createInitialUIState ( ) ,
356+ isWorking : true ,
357+ status : 'Crunching...' ,
358+ } ;
359+ const { lastFrame, stdin } = render (
360+ React . createElement (
361+ I18nProvider ,
362+ null ,
363+ React . createElement (
364+ ThemeProvider ,
365+ null ,
366+ React . createElement ( AgentUI , {
367+ state,
368+ onInstruction : ( ) => { } ,
369+ onEscape : ( ) => { } ,
370+ onCtrlC : ( ) => { } ,
371+ slashCommands,
372+ } )
373+ )
374+ )
375+ ) ;
376+
377+ stdin . write ( '/' ) ;
378+ await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 50 ) ) ;
379+
380+ const frame = stripAnsi ( lastFrame ( ) ?? '' ) ;
381+ expect ( frame ) . toContain ( '/help' ) ;
382+ expect ( frame ) . toContain ( 'Tab to accept' ) ;
383+ } ) ;
384+
353385 it ( 'renders only the next shell command suggestion for git input in the Ink composer' , async ( ) => {
354386 const state = {
355387 ...createInitialUIState ( ) ,
You can’t perform that action at this time.
0 commit comments