Giter Site home page Giter Site logo

mattmezza / vue-beautiful-chat Goto Github PK

View Code? Open in Web Editor NEW
1.4K 33.0 432.0 4.03 MB

A simple and beautiful Vue chat component backend agnostic, fully customisable and extendable.

Home Page: https://matteo.merola.co/vue-beautiful-chat/

License: MIT License

JavaScript 18.70% Vue 81.30%
vue chat vuejs frontend message support colors marketing customer-support

vue-beautiful-chat's Introduction

vue-beautiful-chat

vue-beautiful-chat provides an intercom-like chat window that can be included easily in any project for free. It provides no messaging facilities, only the view component.

vue-beautiful-chat is porting to vue of react-beautiful-chat (which you can find here)

Go to FAQ ⬇️

gif

Features

  • Customizeable
  • Backend agnostic
  • Free

Table of Contents

Installation

$ yarn add vue-beautiful-chat

Example

import Chat from 'vue-beautiful-chat'
Vue.use(Chat)
<template>
  <div>
    <beautiful-chat
      :participants="participants"
      :titleImageUrl="titleImageUrl"
      :onMessageWasSent="onMessageWasSent"
      :messageList="messageList"
      :newMessagesCount="newMessagesCount"
      :isOpen="isChatOpen"
      :close="closeChat"
      :icons="icons"
      :open="openChat"
      :showEmoji="true"
      :showFile="true"
      :showEdition="true"
      :showDeletion="true"
      :showTypingIndicator="showTypingIndicator"
      :showLauncher="true"
      :showCloseButton="true"
      :colors="colors"
      :alwaysScrollToBottom="alwaysScrollToBottom"
      :disableUserListToggle="false"
      :messageStyling="messageStyling"
      @onType="handleOnType"
      @edit="editMessage" />
  </div>
</template>
export default {
  name: 'app',
  data() {
    return {
      participants: [
        {
          id: 'user1',
          name: 'Matteo',
          imageUrl: 'https://avatars3.githubusercontent.com/u/1915989?s=230&v=4'
        },
        {
          id: 'user2',
          name: 'Support',
          imageUrl: 'https://avatars3.githubusercontent.com/u/37018832?s=200&v=4'
        }
      ], // the list of all the participant of the conversation. `name` is the user name, `id` is used to establish the author of a message, `imageUrl` is supposed to be the user avatar.
      titleImageUrl: 'https://a.slack-edge.com/66f9/img/avatars-teams/ava_0001-34.png',
      messageList: [
          { type: 'text', author: `me`, data: { text: `Say yes!` } },
          { type: 'text', author: `user1`, data: { text: `No.` } }
      ], // the list of the messages to show, can be paginated and adjusted dynamically
      newMessagesCount: 0,
      isChatOpen: false, // to determine whether the chat window should be open or closed
      showTypingIndicator: '', // when set to a value matching the participant.id it shows the typing indicator for the specific user
      colors: {
        header: {
          bg: '#4e8cff',
          text: '#ffffff'
        },
        launcher: {
          bg: '#4e8cff'
        },
        messageList: {
          bg: '#ffffff'
        },
        sentMessage: {
          bg: '#4e8cff',
          text: '#ffffff'
        },
        receivedMessage: {
          bg: '#eaeaea',
          text: '#222222'
        },
        userInput: {
          bg: '#f4f7f9',
          text: '#565867'
        }
      }, // specifies the color scheme for the component
      alwaysScrollToBottom: false, // when set to true always scrolls the chat to the bottom when new events are in (new message, user starts typing...)
      messageStyling: true // enables *bold* /emph/ _underline_ and such (more info at github.com/mattezza/msgdown)
    }
  },
  methods: {
    sendMessage (text) {
      if (text.length > 0) {
        this.newMessagesCount = this.isChatOpen ? this.newMessagesCount : this.newMessagesCount + 1
        this.onMessageWasSent({ author: 'support', type: 'text', data: { text } })
      }
    },
    onMessageWasSent (message) {
      // called when the user sends a message
      this.messageList = [ ...this.messageList, message ]
    },
    openChat () {
      // called when the user clicks on the fab button to open the chat
      this.isChatOpen = true
      this.newMessagesCount = 0
    },
    closeChat () {
      // called when the user clicks on the botton to close the chat
      this.isChatOpen = false
    },
    handleScrollToTop () {
      // called when the user scrolls message list to top
      // leverage pagination for loading another page of messages
    },
    handleOnType () {
      console.log('Emit typing event')
    },
    editMessage(message){
      const m = this.messageList.find(m=>m.id === message.id);
      m.isEdited = true;
      m.data.text = message.data.text;
    }
  }
}

For more detailed examples see the demo folder.

Components

Launcher

Launcher is the only component needed to use vue-beautiful-chat. It will react dynamically to changes in messages. All new messages must be added via a change in props as shown in the example.

Props

prop type description
*participants [agentProfile] Represents your product or service's customer service agents. Fields for each agent: id, name, imageUrl
*onMessageWasSent function(message) Called when a message is sent with the message object as an argument.
*isOpen Boolean The bool indicating whether or not the chat window should be open.
*open Function The function passed to the component that mutates the above mentioned bool toggle for opening the chat
*close Function The function passed to the component that mutates the above mentioned bool toggle for closing the chat
messageList [message] An array of message objects to be rendered as a conversation.
showEmoji Boolean A bool indicating whether or not to show the emoji button
showFile Boolean A bool indicating whether or not to show the file chooser button
showDeletion Boolean A bool indicating whether or not to show the edit button for a message
showEdition Boolean A bool indicating whether or not to show the delete button for a message
showTypingIndicator String A string that can be set to a user's participant.id to show typing indicator for them
showHeader Boolean A bool indicating whether or not to show the header of chatwindow
disableUserListToggle Boolean A bool indicating whether or not to allow the user to toggle between message list and participants list
colors Object An object containing the specs of the colors used to paint the component. See here
messageStyling Boolean A bool indicating whether or not to enable msgdown support for message formatting in chat. See here

Events

event params description
onType undefined Fires when user types on the message input
edit message Fires after user edited message

Slots

header

Replacing default header.

<template v-slot:header>
  🤔 Good chat between {{participants.map(m=>m.name).join(' & ')}}
</template>
user-avatar

Replacing user avatar. Params: message, user

<template v-slot:user-avatar="{ message, user }">
  <div style="border-radius:50%; color: pink; font-size: 15px; line-height:25px; text-align:center;background: tomato; width: 25px !important; height: 25px !important; min-width: 30px;min-height: 30px;margin: 5px; font-weight:bold" v-if="message.type === 'text' && user && user.name">
    {{user.name.toUpperCase()[0]}}
  </div>
</template>
text-message-body

Change markdown for text message. Params: message

<template v-slot:text-message-body="{ message }">
  <small style="background:red" v-if="message.meta">
    {{message.meta}}
  </small>
  {{message.text}}
</template>
system-message-body

Change markdown for system message. Params: message

<template v-slot:system-message-body="{ message }">
  [System]: {{message.text}}
</template>

Message Objects

Message objects are rendered differently depending on their type. Currently, only text, emoji and file types are supported. Each message object has an author field which can have the value 'me' or the id of the corresponding agent.

{
  author: 'support',
  type: 'text',
  id: 1, // or text '1'
  isEdited: false,
  data: {
    text: 'some text',
    meta: '06-16-2019 12:43'
  }
}

{
  author: 'me',
  type: 'emoji',
  id: 1, // or text '1'
  isEdited: false,
  data: {
    code: 'someCode'
  }
}

{
  author: 'me',
  type: 'file',
  id: 1, // or text '1'
  isEdited: false,
  data: {
    file: {
      name: 'file.mp3',
      url: 'https:123.rf/file.mp3'
    }
  }
}

Quick replies

When sending a message, you can provide a set of sentences that will be displayed in the user chat as quick replies. Adding in the message object a suggestions field with the value an array of strings will trigger this functionality

{
  author: 'support',
  type: 'text',
  id: 1, // or text '1'
  data: {
    text: 'some text',
    meta: '06-16-2019 12:43'
  },
  suggestions: ['some quick reply', ..., 'another one']
}

FAQ

How to get the demo working?

git clone [email protected]:mattmezza/vue-beautiful-chat.git
cd vue-beautiful-chat
yarn install  # this installs the package dependencies
yarn watch  # this watches files to continuously compile them

Open a new shell in the same folder

cd demo
yarn install # this installs the demo dependencies
yarn dev # this starts the dev server at http://localhost:8080

How can I add a feature or fix a bug?

  • Fork the repository
  • Fix/add your changes
  • yarn build on the root to have the library compiled with your latest changes
  • create a pull request describing what you did
  • discuss the changes with the maintainer
  • boom! your changes are added to the main repo
  • a release is created almost once per week 😉

How can I customize the colors?

  • When initializing the component, pass an object specifying the colors used:
let redColors = {
  header: {
    bg: '#D32F2F',
    text: '#fff'
  },
  launcher: {
    bg: '#D32F2F'
  },
  messageList: {
    bg: '#fff'
  },
  sentMessage: {
    bg: '#F44336',
    text: '#fff'
  },
  receivedMessage: {
    bg: '#eaeaea',
    text: '#222222'
  },
  userInput: {
    bg: '#fff',
    text: '#212121'
  }
}
<beautiful-chat
  ...
  :colors="redColors" />

This is the red variant. Please check this file for the list of variants shown in the demo page online.

Please note that you need to pass an Object containing each one of the color properties otherwise the validation will fail.

How can I add message formatting?

Good news, message formatting is already added for you. You can enable it by setting messageStyling to true and you will be using the msgdown library. You can enable/disable the formatting support at any time, or you can let users do it whenever they prefer.

Contributors

@a-kriya, @mattmezza

Please contact us if you would like to join as a contributor.

vue-beautiful-chat's People

Contributors

3sne avatar a-kriya avatar andreav avatar arabakevin avatar coyotte508 avatar cristidrg avatar crowdforge-io avatar danpatpang avatar dependabot[bot] avatar diadal avatar hotspurhn avatar javiermartinz avatar jericopulvera avatar jessevanmuijden avatar leonorader avatar mattmezza avatar mcabrera-contenta avatar mskrzypietz avatar nros avatar paulrolland68 avatar re2005 avatar rtj avatar senky avatar sk8killer avatar stranger26 avatar yoshihide-nishimoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-beautiful-chat's Issues

Redefine websocket URL

Hi,
I would like to know if is possible define a different URL to websocket connect to? At least, a different path on same server?

Thanks

Redesign timestamps to messages

Feature Request

As a user I want to know when a message was sent. Therefore it would be pretty cool if we could add a timestamp (like any other messenger) to each message. This option could be optional.

How could it look like?

Could be something simple like just a timestamp

It's me again, would be so cool if we could get this feature!

(!) Double critical issue in TextMessage.vue

  1. Last autolinker feature changes breaks displaying of messsage.data.meta information.
    Used v-html directive deletes all data in div.sc-message--text which holds a paragraph with meta data

  2. Passing a user input to v-html very dangerous because of XSS
    As mentioned in gregjacobs/Autolinker.js#197 autolinker do nothing with dangerous user input. So vue-beatiful-chat is in the risk zone too, because you also not escape user input

Message allowing Empty message

Great job for providing this great library 💪
I realised that sending empty message goes through to the message history/bubble. Is it allowed intentionally? I'll be glad to know what you think.

Steps to reproduce:
click the input box, press space and next press enter. The message is added to the message list.

This does the same in demo.

Perhaps before sending message, trim() method could be used on the message to ensure its not empty.

Dist folder in git repo

Having the dist folder in the git repo - and not in .gitignore - makes the repo history a lot heavier than it has to, with the bundled dist files being overwritten every commit.

It's also harder to contribute, because an ongoing PR will have a new conflict popping up everytime a commit is added on the main branch. And each merge will need to run yarn build.

An alternative is to add the dist folder to .gitignore, and add a prepublishOnly script: "prepublishOnly": "yarn build" to automatically build when publishing.

add lock scroll to bottom to demo

Version 1.4.0 adds the alwaysScrollToBottom config. It would be nice to put a kind of UI control that lets the user choose whether to always scroll to the bottom when message list is updated.

add new message indicator when chat is open

Version 1.4.0 introduces a new config for avoid scrolling to bottom when new messages come in. IN this case user might not realize that a new message came in.

It would be great to show some kind of UI label telling the user that he got new messages (maybe with a link to scroll to the bottom to read those messages).

Url media discovery

If the message is just a plain url, try to understand the kind of media to show.

e.g.:

  • If youtube link then show the video preview
  • if image link then show image preview
  • ...

File Upload Problem

When i sending an file its sending as file message but not actually attaching the data in file object. Screenshots shown below.
Vue dev tool showing this.
screenshot_2
Also browser network inspect showing this on ajax request from onMessageWasSent(msg).
screenshot_3
Can you please see this, am i doing any mistakes ?

Allow user to define images path

When I build my app that uses vue-beautiful-chat, images are exported. But since final URL is always different in different environments, I need to change path of the images. I propose adding new prop imagesPath which will be set to ./ by default but can be changed on the go.

Support for quick replies

It would be nice if there could be "quick reply" support to allow the user to select a pre-configured reply without typing.

For example, how facebook does it:
quick-reply

Loading older messages is problematic

MessageList listens on update to scroll to bottom. This is great when you add new message, but common practice is when you scroll to very top, chat should load older messages. This itself is problematic, because MessageList doesn't expose any onScroll method. But I hacked this using document.querySelector('.sc-message-list'). So now I am able to load older messages, but as soon as I prepend them to messageList, chat itself scrolls to bottom which is undesired. Any idea how to handle this?

example is wrong?

Hello.
I am a beginner programmer.
I think example may be wrong.

In sendmessage
method, "text.length > 0" would be "msg.length > 0", wouldn't be?
I hope you can check.

Thank you.

Installation not working

While the installation : yarn add
You have this message:

warning " > [email protected]" has unmet peer dependency "webpack@2 || 3 || 4".

In main.js we add:
import Chat from 'vue-beautiful-chat'
Vue.use(Chat)

We go in the view: Can not find module vue-beautiful-chat

Sender name? Add author username to received messages

Thank you very much for this great nice looking component. I´m sorry, if i miss something obvious, but how do i show the user which person sent the message?

Author can contain only me and them. I´d like to set author with the user name and show it in the chat box beside the message.

thanks

Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "E:\\Tutoria

I got error when I run.
ERROR in ./src/main.js
Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "E:\Tutorial\vue\vue-beautiful-chat\.babelrc" at 0, attempted to resolve relative to "E:\Tutorial\vue\vue-beautiful-chat"
at E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:17
at Array.map ()
at Function.normalisePlugins (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
at OptionManager.init (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
at File.initOptions (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\index.js:212:65)
at new File (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\file\index.js:135:24)
at Pipeline.transform (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
at transpile (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-loader\lib\index.js:46:20)
at Object.module.exports (E:\Tutorial\vue\vue-beautiful-chat\demo\node_modules\babel-loader\lib\index.js:163:20)
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

vue 2.5.16 babel-preset-env error

After create new vue app and run npm run serve I got this:

in ./node_modules/vue-beautiful-chat/src/Launcher.vue

Module build failed: Error: Cannot find module 'babel-preset-env' from '/Users/bonekost/JsProjects/vue-chat/node_modules/vue-beautiful-chat'
- Did you mean "@babel/env"?
...
 @ ./node_modules/vue-beautiful-chat/src/Launcher.vue 7:0-204 8:0-217
 @ ./node_modules/vue-beautiful-chat/src/index.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client/index.js (webpack)/hot/dev-server.js ./src/main.js

package.json

{
  "name": "vue-chat",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve --open",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "vue": "^2.5.13",
    "vue-beautiful-chat": "^1.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.0.0-beta.6",
    "@vue/cli-plugin-eslint": "^3.0.0-beta.6",
    "@vue/cli-service": "^3.0.0-beta.6",
    "vue-template-compiler": "^2.5.13"
  },
  "babel": {
    "presets": [
      "@vue/app"
    ]
  },
  "eslintConfig": {
    "root": true,
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ]
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

main.js

import Vue from 'vue'
import App from './App.vue'
import Chat from 'vue-beautiful-chat'

Vue.use(Chat, {})

// eslint-disable-next-line
new Vue({
  el: '#app',
  render: h => h(App)
})

Feat : use chat in full page display (not "intercom-like" )

This is a feature request.
We would like to include the "vue-beautiful-chat" ressource in a full page view.
For this we would like to be able ro remove the pop-up / pop-out behaviour and the attached button.

The behaviour we would like to reproduce , is the one of a regular chat app like whatsap for example

IE11 issue

Hi Im using Vuejs + Vuetify + Vuex to develop a website.
Just wondering if anyone experienced Script1003: Expected ':' issue at IE11?

In my case, that is pointing to the emojiData.js.
Appreciate if you let me know if you have clues or suggestion.

// "./node_modules/vue-beautiful-chat/src/emojiData.js":
/
/ (function(module, webpack_exports, webpack_require) {

"use strict";
eval("/* harmony default export */ webpack_exports["a"] = ([\n {\n name: 'People',\n emojis: [\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '������',\n '✨',\n '�

Use events, instead of callbacks

Per Vue documentation, events are preferred over callbacks. I spent far too much time figuring out what each attribute was associated with. Props aren't supposed to be two-way, by convention. I know it's also a matter of preference, but I'd prefer not to check what the return type is. With events, we don't have that issue.

Support for color changes/theming

I saw this was being tracked as an enhancement in the React project, but it would be nice to have a hook to change the theme/colors of this window and messages.

Great libraries - great work! :)

VM1992:1 Uncaught SyntaxError: Unexpected identifier

after i added beautiful chat in to my vue js project , my appplication seems to be crashing with the following error:

VM1992:1 Uncaught SyntaxError: Unexpected identifier
at Object. (app.js:2316)
at webpack_require (app.js:556)
at fn (app.js:87)
at eval (eval at (app.js:1782), :27:25)
at Object. (app.js:1782)
at webpack_require (app.js:556)
at fn (app.js:87)
at Object. (app.js:587)
at webpack_require (app.js:556)
at app.js:579

what am i missing here?

File Download support

Please add download link on click file name , currently its showing hand tool but nothing happens

Version 2.1.0 - breaking due to error on msgdown

Just updated your package on my code. And I could build my project which was working just a few hours ago. I got the following error:

`ERROR in ./node_modules/msgdown/src/msgdown.js
Module parse failed: app/node_modules/msgdown/src/msgdown.js Unexpected token (25:12)
You may need an appropriate loader to handle this file type.
|
| module.exports = (text, tokens = defaultTokens) => {
| tokens = {...defaultTokens, ...tokens}
| const appendDefault = () => {
| html += text[index]
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-beautiful-chat/src/TextMessage.vue 17:10-28
@ ./node_modules/vue-beautiful-chat/src/TextMessage.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-beautiful-chat/src/Message.vue
@ ./node_modules/vue-beautiful-chat/src/Message.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-beautiful-chat/src/MessageList.vue
@ ./node_modules/vue-beautiful-chat/src/MessageList.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-beautiful-chat/src/ChatWindow.vue
@ ./node_modules/vue-beautiful-chat/src/ChatWindow.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-beautiful-chat/src/Launcher.vue
@ ./node_modules/vue-beautiful-chat/src/Launcher.vue
@ ./node_modules/vue-beautiful-chat/src/index.js
@ ./src/main.js

ERROR in static/js/vendor.5b188cd0995974f1a58f.js from UglifyJs
Unexpected token: punc (() [./node_modules/vue-beautiful-chat/src/index.js:7,0][static/js/vendor.5b188cd0995974f1a58f.js:78913,10]`

I fixed the problem by downgrading to version 2.0.0

Multiple users for group chat

I'd like to enable vue-beautiful-chat for multiple users. You can think of it as multiple support agents, although in my case it's more like multiple people in a game room.

I'm going to work this on my own fork and use it for my project. But it'd be awesome if it was merged in your repository.

How would you like the changes to look like?

I guess the possibility to use agentProfiles instead of agentProfile and add an optional id field to an agentProfile would work well enough? In the messages, in addition to 'me' or 'them', when there are multiple agent profiles the id of the agent profile could be used?

Multiple Chats

Are there any plans to support multiple different chats.

Like having thread list to select from.
And some UI to create a new thread or start a new direct conversation between two users?

add message styling

Would be nice to have the ability to send message with a lil bit of formatting like:

  • bold *bold*
  • italic /italic/
  • underline _underline_
  • line through ~line through~
  • code inline `var pippo = 0;`

[Feature Request] Add neutral info messages

Feature

Would be pretty cool if we could have a third source of messages which would be 'info' or something, to display generic information in the chat.

Example

image

PS: Very big fan of this repo! Keep up the good work!

Multi line message

Not sure if I'm doing something wrong,but looks it is not possible to display a multiple line message. The new line character seems to be ignored/removed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.