From 9028b49362ade4fddb0a3426c55322fd272a77d4 Mon Sep 17 00:00:00 2001 From: Mahesh Sanikommu Date: Thu, 28 May 2026 01:53:56 -0700 Subject: [PATCH] feat: default auto space in chat input space selector (#1017) --- apps/web/components/chat/home-chat-composer.tsx | 3 ++- apps/web/components/chat/index.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/components/chat/home-chat-composer.tsx b/apps/web/components/chat/home-chat-composer.tsx index 8f4188a88..2f7cda2db 100644 --- a/apps/web/components/chat/home-chat-composer.tsx +++ b/apps/web/components/chat/home-chat-composer.tsx @@ -7,6 +7,7 @@ import { useProject } from "@/stores" import { cn } from "@lib/utils" import type { ModelId } from "@/lib/models" import { SpaceSelector } from "@/components/space-selector" +import { AUTO_CHAT_SPACE_ID } from "@/lib/chat-auto-space" export function HomeChatComposer({ onStartChat, @@ -19,7 +20,7 @@ export function HomeChatComposer({ const [selectedModel, setSelectedModel] = useState("gemini-2.5-pro") const { selectedProject } = useProject() const [chatSpaceProjects, setChatSpaceProjects] = useState([ - selectedProject, + AUTO_CHAT_SPACE_ID, ]) const send = useCallback(() => { diff --git a/apps/web/components/chat/index.tsx b/apps/web/components/chat/index.tsx index db4be7863..c8ebb1e19 100644 --- a/apps/web/components/chat/index.tsx +++ b/apps/web/components/chat/index.tsx @@ -153,7 +153,7 @@ export function ChatSidebar({ const targetHighlightChatIdRef = useRef(null) const { selectedProject } = useProject() const [chatSpaceProjects, setChatSpaceProjects] = useState([ - initialChatProject ?? selectedProject, + initialChatProject ?? AUTO_CHAT_SPACE_ID, ]) const chatProject = chatSpaceProjects[0] ?? selectedProject const { allProjects } = useContainerTags()