File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ const useLayercodeAgent = (
128128 const triggerUserTurnFinished = useCallback ( ( ) => {
129129 clientRef . current ?. triggerUserTurnFinished ( ) ;
130130 } , [ ] ) ;
131+ const sendClientResponseText = useCallback ( ( text : string ) => {
132+ clientRef . current ?. sendClientResponseText ( text ) ;
133+ } , [ ] ) ;
131134 const connect = useCallback ( async ( ) => {
132135 if ( clientRef . current ) {
133136 try {
@@ -138,10 +141,7 @@ const useLayercodeAgent = (
138141 clientRef . current = null ;
139142 }
140143
141- const nextConversationId =
142- conversationIdRef . current !== undefined
143- ? conversationIdRef . current
144- : internalConversationId ?? null ;
144+ const nextConversationId = conversationIdRef . current !== undefined ? conversationIdRef . current : internalConversationId ?? null ;
145145
146146 const client = createClient ( nextConversationId ?? null ) ;
147147
@@ -179,6 +179,7 @@ const useLayercodeAgent = (
179179 disconnect,
180180 mute,
181181 unmute,
182+ sendClientResponseText,
182183
183184 // State
184185 status,
You can’t perform that action at this time.
0 commit comments