From bc5cb3c7aec7c001e2483531fecb575367238d2d Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Tue, 5 Nov 2024 14:26:01 -0600 Subject: [PATCH] update enablement settings --- package.json | 6 ++++-- src/aiProviders/continue/continueContextProvider.ts | 2 +- src/views/jobManager/selfCodes/contributes.json | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3871f6cb..d2d259b1 100644 --- a/package.json +++ b/package.json @@ -562,7 +562,8 @@ "command": "vscode-db2i.jobManager.focusContinue", "title": "Register Continue Provider", "category": "Db2 for i", - "icon": "$(star-full)" + "icon": "$(star-full)", + "enablement": "vscode-db2i:continueExtensionActive" }, { "command": "vscode-db2i.jobManager.closeJob", @@ -686,7 +687,8 @@ "command": "vscode-db2i.self.explainSelf", "title": "Explain SELF Code with continue", "category": "Db2 for i", - "icon": "$(debug-alt)" + "icon": "$(debug-alt)", + "enablement": "vscode-db2i:continueExtensionActive" }, { "command": "vscode-db2i.self.help", diff --git a/src/aiProviders/continue/continueContextProvider.ts b/src/aiProviders/continue/continueContextProvider.ts index ddb44430..6b64828c 100644 --- a/src/aiProviders/continue/continueContextProvider.ts +++ b/src/aiProviders/continue/continueContextProvider.ts @@ -186,7 +186,7 @@ export async function registerContinueProvider() { isContinueActive = true; const continueAPI = continueEx?.exports; continueAPI?.registerCustomContextProvider(provider); - vscode.commands.executeCommand('setContext', 'continueExtensionActive', true); + vscode.commands.executeCommand('setContext', 'vscode-db2i:continueExtensionActive', true); vscode.window.showInformationMessage(`@Db2i context provider enabled in Continue!`); } } diff --git a/src/views/jobManager/selfCodes/contributes.json b/src/views/jobManager/selfCodes/contributes.json index f406d996..d49800a4 100644 --- a/src/views/jobManager/selfCodes/contributes.json +++ b/src/views/jobManager/selfCodes/contributes.json @@ -96,7 +96,8 @@ "command": "vscode-db2i.self.explainSelf", "title": "Explain SELF Code with continue", "category": "Db2 for i", - "icon": "$(debug-alt)" + "icon": "$(debug-alt)", + "enablement": "vscode-db2i:continueExtensionActive" }, { "command": "vscode-db2i.self.help", @@ -157,7 +158,8 @@ { "command": "vscode-db2i.self.explainSelf", "when": "view == vscode-db2i.self.nodes && viewItem == selfCodeNode", - "group": "navigation" + "group": "navigation", + "enablement": "vscode-db2i:continueExtensionActive" } ] }