added a shortcut to open the loging app

This commit is contained in:
Pierre committed 2026-10-04 14:06:31 +02:00
1 parent 5614ad049d
commit f57e23d76a
7 files changed
+31 -5

No files matched your search

+6 -4
View File
@@ -444,10 +444,12 @@ export async function activate(context: vscode.ExtensionContext) {
editor.revealRange(new vscode.Range(pos, pos), vscode.TextEditorRevealType.InCenter);
}),
vscode.commands.registerCommand('appdaemon.goToApp', async () => {
const apps = await findAllApps();
vscode.commands.registerCommand('appdaemon.goToApp', async (requestedName?: string) => {
const apps = (await findAllApps()).filter(app => !requestedName || app.appName === requestedName);
if (apps.length === 0) {
vscode.window.showWarningMessage('AppDaemon: No app definitions found in workspace');
vscode.window.showWarningMessage(requestedName
? `AppDaemon: No definition found for ${requestedName}`
: 'AppDaemon: No app definitions found in workspace');
return;
}
@@ -459,7 +461,7 @@ export async function activate(context: vscode.ExtensionContext) {
app
}));
const picked = await vscode.window.showQuickPick(items, {
const picked = apps.length === 1 && requestedName ? items[0] : await vscode.window.showQuickPick(items, {
placeHolder: 'Go to AppDaemon app…',
matchOnDescription: true,
matchOnDetail: false