@amisi-mobile-starter/chat exports six UI components, Zod schemas and inferred types, useChatHistory, conversation-storage functions, and two mock handlers.ChatContainer calls useAnalytics, so render it below AnalyticsProvider.
The current component consumes suggestions, initialAssistantMessage, onSendMessage, onStreamMessage, placeholder, and onClose. It does not consume apiEndpoint, systemPrompt, or visible.When onStreamMessage exists, the component streams through that handler. Otherwise it calls onSendMessage; if neither handler exists, the non-streaming response is an empty string. mockStreamHandler is used only as the internal fallback in the streaming path.
The package exports ChatContainer, ChatHeader, ChatMessageBubble, ChatComposer, ChatSuggestionChips, and ChatTypingIndicator. Their props are exported from @amisi-mobile-starter/chat.
ChatContainer saves a conversation when its close handler runs and at least one message exists. Storage uses @amisi-mobile-starter/core key-value storage, keeps at most 20 conversations, and derives the title from the first user message.
The direct synchronous exports are saveConversation(messages), getAllConversations(), getConversationById(id), deleteConversation(id), clearAllConversations(), and getConversationCount().Messages have id, role, content, and timestamp. Roles are user, assistant, or system. Conversations have id, title, messages, createdAt, and updatedAt.
readStreamAsText and readSSEStream exist in src/utils/streamReader.ts,
but the package barrel does not export them.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AMiSi Mobile Starter","description":"Documentation for the production-ready Expo and React Native starter with authentication, subscriptions, notifications, analytics, security, and release infrastructure.","colors":{"primary":"#2B59D3","light":"#5C82E6","dark":"#2449AE"},"logo":{"light":"https://mintcdn.com/amisi/OQCBB6T0Z3f8eiII/assets/amisi.svg?fit=max\u0026auto=format\u0026n=OQCBB6T0Z3f8eiII\u0026q=85\u0026s=4d6c9a8a297eb08561c0cc6088098912","dark":"https://mintcdn.com/amisi/OQCBB6T0Z3f8eiII/assets/amisi-light.svg?fit=max\u0026auto=format\u0026n=OQCBB6T0Z3f8eiII\u0026q=85\u0026s=9fb2fd1b6e4320910d1006b6a5cadeec","href":"https://mobile-starter.amisi.ai/"},"favicon":"https://mintcdn.com/amisi/OQCBB6T0Z3f8eiII/assets/favicon.svg?fit=max\u0026auto=format\u0026n=OQCBB6T0Z3f8eiII\u0026q=85\u0026s=16f42f55fbd9060d43eddeed7b7a9d38","appearance":{"default":"system"},"background":{"decoration":"gradient","color":{"light":"#FAFAF9","dark":"#16161A"}},"navbar":{"links":[{"href":"https://mobile-starter.amisi.ai/","label":"Website"},{"href":"https://discord.gg/XtP4jWXw","label":"Discord","type":"discord"}],"primary":{"type":"button","label":"Get the starter","href":"https://mobile-starter.amisi.ai/#pricing"}},"footer":{"socials":{"x":"https://x.com/AmisiMobile","github":"https://github.com/amisi-dev-tools/react-native-expo-starter-kit","discord":"https://discord.gg/XtP4jWXw"},"links":[{"header":"Product","items":[{"label":"Website","href":"https://mobile-starter.amisi.ai/"},{"label":"Pricing","href":"https://mobile-starter.amisi.ai/"},{"label":"Live demo","href":"https://fir-demo-mobile-starter.web.app"}]},{"header":"Resources","items":[{"label":"Quickstart","href":"/getting-started/quickstart"},{"label":"Architecture","href":"/architecture/overview"},{"label":"Changelog","href":"/changelog"}]},{"header":"Community","items":[{"label":"GitHub","href":"https://github.com/amisi-dev-tools/react-native-expo-starter-kit"},{"label":"Discussions","href":"https://github.com/amisi-dev-tools/react-native-expo-starter-kit/discussions"},{"label":"Discord","href":"https://discord.gg/XtP4jWXw"}]},{"header":"Company","items":[{"label":"Enterprise","href":"https://mobile-starter.amisi.ai/enterprise"},{"label":"Terms","href":"https://mobile-starter.amisi.ai/terms-and-conditions"},{"label":"Privacy","href":"https://mobile-starter.amisi.ai/privacy-policy"}]}]},"search":{"prompt":"Search AMiSi docs..."},"fonts":{"heading":{"family":"Sora"},"body":{"family":"Onest"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"amisi","hasAudioNarration":false,"actualSubdomain":"amisi","customDomains":["docs.mobile-starter.amisi.ai"],"gitSource":{"type":"github","owner":"amisi-dev-tools","repo":"amisi-mobile-starter","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a897b392953dae940903627","collectionId":"b45e0c27-3374-483e-aafe-c7edced231ff","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a897b392953dae940903627"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a897b392953dae940903627","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"Features","count":25},{"language":"default","tag":"Components","count":23},{"language":"default","tag":"Packages","count":11},{"language":"default","tag":"Forms","count":9},{"language":"default","tag":"Content and layout","count":8},{"language":"default","tag":"Introduction","count":7},{"language":"default","tag":"Tips \u0026 Tricks","count":7},{"language":"default","tag":"Configuration","count":6},{"language":"default","tag":"Getting started","count":6},{"language":"default","tag":"Working with the starter","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"packages/chat","slug":"/packages/chat","pageMetadata":{"title":"Chat","description":"Build chat UI with exact handler, component, and local-history APIs.","icon":"message","sidebar_position":4,"href":"/packages/chat"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build chat UI with exact handler, component, and local-history APIs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`@amisi-mobile-starter/chat`,children:`@amisi-mobile-starter/chat`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@amisi-mobile-starter/chat`}),` exports six UI components, Zod schemas and inferred types, `,_jsx(_components.code,{children:`useChatHistory`}),`, conversation-storage functions, and two mock handlers.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ChatContainer`}),` calls `,_jsx(_components.code,{children:`useAnalytics`}),`, so render it below `,_jsx(_components.code,{children:`AnalyticsProvider`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`render-a-chat`,children:`Render a chat`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ChatContainer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mockStreamHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@amisi-mobile-starter/chat'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` AssistantScreen`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`ChatContainer`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` suggestions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Explain this app'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Show me the features'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` initialAssistantMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"How can I help?\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onStreamMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mockStreamHandler`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ask me anything...\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onClose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ChatContainerProps`}),` extends this configuration:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ChatConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` apiEndpoint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` suggestions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` initialAssistantMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onSendMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onStreamMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` AsyncIterable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` systemPrompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onClose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ChatContainerProps`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` extends`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ChatConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` visible`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The current component consumes `,_jsx(_components.code,{children:`suggestions`}),`, `,_jsx(_components.code,{children:`initialAssistantMessage`}),`, `,_jsx(_components.code,{children:`onSendMessage`}),`, `,_jsx(_components.code,{children:`onStreamMessage`}),`, `,_jsx(_components.code,{children:`placeholder`}),`, and `,_jsx(_components.code,{children:`onClose`}),`. It does not consume `,_jsx(_components.code,{children:`apiEndpoint`}),`, `,_jsx(_components.code,{children:`systemPrompt`}),`, or `,_jsx(_components.code,{children:`visible`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`onStreamMessage`}),` exists, the component streams through that handler. Otherwise it calls `,_jsx(_components.code,{children:`onSendMessage`}),`; if neither handler exists, the non-streaming response is an empty string. `,_jsx(_components.code,{children:`mockStreamHandler`}),` is used only as the internal fallback in the streaming path.`]}),`\n`,_jsx(Heading,{level:`2`,id:`components`,children:`Components`}),`\n`,_jsxs(_components.p,{children:[`The package exports `,_jsx(_components.code,{children:`ChatContainer`}),`, `,_jsx(_components.code,{children:`ChatHeader`}),`, `,_jsx(_components.code,{children:`ChatMessageBubble`}),`, `,_jsx(_components.code,{children:`ChatComposer`}),`, `,_jsx(_components.code,{children:`ChatSuggestionChips`}),`, and `,_jsx(_components.code,{children:`ChatTypingIndicator`}),`. Their props are exported from `,_jsx(_components.code,{children:`@amisi-mobile-starter/chat`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`conversation-history`,children:`Conversation history`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ChatContainer`}),` saves a conversation when its close handler runs and at least one message exists. Storage uses `,_jsx(_components.code,{children:`@amisi-mobile-starter/core`}),` key-value storage, keeps at most 20 conversations, and derives the title from the first user message.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`tsx`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`useChatHistory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@amisi-mobile-starter/chat'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` HistoryScreen`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`conversations`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`count`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`refresh`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`getById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`deleteById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`clearAll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useChatHistory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The direct synchronous exports are `,_jsx(_components.code,{children:`saveConversation(messages)`}),`, `,_jsx(_components.code,{children:`getAllConversations()`}),`, `,_jsx(_components.code,{children:`getConversationById(id)`}),`, `,_jsx(_components.code,{children:`deleteConversation(id)`}),`, `,_jsx(_components.code,{children:`clearAllConversations()`}),`, and `,_jsx(_components.code,{children:`getConversationCount()`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Messages have `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`role`}),`, `,_jsx(_components.code,{children:`content`}),`, and `,_jsx(_components.code,{children:`timestamp`}),`. Roles are `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`assistant`}),`, or `,_jsx(_components.code,{children:`system`}),`. Conversations have `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`title`}),`, `,_jsx(_components.code,{children:`messages`}),`, `,_jsx(_components.code,{children:`createdAt`}),`, and `,_jsx(_components.code,{children:`updatedAt`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`readStreamAsText`}),` and `,_jsx(_components.code,{children:`readSSEStream`}),` exist in `,_jsx(_components.code,{children:`src/utils/streamReader.ts`}),`,\nbut the package barrel does not export them.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chat","description":"Build chat UI with exact handler, component, and local-history APIs.","icon":"message","sidebar_position":4,"href":"/packages/chat"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"@amisi-mobile-starter/chat","slug":"@amisi-mobile-starter/chat","depth":1,"children":[]},{"title":"Render a chat","slug":"render-a-chat","depth":2,"children":[]},{"title":"Components","slug":"components","depth":2,"children":[]},{"title":"Conversation history","slug":"conversation-history","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"amisi","siteName":"AMiSi Mobile Starter","title":"Chat - AMiSi Mobile Starter","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-22T09:41:46.822Z","originalFileLocation":"packages/chat.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build chat UI with exact handler, component, and local-history APIs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AMiSi Mobile Starter\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat - AMiSi Mobile Starter\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build chat UI with exact handler, component, and local-history APIs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AMiSi Mobile Starter\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mobile-starter.amisi.ai/packages/chat\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://amisi.mintlify.app/_mintlify/api/og/v2?division=Packages\u0026amp;title=Chat\u0026amp;description=Build+chat+UI+with+exact+handler%2C+component%2C+and+local-history+APIs.\u0026amp;theme=e9fd690619fa01684fbd9bb1\u0026amp;signature=2eb8cb8a2eb6f90ef03edf59c7f9f76a1931787ffd6cde51d1e3c42ab4c934c1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chat - AMiSi Mobile Starter\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build chat UI with exact handler, component, and local-history APIs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://amisi.mintlify.app/_mintlify/api/og/v2?division=Packages\u0026amp;title=Chat\u0026amp;description=Build+chat+UI+with+exact+handler%2C+component%2C+and+local-history+APIs.\u0026amp;theme=e9fd690619fa01684fbd9bb1\u0026amp;signature=2eb8cb8a2eb6f90ef03edf59c7f9f76a1931787ffd6cde51d1e3c42ab4c934c1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/amisi/Mi364PzUVnbpdudy/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AMiSi Mobile Starter\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2B59D3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mobile-starter.amisi.ai/packages/chat\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/packages/chat.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mobile-starter.amisi.ai/#organization\",\"name\":\"AMiSi Mobile Starter\",\"url\":\"https://docs.mobile-starter.amisi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/amisi/OQCBB6T0Z3f8eiII/assets/amisi.svg?fit=max\u0026auto=format\u0026n=OQCBB6T0Z3f8eiII\u0026q=85\u0026s=4d6c9a8a297eb08561c0cc6088098912\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mobile-starter.amisi.ai#website\",\"name\":\"AMiSi Mobile Starter\",\"url\":\"https://docs.mobile-starter.amisi.ai\",\"publisher\":{\"@id\":\"https://docs.mobile-starter.amisi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mobile-starter.amisi.ai/packages/chat#webpage\",\"url\":\"https://docs.mobile-starter.amisi.ai/packages/chat\",\"name\":\"Chat\",\"description\":\"Build chat UI with exact handler, component, and local-history APIs.\",\"dateModified\":\"2026-08-22T09:41:46.822Z\",\"isPartOf\":{\"@id\":\"https://docs.mobile-starter.amisi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mobile-starter.amisi.ai/packages/chat#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mobile-starter.amisi.ai/packages/chat#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Packages\",\"item\":\"https://docs.mobile-starter.amisi.ai/packages/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat\",\"item\":\"https://docs.mobile-starter.amisi.ai/packages/chat\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.mobile-starter.amisi.ai/packages/chat#article\",\"headline\":\"Chat\",\"name\":\"Chat\",\"description\":\"Build chat UI with exact handler, component, and local-history APIs.\",\"url\":\"https://docs.mobile-starter.amisi.ai/packages/chat\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mobile-starter.amisi.ai/packages/chat#webpage\"},\"dateModified\":\"2026-08-22T09:41:46.822Z\",\"publisher\":{\"@id\":\"https://docs.mobile-starter.amisi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mobile-starter.amisi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AMiSi Mobile Starter\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"AMiSi Mobile Starter","nav":{"global":null,"tabs":[{"tab":"Introduction","pages":[{"title":"Introduction","href":""}]},{"tab":"Features","groups":[{"group":"Configuration","pages":[{"title":"Configuration overview","icon":"gear","href":"/configuration/overview"},{"title":"Configurator","sidebarTitle":"Configurator","icon":"sliders","href":"/configuration/configurator"},{"title":"App identity","sidebarTitle":"App identity","icon":"badge-check","href":"/configuration/app-identity"},{"title":"Branding","sidebarTitle":"Branding","icon":"palette","href":"/configuration/branding"},{"title":"Environment variables","icon":"key","href":"/configuration/environment-variables"},{"title":"Adapters","icon":"plug","href":"/configuration/adapters"}]},{"group":"AI","pages":[{"title":"AI enablement overview","icon":"sparkles","href":"/ai/overview"},{"title":"Agents","icon":"users","href":"/ai/agents"},{"title":"Skills","icon":"wand-magic-sparkles","href":"/ai/skills"},{"title":"Task specifications","icon":"list-check","href":"/ai/task-specs"}]},{"group":"Generators","pages":[{"title":"Generators","sidebarTitle":"Generators Overview","icon":"wand-magic-sparkles","href":"/generators/overview"},{"title":"Feature generator","icon":"boxes-stacked","href":"/generators/feature"},{"title":"Adapter generator","icon":"plug","href":"/generators/adapter"},{"title":"Screen generator","icon":"mobile-screen","href":"/generators/screen"}]},{"group":"Packages","pages":[{"title":"Overview","icon":"boxes","href":"/packages/overview"},{"title":"Analytics","icon":"chart-line","href":"/packages/analytics"},{"title":"Auth","description":"Configure the adapter-based authentication runtime and its exact contracts.","icon":"shield-check","href":"/packages/auth"},{"title":"Chat","icon":"message","href":"/packages/chat"},{"title":"Config","description":"Read normalized app configuration, validated environment values, flags, and variants.","icon":"gear","href":"/packages/config"},{"title":"Core","icon":"toolbox","href":"/packages/core"},{"title":"Translations","icon":"globe","href":"/packages/i18n"},{"title":"Notifications","icon":"bell","href":"/packages/notifications"},{"title":"Security","icon":"lock","href":"/packages/security"},{"title":"Subscriptions","icon":"credit-card","href":"/packages/subscriptions"},{"title":"Theme","icon":"palette","href":"/packages/theme"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/ai-tools/overview"}]},{"tab":"Tips \u0026 Tricks","pages":[{"title":"Tips \u0026 Tricks","href":"/essentials/markdown"}]},{"tab":"Components","pages":[{"title":"Components","href":"/ui/intro"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Chat - AMiSi Mobile Starter","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":[],"chunks":[]}