refactor(vscode-ide-companion): translate Chinese comments to English

- Translate all Chinese comments in TypeScript files to English for better code readability
- Update documentation comments to be in English
- Maintain code functionality while improving internationalization

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
yiliang114
2025-11-25 23:41:24 +08:00
parent d5ede56e62
commit 3c09ad46ca
15 changed files with 216 additions and 214 deletions

View File

@@ -73,7 +73,8 @@ export class QwenAgentManager {
* Connect to Qwen service
*
* @param workingDir - Working directory
* @param authStateManager - Auth state manager (optional)
* @param authStateManager - Authentication state manager (optional)
* @param cliPath - CLI path (optional, if provided will override the path in configuration)
*/
async connect(
workingDir: string,

View File

@@ -26,7 +26,8 @@ export class QwenConnectionHandler {
* @param connection - ACP connection instance
* @param sessionReader - Session reader instance
* @param workingDir - Working directory
* @param authStateManager - Auth state manager (optional)
* @param authStateManager - Authentication state manager (optional)
* @param cliPath - CLI path (optional, if provided will override the path in configuration)
*/
async connect(
connection: AcpConnection,
@@ -100,7 +101,7 @@ export class QwenConnectionHandler {
'[QwenAgentManager] Found existing sessions:',
sessions.length,
);
const lastSession = sessions[0]; // 已按lastUpdated排序
const lastSession = sessions[0]; // Already sorted by lastUpdated
try {
await connection.switchSession(lastSession.sessionId);

View File

@@ -5,71 +5,71 @@
*/
/**
* Qwen Agent Manager 类型定义
* Qwen Agent Manager Type Definitions
*
* 包含所有相关的接口和类型定义
* Contains all related interfaces and type definitions
*/
import type { AcpPermissionRequest } from '../shared/acpTypes.js';
/**
* 聊天消息
* Chat Message
*/
export interface ChatMessage {
/** 消息角色:用户或助手 */
/** Message role: user or assistant */
role: 'user' | 'assistant';
/** 消息内容 */
/** Message content */
content: string;
/** 时间戳 */
/** Timestamp */
timestamp: number;
}
/**
* 计划条目
* Plan Entry
*/
export interface PlanEntry {
/** 条目内容 */
/** Entry content */
content: string;
/** 优先级 */
/** Priority */
priority: 'high' | 'medium' | 'low';
/** 状态 */
/** Status */
status: 'pending' | 'in_progress' | 'completed';
}
/**
* 工具调用更新数据
* Tool Call Update Data
*/
export interface ToolCallUpdateData {
/** 工具调用ID */
/** Tool call ID */
toolCallId: string;
/** 工具类型 */
/** Tool type */
kind?: string;
/** 工具标题 */
/** Tool title */
title?: string;
/** 状态 */
/** Status */
status?: string;
/** 原始输入 */
/** Raw input */
rawInput?: unknown;
/** 内容 */
/** Content */
content?: Array<Record<string, unknown>>;
/** 位置信息 */
/** Location information */
locations?: Array<{ path: string; line?: number | null }>;
}
/**
* 回调函数集合
* Callback Functions Collection
*/
export interface QwenAgentCallbacks {
/** 消息回调 */
/** Message callback */
onMessage?: (message: ChatMessage) => void;
/** 流式文本块回调 */
/** Stream text chunk callback */
onStreamChunk?: (chunk: string) => void;
/** 思考文本块回调 */
/** Thought text chunk callback */
onThoughtChunk?: (chunk: string) => void;
/** 工具调用回调 */
/** Tool call callback */
onToolCall?: (update: ToolCallUpdateData) => void;
/** 计划回调 */
/** Plan callback */
onPlan?: (entries: PlanEntry[]) => void;
/** 权限请求回调 */
/** Permission request callback */
onPermissionRequest?: (request: AcpPermissionRequest) => Promise<string>;
}