@@ -127,7 +127,7 @@ const VapiWidget: React.FC<VapiWidgetProps> = ({
127
127
! showTranscript &&
128
128
vapi . voice . isCallActive &&
129
129
( mode === 'voice' || mode === 'hybrid' ) ;
130
- const showingEmptyState = ! vapi . voice . isCallActive ;
130
+ const showingEmptyState = mode === 'voice' && ! vapi . voice . isCallActive ;
131
131
132
132
if ( isEmpty || hideTranscript || showingEmptyState ) {
133
133
return {
@@ -203,6 +203,12 @@ const VapiWidget: React.FC<VapiWidgetProps> = ({
203
203
}
204
204
205
205
setChatInput ( '' ) ;
206
+
207
+ if ( mode === 'chat' || mode === 'hybrid' ) {
208
+ setTimeout ( ( ) => {
209
+ inputRef . current ?. focus ( ) ;
210
+ } , 100 ) ;
211
+ }
206
212
} ;
207
213
208
214
const handleFloatingButtonClick = ( ) => {
@@ -254,11 +260,16 @@ const VapiWidget: React.FC<VapiWidgetProps> = ({
254
260
} ;
255
261
256
262
const renderConversationArea = ( ) => {
257
- if ( vapi . voice . isCallActive ) {
258
- const shouldShowTranscript =
259
- showTranscript || mode === 'chat' || mode === 'hybrid' ;
263
+ // Chat mode: always show conversation messages
264
+ if ( mode === 'chat' ) {
265
+ return renderConversationMessages ( ) ;
266
+ }
260
267
261
- if ( shouldShowTranscript ) {
268
+ // Hybrid mode: show messages when call is not active, respect showTranscript when active
269
+ if ( mode === 'hybrid' ) {
270
+ if ( ! vapi . voice . isCallActive ) {
271
+ return renderConversationMessages ( ) ;
272
+ } else if ( showTranscript ) {
262
273
return renderConversationMessages ( ) ;
263
274
} else {
264
275
return (
@@ -276,6 +287,29 @@ const VapiWidget: React.FC<VapiWidgetProps> = ({
276
287
}
277
288
}
278
289
290
+ // Voice mode: respect showTranscript when call is active
291
+ if ( mode === 'voice' ) {
292
+ if ( vapi . voice . isCallActive ) {
293
+ if ( showTranscript ) {
294
+ return renderConversationMessages ( ) ;
295
+ } else {
296
+ return (
297
+ < AnimatedStatusIcon
298
+ size = { 150 }
299
+ connectionStatus = { vapi . voice . connectionStatus }
300
+ isCallActive = { vapi . voice . isCallActive }
301
+ isSpeaking = { vapi . voice . isSpeaking }
302
+ isTyping = { vapi . chat . isTyping }
303
+ volumeLevel = { vapi . voice . volumeLevel }
304
+ baseColor = { colors . accentColor }
305
+ colors = { colors . accentColor }
306
+ />
307
+ ) ;
308
+ }
309
+ }
310
+ }
311
+
312
+ // Default: show empty conversation
279
313
return (
280
314
< EmptyConversation
281
315
mode = { mode }
0 commit comments