Skip to content

About

Repository which contains reusable components Cognigy uses in order to render chat histories.

Topics

Resources

Accessibility

Stars

1 star

Watchers

10 watching

Forks

Latest commit

 

History

1,173 Commits

Folders and files

Repository files navigation

ESLint Accessibility

Chat Components

This repository contains reusable components Cognigy uses in various of their products in order to render chat-messages such as:

  • text messages
  • galleries
  • quick replies
  • buttons
  • images

and much more. We aim to use these components in various products such as:

  • Cognigy.AI - as part of our Interaction Panel
  • Cognigy Insights - as part of the Transcript Explorer
  • Cognigy Live Agent - in order to render the Chat history
  • Webchat v3 - our new Webchat Widget

Develop

npm run dev

npm run test:watch

To inspect progressive Markdown rendering, open the dev server's /#streaming-messages tab (usually http://localhost:5173/#streaming-messages). Choose an example or enter your own Markdown, then select Replay streaming. It sends eight-character chunks every 250 ms with Markdown and progressive rendering enabled; watch the message while it arrives and compare its finished output with the editor. The existing message examples appear below the replay controls. The former /#streaming-markdown-lab URL also opens this tab.

To test in local Webchat v3 build:

  1. In /chat-components run npm ci && npm pack
  2. In /Webchat folder run npm i with the correct relative path and file name, e.g. npm i ../chat-components/cognigy-chat-components-0.36.1.tgz

Release

npm version patch or npm version minor

It will bump the version in package.json, commit it and create a git tag.

Push the changes to the GitHub and create a PR.

If the bump fails the dom-compat "FIX_VERSION" guard test, the skip block in test/dom-compat.spec.tsx expects a different release number — see docs/accessibility.md.

After the PR is merged:

git push --tags

This will trigger the GitHub Action to create a release on GitHub and will publish the package to npm.

Both release.yml and publish.yml trigger on the tag push itself. Creating a GitHub release by hand does not publish to npm — if a publish run fails, re-run it against the existing tag instead:

gh workflow run publish.yml --ref <tag>

Dispatch against a tag ref (e.g. v1.2.3), never a branch. Publishing is guarded to refs/tags/v* and will skip on anything else.

About

Repository which contains reusable components Cognigy uses in order to render chat histories.

Topics

Resources

Accessibility

Stars

1 star

Watchers

10 watching

Forks

Releases

Packages

Used by

Contributors

Languages