mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
chore(vscode-ide-companion): bump version to 0.4.1
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "qwen-code-vscode-ide-companion",
|
||||
"displayName": "Qwen Code Companion",
|
||||
"description": "Enable Qwen Code with direct access to your VS Code workspace.",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"publisher": "qwenlm",
|
||||
"icon": "assets/icon.png",
|
||||
"repository": {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*
|
||||
* Responsible for managing ACP protocol session operations, including initialization, authentication, session creation, and switching
|
||||
*/
|
||||
|
||||
import { JSONRPC_VERSION } from '../types/acpTypes.js';
|
||||
import type {
|
||||
AcpRequest,
|
||||
|
||||
@@ -21,7 +21,7 @@ export class AuthStateManager {
|
||||
private static context: vscode.ExtensionContext | null = null;
|
||||
private static readonly AUTH_STATE_KEY = 'qwen.authState';
|
||||
private static readonly AUTH_CACHE_DURATION = 24 * 60 * 60 * 1000; // 24 hours
|
||||
|
||||
//TODO:
|
||||
private constructor() {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ import { QwenConnectionHandler } from '../services/qwenConnectionHandler.js';
|
||||
import { QwenSessionUpdateHandler } from './qwenSessionUpdateHandler.js';
|
||||
import { CliContextManager } from '../cli/cliContextManager.js';
|
||||
import { authMethod } from '../types/acpTypes.js';
|
||||
import { MIN_CLI_VERSION_FOR_SESSION_METHODS } from '../cli/cliVersionManager.js';
|
||||
|
||||
export type { ChatMessage, PlanEntry, ToolCallUpdateData };
|
||||
|
||||
@@ -1034,7 +1035,7 @@ export class QwenAgentManager {
|
||||
|
||||
if (!supportsSessionLoad) {
|
||||
throw new Error(
|
||||
`CLI version does not support session/load method. Please upgrade to version 0.4.0 or later.`,
|
||||
`CLI version does not support session/load method. Please upgrade to version ${MIN_CLI_VERSION_FOR_SESSION_METHODS} or later.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ import * as vscode from 'vscode';
|
||||
import type { AcpConnection } from './acpConnection.js';
|
||||
import type { QwenSessionReader } from '../services/qwenSessionReader.js';
|
||||
import type { AuthStateManager } from '../services/authStateManager.js';
|
||||
import { CliVersionManager } from '../cli/cliVersionManager.js';
|
||||
import {
|
||||
CliVersionManager,
|
||||
MIN_CLI_VERSION_FOR_SESSION_METHODS,
|
||||
} from '../cli/cliVersionManager.js';
|
||||
import { CliContextManager } from '../cli/cliContextManager.js';
|
||||
import { authMethod } from '../types/acpTypes.js';
|
||||
|
||||
@@ -54,13 +57,13 @@ export class QwenConnectionHandler {
|
||||
// Show warning if CLI version is below minimum requirement
|
||||
if (!versionInfo.isSupported) {
|
||||
console.warn(
|
||||
`[QwenAgentManager] CLI version ${versionInfo.version} is below minimum required version ${'0.4.0'}`,
|
||||
`[QwenAgentManager] CLI version ${versionInfo.version} is below minimum required version ${MIN_CLI_VERSION_FOR_SESSION_METHODS}`,
|
||||
);
|
||||
|
||||
// TODO: Wait to determine release version number
|
||||
// vscode.window.showWarningMessage(
|
||||
// `Qwen Code CLI version ${versionInfo.version} is below the minimum required version. Some features may not work properly. Please upgrade to version 0.4.0 or later.`,
|
||||
// );
|
||||
// Wait to determine release version number
|
||||
vscode.window.showWarningMessage(
|
||||
`Qwen Code CLI version ${versionInfo.version} is below the minimum required version. Some features may not work properly. Please upgrade to version ${MIN_CLI_VERSION_FOR_SESSION_METHODS} or later.`,
|
||||
);
|
||||
}
|
||||
|
||||
const config = vscode.workspace.getConfiguration('qwenCode');
|
||||
|
||||
@@ -63,8 +63,6 @@
|
||||
content: '\25cf';
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
/* TODO: */
|
||||
/* padding-top: 2px; */
|
||||
font-size: 10px;
|
||||
color: #c74e39;
|
||||
z-index: 1;
|
||||
|
||||
Reference in New Issue
Block a user