fix(web): show the correctly matching shortcut in new thread button's tooltip (#5594)
This commit is contained in:
1 parent
61b51ae0e3
commit
239ef1c54d
1 file changed
+6
-4
@@ -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} />
|
||||
|
||||
Reference in new issue
Block a user