feat: Suppress startup command notifications
- Commented out the display of informational message on command readiness - Implemented a periodic check for the status of DevChat commands - Optimized the conditional display of the DevChat status bar item tooltip
This commit is contained in:
parent
802d6996fc
commit
043b067864
@ -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);
|
||||
|
@ -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}`;
|
||||
|
@ -19,7 +19,7 @@ export class ProgressBar {
|
||||
return new Promise<void>((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 !== "") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user