Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2841,10 +2841,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
const showJumpHints = useThreadJumpHintsVisible(shouldShowJumpHintsNow);

const handleNewThreadClick = (event?: ReactMouseEvent) => {
if (
boringSidebarEnabled ||
shouldCreateNewThreadInCurrentProject(event?.shiftKey ?? false, projectGroups.length)
) {
if (shouldCreateNewThreadInCurrentProject(event?.shiftKey ?? false, projectGroups.length)) {
if (isMobile) setOpenMobile(false);
void startNewThreadFromContext({
activeDraftThread: newThreadContext.activeDraftThread,
Expand Down Expand Up @@ -3044,7 +3041,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
newThreadDisabled={projects.length === 0}
newThreadShortcutLabel={newThreadShortcutLabel}
newThreadInProjectShortcutLabel={newThreadInProjectShortcutLabel}
showNewThreadInProjectHint={!boringSidebarEnabled && projectGroups.length > 1}
showNewThreadInProjectHint={projectGroups.length > 1}
searchInputRef={threadSearchInputRef}
searchQuery={threadSearchQuery}
onSearchQueryChange={(value) => {
Expand Down
6 changes: 2 additions & 4 deletions apps/web/src/shortcuts/chatRouteCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function installChatRouteCommands(router: AnyRouter): () => void {
const readProjectGroupCount = () =>
buildSidebarProjectSnapshots({
projects: readProjects(),
groupScratchProjects: true,
settings: selectProjectGroupingSettings(getClientSettings()),
primaryEnvironmentId: appAtomRegistry.get(primaryEnvironmentIdAtom),
resolveEnvironmentLabel: () => null,
Expand Down Expand Up @@ -117,10 +118,7 @@ export function installChatRouteCommands(router: AnyRouter): () => void {
void scratch.startScratchThread(environmentId);
},
"chat.new": (event) => {
// The boring sidebar's folders already show the context, so it starts in
// the current project like the legacy sidebar did.
const { boringSidebarEnabled, legacySidebarEnabled } = getClientSettings();
if (!boringSidebarEnabled && !legacySidebarEnabled && readProjectGroupCount() > 1) {
if (readProjectGroupCount() > 1) {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
claim(event);
openCommandPalette({ open: "new-thread-in" });
return;
Expand Down
Loading