feat: default auto space in chat input space selector (#1017)

This commit is contained in:
Mahesh Sanikommu 2026-05-28 01:53:56 -07:00 committed by GitHub
parent 9fa626cf17
commit 9028b49362
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -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<ModelId>("gemini-2.5-pro")
const { selectedProject } = useProject()
const [chatSpaceProjects, setChatSpaceProjects] = useState<string[]>([
selectedProject,
AUTO_CHAT_SPACE_ID,
])
const send = useCallback(() => {

View file

@ -153,7 +153,7 @@ export function ChatSidebar({
const targetHighlightChatIdRef = useRef<string | null>(null)
const { selectedProject } = useProject()
const [chatSpaceProjects, setChatSpaceProjects] = useState<string[]>([
initialChatProject ?? selectedProject,
initialChatProject ?? AUTO_CHAT_SPACE_ID,
])
const chatProject = chatSpaceProjects[0] ?? selectedProject
const { allProjects } = useContainerTags()