@athenaintel/react 0.10.4 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +20 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66590,16 +66590,26 @@ function useAthenaThreadManager() {
|
|
|
66590
66590
|
const runtime = useAssistantRuntime({ optional: true });
|
|
66591
66591
|
const threadId = useThread({ optional: true, selector: (s) => s.threadId });
|
|
66592
66592
|
const threadList = useThreadList({ optional: true });
|
|
66593
|
-
|
|
66594
|
-
|
|
66595
|
-
|
|
66596
|
-
|
|
66597
|
-
|
|
66598
|
-
|
|
66599
|
-
|
|
66600
|
-
|
|
66601
|
-
|
|
66602
|
-
|
|
66593
|
+
const switchToThread = useCallback(
|
|
66594
|
+
(id) => runtime.threads.switchToThread(id),
|
|
66595
|
+
[runtime]
|
|
66596
|
+
);
|
|
66597
|
+
const switchToNewThread = useCallback(
|
|
66598
|
+
() => runtime.threads.switchToNewThread(),
|
|
66599
|
+
[runtime]
|
|
66600
|
+
);
|
|
66601
|
+
return useMemo(() => {
|
|
66602
|
+
if (!runtime || !threadList) {
|
|
66603
|
+
return null;
|
|
66604
|
+
}
|
|
66605
|
+
return {
|
|
66606
|
+
activeThreadId: threadId ?? null,
|
|
66607
|
+
threadIds: threadList.threadIds,
|
|
66608
|
+
isLoading: threadList.isLoading,
|
|
66609
|
+
switchToThread,
|
|
66610
|
+
switchToNewThread
|
|
66611
|
+
};
|
|
66612
|
+
}, [runtime, threadId, threadList, switchToThread, switchToNewThread]);
|
|
66603
66613
|
}
|
|
66604
66614
|
function useAppendToComposer() {
|
|
66605
66615
|
const aui = useAui();
|