AI Chat — How it works
Technical anatomy of the built-in conversational search. Overview: AI Chat.
Routes & entry
| Route / layout | Component |
|---|---|
/search/chat (the chat map layout) | ChatContent — src/components/pages/search/components/MapRoot/components/ChatContent/ |
The chat panel renders inside the search experience (it’s shown when the map layout is
chat), so it sits on top of the same SearchProvider / MapOptionsProvider as the rest of
search.
How it works
user message
│ APIChat.fetchReply({ value, token }) server-side NLP (proxy → Repliers)
▼
{ request, nlpId }
│ request.summary → the AI's text reply
│ request.params/body → parsed MLS filters
│ request.locations/aggregates → geo + cluster context
▼
"Apply Filters" → useApplyFilters
│ setFilters(params + body) (SearchProvider)
│ setLocations / setPoint, fitBounds(map)
▼
results carousel in the chat + updated map/gridAPIChat.fetchReplydoes the parsing;nlpIdis the conversation token so follow-up messages refine the previous query.- History + token persist to
localStorage(@configs/storagenlpHistoryKey/nlpTokenKey), so the conversation survives reloads. useApplyFiltersapplies the parsed filters toSearchProvider, frames the map on the matched locations/point/clusters, and (if the reply carries image-search items) syncsAiSearchProvider.
Providers
Consumes the search-section providers — useSearch (SearchProvider), useMapOptions /
useMapLocations (MapOptionsProvider), and useAiSearch (AiSearchProvider). No scoped
provider of its own. See Property Search — How it works.
Configuration
| Config / flag | Role |
|---|---|
@configs/features aiChat | Enables the chat panel. |
APIChat (services/API) | The fetchReply NLP call (via the proxy backend). |
@configs/storage | nlpHistoryKey / nlpTokenKey for persistence. |
Gotchas & hints
- NLP is server-side. Parsing happens through the proxy backend (Repliers), not in the browser — the client only sends the text and renders the structured reply.
- Same endpoint, different owner. The AI Agent integration’s
ExtractFiltersuses the sameAPIChat.fetchReply, but AI Chat is the portal’s own UI that applies filters directly, whereas the agent exposes that capability to an external UI overpostMessage.
Workflow and verification
Source review: e30dd9b47, 2026-11-02. The cross-layer guide covers the NLP request and its distinction from the iframe bridge. NLP conversation id, iframe session id and auth token have different owners. No live NLP conversation was executed.
Last updated on