feat: default auto space in chat input space selector

This commit is contained in:
MaheshtheDev 2026-05-28 07:58:50 +00:00
parent 9fa626cf17
commit d66d33c395
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()