@finogeeks2026/chatkit-web 0.0.11 → 0.0.12

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -991,15 +991,22 @@ async function tc() {
991
991
  Ql(),
992
992
  ec()
993
993
  ]);
994
- t.length > 0 && Ne.setState({
995
- sessions: t,
996
- currentSessionId: n || ((e = t[0]) == null ? void 0 : e.id) || null
997
- });
994
+ if (t.length > 0) {
995
+ const r = n && t.some((i) => i.id === n) ? n : ((e = t[0]) == null ? void 0 : e.id) ?? null;
996
+ Ne.setState({
997
+ sessions: t,
998
+ currentSessionId: r
999
+ });
1000
+ }
998
1001
  } catch (t) {
999
1002
  console.warn("[chatkit-store] Failed to load from IndexedDB:", t);
1000
1003
  }
1001
1004
  At == null || At(), At = Ne.subscribe((t) => {
1002
- Zl(t.sessions).catch(console.warn), Jl(t.currentSessionId).catch(console.warn);
1005
+ var a;
1006
+ const n = t.sessions.filter((o) => o.messages.length > 0);
1007
+ Zl(n).catch(console.warn);
1008
+ const i = t.currentSessionId && t.sessions.some((o) => o.id === t.currentSessionId && o.messages.length > 0) ? t.currentSessionId : ((a = n[0]) == null ? void 0 : a.id) ?? null;
1009
+ Jl(i).catch(console.warn);
1003
1010
  });
1004
1011
  }
1005
1012
  function ly() {
@@ -24947,7 +24954,7 @@ const fy = Et("Headphones", [
24947
24954
  overflowY: "auto",
24948
24955
  backgroundColor: "transparent",
24949
24956
  color: "var(--chatkit-text-primary)",
24950
- fontSize: 15,
24957
+ fontSize: 16,
24951
24958
  fontFamily: "inherit",
24952
24959
  lineHeight: 1.5,
24953
24960
  boxSizing: "border-box",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finogeeks2026/chatkit-web",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "面向 Web / H5 的 AI 对话 UI SDK,支持流式对话、多会话管理、主题定制",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",