@plasius/chatbot
v1.1.17
Published
OpenAI Chatbot
Downloads
1,187
Readme
@plasius/chatbot
Public package for chatbot UI/state integrations used in Plasius applications.
Install
npm install @plasius/chatbotModule 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:runDemo Sanity Check
npm run demo:runPublishing
This package is published via GitHub CD only.
- Configure repository environment
productionwith secretNPM_TOKEN. - Run
.github/workflows/cd.ymlvia Actions -> CD (Publish to npm) -> Run workflow. - Select the version bump (
patch,minor,major, ornone) and optional pre-release id.
Governance
- Security policy: SECURITY.md
- Code of conduct: CODE_OF_CONDUCT.md
- ADRs: docs/adrs
- Legal docs: legal
License
MIT
