@ai4i/vic
v2.0.7
Published
Vic chatbot
Readme
@ai4i/vic Widget
Embeddable React chatbot widget for Vic.
Install
npm install @ai4i/vicimport '@ai4i/vic/dist/vic.css'Development
pnpm dev # hot-reload dev server (:5173)
pnpm build # production bundle
pnpm build:watch # watch mode (used by root pnpm dev)
pnpm test:run # Vitest
pnpm test:e2e # Cypress
pnpm type-checkFrom repo root: pnpm --filter @ai4i/vic <script>.
Documentation
| Topic | Link | | ----- | ---- | | Start here | ../../docs/getting-started.md | | Widget embedding & theming | ../../docs/widget-embedding.md | | Embed contexts | ../app/src/lib/ai/README.md#embed-contexts | | Architecture | ../../docs/architecture.md |
Key files
| File | Purpose |
| ---- | ------- |
| src/widget.tsx | Widget entry |
| src/useVicInterface.ts | window.vic API |
| src/hooks/useConversation.tsx | Chat state, API transport |
| src/configs/componentSchemas.ts | LLM component schemas (server-safe) |
| src/configs/componentConfigs.ts | React component mapping |
Adding a custom LLM component: .cursor/rules/chat-component.mdc.
License
ISC
