{"_id":"@agent-ai-sdk/chat-ui","_rev":"6-88db8f6dfae59a27ad69e8ca742dbe53","name":"@agent-ai-sdk/chat-ui","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.0","author":{"name":"Shrikant Jagtap"},"license":"MIT","_id":"@agent-ai-sdk/chat-ui@1.0.0","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"dist":{"shasum":"9c721cb09ae62eae431f18ac31679b195e7a78ad","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.0.tgz","fileCount":5,"integrity":"sha512-v5iFRX12JyomTCLrGPN/xpTg1dUIA/1gJfr8nmB21UdaWgE8oA5ZWgV+IEuZS7enslCIZT+tI+e9uEot+5u+Tg==","signatures":[{"sig":"MEQCICAbM6I3B7MzsGVf6wNWzdb6dK0S8fJCSInnxep/m7+FAiAcUQyO3Fbrcg/6OWcXxNHKwv4aOGxtgEfp73yVdkEO1g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":180333},"main":"./dist/index.js","type":"module","email":"shrijagtap11@gmail.com","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","pack:check":"npm run build && npm pack --dry-run","prepublishOnly":"npm run build"},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"_npmVersion":"10.8.2","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.7.2","@types/react":"^18.3.14","@types/react-dom":"^18.3.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/chat-ui_1.0.0_1767014292806_0.9743551705072575","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.1","author":{"name":"Shrikant Jagtap"},"license":"MIT","_id":"@agent-ai-sdk/chat-ui@1.0.1","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"dist":{"shasum":"503b4a191bbb69707549c975de162b3d3491029a","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.1.tgz","fileCount":5,"integrity":"sha512-RmNFJWUoB8YeXUWmNLSvzOWkqpw0nJ+IVIvbFEoD2p/QbKkAa+mlKzQNuQQT/d9OSdjsSEZCwpIx6r6SudhQjQ==","signatures":[{"sig":"MEUCIQCNecw2FRiDE+s+d4QDyD37GfJIOLT94DFvq4vwcQN1DQIgUq0JwYp+NKoZryq0U+aHUoVZVRgnHmpRgxDgSEb7grs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181549},"main":"./dist/index.js","type":"module","email":"shrijagtap11@gmail.com","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","pack:check":"npm run build && npm pack --dry-run","prepublishOnly":"npm run build"},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"_npmVersion":"10.8.2","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.7.2","@types/react":"^18.3.14","@types/react-dom":"^18.3.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/chat-ui_1.0.1_1767015502257_0.5760768670172445","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.2","author":{"name":"Shrikant Jagtap"},"license":"MIT","_id":"@agent-ai-sdk/chat-ui@1.0.2","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"dist":{"shasum":"67d81d01c7be0e3e37b07ee610e9fc852ca948c6","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.2.tgz","fileCount":5,"integrity":"sha512-E0MET8l+gMQMmaw3VIQkQQMBHHR5kSIkbmLPqmexQPinqxvZOn+Ioj/n4VgEE1YC1uybyAxCZFFEIO3muPVkZA==","signatures":[{"sig":"MEQCIERYLXMDlxD0TpD7OmR58S7ubx9SwJRaKKzFtKplETk+AiBab977oxaYA1NWvDjS7RcCM5NghjCGSyCXSE/aiWiDTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":181545},"main":"./dist/index.js","type":"module","email":"shrijagtap11@gmail.com","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","pack:check":"npm run build && npm pack --dry-run","prepublishOnly":"npm run build"},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"_npmVersion":"10.8.2","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.7.2","@types/react":"^18.3.14","@types/react-dom":"^18.3.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/chat-ui_1.0.2_1767016320236_0.8009206356512819","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.3","author":{"name":"Shrikant Jagtap"},"license":"MIT","_id":"@agent-ai-sdk/chat-ui@1.0.3","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"dist":{"shasum":"79a92de7f6a5695cbab51cd407bb60958e32a325","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.3.tgz","fileCount":9,"integrity":"sha512-ba0Qq6nDMESZbUAjHoyCg49CK+2Dp5jRKAQUgZe6LxIxU7QccVtISNxTif/TzCuNgCYCamU42A77XPLSIwrxSA==","signatures":[{"sig":"MEUCIQC9Rf+sibMOLOwHNc3k0+RZZjSsNG7T12wTpTeCBeEbXAIgKX4qbVc86Lcm/vKVKSpL6q0wvr20i4dx3tntaFpUgdw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1169455},"main":"./dist/index.js","type":"module","email":"shrijagtap11@gmail.com","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","pack:check":"npm run build && npm pack --dry-run","prepublishOnly":"npm run build"},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"_npmVersion":"10.8.2","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.7.2","@types/react":"^18.3.14","@types/react-dom":"^18.3.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/chat-ui_1.0.3_1767016455606_0.17106642962685892","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.4","author":{"name":"Shrikant Jagtap"},"license":"MIT","_id":"@agent-ai-sdk/chat-ui@1.0.4","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"dist":{"shasum":"99b5e8edab193084d64244de35ce791972a669ca","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.4.tgz","fileCount":9,"integrity":"sha512-u7XjqVZPI/t9jZk5KNnztS8vIP773kGc7CAXzHDUfojTfV0vgck8wzV4OPkb5KIXwryED3gTGBxh0Qpc+mZXVA==","signatures":[{"sig":"MEYCIQDz4NbC0i1Cl6tp+CA7qYhuHv2tyBGujGWThWKN3iCgGAIhAKxoNxSRdyy5XvXdXnGYoBkr7y/kGKvJDeROH3ZAP5ja","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1169607},"main":"./dist/index.js","type":"module","email":"shrijagtap11@gmail.com","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","pack:check":"npm run build && npm pack --dry-run","prepublishOnly":"npm run build"},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"_npmVersion":"10.8.2","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.7.2","@types/react":"^18.3.14","@types/react-dom":"^18.3.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/chat-ui_1.0.4_1767016558348_0.3340164992376735","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@agent-ai-sdk/chat-ui","version":"1.0.5","license":"MIT","type":"module","author":{"name":"Shrikant Jagtap"},"email":"shrijagtap11@gmail.com","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"peerDependencies":{"react":">=18","react-dom":">=18"},"devDependencies":{"@types/react":"^18.3.14","@types/react-dom":"^18.3.1","react":"^18.3.1","react-dom":"^18.3.1","tsup":"^8.5.0","typescript":"^5.7.2"},"scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build","pack:check":"npm run build && npm pack --dry-run"},"publishConfig":{"access":"public"},"_id":"@agent-ai-sdk/chat-ui@1.0.5","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-/e9d6mEX+PJKQNiP+624LOAjkvKTw3yo+LrvCzq+QTMUVlE58CfosIec8GYHzoYx4JQ5AGTMCkYueD82uueBfQ==","shasum":"769cce7dc269aba325eb07fa3399d6888b45f9ea","tarball":"https://registry.npmjs.org/@agent-ai-sdk/chat-ui/-/chat-ui-1.0.5.tgz","fileCount":9,"unpackedSize":1170217,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC9MLZT4nxzdHoYIS2u7L4J/eQLPxgQoorW/13bH6RtYAiA+146gEDG94+NlGPTuYnayqAGpqOAzmxS8o3pvE/z9RQ=="}]},"_npmUser":{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"},"directories":{},"maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-ui_1.0.5_1767104672653_0.6272085364330973"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-29T13:18:12.726Z","modified":"2025-12-30T14:24:33.144Z","1.0.0":"2025-12-29T13:18:12.965Z","1.0.1":"2025-12-29T13:38:22.416Z","1.0.2":"2025-12-29T13:52:00.392Z","1.0.3":"2025-12-29T13:54:15.820Z","1.0.4":"2025-12-29T13:55:58.584Z","1.0.5":"2025-12-30T14:24:32.945Z"},"author":{"name":"Shrikant Jagtap"},"license":"MIT","description":"Minimal React chat window UI for `ai-chat-kit` backends (streaming SSE).","maintainers":[{"name":"iamshrikantjagtap","email":"shrijagtap11@gmail.com"}],"readme":"# @agent-ai-sdk/chat-ui\n\nMinimal React chat window UI for `ai-chat-kit` backends (streaming SSE).\n\n## UI Component Preview\n\n| Chat | History |\n| --- | --- |\n| ![Chat UI - Chat tab](https://unpkg.com/@agent-ai-sdk/chat-ui/images/chat_ui1.png) | ![Chat UI - History tab](https://unpkg.com/@agent-ai-sdk/chat-ui/images/chat_ui2.png) |\n| ![Chat UI - Assistant tab](https://unpkg.com/@agent-ai-sdk/chat-ui/images/chat_ui3.png) | ![Chat UI - Spec tab](https://unpkg.com/@agent-ai-sdk/chat-ui/images/chat_ui4.png) |\n\n## Features\n\n- **Streaming chat (SSE)**: token-by-token assistant rendering with **Stop** + **Reset** controls.\n- **Conversation history**: list/refresh conversations, load a conversation into chat, delete conversation, and clear all history.\n  - Falls back to legacy `GET /chat/history?userId=...` if newer conversation endpoints aren’t available.\n- **Model picker**: configurable model options; sends `{ model, conversationId }` in `params`.\n- **Chat modes**: Agent / Plan / Debug / Ask (adds a lightweight prompt prefix to guide responses).\n- **Message rendering**: lightweight “markdown-ish” UI with headings, lists, blockquotes, inline code, and fenced code blocks (with **Copy**).\n- **Attachments**: attach files (name/type/size are appended into the prompt; files are not uploaded).\n- **Keyboard UX**: Enter to send, Shift+Enter for a newline.\n- **Layout customization**: `title`, `width`, `maxWidth`, `bodyHeight`, and per-tab subtitles.\n\n## Install\n\n```bash\nnpm i @agent-ai-sdk/chat-ui\n```\n\n### Peer dependencies\n\n- `react` (>= 18)\n- `react-dom` (>= 18)\n\n## Usage (Vite + React)\n\n```tsx\nimport { ChatWindow } from \"@agent-ai-sdk/chat-ui\";\n\nexport default function App() {\n  return (\n    <div style={{ padding: 24 }}>\n      <ChatWindow\n        userId=\"demo-user\"\n        endpoint=\"http://localhost:8000/chat/stream\"\n      />\n    </div>\n  );\n}\n```\n\n## Backend requirement (Python / FastAPI)\n\nThis UI expects an `ai-chat-kit` compatible backend that supports **SSE streaming** at:\n- `POST /chat/stream` (returns `text/event-stream`)\n\nIf you’re using this repo’s backend library (`Backend/fastapi-ai-chat`), install it from PyPI:\n\n```bash\npython -m pip install \"fastapi-ai-chat\"\n```\n\nMinimal FastAPI app using the backend library (import example):\n\n```python\nfrom fastapi_ai_chat import create_app\n\napp = create_app(\n      gemini_api_key='your_key'\n        openai_api_key='your_key',\n        anthropic_api_key='your_key',\n    # Optionally pass keys directly, or set env vars like OPENAI_API_KEY / ANTHROPIC_API_KEY  \n)\n```\n\n\n## Author\n\n- Name: Shrikant Jagtap\n- Email: shrijagtap11@gmail.com\n\n\n","readmeFilename":"README.md"}