11/*---------------------------------------------------------------------------------------------
2- * Atom++ — Customize
2+ * LevelCode — Customize
33 *
44 * One product surface for everything: AI key/model, appearance + keymap, sync, updates, and
55 * power-editing/hackability. A self-contained webview whose buttons run the same commands the
@@ -29,7 +29,7 @@ function activeModelId(ai, providerId) {
2929}
3030
3131async function gatherStatus ( context ) {
32- const ai = vscode . workspace . getConfiguration ( 'atompp .ai' ) ;
32+ const ai = vscode . workspace . getConfiguration ( 'levelcode .ai' ) ;
3333 const providerId = normId ( ai . get ( 'provider' , 'claude' ) ) ;
3434 const p = getProvider ( providerId ) || getProvider ( 'claude' ) ;
3535 const skey = secretStorageKey ( providerId ) ;
@@ -48,9 +48,9 @@ async function gatherStatus(context) {
4848 theme : vscode . workspace . getConfiguration ( 'workbench' ) . get ( 'colorTheme' , '' ) ,
4949 syncEnabled : ! ! vscode . workspace . getConfiguration ( ) . get ( 'configurationSync.keybindingsPerPlatform' ) || undefined ,
5050 // Sync is stripped from public builds until the managed host ships (strip-unreleased.mjs), so
51- // only show its section when the atom- sync extension is actually present (its command exists).
52- syncAvailable : ( await vscode . commands . getCommands ( true ) ) . includes ( 'atompp .sync.setUp' ) ,
53- updates : vscode . workspace . getConfiguration ( 'atompp .update' ) . get ( 'enabled' , true )
51+ // only show its section when the sync feature is present (its command exists).
52+ syncAvailable : ( await vscode . commands . getCommands ( true ) ) . includes ( 'levelcode .sync.setUp' ) ,
53+ updates : vscode . workspace . getConfiguration ( 'levelcode .update' ) . get ( 'enabled' , true )
5454 } ;
5555}
5656
@@ -77,29 +77,29 @@ function htmlFor(nonce, s) {
7777 row ( 'Model' , ( s . model || '(default)' ) + ( s . modelCaps ? ' · ' + s . modelCaps : '' ) ) +
7878 row ( 'Agent (tool use)' , s . agentReady ? 'available' : 'chat only for this model' , s . agentReady ) +
7979 row ( 'Inline completions' , s . completions ? 'on' : 'off' , s . completions ) +
80- '<div class="btns">' + btn ( 'Change model / provider' , 'atompp .ai.pickModel' , true ) +
81- btn ( keyBtn , 'atompp .ai.setApiKey' , ! s . keySet && ! s . noKey ) +
82- btn ( 'Sign in to Atom++ ' , 'atompp .ai.account' ) +
83- btn ( 'Open chat' , 'atompp .ai.focus' ) +
84- btn ( 'Agent Sketch' , 'atompp .ai.sketch' ) + '</div>' ) ;
80+ '<div class="btns">' + btn ( 'Change model / provider' , 'levelcode .ai.pickModel' , true ) +
81+ btn ( keyBtn , 'levelcode .ai.setApiKey' , ! s . keySet && ! s . noKey ) +
82+ btn ( 'Sign in to LevelCode ' , 'levelcode .ai.account' ) +
83+ btn ( 'Open chat' , 'levelcode .ai.focus' ) +
84+ btn ( 'Agent Sketch' , 'levelcode .ai.sketch' ) + '</div>' ) ;
8585
8686 const look = section ( '🎨' , 'Appearance & keys' ,
8787 row ( 'Theme' , s . theme || '' ) +
8888 '<div class="btns">' + btn ( 'Choose theme' , 'workbench.action.selectTheme' ) +
89- btn ( 'Apply keymap preset' , 'atompp .keymap.apply' ) +
90- btn ( 'Import from VS Code' , 'atompp .import.vscode' ) + '</div>' ) ;
89+ btn ( 'Apply keymap preset' , 'levelcode .keymap.apply' ) +
90+ btn ( 'Import from VS Code' , 'levelcode .import.vscode' ) + '</div>' ) ;
9191
9292 const sync = s . syncAvailable ? section ( '🔄' , 'Sync' ,
9393 '<p class="muted">Carry your settings, keybindings, theme, MCP & skills across machines.</p>' +
94- '<div class="btns">' + btn ( 'Set up Sync' , 'atompp .sync.setUp' ) + btn ( 'Sync status' , 'atompp .sync.status' ) + '</div>' ) : '' ;
94+ '<div class="btns">' + btn ( 'Set up Sync' , 'levelcode .sync.setUp' ) + btn ( 'Sync status' , 'levelcode .sync.status' ) + '</div>' ) : '' ;
9595
9696 const upd = section ( '⬆️' , 'Updates' ,
9797 row ( 'Auto-check' , s . updates ? 'on' : 'off' , s . updates ) +
98- '<div class="btns">' + btn ( 'Check for updates' , 'atompp .update.check' ) + '</div>' ) ;
98+ '<div class="btns">' + btn ( 'Check for updates' , 'levelcode .update.check' ) + '</div>' ) ;
9999
100100 const hack = section ( '🛠️' , 'Hackability' ,
101101 '<p class="muted">Make it yours — a user init script and your own packages, hot-reloaded.</p>' +
102- '<div class="btns">' + btn ( 'Open init script' , 'atompp .init.edit' ) + btn ( 'Generate a package' , 'atompp .package.generate' ) + '</div>' ) ;
102+ '<div class="btns">' + btn ( 'Open init script' , 'levelcode .init.edit' ) + btn ( 'Generate a package' , 'levelcode .package.generate' ) + '</div>' ) ;
103103
104104 return '<!doctype html><html><head><meta charset="utf-8">' +
105105 '<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; style-src \'unsafe-inline\'; script-src \'nonce-' + nonce + '\';">' +
@@ -121,7 +121,7 @@ function htmlFor(nonce, s) {
121121 '.b.primary{background:var(--vscode-button-background);color:var(--vscode-button-foreground);}' +
122122 '.b.primary:hover{background:var(--vscode-button-hoverBackground);}' +
123123 '</style></head><body>' +
124- '<h1>Customize Atom++ </h1><p class="sub">Everything in one place. Buttons run the matching command.</p>' +
124+ '<h1>Customize LevelCode </h1><p class="sub">Everything in one place. Buttons run the matching command.</p>' +
125125 ai + look + sync + upd + hack +
126126 '<script nonce="' + nonce + '">const v=acquireVsCodeApi();' +
127127 'document.querySelectorAll(".b").forEach(b=>b.onclick=()=>v.postMessage({type:"run",command:b.dataset.cmd}));' +
@@ -130,13 +130,13 @@ function htmlFor(nonce, s) {
130130
131131async function openCustomize ( context ) {
132132 if ( panel ) { panel . reveal ( ) ; return ; }
133- panel = vscode . window . createWebviewPanel ( 'atompp .customize' , 'Customize Atom++ ' , vscode . ViewColumn . Active , { enableScripts : true , retainContextWhenHidden : true } ) ;
133+ panel = vscode . window . createWebviewPanel ( 'levelcode .customize' , 'Customize LevelCode ' , vscode . ViewColumn . Active , { enableScripts : true , retainContextWhenHidden : true } ) ;
134134 panel . onDidDispose ( ( ) => { panel = undefined ; } ) ;
135135 const nonce = String ( Date . now ( ) ) + Math . random ( ) . toString ( 36 ) . slice ( 2 ) ;
136136 const render = async ( ) => { if ( panel ) { panel . webview . html = htmlFor ( nonce , await gatherStatus ( context ) ) ; } } ;
137137 panel . webview . onDidReceiveMessage ( async ( m ) => {
138138 if ( m && m . type === 'run' && m . command ) {
139- try { await vscode . commands . executeCommand ( m . command ) ; } catch ( e ) { vscode . window . showErrorMessage ( 'Atom++ : ' + ( ( e && e . message ) || e ) ) ; }
139+ try { await vscode . commands . executeCommand ( m . command ) ; } catch ( e ) { vscode . window . showErrorMessage ( 'LevelCode : ' + ( ( e && e . message ) || e ) ) ; }
140140 setTimeout ( render , 500 ) ; // refresh status after the action
141141 }
142142 } ) ;
0 commit comments