llmasaservice-ui 0.9.5 → 0.9.7
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -17
- package/dist/index.mjs +20 -17
- package/package.json +1 -1
- package/src/AgentPanel.tsx +3 -2
- package/src/ChatPanel.tsx +18 -16
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -500,22 +500,24 @@ var ChatPanel = ({
|
|
|
500
500
|
}
|
|
501
501
|
if (needsUpdate) {
|
|
502
502
|
ensureConversation().then((convId) => {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
503
|
+
if (convId && convId !== "") {
|
|
504
|
+
console.log(
|
|
505
|
+
"updating conversation with customer id and email",
|
|
506
|
+
convId,
|
|
507
|
+
currentCustomer
|
|
508
|
+
);
|
|
509
|
+
const r = fetch(`${publicAPIUrl}/conversations/${convId}`, {
|
|
510
|
+
method: "POST",
|
|
511
|
+
headers: {
|
|
512
|
+
"Content-Type": "application/json"
|
|
513
|
+
},
|
|
514
|
+
body: JSON.stringify({
|
|
515
|
+
project_id: project_id != null ? project_id : "",
|
|
516
|
+
customerId: updatedValues.customer_id,
|
|
517
|
+
customerEmail: updatedValues.customer_user_email
|
|
518
|
+
})
|
|
519
|
+
});
|
|
520
|
+
}
|
|
519
521
|
});
|
|
520
522
|
setCurrentCustomer(updatedValues);
|
|
521
523
|
}
|
|
@@ -1375,7 +1377,7 @@ var AgentPanel = ({
|
|
|
1375
1377
|
thumbsUpClick,
|
|
1376
1378
|
thumbsDownClick,
|
|
1377
1379
|
theme,
|
|
1378
|
-
|
|
1380
|
+
markdownClass = null,
|
|
1379
1381
|
width,
|
|
1380
1382
|
height,
|
|
1381
1383
|
url = "https://chat.llmasaservice.io/",
|
|
@@ -1456,6 +1458,7 @@ var AgentPanel = ({
|
|
|
1456
1458
|
url,
|
|
1457
1459
|
title: (_a = agentData == null ? void 0 : agentData.displayTitle) != null ? _a : "",
|
|
1458
1460
|
theme: theme ? theme : (agentData == null ? void 0 : agentData.displayTheme) === "light" ? "light" : "dark",
|
|
1461
|
+
markdownClass: markdownClass != null ? markdownClass : void 0,
|
|
1459
1462
|
cssUrl: (_b = agentData == null ? void 0 : agentData.cssUrl) != null ? _b : "",
|
|
1460
1463
|
height: height ? height : (_c = agentData == null ? void 0 : agentData.displayHeight) != null ? _c : "100vh",
|
|
1461
1464
|
width: width ? width : (_d = agentData == null ? void 0 : agentData.displayWidth) != null ? _d : "100%",
|
package/dist/index.mjs
CHANGED
|
@@ -466,22 +466,24 @@ var ChatPanel = ({
|
|
|
466
466
|
}
|
|
467
467
|
if (needsUpdate) {
|
|
468
468
|
ensureConversation().then((convId) => {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
469
|
+
if (convId && convId !== "") {
|
|
470
|
+
console.log(
|
|
471
|
+
"updating conversation with customer id and email",
|
|
472
|
+
convId,
|
|
473
|
+
currentCustomer
|
|
474
|
+
);
|
|
475
|
+
const r = fetch(`${publicAPIUrl}/conversations/${convId}`, {
|
|
476
|
+
method: "POST",
|
|
477
|
+
headers: {
|
|
478
|
+
"Content-Type": "application/json"
|
|
479
|
+
},
|
|
480
|
+
body: JSON.stringify({
|
|
481
|
+
project_id: project_id != null ? project_id : "",
|
|
482
|
+
customerId: updatedValues.customer_id,
|
|
483
|
+
customerEmail: updatedValues.customer_user_email
|
|
484
|
+
})
|
|
485
|
+
});
|
|
486
|
+
}
|
|
485
487
|
});
|
|
486
488
|
setCurrentCustomer(updatedValues);
|
|
487
489
|
}
|
|
@@ -1341,7 +1343,7 @@ var AgentPanel = ({
|
|
|
1341
1343
|
thumbsUpClick,
|
|
1342
1344
|
thumbsDownClick,
|
|
1343
1345
|
theme,
|
|
1344
|
-
|
|
1346
|
+
markdownClass = null,
|
|
1345
1347
|
width,
|
|
1346
1348
|
height,
|
|
1347
1349
|
url = "https://chat.llmasaservice.io/",
|
|
@@ -1422,6 +1424,7 @@ var AgentPanel = ({
|
|
|
1422
1424
|
url,
|
|
1423
1425
|
title: (_a = agentData == null ? void 0 : agentData.displayTitle) != null ? _a : "",
|
|
1424
1426
|
theme: theme ? theme : (agentData == null ? void 0 : agentData.displayTheme) === "light" ? "light" : "dark",
|
|
1427
|
+
markdownClass: markdownClass != null ? markdownClass : void 0,
|
|
1425
1428
|
cssUrl: (_b = agentData == null ? void 0 : agentData.cssUrl) != null ? _b : "",
|
|
1426
1429
|
height: height ? height : (_c = agentData == null ? void 0 : agentData.displayHeight) != null ? _c : "100vh",
|
|
1427
1430
|
width: width ? width : (_d = agentData == null ? void 0 : agentData.displayWidth) != null ? _d : "100%",
|
package/package.json
CHANGED
package/src/AgentPanel.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export interface AgentPanelProps {
|
|
|
18
18
|
thumbsUpClick?: (callId: string) => void;
|
|
19
19
|
thumbsDownClick?: (callId: string) => void;
|
|
20
20
|
theme?: "light" | "dark";
|
|
21
|
-
|
|
21
|
+
markdownClass?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
height?: string;
|
|
24
24
|
url?: string;
|
|
@@ -78,7 +78,7 @@ const AgentPanel: React.FC<AgentPanelProps & ExtraProps> = ({
|
|
|
78
78
|
thumbsUpClick,
|
|
79
79
|
thumbsDownClick,
|
|
80
80
|
theme,
|
|
81
|
-
|
|
81
|
+
markdownClass = null,
|
|
82
82
|
width,
|
|
83
83
|
height,
|
|
84
84
|
url = "https://chat.llmasaservice.io/",
|
|
@@ -178,6 +178,7 @@ const AgentPanel: React.FC<AgentPanelProps & ExtraProps> = ({
|
|
|
178
178
|
? "light"
|
|
179
179
|
: "dark"
|
|
180
180
|
}
|
|
181
|
+
markdownClass={markdownClass ?? undefined}
|
|
181
182
|
cssUrl={agentData?.cssUrl ?? ""}
|
|
182
183
|
height={height ? height : agentData?.displayHeight ?? "100vh"}
|
|
183
184
|
width={width ? width : agentData?.displayWidth ?? "100%"}
|
package/src/ChatPanel.tsx
CHANGED
|
@@ -510,23 +510,25 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
|
|
|
510
510
|
if (needsUpdate) {
|
|
511
511
|
// update the customer id and email in the conversation
|
|
512
512
|
ensureConversation().then((convId) => {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
513
|
+
if (convId && convId !== "") {
|
|
514
|
+
console.log(
|
|
515
|
+
"updating conversation with customer id and email",
|
|
516
|
+
convId,
|
|
517
|
+
currentCustomer
|
|
518
|
+
);
|
|
518
519
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
520
|
+
const r = fetch(`${publicAPIUrl}/conversations/${convId}`, {
|
|
521
|
+
method: "POST",
|
|
522
|
+
headers: {
|
|
523
|
+
"Content-Type": "application/json",
|
|
524
|
+
},
|
|
525
|
+
body: JSON.stringify({
|
|
526
|
+
project_id: project_id ?? "",
|
|
527
|
+
customerId: updatedValues.customer_id,
|
|
528
|
+
customerEmail: updatedValues.customer_user_email,
|
|
529
|
+
}),
|
|
530
|
+
});
|
|
531
|
+
}
|
|
530
532
|
});
|
|
531
533
|
|
|
532
534
|
setCurrentCustomer(updatedValues);
|