mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
chore(vscode-ide-companion): bump version to 0.4.1
This commit is contained in:
@@ -31,15 +31,6 @@ export class CliContextManager {
|
||||
this.currentVersionInfo = versionInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current CLI version information
|
||||
*
|
||||
* @returns Current CLI version information or null if not set
|
||||
*/
|
||||
getCurrentVersionInfo(): CliVersionInfo | null {
|
||||
return this.currentVersionInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current CLI feature flags
|
||||
*
|
||||
@@ -54,68 +45,14 @@ export class CliContextManager {
|
||||
return {
|
||||
supportsSessionList: false,
|
||||
supportsSessionLoad: false,
|
||||
supportsSessionSave: false,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current CLI supports session/list method
|
||||
*
|
||||
* @returns Whether session/list is supported
|
||||
*/
|
||||
supportsSessionList(): boolean {
|
||||
return this.getCurrentFeatures().supportsSessionList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current CLI supports session/load method
|
||||
*
|
||||
* @returns Whether session/load is supported
|
||||
*/
|
||||
supportsSessionLoad(): boolean {
|
||||
return this.getCurrentFeatures().supportsSessionLoad;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current CLI supports session/save method
|
||||
*
|
||||
* @returns Whether session/save is supported
|
||||
*/
|
||||
supportsSessionSave(): boolean {
|
||||
return this.getCurrentFeatures().supportsSessionSave;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if CLI is installed and detected
|
||||
*
|
||||
* @returns Whether CLI is installed
|
||||
*/
|
||||
isCliInstalled(): boolean {
|
||||
return this.currentVersionInfo?.detectionResult.isInstalled ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CLI version string
|
||||
*
|
||||
* @returns CLI version string or undefined if not detected
|
||||
*/
|
||||
getCliVersion(): string | undefined {
|
||||
return this.currentVersionInfo?.version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if CLI version is supported
|
||||
*
|
||||
* @returns Whether CLI version is supported
|
||||
*/
|
||||
isCliVersionSupported(): boolean {
|
||||
return this.currentVersionInfo?.isSupported ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear current CLI context
|
||||
*/
|
||||
clearContext(): void {
|
||||
this.currentVersionInfo = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,6 @@ export interface CliFeatureFlags {
|
||||
* Whether the CLI supports session/load ACP method
|
||||
*/
|
||||
supportsSessionLoad: boolean;
|
||||
|
||||
/**
|
||||
* Whether the CLI supports session/save ACP method
|
||||
*/
|
||||
supportsSessionSave: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,6 +86,7 @@ export class CliVersionManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// Simple version comparison (assuming semantic versioning)
|
||||
try {
|
||||
const versionParts = version.split('.').map(Number);
|
||||
@@ -131,7 +127,6 @@ export class CliVersionManager {
|
||||
return {
|
||||
supportsSessionList: isSupportedVersion,
|
||||
supportsSessionLoad: isSupportedVersion,
|
||||
supportsSessionSave: false, // Not yet supported in any version
|
||||
};
|
||||
}
|
||||
|
||||
@@ -190,7 +185,6 @@ export class CliVersionManager {
|
||||
features: {
|
||||
supportsSessionList: false,
|
||||
supportsSessionLoad: false,
|
||||
supportsSessionSave: false,
|
||||
},
|
||||
detectionResult: {
|
||||
isInstalled: false,
|
||||
@@ -232,15 +226,4 @@ export class CliVersionManager {
|
||||
const versionInfo = await this.detectCliVersion(forceRefresh);
|
||||
return versionInfo.features.supportsSessionLoad;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if CLI supports session/save method
|
||||
*
|
||||
* @param forceRefresh - Force a new check, ignoring cache
|
||||
* @returns Whether session/save is supported
|
||||
*/
|
||||
async supportsSessionSave(forceRefresh = false): Promise<boolean> {
|
||||
const versionInfo = await this.detectCliVersion(forceRefresh);
|
||||
return versionInfo.features.supportsSessionSave;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user