Skip to content

Commit f00676d

Browse files
authored
fix: sendClientResponseData type (#28)
1 parent 1b21b3c commit f00676d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ const useLayercodeAgent = (
381381
const sendClientResponseText = useCallback((text: string) => {
382382
clientRef.current?.sendClientResponseText(text);
383383
}, []);
384-
const sendClientResponseData = useCallback((text: string) => {
385-
clientRef.current?.sendClientResponseData(text);
384+
const sendClientResponseData = useCallback((data: any) => {
385+
clientRef.current?.sendClientResponseData(data);
386386
}, []);
387387
const connect = useCallback(async () => {
388388
if (clientRef.current) {
@@ -394,7 +394,7 @@ const useLayercodeAgent = (
394394
clientRef.current = null;
395395
}
396396

397-
const nextConversationId = conversationIdRef.current !== undefined ? conversationIdRef.current : internalConversationId ?? null;
397+
const nextConversationId = conversationIdRef.current !== undefined ? conversationIdRef.current : (internalConversationId ?? null);
398398

399399
const client = createClient(nextConversationId ?? null);
400400

0 commit comments

Comments
 (0)