@crestapps/ai-chat-ui 2.0.0-preview.163 → 2.0.0-preview.170

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/ai-chat.js CHANGED
@@ -668,7 +668,7 @@ window.coreAIChatManager = function () {
668
668
  ttsInstanceId: 'ai-chat-' + Math.random().toString(36).slice(2),
669
669
  singleResponseMode: !!config.singleResponseMode,
670
670
  conversationModeEnabled: config.chatMode === 'Conversation',
671
- realtimeEnabled: config.chatMode === 'Realtime' || !!config.realtimeEnabled,
671
+ realtimeEnabled: !!config.realtimeEnabled,
672
672
  // Server-relay WebRTC transport: primary when advertised and supported; the client falls back
673
673
  // to the WebSocket path below if the peer cannot connect.
674
674
  realtimeWebRtcEnabled: config.realtimeWebRtcEnabled === true && typeof window.RTCPeerConnection === 'function',
@@ -2283,9 +2283,18 @@ window.coreAIChatManager = function () {
2283
2283
  },
2284
2284
  realtimeEnabled: true,
2285
2285
  // The conversation button doubles as the realtime button on this host; the module owns its
2286
- // click, label and state from here on.
2286
+ // click, label and state from here on. The text controls are handed over too so the module
2287
+ // hides them: realtime is audio-only, and a message box that plays no part in a spoken
2288
+ // conversation only invites the user to type into it.
2289
+ //
2290
+ // conversationButton is deliberately not passed. It is the same element as the realtime
2291
+ // button here, and the module hides the conversation button before showing the realtime
2292
+ // one -- naming it twice would ask it to hide the control it then has to show.
2287
2293
  selectors: {
2288
- realtimeButton: config.conversationButtonElementSelector
2294
+ realtimeButton: config.conversationButtonElementSelector,
2295
+ input: config.inputElementSelector,
2296
+ sendButton: config.sendButtonElementSelector,
2297
+ micButton: config.micButtonElementSelector
2289
2298
  },
2290
2299
  onActivate: function onActivate() {
2291
2300
  self.isConversationMode = true;