Skip to content

Conversation

@cyfung1031
Copy link
Collaborator

概述 Descriptions

变更内容 Changes

截图 Screenshots

@cyfung1031 cyfung1031 force-pushed the pr-vscodeConnect-001 branch 3 times, most recently from 73c1f7f to 40777de Compare November 13, 2025 06:41
@CodFrm CodFrm changed the base branch from main to release/v1.3 November 13, 2025 06:48
@CodFrm CodFrm changed the base branch from release/v1.3 to main November 13, 2025 06:50
@cyfung1031 cyfung1031 added the P2 🐌 非重要也不紧急的内容 label Nov 14, 2025
@cyfung1031 cyfung1031 changed the title VSCodeConnect 代码优化 [v1.3?] VSCodeConnect 代码优化 Dec 2, 2025
@CodFrm CodFrm changed the base branch from main to release/v1.3 December 17, 2025 03:09
@CodFrm CodFrm requested a review from Copilot December 17, 2025 03:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

这个 PR 对 VSCodeConnect 服务进行了重构,目的是优化代码结构和提高可维护性。主要改进包括提取类型定义、重构连接逻辑、改进访问修饰符使用,以及增强错误处理。

主要变更:

  • 提取了 VSCodeConnectParam 类型定义,提高了类型复用性和可读性
  • 重构了 WebSocket 连接和重连逻辑,将嵌套的回调改为更清晰的结构
  • 添加了私有访问修饰符,改进了封装性

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 14 comments.

File Description
src/app/service/service_worker/client.ts 更新了 SystemClient 的 connectVSCode 方法类型定义,使用新提取的 VSCodeConnectParam 类型
src/app/service/offscreen/vscode-connect.ts 主要重构文件:提取类型定义、添加访问修饰符、重构连接和重连逻辑、改进消息处理结构
src/app/service/offscreen/index.ts 更新 VSCodeConnect 实例化方式,传递 Server 对象而不是 Group 对象
src/app/service/offscreen/client.ts 更新 VscodeConnectClient 的 connect 方法类型定义

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 🐌 非重要也不紧急的内容

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant