Skip to content

Commit 3a396bc

Browse files
committed
feat: rename from conversation.begin -> conversation.start
1 parent 36327ad commit 3a396bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react/src/hooks/useConversationWith.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ type ConversationActions = {
114114
prepareConnection: () => Promise<void>,
115115

116116
/** Connect to the underlying room and dispatch any agents */
117-
begin: (options?: AgentSessionConnectOptions) => Promise<void>;
117+
start: (options?: AgentSessionConnectOptions) => Promise<void>;
118118

119119
/** Disconnect from the underlying room */
120120
end: () => Promise<void>;
@@ -307,7 +307,7 @@ export function useConversationWith(agentToDispatch: string | RoomAgentDispatch,
307307
},
308308
}), [conversationState, emitter, room, options.credentials, options.dispatch?.agentConnectTimeoutMilliseconds]), agentName);
309309

310-
const begin = useCallback(async (connectOptions: AgentSessionConnectOptions = {}) => {
310+
const start = useCallback(async (connectOptions: AgentSessionConnectOptions = {}) => {
311311
const {
312312
signal,
313313
tracks = { microphone: { enabled: true, publishOptions: { preConnectBuffer: true } } },
@@ -361,14 +361,14 @@ export function useConversationWith(agentToDispatch: string | RoomAgentDispatch,
361361
waitUntilDisconnected,
362362

363363
prepareConnection,
364-
begin,
364+
start,
365365
end,
366366
}), [
367367
conversationState,
368368
waitUntilConnected,
369369
waitUntilDisconnected,
370370
prepareConnection,
371-
begin,
371+
start,
372372
end,
373373
]);
374374
}

0 commit comments

Comments
 (0)