mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Remove CLI version checker and status bar display, revert to original notification approach
This change removes the CliVersionChecker class and all related status bar functionality, reverting to the original approach that uses vscode.window.showInformationMessage for version-related notifications, as was implemented in the main branch. The changes include: 1. Removing CliVersionChecker import 2. Removing status bar item creation and update logic 3. Removing CLI version check on activation 4. Removing showCliVersionInfo command This addresses the issue where version detection notifications should use vscode.window.showInformationMessage instead of status bar display.
This commit is contained in:
@@ -16,7 +16,6 @@ import {
|
|||||||
} from '@qwen-code/qwen-code-core/src/ide/detect-ide.js';
|
} from '@qwen-code/qwen-code-core/src/ide/detect-ide.js';
|
||||||
import { WebViewProvider } from './webview/WebViewProvider.js';
|
import { WebViewProvider } from './webview/WebViewProvider.js';
|
||||||
import { registerNewCommands } from './commands/index.js';
|
import { registerNewCommands } from './commands/index.js';
|
||||||
import { CliVersionChecker } from './cli/cliVersionChecker.js';
|
|
||||||
|
|
||||||
const CLI_IDE_COMPANION_IDENTIFIER = 'qwenlm.qwen-code-vscode-ide-companion';
|
const CLI_IDE_COMPANION_IDENTIFIER = 'qwenlm.qwen-code-vscode-ide-companion';
|
||||||
const INFO_MESSAGE_SHOWN_KEY = 'qwenCodeInfoMessageShown';
|
const INFO_MESSAGE_SHOWN_KEY = 'qwenCodeInfoMessageShown';
|
||||||
@@ -104,33 +103,6 @@ async function checkForUpdates(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Update status bar item with CLI version information
|
|
||||||
*/
|
|
||||||
async function updateStatusBarItem(
|
|
||||||
statusBarItem: vscode.StatusBarItem,
|
|
||||||
context: vscode.ExtensionContext,
|
|
||||||
) {
|
|
||||||
try {
|
|
||||||
// Initialize the version checker
|
|
||||||
const versionChecker = CliVersionChecker.getInstance(context);
|
|
||||||
|
|
||||||
// Get version status for display
|
|
||||||
const versionStatus = await versionChecker.getVersionStatus();
|
|
||||||
|
|
||||||
// Update status bar item
|
|
||||||
statusBarItem.text = versionStatus;
|
|
||||||
statusBarItem.tooltip = 'Qwen Code CLI Version Information';
|
|
||||||
statusBarItem.show();
|
|
||||||
} catch (error) {
|
|
||||||
const message = error instanceof Error ? error.message : String(error);
|
|
||||||
log(`Error updating status bar: ${message}`);
|
|
||||||
statusBarItem.text = 'CLI: Error';
|
|
||||||
statusBarItem.tooltip = 'Failed to get CLI version information';
|
|
||||||
statusBarItem.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function activate(context: vscode.ExtensionContext) {
|
export async function activate(context: vscode.ExtensionContext) {
|
||||||
logger = vscode.window.createOutputChannel('Qwen Code Companion');
|
logger = vscode.window.createOutputChannel('Qwen Code Companion');
|
||||||
log = createLogger(context, logger);
|
log = createLogger(context, logger);
|
||||||
@@ -138,17 +110,6 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
|
|
||||||
checkForUpdates(context, log);
|
checkForUpdates(context, log);
|
||||||
|
|
||||||
// Create status bar item for CLI version info
|
|
||||||
const versionStatusBarItem = vscode.window.createStatusBarItem(
|
|
||||||
vscode.StatusBarAlignment.Right,
|
|
||||||
100,
|
|
||||||
);
|
|
||||||
versionStatusBarItem.command = 'qwen-code.showCliVersionInfo';
|
|
||||||
context.subscriptions.push(versionStatusBarItem);
|
|
||||||
|
|
||||||
// Update status bar with CLI version info
|
|
||||||
updateStatusBarItem(versionStatusBarItem, context);
|
|
||||||
|
|
||||||
const diffContentProvider = new DiffContentProvider();
|
const diffContentProvider = new DiffContentProvider();
|
||||||
const diffManager = new DiffManager(
|
const diffManager = new DiffManager(
|
||||||
log,
|
log,
|
||||||
@@ -306,26 +267,6 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
vscode.workspace.onDidGrantWorkspaceTrust(() => {
|
vscode.workspace.onDidGrantWorkspaceTrust(() => {
|
||||||
ideServer.syncEnvVars();
|
ideServer.syncEnvVars();
|
||||||
}),
|
}),
|
||||||
vscode.commands.registerCommand(
|
|
||||||
'qwen-code.showCliVersionInfo',
|
|
||||||
async () => {
|
|
||||||
try {
|
|
||||||
const versionChecker = CliVersionChecker.getInstance(context);
|
|
||||||
const versionStatus = await versionChecker.getVersionStatus();
|
|
||||||
|
|
||||||
// Show information message with version details
|
|
||||||
vscode.window.showInformationMessage(
|
|
||||||
`Qwen Code CLI Version: ${versionStatus}`,
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
const message =
|
|
||||||
error instanceof Error ? error.message : String(error);
|
|
||||||
vscode.window.showErrorMessage(
|
|
||||||
`Failed to get CLI version info: ${message}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
vscode.commands.registerCommand(
|
vscode.commands.registerCommand(
|
||||||
'qwen-code.runQwenCode',
|
'qwen-code.runQwenCode',
|
||||||
async (
|
async (
|
||||||
|
|||||||
Reference in New Issue
Block a user