@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 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.44" : "dev";
1026
+ var CHAT_PANEL_VERSION = true ? "0.2.46" : "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 testProductBackendEndpoint = async () => {
1506
+ const url = `${effectiveProductBackendUrl}/getDocument/snowkite/categories/`;
1507
+ console.log("[KiteChat TEST] Testing product backend connectivity...");
1508
+ console.log("[KiteChat TEST] URL:", url);
1509
+ try {
1510
+ const response = await fetch(url, {
1511
+ method: "GET",
1512
+ // Note: not using credentials: 'include' to avoid CORS issues with wildcard
1513
+ headers: {
1514
+ "Accept": "application/json"
1515
+ }
1516
+ });
1517
+ console.log("[KiteChat TEST] Response status:", response.status);
1518
+ console.log("[KiteChat TEST] Response ok:", response.ok);
1519
+ if (response.ok) {
1520
+ const data = await response.json();
1521
+ console.log("[KiteChat TEST] SUCCESS - product backend reachable, data:", data);
1522
+ } else {
1523
+ const errorText = await response.text();
1524
+ console.log("[KiteChat TEST] FAILED - status:", response.status, "body:", errorText);
1525
+ }
1526
+ } catch (error) {
1527
+ console.error("[KiteChat TEST] ERROR:", error);
1528
+ }
1529
+ };
1530
+ testProductBackendEndpoint();
1531
+ }, [effectiveProductBackendUrl, orgConfigState.status]);
1501
1532
  const effectiveUser = React6.useMemo(() => {
1502
1533
  if (authState.status === "authenticated") {
1503
1534
  return {
package/dist/auto.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createKiteChat
3
- } from "./chunk-G74XTXWW.js";
3
+ } from "./chunk-4HIWUL6E.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -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.44" : "dev";
1027
+ var CHAT_PANEL_VERSION = true ? "0.2.46" : "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 testProductBackendEndpoint = async () => {
1507
+ const url = `${effectiveProductBackendUrl}/getDocument/snowkite/categories/`;
1508
+ console.log("[KiteChat TEST] Testing product backend connectivity...");
1509
+ console.log("[KiteChat TEST] URL:", url);
1510
+ try {
1511
+ const response = await fetch(url, {
1512
+ method: "GET",
1513
+ // Note: not using credentials: 'include' to avoid CORS issues with wildcard
1514
+ headers: {
1515
+ "Accept": "application/json"
1516
+ }
1517
+ });
1518
+ console.log("[KiteChat TEST] Response status:", response.status);
1519
+ console.log("[KiteChat TEST] Response ok:", response.ok);
1520
+ if (response.ok) {
1521
+ const data = await response.json();
1522
+ console.log("[KiteChat TEST] SUCCESS - product backend reachable, data:", data);
1523
+ } else {
1524
+ const errorText = await response.text();
1525
+ console.log("[KiteChat TEST] FAILED - status:", response.status, "body:", errorText);
1526
+ }
1527
+ } catch (error) {
1528
+ console.error("[KiteChat TEST] ERROR:", error);
1529
+ }
1530
+ };
1531
+ testProductBackendEndpoint();
1532
+ }, [effectiveProductBackendUrl, orgConfigState.status]);
1502
1533
  const effectiveUser = React6.useMemo(() => {
1503
1534
  if (authState.status === "authenticated") {
1504
1535
  return {