This commit is contained in:
2026-01-23 01:45:31 +01:00
parent d16bc0a1ef
commit 9b8134441c
4 changed files with 70 additions and 33 deletions

View File

@@ -4,13 +4,13 @@ export function activate(context: vscode.ExtensionContext) {
console.log('Congratulations, your extension "vscodestat" is now active!');
// crée une commande de test
let disposable = vscode.commands.registerCommand('vscodestat.helloWorld', () => {
const disposable = vscode.commands.registerCommand('vscodestat.helloWorld', () => {
vscode.window.showInformationMessage('Hello World from vscodestat!');
});
context.subscriptions.push(disposable);
// commande pour definir l'url
let disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
const disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
const url = await vscode.window.showInputBox({
prompt: 'Enter the URL:',
placeHolder: ''
@@ -24,7 +24,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(disposable2);
// commande pour tester l'url
let disposable3 = vscode.commands.registerCommand('vscodestat.callUrl', async () => {
const disposable3 = 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.');