feat(vscode-ide-companion): add sidebar view and multi-position chat layout#2188
Merged
yiliang114 merged 15 commits intomainfrom Mar 11, 2026
Merged
feat(vscode-ide-companion): add sidebar view and multi-position chat layout#2188yiliang114 merged 15 commits intomainfrom
yiliang114 merged 15 commits intomainfrom
Conversation
… positioning All chat positions (sidebar, editor tab, panel, secondary sidebar) are now available simultaneously. Remove the old chat.location configuration and setChatLocation commands. Add focusChat, newConversation, and showLogs commands. Refactor ChatWebviewViewProvider to use lazy factory pattern and move webview files into providers/ subdirectory.
…ssion clear API - Guard captureTab() setTimeout callback against panel dispose/replace that can occur before the deferred callback runs - Add AcpConnection.resetSessionState() to clear session without disconnecting the child process - Add QwenAgentManager.clearCurrentSession() so sidebar/panel views can force creation of a fresh session Co-authored-by: ZZBuAoYe <zzbuaoye@gmail.com>
Guard the setTimeout callback in captureTab() against panel being disposed or replaced before the deferred callback runs. Capture a reference to the current panel before the timeout and verify it is still the active panel inside the callback. Co-authored-by: ZZBuAoYe <zzbuaoye@gmail.com>
Contributor
📋 Review SummaryThis PR adds multi-position chat view support to the VS Code IDE Companion, allowing the chat UI to appear in the sidebar, bottom panel, and secondary sidebar. It introduces a new Activity Bar entry, registers multiple webview views, and implements a lazy factory pattern for efficient resource usage. The PR also fixes a race condition in PanelManager and adds new commands with keybindings. 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
…vscode-ide-companion-layout # Conflicts: # packages/cli/src/acp-integration/service/filesystem.ts # packages/vscode-ide-companion/package.json # packages/vscode-ide-companion/src/webview/providers/WebViewProvider.ts
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
This was referenced Mar 8, 2026
Resolved merge conflicts for WebViewProvider.ts and MessageHandler.ts, adjusting import paths to match the providers/ directory structure.
…s from PR #2195 - Add extractSessionListItems() utility for robust ACP response parsing - Refactor getSessionList() and getSessionListPaged() to use the new utility - Add openNewChatTabCommand to create new session when opening chat tab - Add comprehensive test coverage for session list extraction Co-authored-by: ZZAoYe <zzbuaoye@gmail.com>
…ew tests - Use consistent kebab-case prefix 'qwen-code.' for all view IDs - Update package.json views and viewsContainers to match new naming - Add fine-grained activationEvents for views and commands - Add test verifying all three view positions are registered correctly This ensures consistent naming across commands, views, and containers.
This was referenced Mar 10, 2026
…vscode-ide-companion-layout
This was referenced Mar 11, 2026
…vscode-ide-companion-layout
…ve sidebar pattern Adopt Claude Code's approach for webview view registration: - Use mutual-exclusive sidebar/secondary sidebar with `when` conditions - Detect secondary sidebar support via VS Code version >= 1.106 - Share single ChatWebviewViewProvider instance across both view IDs - Only set context key when secondary sidebar is NOT supported - Pass supportsSecondarySidebar as closure variable to commands Additional fixes: - Fix WebViewContent.generate() to accept both Webview and WebviewPanel - Fix permission handler leak (cancel old promise before new) - Fix double diff command execution in resolve callback - Add initializationPromise dedup for auth-restore races - Add attachToView() for sidebar/secondary sidebar hosting - Add missing AskUserQuestionResponseMessage import Co-authored-by: buaoyezz <buaoyezz@users.noreply.github.com>
…ext-aware new chat - Adjust thinking message timestamp to sort above assistant response - Add context-aware new chat: sidebar resets in-place, editor tab opens new tab Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This was referenced Mar 12, 2026
|
GREAT! |
|
i guess this PR also fixes older (but same) feature request #1308 |
This was referenced Mar 14, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Add an Activity Bar sidebar entry and multi-position chat view support for the VS Code IDE Companion. The chat UI can now appear in the sidebar, bottom panel, and Secondary Side Bar via WebviewView; the sidebar view supports native VS Code drag-and-drop to relocate. Editor-tab chat (WebviewPanel) behavior is unchanged. Also fixes a race condition in
PanelManager.captureTab().Dive Deeper
Sidebar + multi-position chat views
Before (main): The chat UI only exists as editor tabs (WebviewPanel). There is no Activity Bar entry, and no
viewsContainersorviewsare registered.After:
qwenCodeSidebarview container in the Activity Bar with a branded Qwen SVG icon for one-click sidebar accessChatWebviewViewProviderusing a lazy factory pattern — the heavyweightWebViewProvideris only instantiated when VS Code actually opens the view, keeping extension startup lightweightsrc/constants/viewIds.tsfor centralized view ID constantsWebViewProvider,PanelManager,MessageHandler,WebViewContent) intowebview/providers/subdirectory for better organizationNew commands & keybindings
qwen-code.focusChatCmd+Shift+Lqwen-code.newConversationqwen-code.showLogsBug fix
setTimeoutcallback incaptureTab()could run after the panel had been disposed or replaced, causing a null-reference onthis.panel!.title. Now captures ascheduledPanelreference before the timeout and validates it inside the callback before accessing panel properties.Reviewer Test Plan
Qwen Code: Openfrom the Command Palette to open an editor-tab chat; confirm it runs independently of the sidebarCmd+Shift+Lfocuses the sidebar chatQwen Code: New Conversationopens a new editor tabQwen Code: Show Logsreveals the output channelTesting Matrix
Linked issues / bugs
Closes #1390
Related to #1870 #1972 #2097