refactor(vscode-ide-companion): 重构代码并更新文件命名

- 更新文件命名规则,使用小写字母和下划线
- 修复部分代码导入路径
- 删除未使用的 WEBVIEW_PIN_FEATURE.md 文件
This commit is contained in:
yiliang114
2025-11-19 10:40:16 +08:00
parent 9fcdd3fa77
commit e02866d06f
20 changed files with 35 additions and 477 deletions

View File

@@ -8,11 +8,11 @@ import * as vscode from 'vscode';
import {
QwenAgentManager,
type ChatMessage,
} from './agents/QwenAgentManager.js';
import { ConversationStore } from './storage/ConversationStore.js';
} from './agents/qwenAgentManager.js';
import { ConversationStore } from './storage/conversationStore.js';
import type { AcpPermissionRequest } from './shared/acpTypes.js';
import { CliDetector } from './utils/CliDetector.js';
import { AuthStateManager } from './auth/AuthStateManager.js';
import { CliDetector } from './utils/cliDetector.js';
import { AuthStateManager } from './auth/authStateManager.js';
export class WebViewProvider {
private panel: vscode.WebviewPanel | null = null;

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/
@@ -14,9 +14,12 @@ import type {
} from '../shared/acpTypes.js';
import type { ChildProcess, SpawnOptions } from 'child_process';
import { spawn } from 'child_process';
import type { PendingRequest, AcpConnectionCallbacks } from './AcpTypes.js';
import { AcpMessageHandler } from './AcpMessageHandler.js';
import { AcpSessionManager } from './AcpSessionManager.js';
import type {
PendingRequest,
AcpConnectionCallbacks,
} from './connectionTypes.js';
import { AcpMessageHandler } from './acpMessageHandler.js';
import { AcpSessionManager } from './acpSessionManager.js';
/**
* ACP Connection Handler for VSCode Extension

View File

@@ -19,8 +19,11 @@ import type {
AcpPermissionRequest,
} from '../shared/acpTypes.js';
import { CLIENT_METHODS } from './schema.js';
import type { PendingRequest, AcpConnectionCallbacks } from './AcpTypes.js';
import { AcpFileHandler } from './AcpFileHandler.js';
import type {
PendingRequest,
AcpConnectionCallbacks,
} from './connectionTypes.js';
import { AcpFileHandler } from './acpFileHandler.js';
import type { ChildProcess } from 'child_process';
/**

View File

@@ -17,7 +17,7 @@ import type {
AcpResponse,
} from '../shared/acpTypes.js';
import { AGENT_METHODS, CUSTOM_METHODS } from './schema.js';
import type { PendingRequest } from './AcpTypes.js';
import type { PendingRequest } from './connectionTypes.js';
import type { ChildProcess } from 'child_process';
/**

View File

@@ -1,10 +1,10 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/
import { AcpConnection } from '../acp/AcpConnection.js';
import { AcpConnection } from '../acp/acpConnection.js';
import type {
AcpSessionUpdate,
AcpPermissionRequest,
@@ -12,16 +12,16 @@ import type {
import {
QwenSessionReader,
type QwenSession,
} from '../services/QwenSessionReader.js';
import type { AuthStateManager } from '../auth/AuthStateManager.js';
} from '../services/qwenSessionReader.js';
import type { AuthStateManager } from '../auth/authStateManager.js';
import type {
ChatMessage,
PlanEntry,
ToolCallUpdateData,
QwenAgentCallbacks,
} from './QwenTypes.js';
import { QwenConnectionHandler } from './QwenConnectionHandler.js';
import { QwenSessionUpdateHandler } from './QwenSessionUpdateHandler.js';
import { QwenConnectionHandler } from './qwenConnectionHandler.js';
import { QwenSessionUpdateHandler } from './qwenSessionUpdateHandler.js';
// 重新导出类型以保持向后兼容
export type { ChatMessage, PlanEntry, ToolCallUpdateData };

View File

@@ -11,9 +11,9 @@
*/
import * as vscode from 'vscode';
import type { AcpConnection } from '../acp/AcpConnection.js';
import type { QwenSessionReader } from '../services/QwenSessionReader.js';
import type { AuthStateManager } from '../auth/AuthStateManager.js';
import type { AcpConnection } from '../acp/acpConnection.js';
import type { QwenSessionReader } from '../services/qwenSessionReader.js';
import type { AuthStateManager } from '../auth/authStateManager.js';
/**
* Qwen连接处理器类

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/

View File

@@ -15,7 +15,7 @@ import {
type IdeInfo,
} from '@qwen-code/qwen-code-core/src/ide/detect-ide.js';
import { WebViewProvider } from './WebViewProvider.js';
import { AuthStateManager } from './auth/AuthStateManager.js';
import { AuthStateManager } from './auth/authStateManager.js';
const CLI_IDE_COMPANION_IDENTIFIER = 'qwenlm.qwen-code-vscode-ide-companion';
const INFO_MESSAGE_SHOWN_KEY = 'qwenCodeInfoMessageShown';

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/

View File

@@ -1,11 +1,11 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/
import type * as vscode from 'vscode';
import type { ChatMessage } from '../agents/QwenAgentManager.js';
import type { ChatMessage } from '../agents/qwenAgentManager.js';
export interface Conversation {
id: string;

View File

@@ -6,7 +6,7 @@
import React, { useState, useEffect, useRef } from 'react';
import { useVSCode } from './hooks/useVSCode.js';
import type { Conversation } from '../storage/ConversationStore.js';
import type { Conversation } from '../storage/conversationStore.js';
import {
PermissionRequest,
type PermissionOption,

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen Team
* SPDX-License-Identifier: Apache-2.0
*/