@@ -475,6 +475,42 @@ export function renderChatPrimaryActions(props: ChatRunControlsProps) {
475475 // the control shows whenever either route exists, and it always sits ahead of
476476 // the primary action rather than standing in for it.
477477 const voiceControl = props . dictation || props . onToggleVoice ? voiceButton : nothing ;
478+ const mobileDictationControl = props . dictation
479+ ? html `
480+ < span class ="chat-mobile-dictation-action ">
481+ ${ renderComposerVoiceButton ( {
482+ connected : props . connected ,
483+ sending : props . sending ,
484+ isBusy : props . isBusy ,
485+ dictation : props . dictation ,
486+ idleLabel : t ( "chat.composer.dictationCapability" ) ,
487+ } ) }
488+ </ span >
489+ `
490+ : nothing ;
491+ const mobileTalkAction =
492+ ! hasComposedContent && ! props . dictation ?. active && props . onToggleVoice
493+ ? html `
494+ < openclaw-tooltip
495+ class ="chat-mobile-talk-action "
496+ .content =${ t ( "chat.composer.realtimeTalkCapability" ) }
497+ >
498+ < button
499+ class ="chat-send-btn chat-send-btn--talk-mode "
500+ type ="button "
501+ @pointerdown =${ props . onPrimaryActionPointerDown }
502+ @click =${ props . onToggleVoice }
503+ ?disabled=${ ! props . connected || props . sending || props . isBusy }
504+ aria-label=${ t ( "chat.composer.realtimeTalkCapability" ) }
505+ >
506+ ${ icons . audioLines }
507+ < span class ="agent-chat__control-label "
508+ > ${ t ( "chat.composer.realtimeTalkCapability" ) } </ span
509+ >
510+ </ button >
511+ </ openclaw-tooltip >
512+ `
513+ : nothing ;
478514 // Send holds the trailing edge whatever the draft is. During an active run the
479515 // same slot shows stop while empty, then becomes the follow-up action as soon
480516 // as the operator composes content; two competing primary buttons never render.
@@ -512,6 +548,31 @@ export function renderChatPrimaryActions(props: ChatRunControlsProps) {
512548 props . onPrimaryActionPointerDown ,
513549 )
514550 : nothing ;
551+ const desktopPrimaryAction = props . dictation ?. active
552+ ? dictationSendAction
553+ : props . canAbort
554+ ? hasComposedContent
555+ ? sendAction
556+ : abortAction
557+ : sendAction ;
558+ const mobilePrimaryAction = props . dictation ?. active
559+ ? dictationSendAction
560+ : hasComposedContent
561+ ? sendAction
562+ : props . canAbort
563+ ? abortAction
564+ : props . onToggleVoice
565+ ? mobileTalkAction
566+ : sendAction ;
567+ const primaryActions =
568+ mobilePrimaryAction === desktopPrimaryAction
569+ ? html `< span class ="chat-mobile-primary-action chat-desktop-primary-action "
570+ > ${ desktopPrimaryAction } </ span
571+ > `
572+ : html `
573+ < span class ="chat-mobile-primary-action "> ${ mobilePrimaryAction } </ span >
574+ < span class ="chat-desktop-primary-action "> ${ desktopPrimaryAction } </ span >
575+ ` ;
515576 return html `
516577 ${ props . voiceActive && props . onToggleVoice
517578 ? html `
@@ -574,17 +635,8 @@ export function renderChatPrimaryActions(props: ChatRunControlsProps) {
574635 </ openclaw-tooltip >
575636 `
576637 : nothing }
577- ${ abortAction }
638+ < span class =" chat-mobile-primary-action chat-desktop-primary-action " > ${ abortAction } </ span >
578639 `
579- : html `
580- ${ voiceControl }
581- ${ props . dictation ?. active
582- ? dictationSendAction
583- : props . canAbort
584- ? hasComposedContent
585- ? sendAction
586- : abortAction
587- : sendAction }
588- ` }
640+ : html ` ${ voiceControl } ${ mobileDictationControl } ${ primaryActions } ` }
589641 ` ;
590642}
0 commit comments