-up
This commit is contained in:
parent
56d78a93ec
commit
0dc1bb0767
@ -30,7 +30,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
vscode.window.showWarningMessage('URL is not set. Please set the URL first.');
|
vscode.window.showWarningMessage('URL is not set. Please set the URL first.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await makeHttpRequest({});
|
await makeHttpRequest({ event: 'ping'});
|
||||||
});
|
});
|
||||||
context.subscriptions.push(disposable3);
|
context.subscriptions.push(disposable3);
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
console.log('Opened file:', filePath);
|
console.log('Opened file:', filePath);
|
||||||
|
|
||||||
vscode.window.showInformationMessage(`Opened file: ${filePath}`);
|
vscode.window.showInformationMessage(`Opened file: ${filePath}`);
|
||||||
await makeHttpRequest({ opened: filePath });
|
await makeHttpRequest({ event: 'open', project: extractProjectName(filePath) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
console.log('Saved file:', filePath);
|
console.log('Saved file:', filePath);
|
||||||
|
|
||||||
vscode.window.showInformationMessage(`Saved file: ${filePath}`);
|
vscode.window.showInformationMessage(`Saved file: ${filePath}`);
|
||||||
await makeHttpRequest({ saved: filePath });
|
await makeHttpRequest({ event: 'save', project: extractProjectName(filePath) });
|
||||||
});
|
});
|
||||||
|
|
||||||
// detecte un focus / blur de la fenetre vscode
|
// detecte un focus / blur de la fenetre vscode
|
||||||
@ -89,3 +89,8 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deactivate() { }
|
export function deactivate() { }
|
||||||
|
|
||||||
|
function extractProjectName(path) {
|
||||||
|
const match = path.match(/\/root\/(docker|projects)\/([^/]+)/);
|
||||||
|
return match?.[1];
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user