@@ -39,6 +39,7 @@ import { DeviceRotationDirection, IDEPanelMoveTarget } from "./common/Project";
3939import { AdminRestrictedFunctionalityError , PaywalledFunctionalityError } from "./common/Errors" ;
4040import { registerRadonAI } from "./ai/mcp/RadonMcpController" ;
4141import { MaestroCodeLensProvider } from "./providers/MaestroCodeLensProvider" ;
42+ import { removeLicense } from "./utilities/license" ;
4243
4344const CHAT_ONBOARDING_COMPLETED = "chat_onboarding_completed" ;
4445
@@ -226,6 +227,20 @@ export async function activate(context: ExtensionContext) {
226227 }
227228 }
228229
230+ function removeLicenseWithConfirmation ( ) {
231+ window
232+ . showWarningMessage (
233+ "Are you sure you want to remove license? Restoring it will require a license key." ,
234+ "Yes" ,
235+ "No"
236+ )
237+ . then ( ( item ) => {
238+ if ( item === "Yes" ) {
239+ removeLicense ( ) ;
240+ }
241+ } ) ;
242+ }
243+
229244 context . subscriptions . push (
230245 window . registerWebviewViewProvider (
231246 SidePanelViewProvider . viewType ,
@@ -301,6 +316,9 @@ export async function activate(context: ExtensionContext) {
301316 context . subscriptions . push (
302317 commands . registerCommand ( "RNIDE.toggleDeviceAppearance" , toggleDeviceAppearance )
303318 ) ;
319+ context . subscriptions . push (
320+ commands . registerCommand ( "RNIDE.removeLicense" , removeLicenseWithConfirmation )
321+ ) ;
304322 // Debug adapter used by custom launch configuration, we register it in case someone tries to run the IDE configuration
305323 // The current workflow is that people shouldn't run it, but since it is listed under launch options it might happen
306324 // When it does happen, we open the IDE panel and restart the app.
0 commit comments