@cuddlynest/ai-chatbot
v0.0.4
Published
This library was generated with [Nx](https://nx.dev).
Readme
@cuddlynest/ai-chatbot
This library was generated with Nx.
Running unit tests
Run nx test @cuddlynest/ai-chatbot to execute the unit tests via Vitest.
Component-based isolation – Each main chat experience is in its own folder (AiChatbot, ChatDrawerPerfectMatch) with test and index files.
UI separation – Reusable building blocks live in the ui/ folder.
Hooks – Custom logic and state management extracted into hooks.
Utils – Lightweight utility functions grouped under utils/.
Tests – *.spec.tsx files colocated with components.
Barrel Exports – Clean imports with index files across folders.
libs/ └── ai-chatbot/ ├── src/ │ └── lib/ │ ├── components/ │ │ ├── AiChatbot/ │ │ │ ├── AiChatbot.tsx │ │ │ ├── AiChatbot.spec.tsx │ │ │ └── index.ts # Barrel export │ │ ├── ChatDrawerPerfectMatch/ │ │ │ ├── ChatDrawerPerfectMatch.tsx │ │ │ ├── ChatDrawerPerfectMatch.spec.tsx │ │ │ └── index.ts │ ├── ui/ │ │ ├── ChatInputForm.tsx # Shared UI component │ │ ├── ChatMessages.tsx │ │ └── CustomSwitch.tsx │ ├── hooks/ │ │ ├── useAiChat.ts # Custom logic for AI Chat │ │ ├── useChatDrawer.ts # State/logic for ChatDrawer │ │ └── useStyle.ts # Shared styles if needed │ ├── utils/ │ │ ├── keyboard.ts # Keyboard logic (e.g. Esc/Enter) │ │ ├── scroll.ts # Scroll behavior (auto-scroll etc.) │ │ └── theme.ts # MUI theme config │ └── index.ts # Entry point for external use
