diff --git a/src/contributes/commands.ts b/src/contributes/commands.ts index ca1984b..47427b5 100644 --- a/src/contributes/commands.ts +++ b/src/contributes/commands.ts @@ -374,7 +374,7 @@ export function registerInstallCommandsPython(context: vscode.ExtensionContext) } UiUtilWrapper.updateConfiguration("DevChat", "PythonForCommands", pythonCommand.trim()); - vscode.window.showInformationMessage(`All slash Commands are ready to use! Please input / to try workflow commands!`); + // vscode.window.showInformationMessage(`All slash Commands are ready to use! Please input / to try workflow commands!`); }); context.subscriptions.push(disposable); diff --git a/src/panel/statusBarView.ts b/src/panel/statusBarView.ts index 71698d2..d379ca9 100644 --- a/src/panel/statusBarView.ts +++ b/src/panel/statusBarView.ts @@ -3,6 +3,8 @@ import * as vscode from 'vscode'; import { dependencyCheck } from './statusBarViewBase'; import { ProgressBar } from '../util/progressBar'; import { ExtensionContextHolder } from '../util/extensionContext'; +import { UiUtilWrapper } from '../util/uiUtil'; +import { logger } from '../util/logger'; export function createStatusBarItem(context: vscode.ExtensionContext): vscode.StatusBarItem { @@ -20,6 +22,28 @@ export function createStatusBarItem(context: vscode.ExtensionContext): vscode.St // add a timer to update the status bar item progressBar.update("Checking dependencies", 0); let hasInstallCommands = false; + + function checkDevChatCommandsStatus() { + const timerDevchatCommands = setInterval(async () => { + try { + const pythonCommand = UiUtilWrapper.getConfiguration("DevChat", "PythonForCommands"); + if (!pythonCommand) { + statusBarItem.text = `$(pass)DevChat$(warning)`; + statusBarItem.tooltip = `ready to chat, command functionality limited`; + statusBarItem.command = 'devcaht.onStatusBarClick'; + } else { + statusBarItem.text = `$(pass)DevChat$(pass)`; + statusBarItem.tooltip = `chat and all commands fully operational`; + statusBarItem.command = 'devcaht.onStatusBarClick'; + clearInterval(timerDevchatCommands); + } + } catch (error) { + logger.channel()?.error(`Error: ${error}`); + logger.channel()?.show(); + } + }, 1000); + } + const timer = setInterval(async () => { try { progressBar.update("Checking dependencies", 0); @@ -62,6 +86,7 @@ export function createStatusBarItem(context: vscode.ExtensionContext): vscode.St } clearInterval(timer); + checkDevChatCommandsStatus(); } catch (error) { statusBarItem.text = `$(warning)DevChat`; statusBarItem.tooltip = `Error: ${error}`; diff --git a/src/util/progressBar.ts b/src/util/progressBar.ts index ab7b23b..277b62b 100644 --- a/src/util/progressBar.ts +++ b/src/util/progressBar.ts @@ -19,7 +19,7 @@ export class ProgressBar { return new Promise((resolve) => { const timer = setInterval(() => { if (this.finish === true && this.error === "") { - vscode.window.showInformationMessage(`${this.message}`); + // vscode.window.showInformationMessage(`${this.message}`); resolve(); clearInterval(timer); } else if (this.finish === true && this.error !== "") {