feature: renommage disposable2/disposable3 en setUrlCommand/callUrlCommand

This commit is contained in:
2026-07-31 15:01:17 +02:00
parent 087dc3dad1
commit 30b87d515f
+4 -4
View File
@@ -4,7 +4,7 @@ export function activate(context: vscode.ExtensionContext) {
console.log('Congratulations, your extension "vscodestat" is now active!');
// commande pour definir l'url
const disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
const setUrlCommand = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
const url = await vscode.window.showInputBox({
prompt: 'Enter the URL:',
placeHolder: '',
@@ -15,10 +15,10 @@ export function activate(context: vscode.ExtensionContext) {
vscode.window.showInformationMessage('URL set successfully.');
}
});
context.subscriptions.push(disposable2);
context.subscriptions.push(setUrlCommand);
// commande pour tester l'url
const disposable3 = vscode.commands.registerCommand('vscodestat.callUrl', async () => {
const callUrlCommand = vscode.commands.registerCommand('vscodestat.callUrl', async () => {
const storedUrl = vscode.workspace.getConfiguration().get('vscodestat.url') as string;
if (!storedUrl) {
vscode.window.showWarningMessage('URL is not set. Please set the URL first.');
@@ -27,7 +27,7 @@ export function activate(context: vscode.ExtensionContext) {
await makeHttpRequest({ event: 'ping' });
vscode.window.showInformationMessage('callUrl done');
});
context.subscriptions.push(disposable3);
context.subscriptions.push(callUrlCommand);
// detecte une ouverture de fichier / nouvel onglet
vscode.window.onDidChangeActiveTextEditor(async (editor) => {