@assistant-ui/core 0.3.1 → 0.3.2
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/internal.d.ts +1 -2
- package/dist/internal.js +1 -2
- package/dist/react/AssistantProvider.d.ts +1 -1
- package/dist/react/AssistantProvider.d.ts.map +1 -1
- package/dist/react/AssistantProvider.js +35 -9
- package/dist/react/AssistantProvider.js.map +1 -1
- package/dist/react/AssistantRuntimeProvider.d.ts +1 -1
- package/dist/react/AssistantRuntimeProvider.js +1 -1
- package/dist/react/RuntimeAdapter.js +2 -2
- package/dist/react/adapters/LocalStorageThreadListAdapter.d.ts.map +1 -1
- package/dist/react/adapters/LocalStorageThreadListAdapter.js +17 -33
- package/dist/react/adapters/LocalStorageThreadListAdapter.js.map +1 -1
- package/dist/react/client/DataRenderers.js +1 -1
- package/dist/react/client/Interactables.js +1 -1
- package/dist/react/client/Tools.js +2 -2
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +2 -1
- package/dist/react/interactables-legacy/Interactables.js +1 -1
- package/dist/react/interactables-legacy/useAssistantInteractable.js +1 -1
- package/dist/react/interactables-legacy/useInteractableState.js +2 -2
- package/dist/react/model-context/useAssistantContext.js +1 -1
- package/dist/react/model-context/useAssistantDataUI.js +2 -2
- package/dist/react/model-context/useAssistantInstructions.js +2 -2
- package/dist/react/model-context/useAssistantTool.js +2 -2
- package/dist/react/model-context/useAssistantToolUI.js +2 -2
- package/dist/react/model-context/useAuiToolOverrides.js +1 -1
- package/dist/react/model-context/useInlineRender.js +1 -1
- package/dist/react/model-context/useInteractable.js +1 -1
- package/dist/react/model-context/useInteractableState.js +2 -2
- package/dist/react/model-context/useInteractableVersions.js +2 -2
- package/dist/react/model-context/useToolArgsStatus.js +2 -2
- package/dist/react/primitive-hooks/useActionBarCopy.js +2 -2
- package/dist/react/primitive-hooks/useActionBarEdit.js +2 -2
- package/dist/react/primitive-hooks/useActionBarFeedback.js +2 -2
- package/dist/react/primitive-hooks/useActionBarReload.js +2 -2
- package/dist/react/primitive-hooks/useActionBarSpeak.js +2 -2
- package/dist/react/primitive-hooks/useActionBarStopSpeaking.js +2 -2
- package/dist/react/primitive-hooks/useBranchPickerNext.js +2 -2
- package/dist/react/primitive-hooks/useBranchPickerPrevious.js +2 -2
- package/dist/react/primitive-hooks/useComposerAddAttachment.js +2 -2
- package/dist/react/primitive-hooks/useComposerCancel.js +2 -2
- package/dist/react/primitive-hooks/useComposerDictate.js +2 -2
- package/dist/react/primitive-hooks/useComposerSend.js +2 -2
- package/dist/react/primitive-hooks/useEditComposerCancel.js +2 -2
- package/dist/react/primitive-hooks/useEditComposerSend.js +2 -2
- package/dist/react/primitive-hooks/useMessageBranching.js +2 -2
- package/dist/react/primitive-hooks/useMessageReload.js +2 -2
- package/dist/react/primitive-hooks/useSuggestionTrigger.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemArchive.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemDelete.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemTrigger.js +2 -2
- package/dist/react/primitive-hooks/useThreadListItemUnarchive.js +2 -2
- package/dist/react/primitive-hooks/useThreadListLoadMore.js +2 -2
- package/dist/react/primitive-hooks/useThreadListNew.js +2 -2
- package/dist/react/primitive-hooks/useThreadMessageIds.js +1 -1
- package/dist/react/primitive-hooks/useVoice.js +2 -2
- package/dist/react/primitives/chainOfThought/ChainOfThoughtParts.js +2 -2
- package/dist/react/primitives/composer/ComposerAttachments.js +2 -2
- package/dist/react/primitives/composer/ComposerIf.js +1 -1
- package/dist/react/primitives/composer/ComposerQueue.js +1 -1
- package/dist/react/primitives/generativeUI/GenerativeUI.js +2 -2
- package/dist/react/primitives/message/MessageAttachments.js +2 -2
- package/dist/react/primitives/message/MessageGroupedParts.js +1 -1
- package/dist/react/primitives/message/MessageParts.js +2 -2
- package/dist/react/primitives/message/MessageQuote.js +2 -2
- package/dist/react/primitives/part/PartMessages.js +2 -2
- package/dist/react/primitives/thread/ThreadMessages.js +2 -2
- package/dist/react/primitives/thread/ThreadSuggestions.js +2 -2
- package/dist/react/primitives/threadList/ThreadListItems.js +2 -2
- package/dist/react/primitives/threadListItem/ThreadListItemTitle.js +1 -1
- package/dist/react/providers/AttachmentByIndexProvider.js +1 -1
- package/dist/react/providers/ChainOfThoughtByIndicesProvider.js +1 -1
- package/dist/react/providers/ChainOfThoughtPartByIndexProvider.js +1 -1
- package/dist/react/providers/MessageByIdProvider.js +1 -1
- package/dist/react/providers/MessageByIndexProvider.js +1 -1
- package/dist/react/providers/PartByIndexProvider.js +1 -1
- package/dist/react/providers/QueueItemByIndexProvider.js +1 -1
- package/dist/react/providers/ReadonlyThreadProvider.js +2 -2
- package/dist/react/providers/SuggestionByIndexProvider.js +1 -1
- package/dist/react/providers/TextMessagePartProvider.js +2 -2
- package/dist/react/providers/ThreadListItemByIndexProvider.js +1 -1
- package/dist/react/providers/ThreadListItemRuntimeProvider.js +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js +14 -13
- package/dist/react/runtimes/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +3 -0
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js +22 -12
- package/dist/react/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/react/runtimes/RuntimeAdapterProvider.js +1 -1
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js +9 -23
- package/dist/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/react/runtimes/external-message-converter.js +1 -1
- package/dist/react/runtimes/useExternalStoreRuntime.js +1 -1
- package/dist/react/runtimes/useExternalStoreSharedOptions.js +1 -1
- package/dist/react/runtimes/useLocalRuntime.js +1 -1
- package/dist/react/runtimes/useRemoteThreadListRuntime.js +7 -13
- package/dist/react/runtimes/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/react/utils/useJSONEqual.js +1 -1
- package/dist/runtime/utils/thread-message-like.js +2 -2
- package/dist/runtime/utils/thread-message-like.js.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +5 -4
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/store/clients/chain-of-thought-client.js +1 -1
- package/dist/store/clients/model-context-client.js +1 -1
- package/dist/store/clients/no-op-composer-client.js +1 -1
- package/dist/store/clients/suggestions.js +2 -2
- package/dist/store/clients/thread-message-client.js +2 -2
- package/dist/store/runtime-clients/composer-runtime-client.js +2 -2
- package/dist/store/runtime-clients/message-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-list-item-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-list-runtime-client.js +2 -2
- package/dist/store/runtime-clients/thread-runtime-client.js +2 -2
- package/dist/store/scopes/thread.d.ts +1 -1
- package/dist/store/scopes/thread.d.ts.map +1 -1
- package/dist/utils/data-url.js +2 -2
- package/dist/utils/data-url.js.map +1 -1
- package/package.json +4 -4
- package/src/internal.ts +0 -7
- package/src/react/AssistantProvider.tsx +28 -15
- package/src/react/AssistantRuntimeProvider.test.tsx +101 -0
- package/src/react/adapters/LocalStorageThreadListAdapter.tsx +28 -7
- package/src/react/index.ts +4 -0
- package/src/react/runtimes/RemoteThreadListHookInstanceManager.tsx +16 -13
- package/src/react/runtimes/RemoteThreadListThreadListRuntimeCore.tsx +53 -10
- package/src/react/runtimes/cloud/AssistantCloudThreadHistoryAdapter.ts +7 -5
- package/src/react/runtimes/useRemoteThreadListRuntime.ts +9 -15
- package/src/runtime/utils/thread-message-like.ts +2 -2
- package/src/runtimes/remote-thread-list/types.ts +5 -4
- package/src/store/scopes/thread.ts +1 -1
- package/src/tests/remote-thread-list-reactive-threadId.test.ts +0 -92
- package/src/tests/thread-message-like.test.ts +15 -0
- package/src/tests/useRemoteThreadListRuntime-controlled.test.tsx +293 -0
- package/src/utils/data-url.test.ts +26 -2
- package/src/utils/data-url.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
//#region src/react/model-context/useInteractableState.ts
|
|
6
6
|
const useInteractableState = (id) => {
|
|
7
7
|
const $ = c(17);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { unstable_getInteractableVersions } from "../../model-context/interactable-composer-metadata.js";
|
|
2
2
|
import { unstable_useInteractableState } from "./useInteractableState.js";
|
|
3
3
|
import { useJSONEqual } from "../utils/useJSONEqual.js";
|
|
4
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
5
|
-
import "@assistant-ui/tap/react-shim";
|
|
6
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
|
+
import "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
7
7
|
//#region src/react/model-context/useInteractableVersions.ts
|
|
8
8
|
const useInteractableVersions = (id, name) => {
|
|
9
9
|
const $ = c(8);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPartialJsonObjectFieldState, getPartialJsonObjectMeta } from "assistant-stream/utils";
|
|
2
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
5
|
//#region src/react/model-context/useToolArgsStatus.ts
|
|
6
6
|
/**
|
|
7
7
|
* Reads whether each argument field for the current tool-call message part is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarCopy.ts
|
|
5
5
|
const useActionBarCopy = (t0) => {
|
|
6
6
|
const $ = c(12);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarEdit.ts
|
|
5
5
|
const useActionBarEdit = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarFeedback.ts
|
|
5
5
|
const useActionBarFeedbackPositive = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarReload.ts
|
|
5
5
|
const useActionBarReload = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarSpeak.ts
|
|
5
5
|
const useActionBarSpeak = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useActionBarStopSpeaking.ts
|
|
5
5
|
const useActionBarStopSpeaking = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useBranchPickerNext.ts
|
|
5
5
|
const useBranchPickerNext = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useBranchPickerPrevious.ts
|
|
5
5
|
const useBranchPickerPrevious = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerAddAttachment.ts
|
|
5
5
|
const useComposerAddAttachment = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerCancel.ts
|
|
5
5
|
const useComposerCancel = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerDictate.ts
|
|
5
5
|
const useComposerDictate = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useComposerSend.ts
|
|
5
5
|
const useComposerSend = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useEditComposerCancel.ts
|
|
5
5
|
const useEditComposerCancel = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useEditComposerSend.ts
|
|
5
5
|
const useEditComposerSend = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useMessageBranching.ts
|
|
5
5
|
const useMessageBranching = () => {
|
|
6
6
|
const $ = c(9);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useMessageReload.ts
|
|
5
5
|
const useMessageReload = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useSuggestionTrigger.ts
|
|
5
5
|
const useSuggestionTrigger = (t0) => {
|
|
6
6
|
const $ = c(8);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemArchive.ts
|
|
5
5
|
const useThreadListItemArchive = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemDelete.ts
|
|
5
5
|
const useThreadListItemDelete = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemTrigger.ts
|
|
5
5
|
const useThreadListItemTrigger = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListItemUnarchive.ts
|
|
5
5
|
const useThreadListItemUnarchive = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListLoadMore.ts
|
|
5
5
|
const useThreadListLoadMore = () => {
|
|
6
6
|
const $ = c(5);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useThreadListNew.ts
|
|
5
5
|
const useThreadListNew = () => {
|
|
6
6
|
const $ = c(4);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { useRef } from "@assistant-ui/tap/react-shim";
|
|
2
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/primitive-hooks/useThreadMessageIds.ts
|
|
4
4
|
const useThreadMessageIds = () => {
|
|
5
5
|
const messages = useAuiState((s) => s.thread.messages);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
-
import { useSyncExternalStore } from "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useSyncExternalStore } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
//#region src/react/primitive-hooks/useVoice.ts
|
|
5
5
|
const useVoiceState = () => {
|
|
6
6
|
return useAuiState(_temp);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChainOfThoughtPartByIndexProvider } from "../../providers/ChainOfThoughtPartByIndexProvider.js";
|
|
2
2
|
import { MessagePartComponent } from "../message/MessageParts.js";
|
|
3
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
4
|
-
import { useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/react/primitives/chainOfThought/ChainOfThoughtParts.tsx
|
|
8
8
|
const ChainOfThoughtPrimitivePartsInner = ({ children }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComposerAttachmentByIndexProvider } from "../../providers/AttachmentByIndexProvider.js";
|
|
2
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/composer/ComposerAttachments.tsx
|
|
7
7
|
const getComponent = (components, attachment) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
3
3
|
//#region src/react/primitives/composer/ComposerIf.tsx
|
|
4
4
|
const useComposerIf = (props) => {
|
|
5
5
|
const $ = c(3);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueueItemByIndexProvider } from "../../providers/QueueItemByIndexProvider.js";
|
|
2
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
3
2
|
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/react/primitives/composer/ComposerQueue.tsx
|
|
6
6
|
const ComposerPrimitiveQueueInner = ({ children }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { createElement } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { createElement } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/generativeUI/GenerativeUI.tsx
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MessageAttachmentByIndexProvider } from "../../providers/AttachmentByIndexProvider.js";
|
|
2
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/message/MessageAttachments.tsx
|
|
7
7
|
const getComponent = (components, attachment) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { MessagePartChildren } from "./MessageParts.js";
|
|
3
3
|
import { GROUPBY_MEMO_KEY, buildGroupTree } from "../../utils/groupParts.js";
|
|
4
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
5
4
|
import { Fragment, useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useShallow } from "zustand/shallow";
|
|
8
8
|
//#region src/react/primitives/message/MessageGroupedParts.tsx
|
|
@@ -4,9 +4,9 @@ import { TextMessagePartProvider } from "../../providers/TextMessagePartProvider
|
|
|
4
4
|
import { ChainOfThoughtByIndicesProvider } from "../../providers/ChainOfThoughtByIndicesProvider.js";
|
|
5
5
|
import { getMessageQuote } from "../../utils/getMessageQuote.js";
|
|
6
6
|
import { GenerativeUIRender } from "../generativeUI/GenerativeUI.js";
|
|
7
|
-
import { RenderChildrenWithAccessor, useAui, useAuiState } from "@assistant-ui/store";
|
|
8
|
-
import { memo } from "@assistant-ui/tap/react-shim";
|
|
9
7
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
8
|
+
import { memo } from "@assistant-ui/tap/react-shim";
|
|
9
|
+
import { RenderChildrenWithAccessor, useAui, useAuiState } from "@assistant-ui/store";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useShallow } from "zustand/shallow";
|
|
12
12
|
//#region src/react/primitives/message/MessageParts.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getMessageQuote } from "../../utils/getMessageQuote.js";
|
|
2
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { memo } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { memo } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/message/MessageQuote.tsx
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReadonlyThreadProvider } from "../../providers/ReadonlyThreadProvider.js";
|
|
2
2
|
import { ThreadPrimitiveMessagesImpl } from "../thread/ThreadMessages.js";
|
|
3
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
4
|
-
import { memo } from "@assistant-ui/tap/react-shim";
|
|
5
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { memo } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/react/primitives/part/PartMessages.tsx
|
|
8
8
|
const usePartMessages = () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MessageByIndexProvider } from "../../providers/MessageByIndexProvider.js";
|
|
2
2
|
import { MessageByIdProvider } from "../../providers/MessageByIdProvider.js";
|
|
3
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
4
|
-
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
|
+
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/react/primitives/thread/ThreadMessages.tsx
|
|
8
8
|
const isComponentsSame = (prev, next) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SuggestionByIndexProvider } from "../../providers/SuggestionByIndexProvider.js";
|
|
2
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/thread/ThreadSuggestions.tsx
|
|
7
7
|
const SuggestionComponent = (t0) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThreadListItemByIndexProvider } from "../../providers/ThreadListItemByIndexProvider.js";
|
|
2
|
-
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
3
|
-
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { memo, useMemo } from "@assistant-ui/tap/react-shim";
|
|
4
|
+
import { RenderChildrenWithAccessor, useAuiState } from "@assistant-ui/store";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/primitives/threadList/ThreadListItems.tsx
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
3
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/primitives/threadListItem/ThreadListItemTitle.tsx
|
|
5
5
|
const ThreadListItemPrimitiveTitle = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/AttachmentByIndexProvider.tsx
|
|
5
5
|
const MessageAttachmentByIndexProvider = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChainOfThoughtClient } from "../../store/clients/chain-of-thought-client.js";
|
|
2
|
-
import { AuiProvider, useAui, useAuiState } from "@assistant-ui/store";
|
|
3
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { AuiProvider, useAui, useAuiState } from "@assistant-ui/store";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/react/providers/ChainOfThoughtByIndicesProvider.tsx
|
|
6
6
|
const ChainOfThoughtByIndicesProvider = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/ChainOfThoughtPartByIndexProvider.tsx
|
|
5
5
|
const ChainOfThoughtPartByIndexProvider = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/MessageByIdProvider.tsx
|
|
5
5
|
const MessageByIdProvider = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/MessageByIndexProvider.tsx
|
|
5
5
|
const MessageByIndexProvider = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/PartByIndexProvider.tsx
|
|
5
5
|
const PartByIndexProvider = (t0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/QueueItemByIndexProvider.tsx
|
|
5
5
|
const QueueItemByIndexProvider = (t0) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ThreadRuntimeImpl } from "../../runtime/api/thread-runtime.js";
|
|
2
2
|
import { ReadonlyThreadRuntimeCore } from "../../runtimes/readonly/ReadonlyThreadRuntimeCore.js";
|
|
3
3
|
import { ThreadClient } from "../../store/runtime-clients/thread-runtime-client.js";
|
|
4
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
5
|
-
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
6
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
|
+
import { useEffect, useState } from "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/react/providers/ReadonlyThreadProvider.tsx
|
|
9
9
|
const READONLY_THREAD_PATH = Object.freeze({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/SuggestionByIndexProvider.tsx
|
|
5
5
|
const SuggestionByIndexProvider = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuiProvider, useAui } from "@assistant-ui/store";
|
|
2
|
-
import "@assistant-ui/tap/react-shim";
|
|
3
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { AuiProvider, useAui } from "@assistant-ui/store";
|
|
4
4
|
import { resource } from "@assistant-ui/tap";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/react/providers/TextMessagePartProvider.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
2
1
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { AuiProvider, Derived, useAui } from "@assistant-ui/store";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/react/providers/ThreadListItemByIndexProvider.tsx
|
|
5
5
|
const ThreadListItemByIndexProvider = (t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThreadListItemClient } from "../../store/runtime-clients/thread-list-item-runtime-client.js";
|
|
2
|
-
import { AuiProvider, useAui } from "@assistant-ui/store";
|
|
3
2
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
3
|
+
import { AuiProvider, useAui } from "@assistant-ui/store";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/react/providers/ThreadListItemRuntimeProvider.tsx
|
|
6
6
|
const ThreadListItemRuntimeProvider = (t0) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteThreadListHookInstanceManager.d.ts","names":[],"sources":["../../../src/react/runtimes/RemoteThreadListHookInstanceManager.tsx"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RemoteThreadListHookInstanceManager.d.ts","names":[],"sources":["../../../src/react/runtimes/RemoteThreadListHookInstanceManager.tsx"],"mappings":";;;;;;;;;;;;;;;KAwBK,6BAA6B;cAcrB,4CAA4C;UAC/C;UAGA;UACA;UACA;EAGN,YAAA,aAAa,sBACb,QAAQ;EAOH,mBAAmB,mBAAgB,QAAA;;;eAPhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BH,qBAAqB,mBAAgB;;;eAxBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BnC,kBAAkB;EAMlB,eAAe,gBAAgB;UAS9B;UAoEA;EAqCD,iCAAiC;IACtC,UAAU,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseSubscribable } from "../../subscribable/subscribable.js";
|
|
2
2
|
import { ThreadListRuntimeImpl } from "../../runtime/api/thread-list-runtime.js";
|
|
3
3
|
import { ThreadListItemRuntimeProvider } from "../providers/ThreadListItemRuntimeProvider.js";
|
|
4
|
-
import { useAui } from "@assistant-ui/store";
|
|
5
|
-
import { Fragment, memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
4
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
5
|
+
import { Fragment, memo, useCallback, useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { useAui } from "@assistant-ui/store";
|
|
7
7
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
8
8
|
import { create } from "zustand";
|
|
9
9
|
//#region src/react/runtimes/RemoteThreadListHookInstanceManager.tsx
|
|
@@ -96,19 +96,20 @@ var RemoteThreadListHookInstanceManager = class extends BaseSubscribable {
|
|
|
96
96
|
const setGetInitializePromise = runtimeCore.__internal_setGetInitializePromise;
|
|
97
97
|
if (typeof setGetInitializePromise === "function") setGetInitializePromise.call(runtimeCore, () => initPromiseRef.current);
|
|
98
98
|
}, [threadBinding]);
|
|
99
|
+
const handleInitialize = useEffectEvent(() => {
|
|
100
|
+
if (hasInitializedRef.current) return;
|
|
101
|
+
if (aui.threadListItem.getState().status !== "new") return;
|
|
102
|
+
hasInitializedRef.current = true;
|
|
103
|
+
initPromiseRef.current = aui.threadListItem.initialize();
|
|
104
|
+
const dispose = runtime.thread.unstable_on("runEnd", () => {
|
|
105
|
+
dispose();
|
|
106
|
+
aui.threadListItem.generateTitle();
|
|
107
|
+
});
|
|
108
|
+
});
|
|
99
109
|
useEffect(() => {
|
|
100
110
|
hasInitializedRef.current = false;
|
|
101
|
-
return runtime.threads.main.unstable_on("initialize",
|
|
102
|
-
|
|
103
|
-
if (aui.threadListItem.getState().status !== "new") return;
|
|
104
|
-
hasInitializedRef.current = true;
|
|
105
|
-
initPromiseRef.current = aui.threadListItem.initialize();
|
|
106
|
-
const dispose = runtime.thread.unstable_on("runEnd", () => {
|
|
107
|
-
dispose();
|
|
108
|
-
aui.threadListItem.generateTitle();
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}, [runtime, aui]);
|
|
111
|
+
return runtime.threads.main.unstable_on("initialize", handleInitialize);
|
|
112
|
+
}, [runtime]);
|
|
112
113
|
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
113
114
|
};
|
|
114
115
|
_OuterActiveThreadProvider = memo(({ threadId, provider: Provider }) => {
|