diff --git a/app/actions.tsx b/app/actions.tsx index 50e985bf..5da29303 100644 --- a/app/actions.tsx +++ b/app/actions.tsx @@ -22,6 +22,7 @@ import { SearchSection } from '@/components/search-section' import SearchRelated from '@/components/search-related' import { GeoJsonLayer } from '@/components/map/geojson-layer' import { ResolutionCarousel } from '@/components/resolution-carousel' +import { getCurrentUserIdOnServer } from '@/lib/auth/get-current-user' import { ResolutionImage } from '@/components/resolution-image' import { CopilotDisplay } from '@/components/copilot-display' import RetrieveSection from '@/components/retrieve-section' @@ -397,7 +398,7 @@ async function submit(formData?: FormData, skip?: boolean) { } as CoreMessage) } - const userId = 'anonymous' + const userId = (await getCurrentUserIdOnServer()) || 'anonymous' const currentSystemPrompt = (await getSystemPrompt(userId)) || '' const mapProvider = formData?.get('mapProvider') as 'mapbox' | 'google' diff --git a/components/settings/components/settings.tsx b/components/settings/components/settings.tsx index 7a526e18..3ef7fc6f 100644 --- a/components/settings/components/settings.tsx +++ b/components/settings/components/settings.tsx @@ -53,7 +53,7 @@ export type SettingsFormValues = z.infer // Default values const defaultValues: Partial = { systemPrompt: - "You are a planetary copilot, an AI assistant designed to help users with information about planets, space exploration, and astronomy. Provide accurate, educational, and engaging responses about our solar system and beyond.", + "You are an AI assistant designed to help users with geospatial data, mapping, and environment-aware insights. Provide accurate and helpful responses based on the available tools and context.", selectedModel: "Grok 4.2", users: [], }