@kite-copilot/chat-panel 0.2.38 → 0.2.39

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
@@ -915,7 +915,7 @@ function TypingIndicator({ className = "" }) {
915
915
 
916
916
  // src/ChatPanel.tsx
917
917
  var import_jsx_runtime10 = require("react/jsx-runtime");
918
- var CHAT_PANEL_VERSION = true ? "0.2.38" : "dev";
918
+ var CHAT_PANEL_VERSION = true ? "0.2.39" : "dev";
919
919
  var DEFAULT_AGENT_URL = "http://localhost:5002";
920
920
  var PANEL_WIDTH = 340;
921
921
  function unescapeJsonString(str) {
@@ -1365,11 +1365,22 @@ function ChatPanel({
1365
1365
  console.log(`[KiteChat] Chat Panel v${CHAT_PANEL_VERSION} loaded`);
1366
1366
  }, []);
1367
1367
  const resetSession = React4.useCallback(() => {
1368
+ console.log("[KiteChat] resetSession called", { isEscalated, hasSupabase: !!supabaseRef.current, sessionId });
1368
1369
  if (isEscalated && supabaseRef.current && sessionId) {
1370
+ console.log("[KiteChat] Updating customer_status to disconnected for session:", sessionId);
1369
1371
  supabaseRef.current.from("escalations").update({
1370
1372
  customer_status: "disconnected",
1371
1373
  customer_last_seen: (/* @__PURE__ */ new Date()).toISOString()
1372
- }).eq("session_id", sessionId);
1374
+ }).eq("session_id", sessionId).then(
1375
+ (result) => {
1376
+ console.log("[KiteChat] Disconnect update result:", result);
1377
+ },
1378
+ (err) => {
1379
+ console.error("[KiteChat] Disconnect update failed:", err);
1380
+ }
1381
+ );
1382
+ } else {
1383
+ console.log("[KiteChat] Skipping disconnect update - conditions not met");
1373
1384
  }
1374
1385
  setSessionId(crypto.randomUUID());
1375
1386
  setIsEscalated(false);
package/dist/auto.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createKiteChat
3
- } from "./chunk-QSVOPKVC.js";
3
+ } from "./chunk-D4Z7O3Y7.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -916,7 +916,7 @@ function TypingIndicator({ className = "" }) {
916
916
 
917
917
  // src/ChatPanel.tsx
918
918
  import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
919
- var CHAT_PANEL_VERSION = true ? "0.2.38" : "dev";
919
+ var CHAT_PANEL_VERSION = true ? "0.2.39" : "dev";
920
920
  var DEFAULT_AGENT_URL = "http://localhost:5002";
921
921
  var PANEL_WIDTH = 340;
922
922
  function unescapeJsonString(str) {
@@ -1366,11 +1366,22 @@ function ChatPanel({
1366
1366
  console.log(`[KiteChat] Chat Panel v${CHAT_PANEL_VERSION} loaded`);
1367
1367
  }, []);
1368
1368
  const resetSession = React4.useCallback(() => {
1369
+ console.log("[KiteChat] resetSession called", { isEscalated, hasSupabase: !!supabaseRef.current, sessionId });
1369
1370
  if (isEscalated && supabaseRef.current && sessionId) {
1371
+ console.log("[KiteChat] Updating customer_status to disconnected for session:", sessionId);
1370
1372
  supabaseRef.current.from("escalations").update({
1371
1373
  customer_status: "disconnected",
1372
1374
  customer_last_seen: (/* @__PURE__ */ new Date()).toISOString()
1373
- }).eq("session_id", sessionId);
1375
+ }).eq("session_id", sessionId).then(
1376
+ (result) => {
1377
+ console.log("[KiteChat] Disconnect update result:", result);
1378
+ },
1379
+ (err) => {
1380
+ console.error("[KiteChat] Disconnect update failed:", err);
1381
+ }
1382
+ );
1383
+ } else {
1384
+ console.log("[KiteChat] Skipping disconnect update - conditions not met");
1374
1385
  }
1375
1386
  setSessionId(crypto.randomUUID());
1376
1387
  setIsEscalated(false);