@@ -197,6 +197,7 @@ export const createMynahUI = (
197197 mynahUI . updateStore ( tabID , {
198198 loadingChat : true ,
199199 promptInputDisabledState : true ,
200+ cancelButtonWhenLoading : true ,
200201 } )
201202
202203 if ( message && messageId ) {
@@ -307,6 +308,7 @@ export const createMynahUI = (
307308 ) {
308309 mynahUI . updateStore ( tabID , {
309310 loadingChat : true ,
311+ cancelButtonWhenLoading : false ,
310312 promptInputDisabledState : true ,
311313 } )
312314
@@ -462,6 +464,13 @@ export const createMynahUI = (
462464 onTabRemove : connector . onTabRemove ,
463465 onTabChange : connector . onTabChange ,
464466 // TODO: update mynah-ui this type doesn't seem correct https://github.com/aws/mynah-ui/blob/3777a39eb534a91fd6b99d6cf421ce78ee5c7526/src/main.ts#L372
467+ onStopChatResponse : ( tabID : string ) => {
468+ mynahUI . updateStore ( tabID , {
469+ loadingChat : false ,
470+ promptInputDisabledState : false ,
471+ } )
472+ connector . onStopChatResponse ( tabID )
473+ } ,
465474 onChatPrompt : ( tabID : string , prompt : ChatPrompt , eventId : string | undefined ) => {
466475 if ( ( prompt . prompt ?? '' ) === '' && ( prompt . command ?? '' ) === '' ) {
467476 return
0 commit comments