@kite-copilot/chat-panel 0.2.44 → 0.2.45
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/auto.cjs +32 -1
- package/dist/auto.js +1 -1
- package/dist/{chunk-G74XTXWW.js → chunk-262FS4KW.js} +32 -1
- package/dist/embed.global.js +12 -12
- package/dist/index.cjs +32 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/auto.cjs
CHANGED
|
@@ -1023,7 +1023,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
1023
1023
|
|
|
1024
1024
|
// src/ChatPanel.tsx
|
|
1025
1025
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1026
|
-
var CHAT_PANEL_VERSION = true ? "0.2.
|
|
1026
|
+
var CHAT_PANEL_VERSION = true ? "0.2.45" : "dev";
|
|
1027
1027
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
1028
1028
|
var PANEL_WIDTH = 340;
|
|
1029
1029
|
function unescapeJsonString(str) {
|
|
@@ -1498,6 +1498,37 @@ function ChatPanel({
|
|
|
1498
1498
|
enabled: !!effectiveProductBackendUrl && orgConfigState.status === "success"
|
|
1499
1499
|
// Only enable after config is fetched
|
|
1500
1500
|
});
|
|
1501
|
+
React6.useEffect(() => {
|
|
1502
|
+
if (!effectiveProductBackendUrl || orgConfigState.status !== "success") {
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
const testUserSiteEndpoint = async () => {
|
|
1506
|
+
const url = `${effectiveProductBackendUrl}/userSite`;
|
|
1507
|
+
console.log("[KiteChat TEST] Testing GET /userSite endpoint...");
|
|
1508
|
+
console.log("[KiteChat TEST] URL:", url);
|
|
1509
|
+
try {
|
|
1510
|
+
const response = await fetch(url, {
|
|
1511
|
+
method: "GET",
|
|
1512
|
+
credentials: "include",
|
|
1513
|
+
headers: {
|
|
1514
|
+
"Accept": "application/json"
|
|
1515
|
+
}
|
|
1516
|
+
});
|
|
1517
|
+
console.log("[KiteChat TEST] /userSite response status:", response.status);
|
|
1518
|
+
console.log("[KiteChat TEST] /userSite response ok:", response.ok);
|
|
1519
|
+
if (response.ok) {
|
|
1520
|
+
const data = await response.json();
|
|
1521
|
+
console.log("[KiteChat TEST] /userSite SUCCESS - data:", data);
|
|
1522
|
+
} else {
|
|
1523
|
+
const errorText = await response.text();
|
|
1524
|
+
console.log("[KiteChat TEST] /userSite FAILED - status:", response.status, "body:", errorText);
|
|
1525
|
+
}
|
|
1526
|
+
} catch (error) {
|
|
1527
|
+
console.error("[KiteChat TEST] /userSite ERROR:", error);
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
testUserSiteEndpoint();
|
|
1531
|
+
}, [effectiveProductBackendUrl, orgConfigState.status]);
|
|
1501
1532
|
const effectiveUser = React6.useMemo(() => {
|
|
1502
1533
|
if (authState.status === "authenticated") {
|
|
1503
1534
|
return {
|
package/dist/auto.js
CHANGED
|
@@ -1024,7 +1024,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
1024
1024
|
|
|
1025
1025
|
// src/ChatPanel.tsx
|
|
1026
1026
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1027
|
-
var CHAT_PANEL_VERSION = true ? "0.2.
|
|
1027
|
+
var CHAT_PANEL_VERSION = true ? "0.2.45" : "dev";
|
|
1028
1028
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
1029
1029
|
var PANEL_WIDTH = 340;
|
|
1030
1030
|
function unescapeJsonString(str) {
|
|
@@ -1499,6 +1499,37 @@ function ChatPanel({
|
|
|
1499
1499
|
enabled: !!effectiveProductBackendUrl && orgConfigState.status === "success"
|
|
1500
1500
|
// Only enable after config is fetched
|
|
1501
1501
|
});
|
|
1502
|
+
React6.useEffect(() => {
|
|
1503
|
+
if (!effectiveProductBackendUrl || orgConfigState.status !== "success") {
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
const testUserSiteEndpoint = async () => {
|
|
1507
|
+
const url = `${effectiveProductBackendUrl}/userSite`;
|
|
1508
|
+
console.log("[KiteChat TEST] Testing GET /userSite endpoint...");
|
|
1509
|
+
console.log("[KiteChat TEST] URL:", url);
|
|
1510
|
+
try {
|
|
1511
|
+
const response = await fetch(url, {
|
|
1512
|
+
method: "GET",
|
|
1513
|
+
credentials: "include",
|
|
1514
|
+
headers: {
|
|
1515
|
+
"Accept": "application/json"
|
|
1516
|
+
}
|
|
1517
|
+
});
|
|
1518
|
+
console.log("[KiteChat TEST] /userSite response status:", response.status);
|
|
1519
|
+
console.log("[KiteChat TEST] /userSite response ok:", response.ok);
|
|
1520
|
+
if (response.ok) {
|
|
1521
|
+
const data = await response.json();
|
|
1522
|
+
console.log("[KiteChat TEST] /userSite SUCCESS - data:", data);
|
|
1523
|
+
} else {
|
|
1524
|
+
const errorText = await response.text();
|
|
1525
|
+
console.log("[KiteChat TEST] /userSite FAILED - status:", response.status, "body:", errorText);
|
|
1526
|
+
}
|
|
1527
|
+
} catch (error) {
|
|
1528
|
+
console.error("[KiteChat TEST] /userSite ERROR:", error);
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
testUserSiteEndpoint();
|
|
1532
|
+
}, [effectiveProductBackendUrl, orgConfigState.status]);
|
|
1502
1533
|
const effectiveUser = React6.useMemo(() => {
|
|
1503
1534
|
if (authState.status === "authenticated") {
|
|
1504
1535
|
return {
|