From 57cb4626e4404e52a05fc22fe058e549faf652e7 Mon Sep 17 00:00:00 2001 From: alexweininger Date: Thu, 3 Jun 2021 23:05:16 -0700 Subject: [PATCH] Execute function after activating tag --- src/commands/functions/createTag.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/commands/functions/createTag.ts b/src/commands/functions/createTag.ts index 34da8bc..77f117d 100644 --- a/src/commands/functions/createTag.ts +++ b/src/commands/functions/createTag.ts @@ -10,6 +10,7 @@ import { Tag } from "../../appwrite"; import { activateTag } from "./activateTag"; import { sleep } from '../../utils/sleep'; import { openFunctionTagsInBrowser } from './openFunctionTagsInBrowser'; +import { executeFunction } from './createExecution'; export async function createTag(item?: TagsTreeItem | Uri): Promise { if (item instanceof Uri) { @@ -158,6 +159,13 @@ async function tagNotification(tag: Tag): Promise { ); if (action === "Activate tag") { await activateTag(tag); + const action = await window.showInformationMessage( + `Successfully activated tag.`, + "Execute function", + ); + if (action === 'Execute function') { + await executeFunction(tag.functionId); + } } if (action === "View in console") { //