fix(web): show the correctly matching shortcut in new thread button's tooltip (#5594)

This commit is contained in:
Utkarsh Patil authored and GitHub committed 2026-08-07 12:54:36 +02:00
1 parent 61b51ae0e3
commit 239ef1c54d
1 file changed
+6 -4
+6 -4
View File
@@ -2816,11 +2816,13 @@ export default function SidebarV2() {
openCommandPalette({ open: "new-thread-in" });
}, [isMobile, newThreadContext, projectGroups.length, setOpenMobile]);
// Same resolution as v1: prefer the local-thread binding, fall back to
// chat.new, no platform gating — web users have working shortcuts too.
// The button mirrors chat.new: in multi-project setups both route through
// the command palette's "New thread in..." picker, and in single-project
// setups both create immediately. chat.newLocal always creates directly, so
// it is only a correct label when chat.new is unbound.
const newThreadShortcutLabel =
shortcutLabelForCommand(keybindings, "chat.newLocal") ??
shortcutLabelForCommand(keybindings, "chat.new");
shortcutLabelForCommand(keybindings, "chat.new") ??
shortcutLabelForCommand(keybindings, "chat.newLocal");
return (
<>
<SidebarChromeHeader isElectron={isElectron} />