TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gcsconsultores/centros-estrategicos-gcs/llms.txt
Use this file to discover all available pages before exploring further.
SallyChat component renders as a Radix Sheet that slides in from the right side of the screen. It maintains the full conversation history for the session, streams AI responses token-by-token from POST /api/chat, and surfaces contextual quick-action buttons when the conversation is just getting started. On desktop it appears as a max-w-md side panel; on mobile it expands to full width.
Chat API Request
Every message the user sends triggers aPOST to /api/chat. The request body carries the full conversation history in Vercel AI SDK UIMessage format plus an optional context object that lets the API personalise Sally’s system prompt for the current room and visitor.
UIMessageStreamResponse, so the client receives text incrementally and can update the UI after each token rather than waiting for the full reply.
Quick Actions
When a conversation has two messages or fewer (messages.length <= 2), the chat panel displays three one-tap quick-action buttons above the input field. Tapping one immediately calls onSendMessage with a pre-written prompt, bypassing the text input.
| Button Label | Message Sent to Sally |
|---|---|
| Agendar reunion | Me gustaria agendar una reunion con un consultor |
| Hacer diagnostico | Quiero realizar el diagnostico empresarial gratuito |
| Ver servicios | Cuentame mas sobre los servicios de GCS |
SallyChat.tsx as:
SallyChat Props
TheSallyChat component is controlled entirely through props. The parent component (typically VirtualOffice) owns the message list and the open/close state.
currentRoom prop is also displayed in the chat header so the user always knows which virtual room they are chatting from. Sally’s responses reference that room via the system prompt context injection described in How Sally Works.
Typing Indicator
Sally shows an animated typing indicator while she is composing a reply. When the most recent message in the list hasrole === 'user', the component sets isTyping to true for 1.5 seconds:
isTyping is true, three dots rendered as w-2 h-2 circles bounce in sequence using staggered animationDelay values (0ms, 150ms, 300ms). The SallyAvatar component also pulses during this state by applying the animate-pulse-glow class.
Configuration
The following parameters are passed tostreamText() inside app/api/chat/route.ts. Adjust them to change Sally’s verbosity or creativity.
| Parameter | Value | Effect |
|---|---|---|
model | google/gemini-2.5-flash | Latest fast Gemini model |
maxOutputTokens | 500 | Keeps replies concise |
temperature | 0.7 | Balanced creativity and consistency |
abortSignal | req.signal | Cancels the stream if the client disconnects |