@kite-copilot/chat-panel 0.2.44 → 0.2.46
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-4HIWUL6E.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/index.cjs
CHANGED
|
@@ -1077,7 +1077,7 @@ function TypingIndicator({ className = "" }) {
|
|
|
1077
1077
|
|
|
1078
1078
|
// src/ChatPanel.tsx
|
|
1079
1079
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1080
|
-
var CHAT_PANEL_VERSION = true ? "0.2.
|
|
1080
|
+
var CHAT_PANEL_VERSION = true ? "0.2.46" : "dev";
|
|
1081
1081
|
var DEFAULT_AGENT_URL = "http://localhost:5002";
|
|
1082
1082
|
var PANEL_WIDTH = 340;
|
|
1083
1083
|
function unescapeJsonString(str) {
|
|
@@ -1552,6 +1552,37 @@ function ChatPanel({
|
|
|
1552
1552
|
enabled: !!effectiveProductBackendUrl && orgConfigState.status === "success"
|
|
1553
1553
|
// Only enable after config is fetched
|
|
1554
1554
|
});
|
|
1555
|
+
React6.useEffect(() => {
|
|
1556
|
+
if (!effectiveProductBackendUrl || orgConfigState.status !== "success") {
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
const testProductBackendEndpoint = async () => {
|
|
1560
|
+
const url = `${effectiveProductBackendUrl}/getDocument/snowkite/categories/`;
|
|
1561
|
+
console.log("[KiteChat TEST] Testing product backend connectivity...");
|
|
1562
|
+
console.log("[KiteChat TEST] URL:", url);
|
|
1563
|
+
try {
|
|
1564
|
+
const response = await fetch(url, {
|
|
1565
|
+
method: "GET",
|
|
1566
|
+
// Note: not using credentials: 'include' to avoid CORS issues with wildcard
|
|
1567
|
+
headers: {
|
|
1568
|
+
"Accept": "application/json"
|
|
1569
|
+
}
|
|
1570
|
+
});
|
|
1571
|
+
console.log("[KiteChat TEST] Response status:", response.status);
|
|
1572
|
+
console.log("[KiteChat TEST] Response ok:", response.ok);
|
|
1573
|
+
if (response.ok) {
|
|
1574
|
+
const data = await response.json();
|
|
1575
|
+
console.log("[KiteChat TEST] SUCCESS - product backend reachable, data:", data);
|
|
1576
|
+
} else {
|
|
1577
|
+
const errorText = await response.text();
|
|
1578
|
+
console.log("[KiteChat TEST] FAILED - status:", response.status, "body:", errorText);
|
|
1579
|
+
}
|
|
1580
|
+
} catch (error) {
|
|
1581
|
+
console.error("[KiteChat TEST] ERROR:", error);
|
|
1582
|
+
}
|
|
1583
|
+
};
|
|
1584
|
+
testProductBackendEndpoint();
|
|
1585
|
+
}, [effectiveProductBackendUrl, orgConfigState.status]);
|
|
1555
1586
|
const effectiveUser = React6.useMemo(() => {
|
|
1556
1587
|
if (authState.status === "authenticated") {
|
|
1557
1588
|
return {
|
package/dist/index.js
CHANGED