@paramms/chat-widget 1.0.14 → 1.0.15

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.js CHANGED
@@ -1837,7 +1837,8 @@ class $t {
1837
1837
  e && (this.input.value = "", this.h.onTyping(!1), this.h.onSend(e));
1838
1838
  }
1839
1839
  signalTyping() {
1840
- this.h.onTyping(!0), this.typingTimer && clearTimeout(this.typingTimer), this.typingTimer = setTimeout(() => this.h.onTyping(!1), 2e3);
1840
+ const e = this.input.value.trim().slice(0, 100) || void 0;
1841
+ this.h.onTyping(!0, e), this.typingTimer && clearTimeout(this.typingTimer), this.typingTimer = setTimeout(() => this.h.onTyping(!1), 2e3);
1841
1842
  }
1842
1843
  render(e) {
1843
1844
  var f, b, x;
@@ -2299,8 +2300,8 @@ function Ot(s) {
2299
2300
  onInvoke(d, p) {
2300
2301
  o && g.send({ type: "invoke", conversationId: o, actionId: d, clientInvokeId: `iv_${Math.random().toString(36).slice(2)}`, ...p ? { inputs: p } : {} });
2301
2302
  },
2302
- onTyping(d) {
2303
- o && g.send({ type: "typing", conversationId: o, isTyping: d });
2303
+ onTyping(d, p) {
2304
+ o && g.send({ type: "typing", conversationId: o, isTyping: d, ...p ? { preview: p } : {} });
2304
2305
  },
2305
2306
  onReadUpTo(d) {
2306
2307
  o && g.send({ type: "read", conversationId: o, seq: d });