mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
refactor(vscode-ide-companion): simplify ACP connection and cleanup configurations
- Remove .claude from .gitignore - Update CSS file path in eslint config - Simplify VS Code extension title - Remove unused keybinding for openChat command - Delete unused auth constants file - Simplify ACP connection by removing backend parameter - Move authMethod to acpTypes - Restrict ACP backend to Qwen only - Remove backend property from connection state - Minor formatting update in webview index.tsx
This commit is contained in:
@@ -16,7 +16,7 @@ import type { QwenSessionReader } from '../services/qwenSessionReader.js';
|
||||
import type { AuthStateManager } from '../services/authStateManager.js';
|
||||
import { CliVersionManager } from '../cli/cliVersionManager.js';
|
||||
import { CliContextManager } from '../cli/cliContextManager.js';
|
||||
import { authMethod } from '../constants/auth.js';
|
||||
import { authMethod } from '../types/acpTypes.js';
|
||||
|
||||
/**
|
||||
* Qwen Connection Handler class
|
||||
@@ -71,7 +71,7 @@ export class QwenConnectionHandler {
|
||||
// Build extra CLI arguments (only essential parameters)
|
||||
const extraArgs: string[] = [];
|
||||
|
||||
await connection.connect('qwen', effectiveCliPath, workingDir, extraArgs);
|
||||
await connection.connect(effectiveCliPath, workingDir, extraArgs);
|
||||
|
||||
// Check if we have valid cached authentication
|
||||
if (authStateManager) {
|
||||
@@ -214,14 +214,14 @@ export class QwenConnectionHandler {
|
||||
errorMessage,
|
||||
);
|
||||
|
||||
// If the backend reports that authentication is required, try to
|
||||
// If Qwen reports that authentication is required, try to
|
||||
// authenticate on-the-fly once and retry without waiting.
|
||||
const requiresAuth =
|
||||
errorMessage.includes('Authentication required') ||
|
||||
errorMessage.includes('(code: -32000)');
|
||||
if (requiresAuth) {
|
||||
console.log(
|
||||
'[QwenAgentManager] Backend requires authentication. Authenticating and retrying session/new...',
|
||||
'[QwenAgentManager] Qwen requires authentication. Authenticating and retrying session/new...',
|
||||
);
|
||||
try {
|
||||
await connection.authenticate(authMethod);
|
||||
|
||||
Reference in New Issue
Block a user