@plasius/chatbot

Public package for chatbot UI/state integrations used in Plasius applications.
Install
npm install @plasius/chatbot
Module formats
This package publishes dual ESM and CJS artifacts.
When CJS output is emitted under dist-cjs/*.js with type: module, dist-cjs/package.json is generated with { "type": "commonjs" } to ensure Node require(...) compatibility.
Usage
import { ChatBot } from "@plasius/chatbot";
Translations
The chatbot ships en-GB UI and client-error defaults resolved through
@plasius/translations. title and placeholder remain direct component
overrides; pass translate when a host application wants to resolve the stable
chatbot keys with its own locale bundle.
import { ChatBot, type ChatbotTranslate } from "@plasius/chatbot";
const translate: ChatbotTranslate = (key, args) => i18n.t(key, args);
<ChatBot
endpoint="/ai/chatbot"
title="Support"
placeholder="Ask a question"
translate={translate}
/>;
Development
npm install
npm run build
npm test
npm run demo:run
Demo Sanity Check
npm run demo:run
Publishing
This package is published via GitHub CD only.
- Configure repository environment
production with secret NPM_TOKEN.
- Run
.github/workflows/cd.yml via Actions -> CD (Publish to npm) -> Run workflow.
- Select the version bump (
patch, minor, major, or none) and optional pre-release id.
Governance
License
MIT