@@ -13,8 +13,9 @@ export const DisabledMessage: React.FC<{
1313 currentState : State ;
1414 onLoginClick : ( openApiTokenLogin : boolean ) => void ;
1515 onOpenFolder : ( ) => void ;
16+ onLinkClick : ( url : string ) => void ;
1617 onMcpChoice : ( choice : McpConsentChoice , serverName ?: string ) => void ;
17- } > = ( { currentState, onLoginClick, onOpenFolder, onMcpChoice } ) => {
18+ } > = ( { currentState, onLoginClick, onOpenFolder, onLinkClick , onMcpChoice } ) => {
1819 if ( currentState . state === 'Disabled' && currentState . subState === 'NeedAuth' ) {
1920 return (
2021 < div style = { messageOuterStyles } >
@@ -53,17 +54,29 @@ export const DisabledMessage: React.FC<{
5354 }
5455
5556 if ( currentState . state === 'Disabled' && currentState . subState === 'EntitlementCheckFailed' ) {
57+ let customButton : { text : string ; onClick : ( ) => void } | undefined = undefined ;
58+ if ( currentState . detail . payload . ctaLink ) {
59+ const { text, link } = currentState . detail . payload . ctaLink ;
60+ customButton = {
61+ text,
62+ onClick : ( ) => onLinkClick ( link ) ,
63+ } ;
64+ }
65+
66+ const message = currentState . detail . payload . message . replace ( '{ctaLink}' , '' ) . trim ( ) ;
67+
5668 return (
5769 < div style = { { ...messageOuterStyles , width : '100%' } } >
5870 < DialogMessageItem
5971 msg = { {
6072 event_kind : '_RovoDevDialog' ,
6173 type : 'error' ,
6274 title : currentState . detail . payload . title ,
63- text : currentState . detail . payload . message ,
75+ text : message ,
6476 statusCode : `Failure code: ${ currentState . detail . payload . status } ` ,
6577 uid : '' ,
6678 } }
79+ customButton = { customButton }
6780 />
6881 </ div >
6982 ) ;
0 commit comments