@paymanai/payman-ask-sdk 4.0.16 → 4.0.18

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/index.d.mts CHANGED
@@ -117,6 +117,26 @@ type ChatConfig = ChatConfig$1 & {
117
117
  * the consumer hasn't wired one.
118
118
  */
119
119
  debug?: boolean;
120
+ /**
121
+ * Accent / brand colour used by the React Native chat surface (send button,
122
+ * focused border, streaming indicator, etc.). Defaults to Payman teal `#00858d`.
123
+ * Web styling continues to follow Tailwind and ignores this field.
124
+ */
125
+ accent?: string;
126
+ /**
127
+ * Colour scheme for the React Native chat surface (message text, bubbles,
128
+ * markdown tables/code, borders). When omitted the SDK falls back to the
129
+ * device's system scheme via `useColorScheme()`. Pass this from the host
130
+ * app's theme context so the chat honours a manual light/dark override.
131
+ * Web styling continues to follow Tailwind and ignores this field.
132
+ */
133
+ colorScheme?: "light" | "dark";
134
+ /**
135
+ * Bottom safe-area inset (px) for the React Native chat surface. Pass the
136
+ * host app's `useSafeAreaInsets().bottom` so the input bar / voice bar clear
137
+ * the home indicator. Defaults to a small platform fallback when omitted.
138
+ */
139
+ contentInsetBottom?: number;
120
140
  /**
121
141
  * UI version to render.
122
142
  * 1 = original component set
package/dist/index.d.ts CHANGED
@@ -117,6 +117,26 @@ type ChatConfig = ChatConfig$1 & {
117
117
  * the consumer hasn't wired one.
118
118
  */
119
119
  debug?: boolean;
120
+ /**
121
+ * Accent / brand colour used by the React Native chat surface (send button,
122
+ * focused border, streaming indicator, etc.). Defaults to Payman teal `#00858d`.
123
+ * Web styling continues to follow Tailwind and ignores this field.
124
+ */
125
+ accent?: string;
126
+ /**
127
+ * Colour scheme for the React Native chat surface (message text, bubbles,
128
+ * markdown tables/code, borders). When omitted the SDK falls back to the
129
+ * device's system scheme via `useColorScheme()`. Pass this from the host
130
+ * app's theme context so the chat honours a manual light/dark override.
131
+ * Web styling continues to follow Tailwind and ignores this field.
132
+ */
133
+ colorScheme?: "light" | "dark";
134
+ /**
135
+ * Bottom safe-area inset (px) for the React Native chat surface. Pass the
136
+ * host app's `useSafeAreaInsets().bottom` so the input bar / voice bar clear
137
+ * the home indicator. Defaults to a small platform fallback when omitted.
138
+ */
139
+ contentInsetBottom?: number;
120
140
  /**
121
141
  * UI version to render.
122
142
  * 1 = original component set
package/dist/index.js CHANGED
@@ -873,6 +873,17 @@ function useStreamManagerV2(config, callbacks, setMessages, setIsWaitingForRespo
873
873
  signal: abortController.signal,
874
874
  onEvent: (event) => {
875
875
  if (abortController.signal.aborted) return;
876
+ try {
877
+ const et = event?.eventType;
878
+ if (et === "RUN_IN_PROGRESS" || et === "INTENT_PROGRESS" || et === "THINKING_DELTA") {
879
+ const len = (event.partialText ?? event.text ?? "").length;
880
+ console.log(`[stream] ${et} (+${len} chars)`);
881
+ } else {
882
+ console.log(`[stream] ${et ?? "?"}:`, JSON.stringify(event));
883
+ }
884
+ } catch {
885
+ console.log("[stream] (unserializable event)", event?.eventType);
886
+ }
876
887
  processStreamEventV2(event, state);
877
888
  if (state.lastUserAction) {
878
889
  callbacksRef.current.onUserActionRequired?.(state.lastUserAction);