anthropics / anthropics/claude-code

[FEATURE] [VSCode extension] Option to open a session from History in a new tab instead of reusing the focused tab

Đang mở
#93,199 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:ide enhancement platform:vscode
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Preflight Checklist

- [x] I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)

### Problem Statement

In the VS Code extension, clicking a past conversation in the session History list loads that session **into the currently focused Claude tab**, replacing whatever conversation was loaded there.

The replaced session is not lost (it is still in history), but its tab is gone and it is very easy to lose track of the conversation you were just in. The only workaround is to remember to open a fresh tab first (Ctrl+Shift+Esc / "Open in New Tab") **before** clicking a history item — easy to forget, and the cost of forgetting is that your active conversation's tab silently disappears.

Since 2.1.260 the history picker correctly focuses an existing tab when the session is already open. But when the session is NOT open, it silently takes over the focused tab instead of creating a new one.

### Proposed Solution

Any of these would solve it (first one preferred):

1. A setting, e.g. `claudeCode.historyOpenBehavior`: `reuseCurrentTab` (current default) | `newTab` — so users who juggle several conversations can make every history click open its own tab.
2. A modifier on history items: Ctrl+click / middle-click on a session in the History list opens it in a new tab.
3. Never reuse a tab that has an active/ongoing conversation loaded — only reuse tabs that are empty or already showing the picked session.

### Additional Context

- Extension version: 2.1.266, Windows 11, VS Code (user profile with multiple Claude tabs open side by side).
- The old behavior (pre-2.1.260) of loading a duplicate was also problematic, so this is about giving the focused tab protection or a new-tab option — not reverting.
- Related but different: #67419 (history clicks ignoring preferredLocation — sidebar vs editor placement).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start at the VS Code extension's session History picker and the tab/session reuse path introduced around version 2.1.260. Compare the proposed setting, modifier-click, and active-tab protection behaviors with the existing history and tab UX before choosing a direction. Done means the selected behavior is implemented and history clicks no longer unexpectedly replace an ongoing conversation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
vscode
Lĩnh vực
desktop, developer-experience
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.