@cmnd-ai/chatbot-react 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { CustomStyles, InputFieldProps, SendButtonProps, UIFunctionArguments } from "../type.js";
|
|
3
|
-
import "../styles/index.css";
|
|
4
3
|
export interface ConversationProps {
|
|
5
4
|
messages: any[];
|
|
6
5
|
setMessages: Dispatch<SetStateAction<any[]>>;
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Chatbubble from "./Chatbubble.js";
|
|
3
3
|
import LoadingBubble from "./LoadingBubble.js";
|
|
4
4
|
import ChatInputBox from "./ChatInputBox.js";
|
|
5
|
-
import "../styles/index.css";
|
|
6
5
|
const Conversation = ({ messages, handleSendClick, isChatLoading, error, messagesRef, enabledTools, postSessionMessage, setMessages, setChatbotConversationId, setIsChatLoading, setCanSendMessage, scrollToBottom, canSendMessage, setInput, input, Components, UITools, customStyles, }) => {
|
|
7
6
|
return (_jsxs("div", { className: "cmnd-conversations", children: [_jsxs("div", { ref: messagesRef, id: "messages", className: "cmnd-conversations-messages", children: [error, messages.map((m, i) => (_jsx(Chatbubble, { customStyles: customStyles, hide: m.hiddenFromUser, message: m.message, role: m.role, toolCallDetails: m.tool, tools: enabledTools, postSessionMessage: postSessionMessage, messages: messages, setMessages: setMessages, id: m.id, setChatbotConversationId: setChatbotConversationId, setIsChatLoading: setIsChatLoading, setCanSendMessage: setCanSendMessage, scrollToBottom: scrollToBottom, UITools: UITools }, i))), isChatLoading ? _jsx(LoadingBubble, { customStyles: customStyles }) : null] }), _jsxs("div", { id: "cmnd-input-div", className: "cmnd-input-div", children: [Components?.InputField ? (_jsx(Components.InputField, { ...{ input, setInput, canSendMessage, handleSendClick } })) : (_jsx(ChatInputBox, { input: input, setInput: setInput, handleSendClick: handleSendClick })), Components?.SendButton ? (_jsx(Components.SendButton, { ...{
|
|
8
7
|
canSendMessage,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import "./styles/index.css";
|
|
1
2
|
export { default as ChatProvider } from "./ChatProvider/index.js";
|
|
2
3
|
export { default as useChatContext } from "./ChatProvider/useChatContext.js";
|
|
3
|
-
export { CmndChatContext, InputFieldProps, SendButtonProps, CustomStyles
|
|
4
|
+
export { CmndChatContext, InputFieldProps, SendButtonProps, CustomStyles } from "./type.js";
|
|
4
5
|
export { default as CmndChatBot } from "./CmndChatBot/index.js";
|
package/dist/index.js
CHANGED
package/dist/styles/index.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmnd-ai/chatbot-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc && npm run copy-css",
|
|
15
15
|
"copy-css": "mkdir -p dist/styles && cp src/styles/index.css dist/styles/index.css",
|
|
16
|
-
"dev": "tsc -w",
|
|
16
|
+
"dev": "npm run copy-css && tsc -w",
|
|
17
17
|
"prepublishOnly": "npm run build",
|
|
18
18
|
"semantic-release": "semantic-release"
|
|
19
19
|
},
|