@servicetitan/titan-chat-ui 3.2.1 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # v4.0.0 (Fri Sep 19 2025)
2
+
3
+ #### 💥 Breaking Change
4
+
5
+ - Bump cypress from 14.3.3 to 15.2.0 [#55](https://github.com/servicetitan/titan-chatbot-client/pull/55) ([@dependabot[bot]](https://github.com/dependabot[bot]))
6
+
7
+ #### 🚀 Enhancement
8
+
9
+ - SPA-7400: Rebrand Support Chatbot to Atlas [#56](https://github.com/servicetitan/titan-chatbot-client/pull/56) ([@AlexYarmolchuk](https://github.com/AlexYarmolchuk))
10
+
11
+ #### Authors: 2
12
+
13
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
14
+ - Alexandr Yarmolchuk ([@AlexYarmolchuk](https://github.com/AlexYarmolchuk))
15
+
16
+ ---
17
+
1
18
  # v3.2.1 (Tue Sep 09 2025)
2
19
 
3
20
  #### 🐛 Bug Fix
@@ -0,0 +1,95 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_14694_37355)">
3
+ <path d="M2.76947 11.999V35.9984L23.9992 47.9981L45.2289 35.9984V11.999L23.9992 -0.000732422L2.76947 11.999Z" fill="url(#paint0_linear_14694_37355)"/>
4
+ <g style="mix-blend-mode:overlay">
5
+ <path d="M2.77045 35.999L11.8311 30.8767L2.77045 23.9993V35.999Z" fill="url(#paint1_linear_14694_37355)"/>
6
+ <path d="M45.2304 11.9993L36.1697 17.1215L45.2304 23.999V11.9993Z" fill="url(#paint2_linear_14694_37355)"/>
7
+ <path d="M23.9991 48.0002V37.7571L13.3842 42.001L23.9991 48.0002Z" fill="url(#paint3_linear_14694_37355)"/>
8
+ <path d="M23.9995 -0.000732422V10.2424L34.6144 5.99841L23.9995 -0.000732422Z" fill="url(#paint4_linear_14694_37355)"/>
9
+ <path d="M45.2311 36.0004L36.1705 30.8782L34.6162 42.001L45.2311 36.0004Z" fill="url(#paint5_linear_14694_37355)"/>
10
+ <path d="M2.77045 11.9998L11.8311 17.1221L13.3853 5.99927L2.77045 11.9998Z" fill="url(#paint6_linear_14694_37355)"/>
11
+ </g>
12
+ <g style="mix-blend-mode:overlay">
13
+ <path d="M2.77045 11.9993L11.8311 17.1215L2.77045 23.999V11.9993Z" fill="url(#paint7_linear_14694_37355)"/>
14
+ <path d="M45.2304 35.999L36.1697 30.8767L45.2304 23.9993V35.999Z" fill="url(#paint8_linear_14694_37355)"/>
15
+ <path d="M2.7702 36.0008L11.8308 30.8785L13.3851 42.0013L2.7702 36.0008Z" fill="url(#paint9_linear_14694_37355)"/>
16
+ <path d="M45.2311 11.9998L36.1705 17.1221L34.6162 5.99927L45.2311 11.9998Z" fill="url(#paint10_linear_14694_37355)"/>
17
+ <path d="M23.9995 48.0002V37.7571L34.6144 42.001L23.9995 48.0002Z" fill="url(#paint11_linear_14694_37355)"/>
18
+ <path d="M23.9988 -0.000732422V10.2424L13.384 5.99841L23.9988 -0.000732422Z" fill="url(#paint12_linear_14694_37355)"/>
19
+ </g>
20
+ <path opacity="0.66" d="M32.1114 10.2473H15.8869L7.7746 24.0036L15.8869 37.76H32.1114L40.2236 24.0036L32.1114 10.2473Z" fill="white"/>
21
+ <path d="M11.8309 17.1262V30.8811L24 37.76L36.1691 30.8811V17.1262L24 10.2473L11.8309 17.1262Z" fill="white"/>
22
+ <path d="M24.0009 13.3647L26.8825 21.1806L34.866 24.0004L26.8825 26.8216L24.0009 34.6375L21.1207 26.8216L13.1372 24.0004L21.1207 21.1806L24.0009 13.3647Z" fill="url(#paint13_linear_14694_37355)"/>
23
+ <path d="M13.1378 23.9995H24.0014V34.6352L21.1212 26.8192L13.1378 23.9995Z" fill="url(#paint14_linear_14694_37355)"/>
24
+ <path d="M34.8657 24.0004H24.0021V13.3647L26.8823 21.1807L34.8657 24.0004Z" fill="url(#paint15_linear_14694_37355)"/>
25
+ </g>
26
+ <defs>
27
+ <linearGradient id="paint0_linear_14694_37355" x1="2.76947" y1="23.9987" x2="45.2289" y2="23.9987" gradientUnits="userSpaceOnUse">
28
+ <stop stop-color="#2F6CDB"/>
29
+ <stop offset="1" stop-color="#55AAE7"/>
30
+ </linearGradient>
31
+ <linearGradient id="paint1_linear_14694_37355" x1="28.7112" y1="-6.03654" x2="-21.5772" y2="75.9966" gradientUnits="userSpaceOnUse">
32
+ <stop stop-color="#4357B5"/>
33
+ <stop offset="1" stop-color="#2E6BD3"/>
34
+ </linearGradient>
35
+ <linearGradient id="paint2_linear_14694_37355" x1="49.5433" y1="6.73372" x2="-0.746622" y2="88.7655" gradientUnits="userSpaceOnUse">
36
+ <stop stop-color="#4357B5"/>
37
+ <stop offset="1" stop-color="#2E6BD3"/>
38
+ </linearGradient>
39
+ <linearGradient id="paint3_linear_14694_37355" x1="44.9624" y1="3.92721" x2="-5.32747" y2="85.9604" gradientUnits="userSpaceOnUse">
40
+ <stop stop-color="#4357B5"/>
41
+ <stop offset="1" stop-color="#2E6BD3"/>
42
+ </linearGradient>
43
+ <linearGradient id="paint4_linear_14694_37355" x1="33.2914" y1="-3.23027" x2="-16.9986" y2="78.803" gradientUnits="userSpaceOnUse">
44
+ <stop stop-color="#4357B5"/>
45
+ <stop offset="1" stop-color="#2E6BD3"/>
46
+ </linearGradient>
47
+ <linearGradient id="paint5_linear_14694_37355" x1="55.461" y1="10.3619" x2="5.17111" y2="92.3951" gradientUnits="userSpaceOnUse">
48
+ <stop stop-color="#4357B5"/>
49
+ <stop offset="1" stop-color="#2E6BD3"/>
50
+ </linearGradient>
51
+ <linearGradient id="paint6_linear_14694_37355" x1="22.7942" y1="-9.66412" x2="-27.4942" y2="72.3691" gradientUnits="userSpaceOnUse">
52
+ <stop stop-color="#4357B5"/>
53
+ <stop offset="1" stop-color="#2E6BD3"/>
54
+ </linearGradient>
55
+ <linearGradient id="paint7_linear_14694_37355" x1="9.87142" y1="21.6635" x2="0.296576" y2="16.5084" gradientUnits="userSpaceOnUse">
56
+ <stop stop-color="#2E6BD3"/>
57
+ <stop offset="1" stop-color="#2F044D"/>
58
+ </linearGradient>
59
+ <linearGradient id="paint8_linear_14694_37355" x1="39.4934" y1="26.968" x2="47.6416" y2="31.4596" gradientUnits="userSpaceOnUse">
60
+ <stop stop-color="#2E6BD3"/>
61
+ <stop offset="1" stop-color="#2F044D"/>
62
+ </linearGradient>
63
+ <linearGradient id="paint9_linear_14694_37355" x1="15.835" y1="34.8603" x2="5.21554" y2="40.2831" gradientUnits="userSpaceOnUse">
64
+ <stop stop-color="#2E6BD3"/>
65
+ <stop offset="1" stop-color="#2F044D"/>
66
+ </linearGradient>
67
+ <linearGradient id="paint10_linear_14694_37355" x1="33.8435" y1="12.3838" x2="42.8968" y2="7.36418" gradientUnits="userSpaceOnUse">
68
+ <stop stop-color="#2E6BD3"/>
69
+ <stop offset="1" stop-color="#2F044D"/>
70
+ </linearGradient>
71
+ <linearGradient id="paint11_linear_14694_37355" x1="29.3062" y1="36.7828" x2="29.3062" y2="47.8354" gradientUnits="userSpaceOnUse">
72
+ <stop stop-color="#2E6BD3"/>
73
+ <stop offset="1" stop-color="#2F044D"/>
74
+ </linearGradient>
75
+ <linearGradient id="paint12_linear_14694_37355" x1="18.6907" y1="11.8027" x2="18.6907" y2="0.631132" gradientUnits="userSpaceOnUse">
76
+ <stop stop-color="#2E6BD3"/>
77
+ <stop offset="1" stop-color="#2F044D"/>
78
+ </linearGradient>
79
+ <linearGradient id="paint13_linear_14694_37355" x1="24.0009" y1="13.6083" x2="24.0009" y2="34.2593" gradientUnits="userSpaceOnUse">
80
+ <stop stop-color="#2E6BD3"/>
81
+ <stop offset="1" stop-color="#2F044D"/>
82
+ </linearGradient>
83
+ <linearGradient id="paint14_linear_14694_37355" x1="17.7244" y1="30.4929" x2="22.4066" y2="23.6925" gradientUnits="userSpaceOnUse">
84
+ <stop stop-color="#2E6BD3"/>
85
+ <stop offset="1" stop-color="#2F044D"/>
86
+ </linearGradient>
87
+ <linearGradient id="paint15_linear_14694_37355" x1="29.4346" y1="23.8385" x2="29.4346" y2="17.9239" gradientUnits="userSpaceOnUse">
88
+ <stop stop-color="#2E6BD3"/>
89
+ <stop offset="1" stop-color="#2F044D"/>
90
+ </linearGradient>
91
+ <clipPath id="clip0_14694_37355">
92
+ <rect width="48" height="48" fill="white"/>
93
+ </clipPath>
94
+ </defs>
95
+ </svg>
@@ -1 +1 @@
1
- {"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-input.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAe,EAAE,EAAuD,MAAM,OAAO,CAAC;AAM7F,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CA2IhD,CAAC"}
1
+ {"version":3,"file":"chat-input.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-input.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAe,EAAE,EAAuD,MAAM,OAAO,CAAC;AAM7F,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CA4IhD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Form, FormTextArea } from '@servicetitan/design-system';
3
3
  import { provide, useDependencies } from '@servicetitan/react-ioc';
4
- import { CHAT_UI_STORE_TOKEN } from '@servicetitan/titan-chat-ui-common';
4
+ import { CHAT_UI_STORE_TOKEN, useCustomizationChat } from '@servicetitan/titan-chat-ui-common';
5
5
  import classNames from 'classnames';
6
6
  import { observer } from 'mobx-react';
7
7
  import { useCallback, useEffect, useRef, useState } from 'react';
@@ -11,6 +11,8 @@ const TIMEOUT_COOLDOWN_MS = 3000;
11
11
  export const ChatInput = provide({
12
12
  singletons: [ChatInputStore],
13
13
  })(observer(({ className }) => {
14
+ var _a, _b;
15
+ const customization = useCustomizationChat();
14
16
  const typingTimeoutRef = useRef(undefined);
15
17
  const [isSending, setIsSending] = useState(false);
16
18
  const textareaRef = useRef(null);
@@ -81,7 +83,7 @@ export const ChatInput = provide({
81
83
  textareaRef.current.focus();
82
84
  }
83
85
  }, []);
84
- return (_jsx(Form, { className: classNames(className), onSubmit: handleSendMessage, children: _jsxs("div", { className: classNames('d-f flex-row gap-2'), children: [_jsx(FormTextArea, { ref: textareaRef, name: "question", placeholder: "Type your message", rows: 1, maxRows: 2, autoHeight: true, onKeyPress: handleTextKeyPress, value: supportChatInputStore.formState.$.message.value, error: supportChatInputStore.formState.$.message.error, onChange: (e) => {
86
+ return (_jsx(Form, { className: classNames(className), onSubmit: handleSendMessage, children: _jsxs("div", { className: classNames('d-f flex-row gap-2'), children: [_jsx(FormTextArea, { ref: textareaRef, name: "question", placeholder: (_b = (_a = customization.input) === null || _a === void 0 ? void 0 : _a.placeholderText) !== null && _b !== void 0 ? _b : 'Type your message', rows: 1, maxRows: 2, autoHeight: true, onKeyPress: handleTextKeyPress, value: supportChatInputStore.formState.$.message.value, error: supportChatInputStore.formState.$.message.error, onChange: (e) => {
85
87
  supportChatInputStore.formState.$.message.onChange(e.currentTarget.value);
86
88
  }, onFocus: () => {
87
89
  setTimeout(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"chat-input.js","sourceRoot":"","sources":["../../../src/components/chat/chat-input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA8B,WAAW,EAAE,SAAS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an/react-ioc';
3
- import { CHAT_UI_STORE_TOKEN } from '@servicetitan/titan-chat-ui-common';
3
+ import { CHAT_UI_STORE_TOKEN, useCustomizationChat } from '@servicetitan/titan-chat-ui-common';
4
4
  import { observer } from 'mobx-react';
5
5
  import { MessageTyping } from '../messages/message-typing';
6
6
  import { useAvatarProps } from '../messages/use-avatar-props';
7
7
  export const ChatMessageTyping = observer(() => {
8
8
  var _a, _b;
9
- const [chatUiStore] = useDependencies(CHAT_UI_STORE_TOKEN);
9
+ const customization = useCustomizationChat();
10
10
  const [{ agent: { icon, name }, },] = useDependencies(CHAT_UI_STORE_TOKEN);
11
11
  const avatar = useAvatarProps(name, icon);
12
- const Component = (_b = (_a = chatUiStore.customizations.messageTyping) === null || _a === void 0 ? void 0 : _a.component) !== null && _b !== void 0 ? _b : MessageTyping;
12
+ const Component = (_b = (_a = customization.messageTyping) === null || _a === void 0 ? void 0 : _a.component) !== null && _b !== void 0 ? _b : MessageTyping;
13
13
  return _jsx(Component, { avatar: avatar });
14
14
  });
15
15
  //# sourceMappingURL=chat-message-typing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-typing.js","sourceRoot":"","sources":["../../../src/components/chat/chat-message-typing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAO,QAAQ,CAAC,GAAG,EAAE;;IAC/C,MAAM,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAC3D,MAAM,CACF,EACI,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GACxB,EACJ,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,MAAA,MAAA,WAAW,CAAC,cAAc,CAAC,aAAa,0CAAE,SAAS,mCAAI,aAAa,CAAC;IAEvF,OAAO,KAAC,SAAS,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;AACzC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"chat-message-typing.js","sourceRoot":"","sources":["../../../src/components/chat/chat-message-typing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAO,QAAQ,CAAC,GAAG,EAAE;;IAC/C,MAAM,aAAa,GAAG,oBAAoB,EAAE,CAAC;IAC7C,MAAM,CACF,EACI,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GACxB,EACJ,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,MAAA,MAAA,aAAa,CAAC,aAAa,0CAAE,SAAS,mCAAI,aAAa,CAAC;IAE1E,OAAO,KAAC,SAAS,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;AACzC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKH,iBAAiB,EACpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMzD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CA+D7C,CAAC"}
1
+ {"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"AACA,OAAO,EAIH,iBAAiB,EAEpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMzD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CA8D7C,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { BodyText } from '@servicetitan/design-system';
3
- import { useDependencies } from '@servicetitan/react-ioc';
4
- import { CHAT_UI_STORE_TOKEN, } from '@servicetitan/titan-chat-ui-common';
3
+ import { useCustomizationChat, } from '@servicetitan/titan-chat-ui-common';
5
4
  import { observer } from 'mobx-react';
6
5
  import { MessageContentFile } from '../message-content/message-content-file';
7
6
  import { MessageContentText } from '../message-content/message-content-text';
@@ -12,10 +11,9 @@ import { ChatMessageTemplateUser } from './chat-message-template-user';
12
11
  * components and templates/customizations rendering
13
12
  */
14
13
  export const ChatMessage = observer(({ message, omitAvatar, omitTimestamp }) => {
15
- const [chatUiStore] = useDependencies(CHAT_UI_STORE_TOKEN);
16
- const isAgent = message.participant.isAgent;
17
- const { messageTemplates, messages } = chatUiStore.customizations;
14
+ const { messageTemplates, messages } = useCustomizationChat();
18
15
  const messageCustomization = messages === null || messages === void 0 ? void 0 : messages.find(c => c.predicate(message));
16
+ const isAgent = message.participant.isAgent;
19
17
  const isSystem = Boolean(messageCustomization === null || messageCustomization === void 0 ? void 0 : messageCustomization.isSystem);
20
18
  let messageContentNode;
21
19
  if (messageCustomization === null || messageCustomization === void 0 ? void 0 : messageCustomization.component) {
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message.js","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACH,mBAAmB,GAKtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAA0B,QAAQ,CACtD,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,EAAE;IACvC,MAAM,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAC5C,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC,cAAc,CAAC;IAClE,MAAM,oBAAoB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,QAAQ,CAAC,CAAC;IAEzD,IAAI,kBAAyC,CAAC;IAC9C,IAAI,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,SAAS,EAAE,CAAC;QAClC,kBA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AAE,IAAI,CAAC;QACxC,iBAAiB,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,CAAC,OAAO,CAAC;YAC5C,CAAC,CAAC,QAAQ,CAAC,SAAS;YACpB,CAAC,CAAC,uBAAuB,CAAC;IAClC,CAAC;IACD,OAAO,CACH,KAAC,iBAAiB,IACd,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,YAE3B,kBAAkB,GACH,CACvB,CAAC;AACN,CAAC,CACJ,CAAC"}
@@ -10,7 +10,7 @@ import { ChatInputFile } from './chat-input-file';
10
10
  import { ChatMessages } from './chat-messages';
11
11
  import { ChatNotifications } from './chat-notifications';
12
12
  export const Chat = observer(({ className, customizations }) => {
13
- var _a, _b;
13
+ var _a;
14
14
  const scrollRef = useRef(null);
15
15
  const [chatUiStore] = useDependencies(CHAT_UI_STORE_TOKEN);
16
16
  const footerComponent = customizations === null || customizations === void 0 ? void 0 : customizations.footerComponent;
@@ -25,6 +25,6 @@ export const Chat = observer(({ className, customizations }) => {
25
25
  }
26
26
  }, 0);
27
27
  }, [chatUiStore.scrollCounter]);
28
- return (_jsx(Stack, { direction: "column", className: className, "data-cy": "titan-chat", children: chatUiStore.isStarting ? ((loadingComponent !== null && loadingComponent !== void 0 ? loadingComponent : _jsx(ChatConnecting, { className: "p-x-3 p-y-2" }))) : (_jsxs(Fragment, { children: [_jsx("div", { ref: scrollRef, className: "p-x-3 p-y-2 flex-grow-1 of-y-auto", children: _jsx(ChatMessages, { messages: chatUiStore.messages, showTypingIndicator: chatUiStore.isAgentTyping }) }), _jsx(ChatNotifications, {}), !((_b = (_a = chatUiStore.customizations) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.isDisabled) && (_jsxs(Stack, { className: "p-x-3 p-y-2", direction: "column", spacing: "2", children: [_jsx(ChatInputFile, { className: "p-2 box-sizing-border-box border-radius-1 border border-style-dashed" }), _jsx(ChatInput, {}), Boolean(footerComponent) && footerComponent] }))] })) }));
28
+ return (_jsx(Stack, { direction: "column", className: className, "data-cy": "titan-chat", children: chatUiStore.isStarting ? ((loadingComponent !== null && loadingComponent !== void 0 ? loadingComponent : _jsx(ChatConnecting, { className: "p-x-3 p-y-2" }))) : (_jsxs(Fragment, { children: [_jsx("div", { ref: scrollRef, className: "p-x-3 p-y-2 flex-grow-1 of-y-auto", children: _jsx(ChatMessages, { messages: chatUiStore.messages, showTypingIndicator: chatUiStore.isAgentTyping }) }), _jsx(ChatNotifications, {}), !((_a = customizations === null || customizations === void 0 ? void 0 : customizations.input) === null || _a === void 0 ? void 0 : _a.isDisabled) && (_jsxs(Stack, { className: "p-x-3 p-y-2", direction: "column", spacing: "2", children: [_jsx(ChatInputFile, { className: "p-2 box-sizing-border-box border-radius-1 border border-style-dashed" }), _jsx(ChatInput, {}), Boolean(footerComponent) && footerComponent] }))] })) }));
29
29
  });
30
30
  //# sourceMappingURL=chat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../src/components/chat/chat.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAsB,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAM,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA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GAAG,aACzD,KAAC,aAAa,IAAC,SAAS,EAAC,sEAAsE,GAAG,EAClG,KAAC,SAAS,KAAG,EACZ,OAAO,CAAC,eAAe,CAAC,IAAI,eAAe,IACxC,CACX,IACM,CACd,GACG,CACX,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"message-avatar.d.ts","sourceRoot":"","sources":["../../../src/components/messages/message-avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,oCAAoC,CAAC;AAE1F,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,mBAAmB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,mBAAmB,CAuBjD,CAAC"}
1
+ {"version":3,"file":"message-avatar.d.ts","sourceRoot":"","sources":["../../../src/components/messages/message-avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,oCAAoC,CAAC;AAE1F,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,mBAAmB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,mBAAmB,CAyBjD,CAAC"}
@@ -8,9 +8,11 @@ export const MessageAvatar = ({ className, icon, name }) => {
8
8
  const isEmpty = icon === ChatParticipantIcon.Empty;
9
9
  const isInitials = icon === ChatParticipantIcon.Initials;
10
10
  const isBot = icon === ChatParticipantIcon.Bot;
11
+ const isAtlas = icon === ChatParticipantIcon.Atlas;
11
12
  const nameInitials = useMemo(() => getNameInitials(name), [name]);
12
13
  return (_jsx("div", { className: classNames('align-self-end', Styles.userIcon, {
13
14
  [Styles.bot]: isBot,
15
+ [Styles.atlas]: isAtlas,
14
16
  [Styles.system]: isEmpty,
15
17
  }, className), "data-cy": "titan-chat-avatar", "data-cy2": `titan-chat-avatar-${icon}`, children: _jsx(BodyText, { el: "span", children: isInitials ? nameInitials : null }) }));
16
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"message-avatar.js","sourceRoot":"","sources":["../../../src/components/messages/message-avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAM,OAAO,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAQvD,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;IAChF,MAAM,OAAO,GAAG,IAAI,KAAK,mBAAmB,CAAC,KAAK,CAAC;IACnD,MAAM,UAAU,GAAG,IAAI,KAAK,mBAAmB,CAAC,QAAQ,CAAC;IACzD,MAAM,KAAK,GAAG,IAAI,KAAK,mBAAmB,CAAC,GAAG,CAAC;IAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAElE,OAAO,CACH,cACI,SAAS,EAAE,UAAU,CACjB,gBAAgB,EAChB,MAAM,CAAC,QAAQ,EACf;YACI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK;YACnB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO;SAC3B,EACD,SAAS,CACZ,aACO,mBAAmB,cACjB,qBAAqB,IAAI,EAAE,YAErC,KAAC,QAAQ,IAAC,EAAE,EAAC,MAAM,Y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AE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,GAAY,GAC/D,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -18,6 +18,10 @@
18
18
  background-image: url('../../assets/floating-chat-avatar.svg');
19
19
  }
20
20
 
21
+ &.atlas {
22
+ background-image: url('../../assets/atlas-avatar.svg');
23
+ }
24
+
21
25
  &.system {
22
26
  min-height: @spacing-0;
23
27
  height: @spacing-0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/titan-chat-ui",
3
- "version": "3.2.1",
3
+ "version": "4.0.1",
4
4
  "description": "Chat experience UI package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "push:local": "yalc push"
18
18
  },
19
19
  "dependencies": {
20
- "@servicetitan/titan-chat-ui-common": "^3.2.1",
20
+ "@servicetitan/titan-chat-ui-common": "^4.0.1",
21
21
  "dompurify": "^3.2.6",
22
22
  "lodash": "4.17.21",
23
23
  "nanoid": "^5.1.5",
@@ -42,8 +42,8 @@
42
42
  "react-dom": ">=18"
43
43
  },
44
44
  "devDependencies": {
45
- "@servicetitan/cypress-shared": "^3.2.1",
46
- "cypress": "^14.3.2"
45
+ "@servicetitan/cypress-shared": "^4.0.1",
46
+ "cypress": "^15.2.0"
47
47
  },
48
48
  "keywords": [
49
49
  "ServiceTitan"
@@ -55,5 +55,5 @@
55
55
  "cli": {
56
56
  "webpack": false
57
57
  },
58
- "gitHead": "f6a97e29c801f2dd05627766056f9b6e9b2c2318"
58
+ "gitHead": "6c7d023e9833d328cd8537a95fc2740a9f09c046"
59
59
  }
@@ -0,0 +1,95 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_14694_37355)">
3
+ <path d="M2.76947 11.999V35.9984L23.9992 47.9981L45.2289 35.9984V11.999L23.9992 -0.000732422L2.76947 11.999Z" fill="url(#paint0_linear_14694_37355)"/>
4
+ <g style="mix-blend-mode:overlay">
5
+ <path d="M2.77045 35.999L11.8311 30.8767L2.77045 23.9993V35.999Z" fill="url(#paint1_linear_14694_37355)"/>
6
+ <path d="M45.2304 11.9993L36.1697 17.1215L45.2304 23.999V11.9993Z" fill="url(#paint2_linear_14694_37355)"/>
7
+ <path d="M23.9991 48.0002V37.7571L13.3842 42.001L23.9991 48.0002Z" fill="url(#paint3_linear_14694_37355)"/>
8
+ <path d="M23.9995 -0.000732422V10.2424L34.6144 5.99841L23.9995 -0.000732422Z" fill="url(#paint4_linear_14694_37355)"/>
9
+ <path d="M45.2311 36.0004L36.1705 30.8782L34.6162 42.001L45.2311 36.0004Z" fill="url(#paint5_linear_14694_37355)"/>
10
+ <path d="M2.77045 11.9998L11.8311 17.1221L13.3853 5.99927L2.77045 11.9998Z" fill="url(#paint6_linear_14694_37355)"/>
11
+ </g>
12
+ <g style="mix-blend-mode:overlay">
13
+ <path d="M2.77045 11.9993L11.8311 17.1215L2.77045 23.999V11.9993Z" fill="url(#paint7_linear_14694_37355)"/>
14
+ <path d="M45.2304 35.999L36.1697 30.8767L45.2304 23.9993V35.999Z" fill="url(#paint8_linear_14694_37355)"/>
15
+ <path d="M2.7702 36.0008L11.8308 30.8785L13.3851 42.0013L2.7702 36.0008Z" fill="url(#paint9_linear_14694_37355)"/>
16
+ <path d="M45.2311 11.9998L36.1705 17.1221L34.6162 5.99927L45.2311 11.9998Z" fill="url(#paint10_linear_14694_37355)"/>
17
+ <path d="M23.9995 48.0002V37.7571L34.6144 42.001L23.9995 48.0002Z" fill="url(#paint11_linear_14694_37355)"/>
18
+ <path d="M23.9988 -0.000732422V10.2424L13.384 5.99841L23.9988 -0.000732422Z" fill="url(#paint12_linear_14694_37355)"/>
19
+ </g>
20
+ <path opacity="0.66" d="M32.1114 10.2473H15.8869L7.7746 24.0036L15.8869 37.76H32.1114L40.2236 24.0036L32.1114 10.2473Z" fill="white"/>
21
+ <path d="M11.8309 17.1262V30.8811L24 37.76L36.1691 30.8811V17.1262L24 10.2473L11.8309 17.1262Z" fill="white"/>
22
+ <path d="M24.0009 13.3647L26.8825 21.1806L34.866 24.0004L26.8825 26.8216L24.0009 34.6375L21.1207 26.8216L13.1372 24.0004L21.1207 21.1806L24.0009 13.3647Z" fill="url(#paint13_linear_14694_37355)"/>
23
+ <path d="M13.1378 23.9995H24.0014V34.6352L21.1212 26.8192L13.1378 23.9995Z" fill="url(#paint14_linear_14694_37355)"/>
24
+ <path d="M34.8657 24.0004H24.0021V13.3647L26.8823 21.1807L34.8657 24.0004Z" fill="url(#paint15_linear_14694_37355)"/>
25
+ </g>
26
+ <defs>
27
+ <linearGradient id="paint0_linear_14694_37355" x1="2.76947" y1="23.9987" x2="45.2289" y2="23.9987" gradientUnits="userSpaceOnUse">
28
+ <stop stop-color="#2F6CDB"/>
29
+ <stop offset="1" stop-color="#55AAE7"/>
30
+ </linearGradient>
31
+ <linearGradient id="paint1_linear_14694_37355" x1="28.7112" y1="-6.03654" x2="-21.5772" y2="75.9966" gradientUnits="userSpaceOnUse">
32
+ <stop stop-color="#4357B5"/>
33
+ <stop offset="1" stop-color="#2E6BD3"/>
34
+ </linearGradient>
35
+ <linearGradient id="paint2_linear_14694_37355" x1="49.5433" y1="6.73372" x2="-0.746622" y2="88.7655" gradientUnits="userSpaceOnUse">
36
+ <stop stop-color="#4357B5"/>
37
+ <stop offset="1" stop-color="#2E6BD3"/>
38
+ </linearGradient>
39
+ <linearGradient id="paint3_linear_14694_37355" x1="44.9624" y1="3.92721" x2="-5.32747" y2="85.9604" gradientUnits="userSpaceOnUse">
40
+ <stop stop-color="#4357B5"/>
41
+ <stop offset="1" stop-color="#2E6BD3"/>
42
+ </linearGradient>
43
+ <linearGradient id="paint4_linear_14694_37355" x1="33.2914" y1="-3.23027" x2="-16.9986" y2="78.803" gradientUnits="userSpaceOnUse">
44
+ <stop stop-color="#4357B5"/>
45
+ <stop offset="1" stop-color="#2E6BD3"/>
46
+ </linearGradient>
47
+ <linearGradient id="paint5_linear_14694_37355" x1="55.461" y1="10.3619" x2="5.17111" y2="92.3951" gradientUnits="userSpaceOnUse">
48
+ <stop stop-color="#4357B5"/>
49
+ <stop offset="1" stop-color="#2E6BD3"/>
50
+ </linearGradient>
51
+ <linearGradient id="paint6_linear_14694_37355" x1="22.7942" y1="-9.66412" x2="-27.4942" y2="72.3691" gradientUnits="userSpaceOnUse">
52
+ <stop stop-color="#4357B5"/>
53
+ <stop offset="1" stop-color="#2E6BD3"/>
54
+ </linearGradient>
55
+ <linearGradient id="paint7_linear_14694_37355" x1="9.87142" y1="21.6635" x2="0.296576" y2="16.5084" gradientUnits="userSpaceOnUse">
56
+ <stop stop-color="#2E6BD3"/>
57
+ <stop offset="1" stop-color="#2F044D"/>
58
+ </linearGradient>
59
+ <linearGradient id="paint8_linear_14694_37355" x1="39.4934" y1="26.968" x2="47.6416" y2="31.4596" gradientUnits="userSpaceOnUse">
60
+ <stop stop-color="#2E6BD3"/>
61
+ <stop offset="1" stop-color="#2F044D"/>
62
+ </linearGradient>
63
+ <linearGradient id="paint9_linear_14694_37355" x1="15.835" y1="34.8603" x2="5.21554" y2="40.2831" gradientUnits="userSpaceOnUse">
64
+ <stop stop-color="#2E6BD3"/>
65
+ <stop offset="1" stop-color="#2F044D"/>
66
+ </linearGradient>
67
+ <linearGradient id="paint10_linear_14694_37355" x1="33.8435" y1="12.3838" x2="42.8968" y2="7.36418" gradientUnits="userSpaceOnUse">
68
+ <stop stop-color="#2E6BD3"/>
69
+ <stop offset="1" stop-color="#2F044D"/>
70
+ </linearGradient>
71
+ <linearGradient id="paint11_linear_14694_37355" x1="29.3062" y1="36.7828" x2="29.3062" y2="47.8354" gradientUnits="userSpaceOnUse">
72
+ <stop stop-color="#2E6BD3"/>
73
+ <stop offset="1" stop-color="#2F044D"/>
74
+ </linearGradient>
75
+ <linearGradient id="paint12_linear_14694_37355" x1="18.6907" y1="11.8027" x2="18.6907" y2="0.631132" gradientUnits="userSpaceOnUse">
76
+ <stop stop-color="#2E6BD3"/>
77
+ <stop offset="1" stop-color="#2F044D"/>
78
+ </linearGradient>
79
+ <linearGradient id="paint13_linear_14694_37355" x1="24.0009" y1="13.6083" x2="24.0009" y2="34.2593" gradientUnits="userSpaceOnUse">
80
+ <stop stop-color="#2E6BD3"/>
81
+ <stop offset="1" stop-color="#2F044D"/>
82
+ </linearGradient>
83
+ <linearGradient id="paint14_linear_14694_37355" x1="17.7244" y1="30.4929" x2="22.4066" y2="23.6925" gradientUnits="userSpaceOnUse">
84
+ <stop stop-color="#2E6BD3"/>
85
+ <stop offset="1" stop-color="#2F044D"/>
86
+ </linearGradient>
87
+ <linearGradient id="paint15_linear_14694_37355" x1="29.4346" y1="23.8385" x2="29.4346" y2="17.9239" gradientUnits="userSpaceOnUse">
88
+ <stop stop-color="#2E6BD3"/>
89
+ <stop offset="1" stop-color="#2F044D"/>
90
+ </linearGradient>
91
+ <clipPath id="clip0_14694_37355">
92
+ <rect width="48" height="48" fill="white"/>
93
+ </clipPath>
94
+ </defs>
95
+ </svg>
@@ -1,6 +1,6 @@
1
1
  import { Button, Form, FormTextArea } from '@servicetitan/design-system';
2
2
  import { provide, useDependencies } from '@servicetitan/react-ioc';
3
- import { CHAT_UI_STORE_TOKEN } from '@servicetitan/titan-chat-ui-common';
3
+ import { CHAT_UI_STORE_TOKEN, useCustomizationChat } from '@servicetitan/titan-chat-ui-common';
4
4
  import classNames from 'classnames';
5
5
  import { observer } from 'mobx-react';
6
6
  import { ChangeEvent, FC, FormEvent, useCallback, useEffect, useRef, useState } from 'react';
@@ -13,6 +13,7 @@ export const ChatInput: FC<{ className?: string }> = provide({
13
13
  singletons: [ChatInputStore],
14
14
  })(
15
15
  observer(({ className }) => {
16
+ const customization = useCustomizationChat();
16
17
  const typingTimeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
17
18
  const [isSending, setIsSending] = useState(false);
18
19
  const textareaRef = useRef<HTMLTextAreaElement>(null);
@@ -105,7 +106,7 @@ export const ChatInput: FC<{ className?: string }> = provide({
105
106
  <FormTextArea
106
107
  ref={textareaRef}
107
108
  name="question"
108
- placeholder="Type your message"
109
+ placeholder={customization.input?.placeholderText ?? 'Type your message'}
109
110
  rows={1}
110
111
  maxRows={2}
111
112
  autoHeight
@@ -1,19 +1,19 @@
1
1
  import { useDependencies } from '@servicetitan/react-ioc';
2
- import { CHAT_UI_STORE_TOKEN } from '@servicetitan/titan-chat-ui-common';
2
+ import { CHAT_UI_STORE_TOKEN, useCustomizationChat } from '@servicetitan/titan-chat-ui-common';
3
3
  import { observer } from 'mobx-react';
4
4
  import { FC } from 'react';
5
5
  import { MessageTyping } from '../messages/message-typing';
6
6
  import { useAvatarProps } from '../messages/use-avatar-props';
7
7
 
8
8
  export const ChatMessageTyping: FC = observer(() => {
9
- const [chatUiStore] = useDependencies(CHAT_UI_STORE_TOKEN);
9
+ const customization = useCustomizationChat();
10
10
  const [
11
11
  {
12
12
  agent: { icon, name },
13
13
  },
14
14
  ] = useDependencies(CHAT_UI_STORE_TOKEN);
15
15
  const avatar = useAvatarProps(name, icon);
16
- const Component = chatUiStore.customizations.messageTyping?.component ?? MessageTyping;
16
+ const Component = customization.messageTyping?.component ?? MessageTyping;
17
17
 
18
18
  return <Component avatar={avatar} />;
19
19
  });
@@ -1,11 +1,10 @@
1
1
  import { BodyText } from '@servicetitan/design-system';
2
- import { useDependencies } from '@servicetitan/react-ioc';
3
2
  import {
4
- CHAT_UI_STORE_TOKEN,
5
3
  ChatMessageModelFile,
6
4
  ChatMessageModelText,
7
5
  ChatMessageModelWelcome,
8
6
  IChatMessageProps,
7
+ useCustomizationChat,
9
8
  } from '@servicetitan/titan-chat-ui-common';
10
9
  import { observer } from 'mobx-react';
11
10
  import { FC, PropsWithChildren, ReactNode } from 'react';
@@ -20,10 +19,9 @@ import { ChatMessageTemplateUser } from './chat-message-template-user';
20
19
  */
21
20
  export const ChatMessage: FC<IChatMessageProps> = observer(
22
21
  ({ message, omitAvatar, omitTimestamp }) => {
23
- const [chatUiStore] = useDependencies(CHAT_UI_STORE_TOKEN);
24
- const isAgent = message.participant.isAgent;
25
- const { messageTemplates, messages } = chatUiStore.customizations;
22
+ const { messageTemplates, messages } = useCustomizationChat();
26
23
  const messageCustomization = messages?.find(c => c.predicate(message));
24
+ const isAgent = message.participant.isAgent;
27
25
  const isSystem = Boolean(messageCustomization?.isSystem);
28
26
 
29
27
  let messageContentNode: ReactNode | undefined;
@@ -46,7 +46,7 @@ export const Chat: FC<IChatProps> = observer(({ className, customizations }) =>
46
46
  />
47
47
  </div>
48
48
  <ChatNotifications />
49
- {!chatUiStore.customizations?.input?.isDisabled && (
49
+ {!customizations?.input?.isDisabled && (
50
50
  <Stack className="p-x-3 p-y-2" direction="column" spacing="2">
51
51
  <ChatInputFile className="p-2 box-sizing-border-box border-radius-1 border border-style-dashed" />
52
52
  <ChatInput />
@@ -18,6 +18,10 @@
18
18
  background-image: url('../../assets/floating-chat-avatar.svg');
19
19
  }
20
20
 
21
+ &.atlas {
22
+ background-image: url('../../assets/atlas-avatar.svg');
23
+ }
24
+
21
25
  &.system {
22
26
  min-height: @spacing-0;
23
27
  height: @spacing-0;
@@ -1,4 +1,5 @@
1
1
  export const __esModule: true;
2
+ export const atlas: string;
2
3
  export const bot: string;
3
4
  export const system: string;
4
5
  export const userIcon: string;
@@ -14,6 +14,7 @@ export const MessageAvatar: FC<IMessageAvatarProps> = ({ className, icon, name }
14
14
  const isEmpty = icon === ChatParticipantIcon.Empty;
15
15
  const isInitials = icon === ChatParticipantIcon.Initials;
16
16
  const isBot = icon === ChatParticipantIcon.Bot;
17
+ const isAtlas = icon === ChatParticipantIcon.Atlas;
17
18
  const nameInitials = useMemo(() => getNameInitials(name), [name]);
18
19
 
19
20
  return (
@@ -23,6 +24,7 @@ export const MessageAvatar: FC<IMessageAvatarProps> = ({ className, icon, name }
23
24
  Styles.userIcon,
24
25
  {
25
26
  [Styles.bot]: isBot,
27
+ [Styles.atlas]: isAtlas,
26
28
  [Styles.system]: isEmpty,
27
29
  },
28
30
  className