intellinum-chatbot 1.0.0
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/dist/index.css +37 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +70 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +1019 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +980 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +45 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1019 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
var __async = (__this, __arguments, generator) => {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
var fulfilled = (value) => {
|
|
61
|
+
try {
|
|
62
|
+
step(generator.next(value));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
reject(e);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var rejected = (value) => {
|
|
68
|
+
try {
|
|
69
|
+
step(generator.throw(value));
|
|
70
|
+
} catch (e) {
|
|
71
|
+
reject(e);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
75
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/index.tsx
|
|
80
|
+
var index_exports = {};
|
|
81
|
+
__export(index_exports, {
|
|
82
|
+
ChatHistory: () => ChatHistory_default,
|
|
83
|
+
ChatProvider: () => ChatProvider_default,
|
|
84
|
+
ChatSender: () => ChatSender_default,
|
|
85
|
+
Chatting: () => Chatting_default,
|
|
86
|
+
SuggestionChat: () => SuggestionChat_default,
|
|
87
|
+
default: () => index_default,
|
|
88
|
+
useChat: () => useChat
|
|
89
|
+
});
|
|
90
|
+
module.exports = __toCommonJS(index_exports);
|
|
91
|
+
|
|
92
|
+
// src/organisms/IntellinumChat.tsx
|
|
93
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
94
|
+
var IntellinumChat = (props) => {
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "IntellinumChat" });
|
|
96
|
+
};
|
|
97
|
+
var IntellinumChat_default = IntellinumChat;
|
|
98
|
+
|
|
99
|
+
// src/molecules/ChatSender.tsx
|
|
100
|
+
var import_react2 = require("react");
|
|
101
|
+
|
|
102
|
+
// src/assets/icons/SendIcon.tsx
|
|
103
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
104
|
+
var SendIcon = (props) => {
|
|
105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
106
|
+
"svg",
|
|
107
|
+
{
|
|
108
|
+
width: "20",
|
|
109
|
+
height: "20",
|
|
110
|
+
viewBox: "0 0 20 20",
|
|
111
|
+
fill: "none",
|
|
112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { clipPath: "url(#clip0_1096_2365)", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
115
|
+
"path",
|
|
116
|
+
{
|
|
117
|
+
d: "M1.60252 7.80845C1.17752 7.63761 1.18252 7.38345 1.63085 7.23428L17.5358 1.93261C17.9767 1.78595 18.2292 2.03262 18.1059 2.46428L13.5608 18.3693C13.4358 18.8101 13.165 18.8301 12.9633 18.4276L9.16668 10.8334L1.60252 7.80845ZM5.67752 7.64178L10.3742 9.52095L12.9075 14.5893L15.8625 4.24762L5.67668 7.64178H5.67752Z",
|
|
118
|
+
fill: "#FBFBFD"
|
|
119
|
+
}
|
|
120
|
+
) }),
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_1096_2365", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "20", height: "20", fill: "white" }) }) })
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
var SendIcon_default = SendIcon;
|
|
127
|
+
|
|
128
|
+
// src/providers/ChatProvider.tsx
|
|
129
|
+
var import_react = __toESM(require("react"));
|
|
130
|
+
|
|
131
|
+
// src/utils/api.tsx
|
|
132
|
+
var import_axios = __toESM(require("axios"));
|
|
133
|
+
var handleGenerateToken = (PROXY_URL, ORACLE_TOKEN_URL, ORACLE_CLIENT_ID, ORACLE_CLIENT_SECRET, ORACLE_SCOPE) => __async(null, null, function* () {
|
|
134
|
+
try {
|
|
135
|
+
const res = yield import_axios.default.post(PROXY_URL, {
|
|
136
|
+
url: ORACLE_TOKEN_URL,
|
|
137
|
+
payload: {
|
|
138
|
+
grant_type: "client_credentials",
|
|
139
|
+
client_id: ORACLE_CLIENT_ID,
|
|
140
|
+
client_secret: ORACLE_CLIENT_SECRET,
|
|
141
|
+
scope: ORACLE_SCOPE
|
|
142
|
+
},
|
|
143
|
+
config: {
|
|
144
|
+
headers: {
|
|
145
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
localStorage.setItem("intellinum-chatbot-token", res.data.access_token);
|
|
150
|
+
} catch (error) {
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
var handleCreateApi = (PROXY_URL, ORACLE_TOKEN_URL, ORACLE_CLIENT_ID, ORACLE_CLIENT_SECRET, ORACLE_SCOPE) => {
|
|
154
|
+
const apiRequest = import_axios.default.create({
|
|
155
|
+
baseURL: PROXY_URL
|
|
156
|
+
});
|
|
157
|
+
apiRequest.interceptors.request.use(
|
|
158
|
+
(config) => {
|
|
159
|
+
const token = localStorage.getItem("intellinum-chatbot-token");
|
|
160
|
+
if (token) {
|
|
161
|
+
if (config.method == "post") {
|
|
162
|
+
config.data = __spreadProps(__spreadValues({}, config.data), {
|
|
163
|
+
config: {
|
|
164
|
+
headers: {
|
|
165
|
+
Authorization: `Bearer ${token}`
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
} else if (config.method == "get") {
|
|
170
|
+
config.params = __spreadProps(__spreadValues({}, config.params), {
|
|
171
|
+
auth: `Bearer ${token}`
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return config;
|
|
176
|
+
},
|
|
177
|
+
(error) => {
|
|
178
|
+
return Promise.reject(error);
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
apiRequest.interceptors.response.use(
|
|
182
|
+
(response) => {
|
|
183
|
+
return response;
|
|
184
|
+
},
|
|
185
|
+
(error) => __async(null, null, function* () {
|
|
186
|
+
let originalConfig = error.config;
|
|
187
|
+
if (error.response.status === 401 && !originalConfig._retry) {
|
|
188
|
+
yield handleGenerateToken(
|
|
189
|
+
PROXY_URL,
|
|
190
|
+
ORACLE_TOKEN_URL,
|
|
191
|
+
ORACLE_CLIENT_ID,
|
|
192
|
+
ORACLE_CLIENT_SECRET,
|
|
193
|
+
ORACLE_SCOPE
|
|
194
|
+
);
|
|
195
|
+
if (originalConfig.method == "post") {
|
|
196
|
+
try {
|
|
197
|
+
originalConfig.data = JSON.parse(originalConfig.data);
|
|
198
|
+
} catch (error2) {
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return apiRequest.request(originalConfig);
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
);
|
|
205
|
+
const handlePost = (url, payload, config) => {
|
|
206
|
+
const res = apiRequest.post("/", {
|
|
207
|
+
url,
|
|
208
|
+
payload,
|
|
209
|
+
config
|
|
210
|
+
});
|
|
211
|
+
return res;
|
|
212
|
+
};
|
|
213
|
+
const handleGet = (url) => {
|
|
214
|
+
const res = apiRequest.get("/?url=" + url);
|
|
215
|
+
return res;
|
|
216
|
+
};
|
|
217
|
+
return {
|
|
218
|
+
post: handlePost,
|
|
219
|
+
get: handleGet
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
var API = {
|
|
223
|
+
create: handleCreateApi
|
|
224
|
+
};
|
|
225
|
+
var api_default = API;
|
|
226
|
+
|
|
227
|
+
// src/providers/ChatProvider.tsx
|
|
228
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
229
|
+
var ChatContext = import_react.default.createContext(null);
|
|
230
|
+
function ChatProvider(props) {
|
|
231
|
+
const {
|
|
232
|
+
ORACLE_TOKEN_URL,
|
|
233
|
+
ORACLE_BASE_URL,
|
|
234
|
+
ORACLE_CLIENT_ID,
|
|
235
|
+
ORACLE_CLIENT_SECRET,
|
|
236
|
+
ORACLE_SCOPE,
|
|
237
|
+
PROXY_URL,
|
|
238
|
+
WORKFLOW_CODE
|
|
239
|
+
} = props;
|
|
240
|
+
const ApiReq = api_default.create(
|
|
241
|
+
PROXY_URL,
|
|
242
|
+
ORACLE_TOKEN_URL,
|
|
243
|
+
ORACLE_CLIENT_ID,
|
|
244
|
+
ORACLE_CLIENT_SECRET,
|
|
245
|
+
ORACLE_SCOPE
|
|
246
|
+
);
|
|
247
|
+
const [chatHistories, setChatHistories] = (0, import_react.useState)([]);
|
|
248
|
+
const [chats, setChats] = (0, import_react.useState)([]);
|
|
249
|
+
const [isLoading, setIsLoading] = (0, import_react.useState)(true);
|
|
250
|
+
const [isLoadingResponse, setIsLoadingResponse] = (0, import_react.useState)(false);
|
|
251
|
+
const [disallowChattingMessage, setDisallowChattingMessage] = (0, import_react.useState)("");
|
|
252
|
+
const handleNewChat = () => __async(null, null, function* () {
|
|
253
|
+
});
|
|
254
|
+
const handleSendChat = (message) => __async(null, null, function* () {
|
|
255
|
+
var _a;
|
|
256
|
+
setIsLoadingResponse(true);
|
|
257
|
+
try {
|
|
258
|
+
const res = yield ApiReq.post(
|
|
259
|
+
`${ORACLE_BASE_URL}/${WORKFLOW_CODE}/invokeAsync`,
|
|
260
|
+
{
|
|
261
|
+
message,
|
|
262
|
+
conversational: true,
|
|
263
|
+
invocationMode: "ADMIN",
|
|
264
|
+
conversationId: ((_a = chats[chats.length - 1]) == null ? void 0 : _a.jobId) || ""
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
setChats((prev) => [...prev, res.data]);
|
|
268
|
+
const jobId = res.data.jobId;
|
|
269
|
+
let jobStatus = res.data.status;
|
|
270
|
+
while (jobStatus === "RUNNING") {
|
|
271
|
+
const resCheck = yield ApiReq.get(
|
|
272
|
+
`${ORACLE_BASE_URL}/${WORKFLOW_CODE}/status/${jobId}?invocationMode=ADMIN`
|
|
273
|
+
);
|
|
274
|
+
jobStatus = resCheck.data.status;
|
|
275
|
+
setChats((prev) => {
|
|
276
|
+
return prev.map((chat) => {
|
|
277
|
+
if (chat.jobId === jobId) {
|
|
278
|
+
return resCheck.data;
|
|
279
|
+
}
|
|
280
|
+
return chat;
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
if (resCheck.data.status == "RUNNING") {
|
|
284
|
+
yield new Promise((resolve) => setTimeout(resolve, 2e3));
|
|
285
|
+
}
|
|
286
|
+
if (resCheck.data.status !== "RUNNING" && resCheck.data.status !== "COMPLETE") {
|
|
287
|
+
setChats((prev) => {
|
|
288
|
+
return prev.map((chat) => {
|
|
289
|
+
if (chat.jobId === jobId) {
|
|
290
|
+
return __spreadProps(__spreadValues({}, resCheck.data), {
|
|
291
|
+
output: "Something went wrong"
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
return chat;
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
} catch (error) {
|
|
300
|
+
console.log("errpr", error);
|
|
301
|
+
}
|
|
302
|
+
setIsLoadingResponse(false);
|
|
303
|
+
});
|
|
304
|
+
const handleResponseChat = () => __async(null, null, function* () {
|
|
305
|
+
});
|
|
306
|
+
const handleChangeTopic = () => __async(null, null, function* () {
|
|
307
|
+
});
|
|
308
|
+
const handleAttachFile = () => __async(null, null, function* () {
|
|
309
|
+
});
|
|
310
|
+
const handleDeleteChat = () => __async(null, null, function* () {
|
|
311
|
+
});
|
|
312
|
+
const handleGetHistoryChat = () => __async(null, null, function* () {
|
|
313
|
+
});
|
|
314
|
+
(0, import_react.useEffect)(() => {
|
|
315
|
+
}, []);
|
|
316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
317
|
+
ChatContext.Provider,
|
|
318
|
+
{
|
|
319
|
+
value: {
|
|
320
|
+
chatHistories,
|
|
321
|
+
setChatHistories,
|
|
322
|
+
chats,
|
|
323
|
+
setChats,
|
|
324
|
+
isLoading,
|
|
325
|
+
setIsLoading,
|
|
326
|
+
isLoadingResponse,
|
|
327
|
+
setIsLoadingResponse,
|
|
328
|
+
disallowChattingMessage,
|
|
329
|
+
setDisallowChattingMessage,
|
|
330
|
+
handleNewChat,
|
|
331
|
+
handleSendChat,
|
|
332
|
+
handleResponseChat,
|
|
333
|
+
handleChangeTopic,
|
|
334
|
+
handleAttachFile,
|
|
335
|
+
handleDeleteChat,
|
|
336
|
+
handleGetHistoryChat
|
|
337
|
+
},
|
|
338
|
+
children: props.children
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
var useChat = () => import_react.default.useContext(ChatContext);
|
|
343
|
+
var ChatProvider_default = ChatProvider;
|
|
344
|
+
|
|
345
|
+
// src/atoms/CustomLoading/index.tsx
|
|
346
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
347
|
+
function CustomLoading({ size = "12px" }) {
|
|
348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "typing-dots", children: [
|
|
349
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { width: size, height: size } }),
|
|
350
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { width: size, height: size } }),
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { width: size, height: size } })
|
|
352
|
+
] });
|
|
353
|
+
}
|
|
354
|
+
var CustomLoading_default = CustomLoading;
|
|
355
|
+
|
|
356
|
+
// src/molecules/ChatSender.tsx
|
|
357
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
358
|
+
var ChatSender = (props) => {
|
|
359
|
+
const textareaRef = (0, import_react2.useRef)(null);
|
|
360
|
+
const { handleSendChat, isLoadingResponse } = useChat();
|
|
361
|
+
const [message, setMessage] = (0, import_react2.useState)("");
|
|
362
|
+
const handleInput = () => {
|
|
363
|
+
const el = textareaRef.current;
|
|
364
|
+
if (!el) return;
|
|
365
|
+
el.style.height = "auto";
|
|
366
|
+
if (!el.value) {
|
|
367
|
+
el.style.height = "40px";
|
|
368
|
+
el.style.overflowY = "hidden";
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
if (el.scrollHeight > 200) {
|
|
372
|
+
el.style.height = "200px";
|
|
373
|
+
el.style.overflowY = "auto";
|
|
374
|
+
} else {
|
|
375
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
376
|
+
el.style.overflowY = "hidden";
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
const sendChat = () => __async(null, null, function* () {
|
|
380
|
+
if (message.length > 0 && !isLoadingResponse) {
|
|
381
|
+
setMessage("");
|
|
382
|
+
setTimeout(() => {
|
|
383
|
+
handleInput();
|
|
384
|
+
}, 0);
|
|
385
|
+
yield handleSendChat(message);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
389
|
+
"div",
|
|
390
|
+
{
|
|
391
|
+
className: `ic-pt-4 ic-pb-2 ic-px-4 ic-w-full ic-max-w-2xl ic-bg-white ic-rounded-md ic-border ic-border-gray-200 ic-flex ic-items-start ic-justify-between ic-gap-3`,
|
|
392
|
+
children: [
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "ic-w-full ", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
394
|
+
"textarea",
|
|
395
|
+
{
|
|
396
|
+
ref: textareaRef,
|
|
397
|
+
placeholder: "Ask anything",
|
|
398
|
+
value: message,
|
|
399
|
+
rows: 1,
|
|
400
|
+
onInput: handleInput,
|
|
401
|
+
className: `w-full ic-text-sm ic-py-2 ic-w-full ic-px-3 focus:ic-outline-none ic-rounded-md ic-border
|
|
402
|
+
ic-border-gray-300 ic-overflow-auto
|
|
403
|
+
|
|
404
|
+
`,
|
|
405
|
+
onChange: (e) => {
|
|
406
|
+
setMessage(e.target.value);
|
|
407
|
+
},
|
|
408
|
+
onKeyDown: (e) => {
|
|
409
|
+
if (e.key === "Enter") {
|
|
410
|
+
if (e.shiftKey || isLoadingResponse) return;
|
|
411
|
+
e.preventDefault();
|
|
412
|
+
sendChat();
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
) }),
|
|
417
|
+
isLoadingResponse ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "ic-mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CustomLoading_default, { size: "8px" }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
418
|
+
"div",
|
|
419
|
+
{
|
|
420
|
+
className: `${message.length < 1 || isLoadingResponse ? "ic-bg-gray-400" : "ic-bg-primary-500"} ic-mt-1 ic-shrink-0 ic-grow-0 ic-w-9 ic-h-9 ic-rounded-md ic-flex ic-justify-center ic-items-center ic-border ic-border-gray-300`,
|
|
421
|
+
onClick: () => {
|
|
422
|
+
sendChat();
|
|
423
|
+
},
|
|
424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SendIcon_default, {})
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
);
|
|
430
|
+
};
|
|
431
|
+
var ChatSender_default = ChatSender;
|
|
432
|
+
|
|
433
|
+
// src/molecules/ChatHistory.tsx
|
|
434
|
+
var import_react4 = require("react");
|
|
435
|
+
|
|
436
|
+
// src/assets/icons/MenuFoldLineIcon.tsx
|
|
437
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
438
|
+
var MenuFoldLineIcon = (props) => {
|
|
439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
440
|
+
"svg",
|
|
441
|
+
{
|
|
442
|
+
width: "20",
|
|
443
|
+
height: "20",
|
|
444
|
+
viewBox: "0 0 20 20",
|
|
445
|
+
fill: "none",
|
|
446
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
447
|
+
children: [
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("g", { clipPath: "url(#clip0_1081_1936)", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
449
|
+
"path",
|
|
450
|
+
{
|
|
451
|
+
d: "M17.4993 15.0001V16.6668H2.49935V15.0001H17.4993ZM5.49602 3.25342L6.67435 4.43175L4.02268 7.08342L6.67435 9.73509L5.49602 10.9134L1.66602 7.08342L5.49602 3.25342ZM17.4993 9.16675V10.8334H9.99935V9.16675H17.4993ZM17.4993 3.33342V5.00008H9.99935V3.33342H17.4993Z",
|
|
452
|
+
fill: "#21305F"
|
|
453
|
+
}
|
|
454
|
+
) }),
|
|
455
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("clipPath", { id: "clip0_1081_1936", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { width: "20", height: "20", fill: "white" }) }) })
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
) });
|
|
459
|
+
};
|
|
460
|
+
var MenuFoldLineIcon_default = MenuFoldLineIcon;
|
|
461
|
+
|
|
462
|
+
// src/utils/TwMerge.tsx
|
|
463
|
+
var import_clsx = require("clsx");
|
|
464
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
465
|
+
function cn(...inputs) {
|
|
466
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// src/atoms/InputForm.tsx
|
|
470
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
471
|
+
var InputForm = (props) => {
|
|
472
|
+
const _a = props, { rightIcon } = _a, rest = __objRest(_a, ["rightIcon"]);
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
474
|
+
"div",
|
|
475
|
+
{
|
|
476
|
+
className: `ic-border ic-border-gray-300 ic-w-full ic-rounded-md ic-flex ic-items-center
|
|
477
|
+
focus-within:ic-border-dark-primary-500 focus-within:ic-border-2
|
|
478
|
+
|
|
479
|
+
`,
|
|
480
|
+
children: [
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
482
|
+
"input",
|
|
483
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
484
|
+
className: `ic-py-2 ic-w-full ic-px-3 focus:ic-outline-none
|
|
485
|
+
${cn({ "ic-pr-3 ic-border-r ic-border-gray-300": props.rightIcon })}
|
|
486
|
+
${cn({ "ic-rounded-r-md": !props.rightIcon })}
|
|
487
|
+
`
|
|
488
|
+
})
|
|
489
|
+
),
|
|
490
|
+
props.rightIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "ic-py-2 ic-px-3 ic-pl-2", children: props.rightIcon })
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
);
|
|
494
|
+
};
|
|
495
|
+
var InputForm_default = InputForm;
|
|
496
|
+
|
|
497
|
+
// src/assets/icons/SearchIcon.tsx
|
|
498
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
499
|
+
var SearchIcon = (props) => {
|
|
500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
501
|
+
"svg",
|
|
502
|
+
{
|
|
503
|
+
width: "17",
|
|
504
|
+
height: "17",
|
|
505
|
+
viewBox: "0 0 17 17",
|
|
506
|
+
fill: "none",
|
|
507
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
509
|
+
"path",
|
|
510
|
+
{
|
|
511
|
+
d: "M16.0232 14.9163L10.806 9.69911C11.6156 8.65246 12.0536 7.37277 12.0536 6.02679C12.0536 4.41563 11.4248 2.90491 10.2877 1.76585C9.15067 0.626786 7.63594 0 6.02679 0C4.41763 0 2.9029 0.628795 1.76585 1.76585C0.626786 2.9029 0 4.41563 0 6.02679C0 7.63594 0.628795 9.15067 1.76585 10.2877C2.9029 11.4268 4.41563 12.0536 6.02679 12.0536C7.37277 12.0536 8.65045 11.6156 9.6971 10.808L14.9143 16.0232C14.9296 16.0385 14.9477 16.0507 14.9677 16.0589C14.9877 16.0672 15.0092 16.0715 15.0308 16.0715C15.0524 16.0715 15.0739 16.0672 15.0939 16.0589C15.1139 16.0507 15.132 16.0385 15.1473 16.0232L16.0232 15.1493C16.0385 15.134 16.0507 15.1159 16.0589 15.0959C16.0672 15.0759 16.0715 15.0545 16.0715 15.0328C16.0715 15.0112 16.0672 14.9897 16.0589 14.9697C16.0507 14.9498 16.0385 14.9316 16.0232 14.9163ZM9.20893 9.20893C8.35714 10.0587 7.22813 10.5268 6.02679 10.5268C4.82545 10.5268 3.69643 10.0587 2.84464 9.20893C1.99487 8.35714 1.52679 7.22813 1.52679 6.02679C1.52679 4.82545 1.99487 3.69442 2.84464 2.84464C3.69643 1.99487 4.82545 1.52679 6.02679 1.52679C7.22813 1.52679 8.35915 1.99286 9.20893 2.84464C10.0587 3.69643 10.5268 4.82545 10.5268 6.02679C10.5268 7.22813 10.0587 8.35915 9.20893 9.20893Z",
|
|
512
|
+
fill: "black",
|
|
513
|
+
fillOpacity: "0.45"
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
};
|
|
519
|
+
var SearchIcon_default = SearchIcon;
|
|
520
|
+
|
|
521
|
+
// src/atoms/ChatAction.tsx
|
|
522
|
+
var import_react3 = require("react");
|
|
523
|
+
|
|
524
|
+
// src/assets/icons/MessageIcon.tsx
|
|
525
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
526
|
+
var MessageIcon = (props) => {
|
|
527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
528
|
+
"svg",
|
|
529
|
+
{
|
|
530
|
+
width: "20",
|
|
531
|
+
height: "20",
|
|
532
|
+
viewBox: "0 0 20 20",
|
|
533
|
+
fill: "none",
|
|
534
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("g", { clipPath: "url(#clip0_1092_4826)", children: [
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
538
|
+
"path",
|
|
539
|
+
{
|
|
540
|
+
d: "M11.3619 7.9687C10.8463 7.9687 10.4468 8.36825 10.4468 8.86156C10.4468 9.35486 10.8463 9.75441 11.3619 9.75441C11.8329 9.75441 12.2325 9.35486 12.2325 8.86156C12.2325 8.36825 11.8329 7.9687 11.3619 7.9687ZM5.11194 7.9687C4.59631 7.9687 4.19676 8.36825 4.19676 8.86156C4.19676 9.35486 4.59631 9.75441 5.11194 9.75441C5.58292 9.75441 5.98247 9.35486 5.98247 8.86156C5.98247 8.36825 5.58292 7.9687 5.11194 7.9687Z",
|
|
541
|
+
fill: `${props.color || "#5F79C8"}`
|
|
542
|
+
}
|
|
543
|
+
),
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
545
|
+
"path",
|
|
546
|
+
{
|
|
547
|
+
d: "M18.5265 6.27053C17.4938 4.84897 16.0046 3.8247 14.3077 3.36874V3.37098C13.926 2.94687 13.4952 2.55624 13.0131 2.20803C9.35908 -0.44822 4.22961 0.362048 1.5622 4.01607C-0.587352 6.98482 -0.495834 10.9781 1.69613 13.8152L1.71399 16.775C1.71399 16.8464 1.72515 16.9179 1.74747 16.9848C1.77555 17.0743 1.82098 17.1573 1.88118 17.2292C1.94138 17.301 2.01515 17.3603 2.09829 17.4037C2.18142 17.447 2.27229 17.4735 2.36568 17.4817C2.45907 17.4899 2.55316 17.4795 2.64256 17.4513L5.46845 16.5607C6.21622 16.8263 6.98854 16.9781 7.7564 17.0205L7.74524 17.0295C9.73408 18.4781 12.3412 18.9134 14.7318 18.1232L17.5689 19.0473C17.6403 19.0696 17.714 19.083 17.7899 19.083C18.185 19.083 18.5042 18.7638 18.5042 18.3687V15.3777C20.4707 12.708 20.522 9.0183 18.5265 6.27053ZM5.78095 14.9759L5.5131 14.8643L3.30327 15.5562L3.28095 13.2348L3.10238 13.0339C1.21399 10.7304 1.08899 7.41115 2.85685 4.97589C5.00863 2.02499 9.13363 1.37321 12.0756 3.50267C15.0265 5.64776 15.6805 9.76607 13.5488 12.6991C11.7609 15.1522 8.55997 16.0585 5.78095 14.9759ZM17.0533 14.5964L16.8747 14.8196L16.897 17.1411L14.7095 16.4045L14.4417 16.5161C13.1917 16.9804 11.8591 17.0183 10.6247 16.6723L10.6202 16.6701C12.3167 16.1498 13.7987 15.0932 14.8435 13.6589C16.5488 11.3085 16.8256 8.35535 15.8345 5.83749L15.8479 5.84642C16.3613 6.21473 16.8323 6.67455 17.2318 7.23035C18.8524 9.45356 18.7609 12.4804 17.0533 14.5964Z",
|
|
548
|
+
fill: `${props.color || "#5F79C8"}`
|
|
549
|
+
}
|
|
550
|
+
),
|
|
551
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
552
|
+
"path",
|
|
553
|
+
{
|
|
554
|
+
d: "M8.23694 7.9687C7.72131 7.9687 7.32176 8.36825 7.32176 8.86156C7.32176 9.35486 7.72131 9.75441 8.23694 9.75441C8.70792 9.75441 9.10747 9.35486 9.10747 8.86156C9.10747 8.36825 8.70792 7.9687 8.23694 7.9687Z",
|
|
555
|
+
fill: `${props.color || "#5F79C8"}`
|
|
556
|
+
}
|
|
557
|
+
)
|
|
558
|
+
] }),
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("clipPath", { id: "clip0_1092_4826", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { width: "20", height: "20", fill: "white" }) }) })
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
};
|
|
564
|
+
var MessageIcon_default = MessageIcon;
|
|
565
|
+
|
|
566
|
+
// src/assets/icons/EditIcon.tsx
|
|
567
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
568
|
+
var EditIcon = (props) => {
|
|
569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
570
|
+
"svg",
|
|
571
|
+
{
|
|
572
|
+
width: "16",
|
|
573
|
+
height: "16",
|
|
574
|
+
viewBox: "0 0 16 16",
|
|
575
|
+
fill: "none",
|
|
576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
577
|
+
children: [
|
|
578
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("g", { clipPath: "url(#clip0_1096_2009)", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
579
|
+
"path",
|
|
580
|
+
{
|
|
581
|
+
d: "M3.45921 12.284C3.49492 12.284 3.53064 12.2805 3.56635 12.2751L6.56992 11.7483C6.60564 11.7412 6.63957 11.7251 6.66457 11.6983L14.2342 4.12868C14.2508 4.11216 14.2639 4.09254 14.2729 4.07094C14.2818 4.04934 14.2864 4.02618 14.2864 4.00279C14.2864 3.9794 14.2818 3.95625 14.2729 3.93464C14.2639 3.91304 14.2508 3.89342 14.2342 3.8769L11.2664 0.907254C11.2324 0.873326 11.1878 0.855469 11.1396 0.855469C11.0914 0.855469 11.0467 0.873326 11.0128 0.907254L3.44314 8.4769C3.41635 8.50368 3.40028 8.53583 3.39314 8.57154L2.86635 11.5751C2.84898 11.6708 2.85519 11.7692 2.88443 11.862C2.91368 11.9547 2.96509 12.0389 3.03421 12.1073C3.15207 12.2215 3.30028 12.284 3.45921 12.284ZM4.66278 9.16975L11.1396 2.69475L12.4485 4.00368L5.97171 10.4787L4.38421 10.759L4.66278 9.16975ZM14.5717 13.784H1.42885C1.11278 13.784 0.857422 14.0394 0.857422 14.3555V14.9983C0.857422 15.0769 0.921708 15.1412 1.00028 15.1412H15.0003C15.0789 15.1412 15.1431 15.0769 15.1431 14.9983V14.3555C15.1431 14.0394 14.8878 13.784 14.5717 13.784Z",
|
|
582
|
+
fill: "#16203F"
|
|
583
|
+
}
|
|
584
|
+
) }),
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("clipPath", { id: "clip0_1096_2009", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
};
|
|
590
|
+
var EditIcon_default = EditIcon;
|
|
591
|
+
|
|
592
|
+
// src/assets/icons/DeleteIcon.tsx
|
|
593
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
594
|
+
var DeleteIcon = (props) => {
|
|
595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
596
|
+
"svg",
|
|
597
|
+
{
|
|
598
|
+
width: "16",
|
|
599
|
+
height: "16",
|
|
600
|
+
viewBox: "0 0 16 16",
|
|
601
|
+
fill: "none",
|
|
602
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
604
|
+
"path",
|
|
605
|
+
{
|
|
606
|
+
d: "M5.28544 2.14118H5.14258C5.22115 2.14118 5.28544 2.0769 5.28544 1.99833V2.14118H10.714V1.99833C10.714 2.0769 10.7783 2.14118 10.8569 2.14118H10.714V3.4269H11.9997V1.99833C11.9997 1.36797 11.4872 0.855469 10.8569 0.855469H5.14258C4.51222 0.855469 3.99972 1.36797 3.99972 1.99833V3.4269H5.28544V2.14118ZM14.2854 3.4269H1.71401C1.39794 3.4269 1.14258 3.68225 1.14258 3.99833V4.56975C1.14258 4.64833 1.20686 4.71261 1.28544 4.71261H2.36401L2.80508 14.0519C2.83365 14.6608 3.33722 15.1412 3.94615 15.1412H12.0533C12.664 15.1412 13.1658 14.6626 13.1944 14.0519L13.6354 4.71261H14.714C14.7926 4.71261 14.8569 4.64833 14.8569 4.56975V3.99833C14.8569 3.68225 14.6015 3.4269 14.2854 3.4269ZM11.9158 13.8555H4.08365L3.65151 4.71261H12.3479L11.9158 13.8555Z",
|
|
607
|
+
fill: "#FF4D4F"
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
};
|
|
613
|
+
var DeleteIcon_default = DeleteIcon;
|
|
614
|
+
|
|
615
|
+
// src/atoms/ChatAction.tsx
|
|
616
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
617
|
+
var ChatAction = (props) => {
|
|
618
|
+
const { id, title, onEdit, onDelete, activeId, onActiveChange } = props;
|
|
619
|
+
const [open, setOpen] = (0, import_react3.useState)(0);
|
|
620
|
+
const actionRef = (0, import_react3.useRef)(null);
|
|
621
|
+
const dotRef = (0, import_react3.useRef)(null);
|
|
622
|
+
(0, import_react3.useEffect)(() => {
|
|
623
|
+
function handleClickOutside(event) {
|
|
624
|
+
var _a, _b;
|
|
625
|
+
if (actionRef.current && !((_a = actionRef.current) == null ? void 0 : _a.contains(event.target)) && dotRef.current && !((_b = dotRef.current) == null ? void 0 : _b.contains(event.target)) && open == 0) {
|
|
626
|
+
setOpen(0);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
630
|
+
return () => {
|
|
631
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
632
|
+
};
|
|
633
|
+
}, []);
|
|
634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ic-w-full ic-relative", children: [
|
|
635
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
636
|
+
"div",
|
|
637
|
+
{
|
|
638
|
+
className: `ic-w-full clickable hover:ic-bg-dark-primary-100 hover:ic-font-bold ic-px-2 ic-rounded-md
|
|
639
|
+
${activeId == id ? "ic-bg-dark-primary-100 ic-font-bold " : ""}
|
|
640
|
+
`,
|
|
641
|
+
onClick: (e) => {
|
|
642
|
+
onActiveChange(id);
|
|
643
|
+
},
|
|
644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ic-flex ic-justify-between hover:font-bold hover:ic-text-dark-primary-500 ic-w-full ic-py-2 ic-gap-2 ic-items-center", children: [
|
|
645
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ic-flex ic-text-center ic-w-full ic-gap-2 ic-items-center ic-truncate", children: [
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
647
|
+
MessageIcon_default,
|
|
648
|
+
{
|
|
649
|
+
color: `${activeId == id ? "#20305f" : "#737373"} `
|
|
650
|
+
}
|
|
651
|
+
) }),
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
653
|
+
"p",
|
|
654
|
+
{
|
|
655
|
+
className: ` ic-text-sm ic-truncate
|
|
656
|
+
${activeId == id ? "ic-text-dark-primary-500" : ""}
|
|
657
|
+
`,
|
|
658
|
+
children: title
|
|
659
|
+
}
|
|
660
|
+
)
|
|
661
|
+
] }),
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
663
|
+
"p",
|
|
664
|
+
{
|
|
665
|
+
ref: dotRef,
|
|
666
|
+
className: "\r\n ic-select-none\r\n ic-flex ic-justify-center ic-items-center ic-w-10\r\n ic-font-bold ic-rounded-md\r\n ic-pb-2 clickable hover:ic-bg-slate-200 \r\n ",
|
|
667
|
+
onClick: () => {
|
|
668
|
+
setOpen(id == open ? 0 : id);
|
|
669
|
+
},
|
|
670
|
+
children: "..."
|
|
671
|
+
}
|
|
672
|
+
) })
|
|
673
|
+
] })
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
open === id && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
677
|
+
"div",
|
|
678
|
+
{
|
|
679
|
+
className: "ic-absolute ic-z-40 ic-top-10 ic-right-2 ic-p-2 ic-bg-white ic-shadow-md",
|
|
680
|
+
ref: actionRef,
|
|
681
|
+
onMouseEnter: (e) => {
|
|
682
|
+
e.preventDefault();
|
|
683
|
+
},
|
|
684
|
+
children: [
|
|
685
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
686
|
+
"div",
|
|
687
|
+
{
|
|
688
|
+
className: "ic-p-2 ic-flex ic-text-center ic-gap-2 clickable hover:ic-bg-slate-200",
|
|
689
|
+
onClick: () => {
|
|
690
|
+
onEdit(id);
|
|
691
|
+
},
|
|
692
|
+
children: [
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EditIcon_default, {}),
|
|
694
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "ic-text-sm ic-font-bold", children: "Edit" })
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
699
|
+
"div",
|
|
700
|
+
{
|
|
701
|
+
className: "ic-p-2 ic-flex ic-text-center ic-gap-2 clickable hover:ic-bg-slate-200 ",
|
|
702
|
+
onClick: () => {
|
|
703
|
+
onDelete(id);
|
|
704
|
+
},
|
|
705
|
+
children: [
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DeleteIcon_default, {}),
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "ic-text-sm ic-font-bold ic-text-red-500 ", children: "Delete" })
|
|
708
|
+
]
|
|
709
|
+
}
|
|
710
|
+
)
|
|
711
|
+
]
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
] });
|
|
715
|
+
};
|
|
716
|
+
var ChatAction_default = ChatAction;
|
|
717
|
+
|
|
718
|
+
// src/molecules/ChatHistory.tsx
|
|
719
|
+
var import_lodash = __toESM(require("lodash"));
|
|
720
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
721
|
+
var ChatHistory = (props) => {
|
|
722
|
+
const { data } = props;
|
|
723
|
+
const [activeId, setActiveId] = (0, import_react4.useState)(0);
|
|
724
|
+
const [isWide, setIsWide] = (0, import_react4.useState)(true);
|
|
725
|
+
const groupedData = (0, import_react4.useMemo)(() => {
|
|
726
|
+
const now = /* @__PURE__ */ new Date();
|
|
727
|
+
const grouped = import_lodash.default.groupBy(data, (item) => {
|
|
728
|
+
const d = new Date(item.date);
|
|
729
|
+
const isSameMonth = d.getMonth() === now.getMonth() && d.getFullYear() === now.getFullYear();
|
|
730
|
+
if (isSameMonth) return "This month";
|
|
731
|
+
return d.toLocaleString("en-US", { month: "short" });
|
|
732
|
+
});
|
|
733
|
+
return Object.entries(grouped).map(([key, value]) => ({
|
|
734
|
+
date: key,
|
|
735
|
+
data: value
|
|
736
|
+
}));
|
|
737
|
+
}, [data]);
|
|
738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
739
|
+
"div",
|
|
740
|
+
{
|
|
741
|
+
className: `
|
|
742
|
+
ic-transition-all ic-duration-300
|
|
743
|
+
${isWide ? "ic-max-w-screen-lg" : "ic-max-w-12"}
|
|
744
|
+
ic-w-full `,
|
|
745
|
+
children: [
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: " ic-sticky ic-top-0 ic-bg-white ic-py-2 ic-z-20", children: [
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
748
|
+
"div",
|
|
749
|
+
{
|
|
750
|
+
className: `ic-flex ic-justify-between ic-w-full
|
|
751
|
+
${cn({ "ic-flex-col ic-gap-4": !isWide })}
|
|
752
|
+
`,
|
|
753
|
+
children: [
|
|
754
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
className: `clickable
|
|
758
|
+
${!isWide && "ic-transform ic-scale-x-[-1]"}
|
|
759
|
+
`,
|
|
760
|
+
onClick: () => {
|
|
761
|
+
setIsWide(!isWide);
|
|
762
|
+
},
|
|
763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuFoldLineIcon_default, {})
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
!isWide && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "clickable ic-rounded-sm ic-p-1 ic-mt-5 hover:ic-bg-dark-primary-300", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(EditIcon_default, {}) }),
|
|
767
|
+
isWide && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "clickable", children: "New Chat" }),
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "clickable ic-rounded-sm ic-p-1 hover:ic-bg-dark-primary-300" })
|
|
769
|
+
]
|
|
770
|
+
}
|
|
771
|
+
),
|
|
772
|
+
isWide && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ic-mt-7 ic-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
773
|
+
InputForm_default,
|
|
774
|
+
{
|
|
775
|
+
type: "text",
|
|
776
|
+
name: "keyword",
|
|
777
|
+
placeholder: "Search history",
|
|
778
|
+
autoCorrect: "off",
|
|
779
|
+
autoCapitalize: "off",
|
|
780
|
+
spellCheck: "false",
|
|
781
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchIcon_default, {})
|
|
782
|
+
}
|
|
783
|
+
) })
|
|
784
|
+
] }),
|
|
785
|
+
isWide && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: groupedData.map(
|
|
786
|
+
(r, i) => {
|
|
787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ic-mt-5", children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "ic-font-bold ic-text-sm", children: r.date }),
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ic-px-2", children: r.data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
790
|
+
ChatAction_default,
|
|
791
|
+
{
|
|
792
|
+
title: item.title,
|
|
793
|
+
id: item.id,
|
|
794
|
+
activeId,
|
|
795
|
+
onEdit: (id) => {
|
|
796
|
+
},
|
|
797
|
+
onDelete: (id) => {
|
|
798
|
+
},
|
|
799
|
+
onActiveChange: (id) => {
|
|
800
|
+
setActiveId(id);
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
`chat-action-${item.id}-${index}`
|
|
804
|
+
)) })
|
|
805
|
+
] }, `chat-history-${r.date}-${i}`);
|
|
806
|
+
}
|
|
807
|
+
) })
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
};
|
|
812
|
+
var ChatHistory_default = ChatHistory;
|
|
813
|
+
|
|
814
|
+
// src/atoms/SuggestionChat.tsx
|
|
815
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
816
|
+
var SuggestionChat = (props) => {
|
|
817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: "SuggestionChat" });
|
|
818
|
+
};
|
|
819
|
+
var SuggestionChat_default = SuggestionChat;
|
|
820
|
+
|
|
821
|
+
// src/molecules/Chatting.tsx
|
|
822
|
+
var import_react5 = require("react");
|
|
823
|
+
|
|
824
|
+
// src/assets/icons/FlexaIcon.tsx
|
|
825
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
826
|
+
var FlexaIcon = (props) => {
|
|
827
|
+
const { w, h } = props;
|
|
828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
829
|
+
"svg",
|
|
830
|
+
{
|
|
831
|
+
width: w || 40,
|
|
832
|
+
height: h || 40,
|
|
833
|
+
viewBox: "0 0 40 40",
|
|
834
|
+
fill: "none",
|
|
835
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
836
|
+
children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
838
|
+
"path",
|
|
839
|
+
{
|
|
840
|
+
d: "M3.8513 8.02435C5.0388 5.44935 7.53255 3.3806 10.445 3.27435C15.295 3.0306 20.1638 3.14935 25.02 3.3431C22.8638 4.94935 20.5388 6.91185 20.1638 9.74935C19.7013 13.1244 19.9763 16.5494 19.97 19.9494C15.5638 20.0306 10.6825 19.1244 6.7138 21.5181C3.3513 23.5869 3.0263 27.9494 3.38255 31.4994C2.89505 25.8994 3.34505 20.2806 3.15755 14.6744C3.20755 12.4556 2.9388 10.1119 3.8513 8.02435Z",
|
|
841
|
+
fill: "#24315E"
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
845
|
+
"path",
|
|
846
|
+
{
|
|
847
|
+
d: "M25.02 3.343C28.1325 2.87425 31.8013 2.993 34.1388 5.41175C38.2263 9.1555 37.1888 17.0617 31.945 19.2367C28.1263 20.6492 23.945 20.0117 19.97 19.9492C19.9763 16.5492 19.7013 13.1242 20.1638 9.74925C20.5388 6.91175 22.8638 4.94925 25.02 3.343Z",
|
|
848
|
+
fill: "#F37C21"
|
|
849
|
+
}
|
|
850
|
+
),
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
852
|
+
"path",
|
|
853
|
+
{
|
|
854
|
+
d: "M6.71366 21.518C10.6824 19.1243 15.5637 20.0305 19.9699 19.9493C19.9637 23.6805 20.4199 27.5118 19.4012 31.1618C18.3949 34.7118 14.7887 37.243 11.0949 36.9243C7.65741 36.9493 4.91991 34.3493 3.38241 31.4993C2.66357 28.1118 3.35116 23.5868 6.71366 21.518Z",
|
|
855
|
+
fill: "#189DD8"
|
|
856
|
+
}
|
|
857
|
+
)
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
) });
|
|
861
|
+
};
|
|
862
|
+
var FlexaIcon_default = FlexaIcon;
|
|
863
|
+
|
|
864
|
+
// src/assets/icons/ClockIcon.tsx
|
|
865
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
866
|
+
var ClockIcon = (props) => {
|
|
867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
868
|
+
"svg",
|
|
869
|
+
{
|
|
870
|
+
width: "12",
|
|
871
|
+
height: "12",
|
|
872
|
+
viewBox: "0 0 12 12",
|
|
873
|
+
fill: "none",
|
|
874
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
875
|
+
children: [
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("g", { clipPath: "url(#clip0_1096_17248)", children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
878
|
+
"path",
|
|
879
|
+
{
|
|
880
|
+
d: "M6 0C2.68661 0 0 2.68661 0 6C0 9.31339 2.68661 12 6 12C9.31339 12 12 9.31339 12 6C12 2.68661 9.31339 0 6 0ZM6 10.9821C3.24911 10.9821 1.01786 8.75089 1.01786 6C1.01786 3.24911 3.24911 1.01786 6 1.01786C8.75089 1.01786 10.9821 3.24911 10.9821 6C10.9821 8.75089 8.75089 10.9821 6 10.9821Z",
|
|
881
|
+
fill: "#8C8C8C"
|
|
882
|
+
}
|
|
883
|
+
),
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
885
|
+
"path",
|
|
886
|
+
{
|
|
887
|
+
d: "M8.33984 7.69428L6.43002 6.31348V2.99874C6.43002 2.93982 6.3818 2.8916 6.32287 2.8916H5.67868C5.61975 2.8916 5.57153 2.93982 5.57153 2.99874V6.68714C5.57153 6.72196 5.5876 6.7541 5.61573 6.77419L7.83091 8.38937C7.87912 8.42419 7.94609 8.41348 7.98091 8.3666L8.36394 7.84428C8.39877 7.79473 8.38805 7.72776 8.33984 7.69428Z",
|
|
888
|
+
fill: "#8C8C8C"
|
|
889
|
+
}
|
|
890
|
+
)
|
|
891
|
+
] }),
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("clipPath", { id: "clip0_1096_17248", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { width: "12", height: "12", fill: "white" }) }) })
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
};
|
|
897
|
+
var ClockIcon_default = ClockIcon;
|
|
898
|
+
|
|
899
|
+
// src/atoms/AdminChatResponse.tsx
|
|
900
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
901
|
+
var AdminChatResponse = (props) => {
|
|
902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ic-flex ic-gap-4", children: [
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ic-h-10 ic-w-10 ic-bg-white ic-shrink-0 ic-grow-0 ic-shadow-sm ic-rounded-md ic-flex ic-justify-center ic-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FlexaIcon_default, { w: 24, h: 24 }) }) }),
|
|
904
|
+
props.isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ic-mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CustomLoading_default, { size: "8px" }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ic-bg-white ic-shadow-sm ic-p-3 ic-rounded-md", children: [
|
|
905
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "ic-text-sm", children: props.message || "" }),
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { className: "ic-mt-2 ic-w-full text-neutral-700 ic-items-center ic-text-sm ic-flex ic-gap-1 ic-justify-start", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ClockIcon_default, {}),
|
|
908
|
+
" ",
|
|
909
|
+
props.time
|
|
910
|
+
] })
|
|
911
|
+
] })
|
|
912
|
+
] });
|
|
913
|
+
};
|
|
914
|
+
var AdminChatResponse_default = AdminChatResponse;
|
|
915
|
+
|
|
916
|
+
// src/atoms/UserChatResponse.tsx
|
|
917
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
918
|
+
var UserChatResponse = (props) => {
|
|
919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ic-bg-white ic-shadow-sm ic-p-3 ic-rounded-md ic-w-fit", children: [
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "ic-text-sm", children: props.message }),
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "ic-mt-2 ic-w-full text-neutral-700 ic-items-center ic-text-sm ic-flex ic-gap-1 ic-justify-end", children: [
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ClockIcon_default, {}),
|
|
923
|
+
" ",
|
|
924
|
+
props.time
|
|
925
|
+
] })
|
|
926
|
+
] });
|
|
927
|
+
};
|
|
928
|
+
var UserChatResponse_default = UserChatResponse;
|
|
929
|
+
|
|
930
|
+
// src/molecules/Chatting.tsx
|
|
931
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
932
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
933
|
+
var Chatting = (props) => {
|
|
934
|
+
const { chats, isLoadingResponse } = useChat();
|
|
935
|
+
const chatCanvasRef = (0, import_react5.useRef)(null);
|
|
936
|
+
const [isUserAtBottom, setIsUserAtBottom] = (0, import_react5.useState)(true);
|
|
937
|
+
const handleScroll = () => {
|
|
938
|
+
const el = chatCanvasRef.current;
|
|
939
|
+
if (!el) return;
|
|
940
|
+
setIsUserAtBottom(el.scrollHeight - el.scrollTop - el.clientHeight < 10);
|
|
941
|
+
};
|
|
942
|
+
(0, import_react5.useEffect)(() => {
|
|
943
|
+
const el = chatCanvasRef.current;
|
|
944
|
+
if (!el) return;
|
|
945
|
+
if (isUserAtBottom) {
|
|
946
|
+
el.scrollTop = el.scrollHeight;
|
|
947
|
+
}
|
|
948
|
+
}, [chats, isUserAtBottom]);
|
|
949
|
+
(0, import_react5.useEffect)(() => {
|
|
950
|
+
if (!isLoadingResponse && chats.length > 0) {
|
|
951
|
+
const lastChat = chats[chats.length - 1];
|
|
952
|
+
if (lastChat.status === "COMPLETE") {
|
|
953
|
+
props.onResponseChat && props.onResponseChat(lastChat);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}, [chats, isLoadingResponse]);
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
958
|
+
"div",
|
|
959
|
+
{
|
|
960
|
+
ref: chatCanvasRef,
|
|
961
|
+
onScroll: handleScroll,
|
|
962
|
+
className: "ic-h-full ic-overflow-auto ic-relative ic-w-full ic-flex-col ic-items-center ic-justify-between ic-flex ",
|
|
963
|
+
children: [
|
|
964
|
+
chats.length < 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", {}),
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ic-w-full ic-flex ic-justify-center", children: chats.length < 1 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "ic-flex ic-flex-col ic-text-center ic-items-center ic-gap-4", children: [
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FlexaIcon_default, {}),
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "ic-text-dark-primary-500 ic-font-bold ic-text-xl ic-text-center", children: [
|
|
968
|
+
"Welcome to FlexA Copilot",
|
|
969
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {}),
|
|
970
|
+
"How i can assist you today?"
|
|
971
|
+
] })
|
|
972
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ic-w-full ic-max-w-5xl ic-flex ic-flex-col ic-space-y-4 ", children: chats.map((item) => {
|
|
973
|
+
const input = JSON.parse(
|
|
974
|
+
item.input
|
|
975
|
+
);
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
977
|
+
"div",
|
|
978
|
+
{
|
|
979
|
+
className: " ic-flex ic-flex-col ic-space-y-4 ic-w-full ",
|
|
980
|
+
children: [
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: " ic-w-full ic-flex ic-justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ic-w-full ic-flex ic-justify-end ic-max-w-4xl ic-pr-4 ic-pl-20", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
982
|
+
UserChatResponse_default,
|
|
983
|
+
{
|
|
984
|
+
message: input.message,
|
|
985
|
+
time: (0, import_dayjs.default)(item.createDate).format("HH:mm")
|
|
986
|
+
}
|
|
987
|
+
) }) }),
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: " ic-w-full ic-flex ic-justify-start ic-pr-20", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ic-w-full ic-max-w-4xl", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
989
|
+
AdminChatResponse_default,
|
|
990
|
+
{
|
|
991
|
+
message: item.output,
|
|
992
|
+
isLoading: item.status === "RUNNING",
|
|
993
|
+
time: (0, import_dayjs.default)(item.endDate).format("HH:mm")
|
|
994
|
+
}
|
|
995
|
+
) }) })
|
|
996
|
+
]
|
|
997
|
+
},
|
|
998
|
+
`chat-response-${item.jobId}`
|
|
999
|
+
);
|
|
1000
|
+
}) }) }),
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ic-sticky ic-mt-4 ic-bottom-0 ic-w-full ic-flex ic-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChatSender_default, {}) })
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
1005
|
+
};
|
|
1006
|
+
var Chatting_default = Chatting;
|
|
1007
|
+
|
|
1008
|
+
// src/index.tsx
|
|
1009
|
+
var index_default = IntellinumChat_default;
|
|
1010
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1011
|
+
0 && (module.exports = {
|
|
1012
|
+
ChatHistory,
|
|
1013
|
+
ChatProvider,
|
|
1014
|
+
ChatSender,
|
|
1015
|
+
Chatting,
|
|
1016
|
+
SuggestionChat,
|
|
1017
|
+
useChat
|
|
1018
|
+
});
|
|
1019
|
+
//# sourceMappingURL=index.js.map
|