Camunda Copilot Client
React component library for embedding Camunda Copilot chat interface into web applications.
Installation
npm install @camunda/copilot-chat
Usage
import { CopilotChat } from '@camunda/copilot-chat';
function App() {
const handleSendMessage = async (request, options, instance) => {
const response = {
output: {
generic: [
{
response_type: 'text',
text: `You said: "${request.input.text}"`,
},
],
},
};
await instance.messaging.addMessage(response);
};
return <CopilotChat customSendMessage={handleSendMessage} workareaSelector="body" />;
}
Props
customSendMessage (required): Function to handle message sending and responses
workareaSelector (optional): CSS selector for the workarea container (default: "body")
Features
- Bottom-right floating launcher button
- Sidecar panel that slides in from the right
- Automatically injected styles (no separate CSS import needed)
Development
Prerequisites
- Node.js âĽ18.0.0
- npm âĽ9.0.0
Setup
npm install
Local Development
npm run dev
npm run build:watch
npm run demo
npm test
npm run lint
The demo app runs at http://localhost:4200. The dev command automatically rebuilds the library when you make changes and hot-reloads the demo app.
Contributing
git checkout -b '#ticketNumber/my-feature-description'
npm run dev
npm test
npm run build
git commit -m "feat: my feature"
git push
License
Camunda License 1.0 - See LICENSE file for details.