-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Single channel extension bridge #8744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Review SummaryPreviously identified issues:
New issues found:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review complete. Found 1 minor issue to address before approval.
| onDisconnect: async () => { | ||
| await this.extensionChannel.onDisconnect() | ||
| await this.extensionChannel.cleanup(this.socketTransport.getSocket()) | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cleanup flow is broken during manual disconnection. When BridgeOrchestrator.disconnect() calls socketTransport.disconnect(), the SocketTransport removes all listeners (line 247-248 in SocketTransport.ts) before disconnecting, which prevents the onDisconnect callback from firing. This means extensionChannel.cleanup() is never called during manual disconnection, potentially causing resource leaks. The old code explicitly called cleanup() before disconnect() to avoid this issue.
Important
Refactor bridge system to use a single
ExtensionChannel, removingTaskChanneland simplifying event handling and task management.TaskChannelandBaseChannelclasses, consolidating functionality intoExtensionChannel.BridgeOrchestratorto manage connections and events throughExtensionChannelonly.BridgeOrchestrator.ExtensionChannelto handle all task-related events and commands, includingMessage,TaskModeSwitched,TaskAskResponded, and more.ExtensionChannel.Taskclass inTask.ts.ClineProviderto handle task lifecycle events directly.TaskChanneltests and related imports.extension.tsto reflect changes in bridge connection management.This description was created by
for 86977d2. You can customize this summary. It will automatically update as commits are pushed.