@chatsystem/client 1.2.6 → 1.3.2

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/README.md CHANGED
@@ -11,6 +11,26 @@ import { App } from "@chatsystem/client";
11
11
  `appToken` identifies the public customer installation; it is not a user
12
12
  credential. `displayMode` accepts `launcher` or `chatbox`.
13
13
 
14
+ For most React integrations, keep using `App`: it owns one conversation and
15
+ one visual presentation. When the same Agent must appear as both an inline
16
+ chatbox and a floating launcher on one page, mount both presentations inside
17
+ one shared runtime:
18
+
19
+ ```tsx
20
+ import { WidgetRuntime, WidgetView } from "@chatsystem/client";
21
+
22
+ <WidgetRuntime appToken="YOUR_TOKEN_ID" agentId={42}>
23
+ <WidgetView displayMode="chatbox" />
24
+ <WidgetView displayMode="launcher" />
25
+ </WidgetRuntime>;
26
+ ```
27
+
28
+ Both views mirror the same messages, partial response and loading state.
29
+ Opening or closing the launcher does not stop a response. Pressing stop in
30
+ either view cancels the one shared response and leaves its received partial
31
+ content visible in both views. Use separate `WidgetRuntime` boundaries for
32
+ different app tokens or Agents; their conversations and streams stay isolated.
33
+
14
34
  ### Delegated user identity
15
35
 
16
36
  Pass an `identityProvider` when the customer host can recognize its existing
@@ -93,6 +113,9 @@ the client itself; it must never be reimplemented in a host-specific adapter.
93
113
 
94
114
  `data-displayMode` is optional and defaults to `launcher`. Set
95
115
  `data-displayMode="chatbox"` when embedding the chat directly in the page.
116
+ The bundled script remains a single-widget-per-page API; its data attributes
117
+ and `window.ChatSystem.mount()` contract are unchanged by the React multi-view
118
+ API.
96
119
 
97
120
  The declarative form remains the simplest anonymous integration. For Identity
98
121
  Delegation, load the same bundle without `data-appToken`, then use its