Vectrum
Sign In

Pick threads and clear the pick the way T3 Code does

Ctrl+click picks just the clicked thread, a right click on any picked
row opens the multi-select menu, and opening a thread drops the pick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JjohannSocommitted 1 parent 7fc143ccommitebdd857

Showing 2 changed files with 3 additions and 6 deletions.

+2−0src/ui/workspace.rsView File
@@ -1111,6 +1111,8 @@ impl Workspace {
11111111 if let Some(chat) = self.chats.get(&session.entity_id()).cloned() {
11121112 chat.update(cx, |chat, cx| chat.focus_composer(window, cx));
11131113 }
1114+ // Opening a thread drops the multi-select, as in T3 Code.
1115+ self.selection.clear();
11141116 let previous = self.active.replace(session.clone());
11151117 if let Some(previous) = previous.filter(|previous| previous != &session) {
11161118 self.prune_empty_draft(&previous, cx);
+1−6src/ui/workspace/sidebar.rsView File
@@ -309,11 +309,6 @@ impl Workspace {
309309 if let Some(ix) = self.selection.iter().position(|selected| *selected == id) {
310310 self.selection.remove(ix);
311311 } else {
312- if self.selection.is_empty()
313- && let Some(active) = self.active.as_ref().filter(|active| *active != &session)
314- {
315- self.selection.push(active.entity_id());
316- }
317312 self.selection.push(id);
318313 }
319314 self.selection_anchor = Some(id);
@@ -361,7 +356,7 @@ impl Workspace {
361356 (this.selection.contains(&session.entity_id()), this.selected_rows(cx), this.legacy_sidebar())
362357 });
363358 match selected {
364- Some((true, rows, legacy)) if rows.len() > 1 => {
359+ Some((true, rows, legacy)) if !rows.is_empty() => {
365360 if legacy {
366361 Workspace::legacy_multi_select_menu(workspace.clone(), rows, menu, window, cx)
367362 } else {