@assistant-ui/react 0.14.27 → 0.14.29
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/client/ExternalThread.d.ts +11 -1
- package/dist/client/ExternalThread.d.ts.map +1 -1
- package/dist/client/ExternalThread.js +758 -513
- package/dist/client/ExternalThread.js.map +1 -1
- package/dist/context/react/utils/createContextStoreHook.d.ts.map +1 -1
- package/dist/context/react/utils/createStateHookForRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/AssistantRuntimeProvider.js.map +1 -1
- package/dist/legacy-runtime/cloud/auiV0.d.ts +12 -1
- package/dist/legacy-runtime/cloud/auiV0.d.ts.map +1 -1
- package/dist/legacy-runtime/cloud/auiV0.js +2 -1
- package/dist/legacy-runtime/cloud/auiV0.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/commandQueue.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/commandQueue.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/commandQueue.js +7 -6
- package/dist/legacy-runtime/runtime-cores/assistant-transport/commandQueue.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/runManager.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/runManager.js +30 -15
- package/dist/legacy-runtime/runtime-cores/assistant-transport/runManager.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js +8 -4
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useConvertedState.js +1 -0
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useConvertedState.js.map +1 -1
- package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/model-context/makeAssistantVisible.d.ts.map +1 -1
- package/dist/model-context/makeAssistantVisible.js +7 -1
- package/dist/model-context/makeAssistantVisible.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarExportMarkdown.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.js +3 -3
- package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts +7 -6
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.js +10 -11
- package/dist/primitives/actionBar/useActionBarFloatStatus.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
- package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
- package/dist/primitives/assistantModal/popoverRenderPrimitives.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.js +1 -0
- package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js +1 -0
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js +8 -2
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachmentDropzone.js +1 -3
- package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictationTranscript.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerDictationTranscript.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +6 -4
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerQuote.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerQuote.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.d.ts +5 -0
- package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js +86 -40
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.js +1 -0
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.js +1 -0
- package/dist/primitives/composer/ComposerStopDictation.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopover.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopover.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverBack.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverCategories.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverItems.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverItems.js.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/TriggerPopoverRootContext.js.map +1 -1
- package/dist/primitives/composer/trigger/detectTrigger.d.ts +1 -1
- package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerKeyboardResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerNavigationResource.d.ts.map +1 -1
- package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts.map +1 -1
- package/dist/primitives/dropdownMenuRenderPrimitives.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.js.map +1 -1
- package/dist/primitives/error/ErrorRoot.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
- package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartText.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartText.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartData.d.ts +3 -2
- package/dist/primitives/messagePart/useMessagePartData.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartData.js +3 -2
- package/dist/primitives/messagePart/useMessagePartData.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartFile.d.ts +5 -4
- package/dist/primitives/messagePart/useMessagePartFile.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartFile.js +11 -3
- package/dist/primitives/messagePart/useMessagePartFile.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartImage.d.ts +5 -4
- package/dist/primitives/messagePart/useMessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartImage.js +10 -3
- package/dist/primitives/messagePart/useMessagePartImage.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts +5 -4
- package/dist/primitives/messagePart/useMessagePartReasoning.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartReasoning.js +10 -3
- package/dist/primitives/messagePart/useMessagePartReasoning.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartSource.d.ts +6 -4
- package/dist/primitives/messagePart/useMessagePartSource.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartSource.js +12 -3
- package/dist/primitives/messagePart/useMessagePartSource.js.map +1 -1
- package/dist/primitives/messagePart/useMessagePartText.d.ts +6 -5
- package/dist/primitives/messagePart/useMessagePartText.d.ts.map +1 -1
- package/dist/primitives/messagePart/useMessagePartText.js +10 -3
- package/dist/primitives/messagePart/useMessagePartText.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemRemove.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemRemove.js +1 -0
- package/dist/primitives/queueItem/QueueItemRemove.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemSteer.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemSteer.js +1 -0
- package/dist/primitives/queueItem/QueueItemSteer.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemText.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemText.js.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarQuote.d.ts.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.d.ts.map +1 -1
- package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.js +1 -0
- package/dist/primitives/suggestion/SuggestionTrigger.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadScrollToBottom.js +1 -0
- package/dist/primitives/thread/ThreadScrollToBottom.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadViewport.js +53 -19
- package/dist/primitives/thread/ThreadViewport.js.map +1 -1
- package/dist/primitives/thread/ThreadViewportFooter.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/createReserveObservers.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts +4 -0
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js +14 -1
- package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js.map +1 -1
- package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts +13 -1
- package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts.map +1 -1
- package/dist/primitives/thread/topAnchor/topAnchorTurn.js +14 -1
- package/dist/primitives/thread/topAnchor/topAnchorTurn.js.map +1 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js +2 -1
- package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
- package/dist/primitives/threadList/ThreadListLoadMore.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
- package/dist/primitives/threadListFocusGroup.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts.map +1 -1
- package/dist/tests/setup.d.ts +1 -1
- package/dist/utils/Primitive.d.ts.map +1 -1
- package/dist/utils/Primitive.js.map +1 -1
- package/dist/utils/createActionButton.d.ts.map +1 -1
- package/dist/utils/hooks/useOnResizeContent.js +1 -0
- package/dist/utils/hooks/useOnResizeContent.js.map +1 -1
- package/dist/utils/hooks/useSizeHandle.js +1 -0
- package/dist/utils/hooks/useSizeHandle.js.map +1 -1
- package/dist/utils/smooth/useSmooth.d.ts.map +1 -1
- package/dist/utils/smooth/useSmooth.js +2 -2
- package/dist/utils/smooth/useSmooth.js.map +1 -1
- package/package.json +20 -20
- package/src/client/ExternalThread.ts +341 -53
- package/src/legacy-runtime/cloud/auiV0.ts +14 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/commandQueue.ts +4 -1
- package/src/legacy-runtime/runtime-cores/assistant-transport/runManager.ts +37 -10
- package/src/legacy-runtime/runtime-cores/assistant-transport/transport-delivery.test.tsx +79 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/transport-parentid.test.tsx +97 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/transport-scheduling.test.ts +113 -2
- package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransport.spec.md +10 -2
- package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.test.tsx +189 -0
- package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.ts +20 -4
- package/src/model-context/makeAssistantVisible.test.tsx +146 -0
- package/src/model-context/makeAssistantVisible.tsx +18 -1
- package/src/primitives/actionBar/useActionBarFloatStatus.ts +7 -5
- package/src/primitives/composer/ComposerAddAttachment.test.tsx +108 -0
- package/src/primitives/composer/ComposerAddAttachment.ts +10 -4
- package/src/primitives/composer/ComposerAttachmentDropzone.test.tsx +3 -2
- package/src/primitives/composer/ComposerAttachmentDropzone.tsx +3 -2
- package/src/primitives/composer/ComposerInput.test.tsx +98 -1
- package/src/primitives/composer/ComposerInput.tsx +10 -8
- package/src/primitives/composer/ComposerRoot.test.tsx +226 -5
- package/src/primitives/composer/ComposerRoot.tsx +50 -1
- package/src/primitives/messagePart/useMessagePartData.ts +3 -2
- package/src/primitives/messagePart/useMessagePartFile.ts +19 -7
- package/src/primitives/messagePart/useMessagePartImage.ts +18 -7
- package/src/primitives/messagePart/useMessagePartReasoning.ts +15 -6
- package/src/primitives/messagePart/useMessagePartSource.ts +20 -7
- package/src/primitives/messagePart/useMessagePartText.ts +15 -5
- package/src/primitives/thread/ThreadViewport.tsx +15 -0
- package/src/primitives/thread/topAnchor/mountTopAnchorReserve.test.ts +243 -0
- package/src/primitives/thread/topAnchor/mountTopAnchorReserve.ts +28 -7
- package/src/primitives/thread/topAnchor/topAnchorTurn.test.ts +69 -0
- package/src/primitives/thread/topAnchor/topAnchorTurn.ts +29 -0
- package/src/primitives/thread/useThreadViewportAutoScroll.test.tsx +86 -1
- package/src/primitives/thread/useThreadViewportAutoScroll.ts +6 -1
- package/src/tests/DataRenderers.test.tsx +212 -0
- package/src/tests/RemoteThreadListRuntime.adapterProvider.test.tsx +1 -11
- package/src/tests/external-thread-attachments.test.tsx +372 -0
- package/src/tests/external-thread-parity.test.tsx +232 -0
- package/src/tests/generative-ui.test.tsx +1 -46
- package/src/tests/messagePartSwitchRace.test.tsx +172 -0
- package/src/tests/messagePartTypeMismatch.test.tsx +146 -0
- package/src/tests/threadMessageById.test.tsx +0 -7
- package/src/utils/smooth/useSmooth.ts +7 -4
- package/src/tests/BaseComposerRuntimeCore.test.ts +0 -612
- package/src/tests/BaseSubscribable.test.ts +0 -54
- package/src/tests/DataRenderers.test.ts +0 -355
- package/src/tests/ExternalStoreThreadRuntimeCore.test.ts +0 -685
- package/src/tests/LocalThreadRuntimeCore.test.ts +0 -324
- package/src/tests/auiV0Encode.test.ts +0 -188
- package/src/tests/external-message-converter.test.ts +0 -346
- package/src/tests/shouldContinue.test.ts +0 -122
|
@@ -2,35 +2,47 @@ import { SingleThreadList } from "./SingleThreadList.js";
|
|
|
2
2
|
import { Derived, attachTransformScopes, useClientLookup, useClientResource } from "@assistant-ui/store";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { DataRenderers, Tools } from "@assistant-ui/core/react";
|
|
5
|
-
import { useEffect, useEffectEvent, useState } from "@assistant-ui/tap/react-shim";
|
|
5
|
+
import { useEffect, useEffectEvent, useRef, useState } from "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { ToolResponse } from "assistant-stream";
|
|
6
7
|
import { ModelContext, Suggestions } from "@assistant-ui/core/store";
|
|
7
8
|
import { resource, withKey } from "@assistant-ui/tap";
|
|
8
|
-
import { getThreadMessageText, resolveToolApprovalResponse } from "@assistant-ui/core/internal";
|
|
9
|
+
import { fileMatchesAccept, getThreadMessageText, isCreateAttachment, resolveToolApprovalResponse } from "@assistant-ui/core/internal";
|
|
9
10
|
//#region src/client/ExternalThread.ts
|
|
10
11
|
const EMPTY_QUEUE_ITEMS = [];
|
|
11
12
|
const EMPTY_BRANCH_IDS = [];
|
|
13
|
+
const COMPLETE_STATUS = Object.freeze({ type: "complete" });
|
|
14
|
+
const derivePartStatus = (message, partIndex, part) => {
|
|
15
|
+
if (message.role !== "assistant" || !message.status) return COMPLETE_STATUS;
|
|
16
|
+
if (part.type === "tool-call") {
|
|
17
|
+
if (!part.result) return message.status;
|
|
18
|
+
return COMPLETE_STATUS;
|
|
19
|
+
}
|
|
20
|
+
const isLastPart = partIndex === Math.max(0, message.content.length - 1);
|
|
21
|
+
if (message.status.type === "requires-action") return COMPLETE_STATUS;
|
|
22
|
+
return isLastPart ? message.status : COMPLETE_STATUS;
|
|
23
|
+
};
|
|
12
24
|
const useMessageClient = (t0) => {
|
|
13
|
-
const $ = c(
|
|
14
|
-
const { message, index, onEdit, onReload, queue, branches, onRespondToToolApproval } = t0;
|
|
25
|
+
const $ = c(65);
|
|
26
|
+
const { message, index, parentId, onEdit, onReload, queue, branches, onRespondToToolApproval, onAddToolResult, onResumeToolCall, attachmentAdapter } = t0;
|
|
15
27
|
const [isCopied, setIsCopied] = useState(false);
|
|
16
28
|
const [isHovering, setIsHovering] = useState(false);
|
|
17
29
|
const [isEditing, setIsEditing] = useState(false);
|
|
18
30
|
let t1;
|
|
19
|
-
if ($[0] !== message
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
$[
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
} else t1 = $[
|
|
31
|
+
if ($[0] !== message || $[1] !== onAddToolResult || $[2] !== onRespondToToolApproval || $[3] !== onResumeToolCall) {
|
|
32
|
+
t1 = message.content.map((part, idx) => withKey(idx, PartResource({
|
|
33
|
+
part,
|
|
34
|
+
status: derivePartStatus(message, idx, part),
|
|
35
|
+
messageId: message.id,
|
|
36
|
+
onRespondToToolApproval,
|
|
37
|
+
onAddToolResult,
|
|
38
|
+
onResumeToolCall
|
|
39
|
+
})));
|
|
40
|
+
$[0] = message;
|
|
41
|
+
$[1] = onAddToolResult;
|
|
42
|
+
$[2] = onRespondToToolApproval;
|
|
43
|
+
$[3] = onResumeToolCall;
|
|
44
|
+
$[4] = t1;
|
|
45
|
+
} else t1 = $[4];
|
|
34
46
|
const partClients = useClientLookup(t1);
|
|
35
47
|
let t2;
|
|
36
48
|
if ($[5] !== message.attachments) {
|
|
@@ -62,24 +74,25 @@ const useMessageClient = (t0) => {
|
|
|
62
74
|
} else t5 = $[10];
|
|
63
75
|
const handleCancelEdit = t5;
|
|
64
76
|
let t6;
|
|
65
|
-
if ($[11] !== message.id || $[12] !== onEdit || $[13] !== queue) {
|
|
77
|
+
if ($[11] !== message.id || $[12] !== onEdit || $[13] !== parentId || $[14] !== queue) {
|
|
66
78
|
t6 = (msg) => {
|
|
67
79
|
queue?.clear("edit");
|
|
68
80
|
onEdit?.({
|
|
69
81
|
...msg,
|
|
70
|
-
parentId
|
|
82
|
+
parentId,
|
|
71
83
|
sourceId: message.id
|
|
72
84
|
});
|
|
73
85
|
setIsEditing(false);
|
|
74
86
|
};
|
|
75
87
|
$[11] = message.id;
|
|
76
88
|
$[12] = onEdit;
|
|
77
|
-
$[13] =
|
|
78
|
-
$[14] =
|
|
79
|
-
|
|
89
|
+
$[13] = parentId;
|
|
90
|
+
$[14] = queue;
|
|
91
|
+
$[15] = t6;
|
|
92
|
+
} else t6 = $[15];
|
|
80
93
|
const handleSendEdit = t6;
|
|
81
94
|
let t7;
|
|
82
|
-
if ($[
|
|
95
|
+
if ($[16] !== attachmentAdapter || $[17] !== handleSendEdit || $[18] !== isEditing || $[19] !== message || $[20] !== queue) {
|
|
83
96
|
t7 = ComposerClientResource({
|
|
84
97
|
type: "edit",
|
|
85
98
|
isEditing,
|
|
@@ -88,43 +101,45 @@ const useMessageClient = (t0) => {
|
|
|
88
101
|
onBeginEdit: handleBeginEdit,
|
|
89
102
|
onSend: handleSendEdit,
|
|
90
103
|
message,
|
|
91
|
-
queue
|
|
104
|
+
queue,
|
|
105
|
+
attachmentAdapter
|
|
92
106
|
});
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
|
|
107
|
+
$[16] = attachmentAdapter;
|
|
108
|
+
$[17] = handleSendEdit;
|
|
109
|
+
$[18] = isEditing;
|
|
110
|
+
$[19] = message;
|
|
111
|
+
$[20] = queue;
|
|
112
|
+
$[21] = t7;
|
|
113
|
+
} else t7 = $[21];
|
|
99
114
|
const composerClient = useClientResource(t7);
|
|
100
115
|
let branchIds;
|
|
101
116
|
let t8;
|
|
102
|
-
if ($[
|
|
117
|
+
if ($[22] !== branches || $[23] !== message.id) {
|
|
103
118
|
branchIds = branches?.getBranches(message.id) ?? EMPTY_BRANCH_IDS;
|
|
104
119
|
t8 = branchIds.indexOf(message.id);
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
120
|
+
$[22] = branches;
|
|
121
|
+
$[23] = message.id;
|
|
122
|
+
$[24] = branchIds;
|
|
123
|
+
$[25] = t8;
|
|
109
124
|
} else {
|
|
110
|
-
branchIds = $[
|
|
111
|
-
t8 = $[
|
|
125
|
+
branchIds = $[24];
|
|
126
|
+
t8 = $[25];
|
|
112
127
|
}
|
|
113
128
|
const branchIndex = t8;
|
|
114
129
|
const branchNumber = branchIndex === -1 ? 1 : branchIndex + 1;
|
|
115
130
|
const branchCount = branchIndex === -1 ? 1 : branchIds.length;
|
|
116
131
|
let t9;
|
|
117
|
-
if ($[
|
|
132
|
+
if ($[26] !== message.attachments) {
|
|
118
133
|
t9 = message.attachments ?? [];
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else t9 = $[
|
|
134
|
+
$[26] = message.attachments;
|
|
135
|
+
$[27] = t9;
|
|
136
|
+
} else t9 = $[27];
|
|
122
137
|
let t10;
|
|
123
|
-
if ($[
|
|
138
|
+
if ($[28] !== branchCount || $[29] !== branchNumber || $[30] !== composerClient.state || $[31] !== index || $[32] !== isCopied || $[33] !== isHovering || $[34] !== message || $[35] !== parentId || $[36] !== partClients.state || $[37] !== t9) {
|
|
124
139
|
t10 = {
|
|
125
140
|
...message,
|
|
126
141
|
attachments: t9,
|
|
127
|
-
parentId
|
|
142
|
+
parentId,
|
|
128
143
|
isLast: false,
|
|
129
144
|
branchNumber,
|
|
130
145
|
branchCount,
|
|
@@ -135,80 +150,81 @@ const useMessageClient = (t0) => {
|
|
|
135
150
|
index,
|
|
136
151
|
composer: composerClient.state
|
|
137
152
|
};
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
|
|
153
|
+
$[28] = branchCount;
|
|
154
|
+
$[29] = branchNumber;
|
|
155
|
+
$[30] = composerClient.state;
|
|
156
|
+
$[31] = index;
|
|
157
|
+
$[32] = isCopied;
|
|
158
|
+
$[33] = isHovering;
|
|
159
|
+
$[34] = message;
|
|
160
|
+
$[35] = parentId;
|
|
161
|
+
$[36] = partClients.state;
|
|
162
|
+
$[37] = t9;
|
|
163
|
+
$[38] = t10;
|
|
164
|
+
} else t10 = $[38];
|
|
149
165
|
const state = t10;
|
|
150
166
|
let t11;
|
|
151
|
-
if ($[
|
|
167
|
+
if ($[39] !== state) {
|
|
152
168
|
t11 = () => state;
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
} else t11 = $[
|
|
169
|
+
$[39] = state;
|
|
170
|
+
$[40] = t11;
|
|
171
|
+
} else t11 = $[40];
|
|
156
172
|
let t12;
|
|
157
|
-
if ($[
|
|
173
|
+
if ($[41] !== composerClient.methods) {
|
|
158
174
|
t12 = () => composerClient.methods;
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
} else t12 = $[
|
|
175
|
+
$[41] = composerClient.methods;
|
|
176
|
+
$[42] = t12;
|
|
177
|
+
} else t12 = $[42];
|
|
162
178
|
let t13;
|
|
163
|
-
if ($[
|
|
179
|
+
if ($[43] !== onReload) {
|
|
164
180
|
t13 = () => {
|
|
165
181
|
onReload?.();
|
|
166
182
|
};
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
} else t13 = $[
|
|
183
|
+
$[43] = onReload;
|
|
184
|
+
$[44] = t13;
|
|
185
|
+
} else t13 = $[44];
|
|
170
186
|
let t14;
|
|
171
|
-
if ($[
|
|
187
|
+
if ($[45] !== branchIds || $[46] !== branchIndex || $[47] !== branches || $[48] !== message.id) {
|
|
172
188
|
t14 = (t15) => {
|
|
173
189
|
const { position, branchId } = t15;
|
|
174
190
|
if (!branches) return;
|
|
175
191
|
const target = branchId ?? (branchIndex === -1 ? void 0 : position === "previous" ? branchIds[branchIndex - 1] : position === "next" ? branchIds[branchIndex + 1] : void 0);
|
|
176
192
|
if (target !== void 0 && target !== message.id) branches.switchToBranch(target);
|
|
177
193
|
};
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
} else t14 = $[
|
|
194
|
+
$[45] = branchIds;
|
|
195
|
+
$[46] = branchIndex;
|
|
196
|
+
$[47] = branches;
|
|
197
|
+
$[48] = message.id;
|
|
198
|
+
$[49] = t14;
|
|
199
|
+
} else t14 = $[49];
|
|
184
200
|
let t15;
|
|
185
|
-
if ($[
|
|
201
|
+
if ($[50] !== message) {
|
|
186
202
|
t15 = () => getThreadMessageText(message);
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else t15 = $[
|
|
203
|
+
$[50] = message;
|
|
204
|
+
$[51] = t15;
|
|
205
|
+
} else t15 = $[51];
|
|
190
206
|
let t16;
|
|
191
|
-
if ($[
|
|
207
|
+
if ($[52] !== partClients || $[53] !== state) {
|
|
192
208
|
t16 = (selector) => {
|
|
193
209
|
if ("index" in selector) return partClients.get(selector);
|
|
194
210
|
const partIndex = state.parts.findIndex((p) => p.type === "tool-call" && p.toolCallId === selector.toolCallId);
|
|
195
211
|
return partClients.get({ index: partIndex });
|
|
196
212
|
};
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
} else t16 = $[
|
|
213
|
+
$[52] = partClients;
|
|
214
|
+
$[53] = state;
|
|
215
|
+
$[54] = t16;
|
|
216
|
+
} else t16 = $[54];
|
|
201
217
|
let t17;
|
|
202
|
-
if ($[
|
|
218
|
+
if ($[55] !== attachmentClients) {
|
|
203
219
|
t17 = (selector_0) => {
|
|
204
220
|
if ("id" in selector_0) return attachmentClients.get({ key: selector_0.id });
|
|
205
221
|
return attachmentClients.get(selector_0);
|
|
206
222
|
};
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
} else t17 = $[
|
|
223
|
+
$[55] = attachmentClients;
|
|
224
|
+
$[56] = t17;
|
|
225
|
+
} else t17 = $[56];
|
|
210
226
|
let t18;
|
|
211
|
-
if ($[
|
|
227
|
+
if ($[57] !== t11 || $[58] !== t12 || $[59] !== t13 || $[60] !== t14 || $[61] !== t15 || $[62] !== t16 || $[63] !== t17) {
|
|
212
228
|
t18 = {
|
|
213
229
|
getState: t11,
|
|
214
230
|
composer: t12,
|
|
@@ -224,74 +240,107 @@ const useMessageClient = (t0) => {
|
|
|
224
240
|
setIsCopied,
|
|
225
241
|
setIsHovering
|
|
226
242
|
};
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t18 = $[
|
|
243
|
+
$[57] = t11;
|
|
244
|
+
$[58] = t12;
|
|
245
|
+
$[59] = t13;
|
|
246
|
+
$[60] = t14;
|
|
247
|
+
$[61] = t15;
|
|
248
|
+
$[62] = t16;
|
|
249
|
+
$[63] = t17;
|
|
250
|
+
$[64] = t18;
|
|
251
|
+
} else t18 = $[64];
|
|
236
252
|
return t18;
|
|
237
253
|
};
|
|
238
254
|
const MessageClient = resource(useMessageClient);
|
|
239
255
|
const usePartResource = (t0) => {
|
|
240
|
-
const $ = c(
|
|
241
|
-
const { part, onRespondToToolApproval } = t0;
|
|
256
|
+
const $ = c(20);
|
|
257
|
+
const { part, status, messageId, onRespondToToolApproval, onAddToolResult, onResumeToolCall } = t0;
|
|
242
258
|
let t1;
|
|
243
|
-
if ($[0]
|
|
244
|
-
t1 = {
|
|
245
|
-
$[0] = t1;
|
|
246
|
-
} else t1 = $[0];
|
|
247
|
-
let t2;
|
|
248
|
-
if ($[1] !== part) {
|
|
249
|
-
t2 = {
|
|
259
|
+
if ($[0] !== part || $[1] !== status) {
|
|
260
|
+
t1 = {
|
|
250
261
|
...part,
|
|
251
|
-
status
|
|
262
|
+
status
|
|
252
263
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
264
|
+
$[0] = part;
|
|
265
|
+
$[1] = status;
|
|
266
|
+
$[2] = t1;
|
|
267
|
+
} else t1 = $[2];
|
|
268
|
+
const state = t1;
|
|
269
|
+
let t2;
|
|
258
270
|
if ($[3] !== state) {
|
|
259
|
-
|
|
271
|
+
t2 = () => state;
|
|
260
272
|
$[3] = state;
|
|
261
|
-
$[4] =
|
|
262
|
-
} else
|
|
273
|
+
$[4] = t2;
|
|
274
|
+
} else t2 = $[4];
|
|
275
|
+
let t3;
|
|
276
|
+
if ($[5] !== messageId || $[6] !== onAddToolResult || $[7] !== part) {
|
|
277
|
+
t3 = (result) => {
|
|
278
|
+
if (!onAddToolResult) throw new Error("Runtime does not support tool results (onAddToolResult is not set).");
|
|
279
|
+
if (part.type !== "tool-call") throw new Error("Tried to add tool result on non-tool message part");
|
|
280
|
+
const response = ToolResponse.toResponse(result);
|
|
281
|
+
onAddToolResult({
|
|
282
|
+
messageId,
|
|
283
|
+
toolName: part.toolName,
|
|
284
|
+
toolCallId: part.toolCallId,
|
|
285
|
+
result: response.result,
|
|
286
|
+
isError: response.isError,
|
|
287
|
+
...response.artifact !== void 0 && { artifact: response.artifact },
|
|
288
|
+
...response.modelContent !== void 0 && { modelContent: response.modelContent }
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
$[5] = messageId;
|
|
292
|
+
$[6] = onAddToolResult;
|
|
293
|
+
$[7] = part;
|
|
294
|
+
$[8] = t3;
|
|
295
|
+
} else t3 = $[8];
|
|
263
296
|
let t4;
|
|
264
|
-
if ($[
|
|
265
|
-
t4 = (
|
|
297
|
+
if ($[9] !== onResumeToolCall || $[10] !== part) {
|
|
298
|
+
t4 = (payload) => {
|
|
299
|
+
if (!onResumeToolCall) throw new Error("Runtime does not support resuming tool calls (onResumeToolCall is not set).");
|
|
300
|
+
if (part.type !== "tool-call") throw new Error("Tried to resume tool call on non-tool message part");
|
|
301
|
+
onResumeToolCall({
|
|
302
|
+
toolCallId: part.toolCallId,
|
|
303
|
+
payload
|
|
304
|
+
});
|
|
305
|
+
};
|
|
306
|
+
$[9] = onResumeToolCall;
|
|
307
|
+
$[10] = part;
|
|
308
|
+
$[11] = t4;
|
|
309
|
+
} else t4 = $[11];
|
|
310
|
+
let t5;
|
|
311
|
+
if ($[12] !== onRespondToToolApproval || $[13] !== part) {
|
|
312
|
+
t5 = (response_0) => {
|
|
266
313
|
if (!onRespondToToolApproval) throw new Error("Runtime does not support tool approvals.");
|
|
267
314
|
if (part.type !== "tool-call") throw new Error("Tried to respond to tool approval on non-tool message part");
|
|
268
315
|
if (!part.approval || part.approval.approved !== void 0 || part.approval.resolution !== void 0) throw new Error("Tool call has no pending approval");
|
|
269
|
-
onRespondToToolApproval(resolveToolApprovalResponse(part.approval,
|
|
316
|
+
onRespondToToolApproval(resolveToolApprovalResponse(part.approval, response_0));
|
|
270
317
|
};
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
} else
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
278
|
-
getState:
|
|
279
|
-
addToolResult:
|
|
280
|
-
resumeToolCall:
|
|
281
|
-
respondToToolApproval:
|
|
318
|
+
$[12] = onRespondToToolApproval;
|
|
319
|
+
$[13] = part;
|
|
320
|
+
$[14] = t5;
|
|
321
|
+
} else t5 = $[14];
|
|
322
|
+
let t6;
|
|
323
|
+
if ($[15] !== t2 || $[16] !== t3 || $[17] !== t4 || $[18] !== t5) {
|
|
324
|
+
t6 = {
|
|
325
|
+
getState: t2,
|
|
326
|
+
addToolResult: t3,
|
|
327
|
+
resumeToolCall: t4,
|
|
328
|
+
respondToToolApproval: t5
|
|
282
329
|
};
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
|
|
287
|
-
|
|
330
|
+
$[15] = t2;
|
|
331
|
+
$[16] = t3;
|
|
332
|
+
$[17] = t4;
|
|
333
|
+
$[18] = t5;
|
|
334
|
+
$[19] = t6;
|
|
335
|
+
} else t6 = $[19];
|
|
336
|
+
return t6;
|
|
288
337
|
};
|
|
289
338
|
const PartResource = resource(usePartResource);
|
|
290
339
|
const useAttachmentResource = ({ attachment, onRemove }) => {
|
|
291
340
|
return {
|
|
292
341
|
getState: () => attachment,
|
|
293
342
|
remove: async () => {
|
|
294
|
-
onRemove?.();
|
|
343
|
+
await onRemove?.();
|
|
295
344
|
}
|
|
296
345
|
};
|
|
297
346
|
};
|
|
@@ -304,136 +353,217 @@ const useQueueItemClient = ({ item, onSteer, onRemove }) => {
|
|
|
304
353
|
};
|
|
305
354
|
};
|
|
306
355
|
const QueueItemClient = resource(useQueueItemClient);
|
|
356
|
+
const drainAdapterAdd = async (result, upsert) => {
|
|
357
|
+
if (Symbol.asyncIterator in result) for await (const attachment of result) upsert(attachment);
|
|
358
|
+
else upsert(await result);
|
|
359
|
+
};
|
|
360
|
+
const useLiveState = (initial) => {
|
|
361
|
+
const $ = c(3);
|
|
362
|
+
const [state, setState] = useState(initial);
|
|
363
|
+
const ref = useRef(state);
|
|
364
|
+
let t0;
|
|
365
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
366
|
+
t0 = (next) => {
|
|
367
|
+
ref.current = typeof next === "function" ? next(ref.current) : next;
|
|
368
|
+
setState(ref.current);
|
|
369
|
+
};
|
|
370
|
+
$[0] = t0;
|
|
371
|
+
} else t0 = $[0];
|
|
372
|
+
const set = t0;
|
|
373
|
+
let t1;
|
|
374
|
+
if ($[1] !== state) {
|
|
375
|
+
t1 = [
|
|
376
|
+
state,
|
|
377
|
+
set,
|
|
378
|
+
ref
|
|
379
|
+
];
|
|
380
|
+
$[1] = state;
|
|
381
|
+
$[2] = t1;
|
|
382
|
+
} else t1 = $[2];
|
|
383
|
+
return t1;
|
|
384
|
+
};
|
|
307
385
|
const useComposerClientResource = (t0) => {
|
|
308
|
-
const $ = c(
|
|
309
|
-
const { type, isEditing, canCancel, isSendDisabled: t1, onCancel, onBeginEdit, onSend, message, queue } = t0;
|
|
386
|
+
const $ = c(96);
|
|
387
|
+
const { type, isEditing, canCancel, isSendDisabled: t1, onCancel, onBeginEdit, onSend, message, queue, attachmentAdapter } = t0;
|
|
310
388
|
const isSendDisabled = t1 === void 0 ? false : t1;
|
|
311
|
-
const [text, setText] =
|
|
312
|
-
const [role, setRole] =
|
|
389
|
+
const [text, setText, textRef] = useLiveState("");
|
|
390
|
+
const [role, setRole, roleRef] = useLiveState("user");
|
|
313
391
|
let t2;
|
|
314
392
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
315
393
|
t2 = {};
|
|
316
394
|
$[0] = t2;
|
|
317
395
|
} else t2 = $[0];
|
|
318
|
-
const [runConfig, setRunConfig] =
|
|
396
|
+
const [runConfig, setRunConfig, runConfigRef] = useLiveState(t2);
|
|
319
397
|
let t3;
|
|
320
398
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
321
399
|
t3 = [];
|
|
322
400
|
$[1] = t3;
|
|
323
401
|
} else t3 = $[1];
|
|
324
|
-
const [attachments, setAttachments] =
|
|
325
|
-
const [quote, setQuote] =
|
|
402
|
+
const [attachments, setAttachments, attachmentsRef] = useLiveState(t3);
|
|
403
|
+
const [quote, setQuote, quoteRef] = useLiveState(void 0);
|
|
326
404
|
let t4;
|
|
327
|
-
if ($[2] !== message) {
|
|
405
|
+
if ($[2] !== message || $[3] !== setAttachments || $[4] !== setRole || $[5] !== setText) {
|
|
328
406
|
t4 = () => {
|
|
329
407
|
if (message) {
|
|
330
|
-
const messageText = message.content.filter(
|
|
408
|
+
const messageText = message.content.filter(_temp7).map(_temp8).join("\n\n");
|
|
331
409
|
setText(messageText);
|
|
332
410
|
setRole(message.role);
|
|
333
411
|
setAttachments(message.attachments ?? []);
|
|
334
412
|
}
|
|
335
413
|
};
|
|
336
414
|
$[2] = message;
|
|
337
|
-
$[3] =
|
|
338
|
-
|
|
415
|
+
$[3] = setAttachments;
|
|
416
|
+
$[4] = setRole;
|
|
417
|
+
$[5] = setText;
|
|
418
|
+
$[6] = t4;
|
|
419
|
+
} else t4 = $[6];
|
|
339
420
|
const updateFromMessage = useEffectEvent(t4);
|
|
340
421
|
let t5;
|
|
341
|
-
if ($[
|
|
422
|
+
if ($[7] !== isEditing || $[8] !== updateFromMessage) {
|
|
342
423
|
t5 = () => {
|
|
343
424
|
if (isEditing) updateFromMessage();
|
|
344
425
|
};
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
} else t5 = $[
|
|
426
|
+
$[7] = isEditing;
|
|
427
|
+
$[8] = updateFromMessage;
|
|
428
|
+
$[9] = t5;
|
|
429
|
+
} else t5 = $[9];
|
|
349
430
|
let t6;
|
|
350
|
-
if ($[
|
|
431
|
+
if ($[10] !== isEditing) {
|
|
351
432
|
t6 = [isEditing];
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
} else t6 = $[
|
|
433
|
+
$[10] = isEditing;
|
|
434
|
+
$[11] = t6;
|
|
435
|
+
} else t6 = $[11];
|
|
355
436
|
useEffect(t5, t6);
|
|
356
437
|
let t7;
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
438
|
+
if ($[12] !== attachmentAdapter || $[13] !== attachments || $[14] !== setAttachments) {
|
|
439
|
+
let t8;
|
|
440
|
+
if ($[16] !== attachmentAdapter || $[17] !== setAttachments) {
|
|
441
|
+
t8 = (attachment) => withKey(attachment.id, AttachmentResource({
|
|
442
|
+
attachment,
|
|
443
|
+
onRemove: async () => {
|
|
444
|
+
await attachmentAdapter?.remove(attachment);
|
|
445
|
+
setAttachments((prev) => prev.filter((a) => a.id !== attachment.id));
|
|
446
|
+
}
|
|
447
|
+
}));
|
|
448
|
+
$[16] = attachmentAdapter;
|
|
449
|
+
$[17] = setAttachments;
|
|
450
|
+
$[18] = t8;
|
|
451
|
+
} else t8 = $[18];
|
|
452
|
+
t7 = attachments.map(t8);
|
|
453
|
+
$[12] = attachmentAdapter;
|
|
454
|
+
$[13] = attachments;
|
|
455
|
+
$[14] = setAttachments;
|
|
456
|
+
$[15] = t7;
|
|
457
|
+
} else t7 = $[15];
|
|
367
458
|
const attachmentClients = useClientLookup(t7);
|
|
368
|
-
const queueItems = queue?.items ?? EMPTY_QUEUE_ITEMS;
|
|
369
459
|
let t8;
|
|
370
|
-
if ($[
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
460
|
+
if ($[19] !== attachmentAdapter) {
|
|
461
|
+
t8 = async (removed) => {
|
|
462
|
+
if (!attachmentAdapter) return;
|
|
463
|
+
await Promise.all(removed.filter(_temp9).map((a_1) => attachmentAdapter.remove(a_1)));
|
|
464
|
+
};
|
|
465
|
+
$[19] = attachmentAdapter;
|
|
466
|
+
$[20] = t8;
|
|
467
|
+
} else t8 = $[20];
|
|
468
|
+
const removePendingAttachments = t8;
|
|
469
|
+
let t9;
|
|
470
|
+
if ($[21] !== setAttachments) {
|
|
471
|
+
t9 = (attachment_0) => {
|
|
472
|
+
setAttachments((prev_0) => {
|
|
473
|
+
const idx = prev_0.findIndex((a_2) => a_2.id === attachment_0.id);
|
|
474
|
+
if (idx === -1) return [...prev_0, attachment_0];
|
|
475
|
+
const next = [...prev_0];
|
|
476
|
+
next[idx] = attachment_0;
|
|
477
|
+
return next;
|
|
478
|
+
});
|
|
479
|
+
};
|
|
480
|
+
$[21] = setAttachments;
|
|
481
|
+
$[22] = t9;
|
|
482
|
+
} else t9 = $[22];
|
|
483
|
+
const upsertAttachment = t9;
|
|
484
|
+
const queueItems = queue?.items ?? EMPTY_QUEUE_ITEMS;
|
|
485
|
+
let t10;
|
|
486
|
+
if ($[23] !== queue || $[24] !== queueItems) {
|
|
487
|
+
let t11;
|
|
488
|
+
if ($[26] !== queue) {
|
|
489
|
+
t11 = (item) => withKey(item.id, QueueItemClient({
|
|
374
490
|
item,
|
|
375
491
|
onSteer: () => queue?.steer(item.id),
|
|
376
492
|
onRemove: () => queue?.remove(item.id)
|
|
377
493
|
}));
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
} else
|
|
381
|
-
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else
|
|
386
|
-
const queueItemClients = useClientLookup(
|
|
387
|
-
|
|
388
|
-
if ($[16] !== attachments.length || $[17] !== text) {
|
|
389
|
-
t9 = !text.trim() && !attachments.length;
|
|
390
|
-
$[16] = attachments.length;
|
|
391
|
-
$[17] = text;
|
|
392
|
-
$[18] = t9;
|
|
393
|
-
} else t9 = $[18];
|
|
394
|
-
const isEmpty = t9;
|
|
395
|
-
const t10 = isEditing && !isEmpty && !isSendDisabled;
|
|
494
|
+
$[26] = queue;
|
|
495
|
+
$[27] = t11;
|
|
496
|
+
} else t11 = $[27];
|
|
497
|
+
t10 = queueItems.map(t11);
|
|
498
|
+
$[23] = queue;
|
|
499
|
+
$[24] = queueItems;
|
|
500
|
+
$[25] = t10;
|
|
501
|
+
} else t10 = $[25];
|
|
502
|
+
const queueItemClients = useClientLookup(t10);
|
|
503
|
+
attachmentAdapter?.accept;
|
|
396
504
|
let t11;
|
|
397
|
-
if ($[
|
|
398
|
-
t11 =
|
|
505
|
+
if ($[28] !== attachments.length || $[29] !== text) {
|
|
506
|
+
t11 = !text.trim() && !attachments.length;
|
|
507
|
+
$[28] = attachments.length;
|
|
508
|
+
$[29] = text;
|
|
509
|
+
$[30] = t11;
|
|
510
|
+
} else t11 = $[30];
|
|
511
|
+
const isEmpty = t11;
|
|
512
|
+
const t12 = isEditing && !isEmpty && !isSendDisabled;
|
|
513
|
+
const t13 = attachmentAdapter?.accept ?? "*";
|
|
514
|
+
let t14;
|
|
515
|
+
if ($[31] !== attachmentClients.state || $[32] !== canCancel || $[33] !== isEditing || $[34] !== isEmpty || $[35] !== queueItems || $[36] !== quote || $[37] !== role || $[38] !== runConfig || $[39] !== t12 || $[40] !== t13 || $[41] !== text || $[42] !== type) {
|
|
516
|
+
t14 = {
|
|
399
517
|
text,
|
|
400
518
|
role,
|
|
401
519
|
attachments: attachmentClients.state,
|
|
402
520
|
runConfig,
|
|
403
521
|
isEditing,
|
|
404
522
|
canCancel,
|
|
405
|
-
canSend:
|
|
406
|
-
attachmentAccept:
|
|
523
|
+
canSend: t12,
|
|
524
|
+
attachmentAccept: t13,
|
|
407
525
|
isEmpty,
|
|
408
526
|
type,
|
|
409
527
|
dictation: void 0,
|
|
410
528
|
quote,
|
|
411
529
|
queue: queueItems
|
|
412
530
|
};
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
$[
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
531
|
+
$[31] = attachmentClients.state;
|
|
532
|
+
$[32] = canCancel;
|
|
533
|
+
$[33] = isEditing;
|
|
534
|
+
$[34] = isEmpty;
|
|
535
|
+
$[35] = queueItems;
|
|
536
|
+
$[36] = quote;
|
|
537
|
+
$[37] = role;
|
|
538
|
+
$[38] = runConfig;
|
|
539
|
+
$[39] = t12;
|
|
540
|
+
$[40] = t13;
|
|
541
|
+
$[41] = text;
|
|
542
|
+
$[42] = type;
|
|
543
|
+
$[43] = t14;
|
|
544
|
+
} else t14 = $[43];
|
|
545
|
+
const state = t14;
|
|
546
|
+
let t15;
|
|
547
|
+
if ($[44] !== state) {
|
|
548
|
+
t15 = () => state;
|
|
549
|
+
$[44] = state;
|
|
550
|
+
$[45] = t15;
|
|
551
|
+
} else t15 = $[45];
|
|
552
|
+
let t16;
|
|
553
|
+
if ($[46] !== attachmentAdapter || $[47] !== setAttachments || $[48] !== upsertAttachment) {
|
|
554
|
+
t16 = async (fileOrAttachment) => {
|
|
555
|
+
if (attachmentAdapter) {
|
|
556
|
+
const file = isCreateAttachment(fileOrAttachment) ? {
|
|
557
|
+
name: fileOrAttachment.name,
|
|
558
|
+
type: fileOrAttachment.contentType ?? ""
|
|
559
|
+
} : {
|
|
560
|
+
name: fileOrAttachment.name,
|
|
561
|
+
type: fileOrAttachment.type
|
|
562
|
+
};
|
|
563
|
+
if (!fileMatchesAccept(file, attachmentAdapter.accept)) throw new Error(`File type ${file.type || "unknown"} is not accepted. Accepted types: ${attachmentAdapter.accept}`);
|
|
564
|
+
}
|
|
565
|
+
if (!isCreateAttachment(fileOrAttachment) && attachmentAdapter) await drainAdapterAdd(attachmentAdapter.add({ file: fileOrAttachment }), upsertAttachment);
|
|
566
|
+
else if (!isCreateAttachment(fileOrAttachment)) {
|
|
437
567
|
const newAttachment = {
|
|
438
568
|
id: Math.random().toString(36).substring(7),
|
|
439
569
|
type: "file",
|
|
@@ -443,7 +573,7 @@ const useComposerClientResource = (t0) => {
|
|
|
443
573
|
status: { type: "complete" },
|
|
444
574
|
content: []
|
|
445
575
|
};
|
|
446
|
-
setAttachments([...
|
|
576
|
+
setAttachments((prev_1) => [...prev_1, newAttachment]);
|
|
447
577
|
} else {
|
|
448
578
|
const newAttachment_0 = {
|
|
449
579
|
id: fileOrAttachment.id ?? Math.random().toString(36).substring(7),
|
|
@@ -453,230 +583,318 @@ const useComposerClientResource = (t0) => {
|
|
|
453
583
|
content: fileOrAttachment.content,
|
|
454
584
|
status: { type: "complete" }
|
|
455
585
|
};
|
|
456
|
-
setAttachments([...
|
|
586
|
+
setAttachments((prev_2) => [...prev_2, newAttachment_0]);
|
|
457
587
|
}
|
|
458
588
|
};
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
589
|
+
$[46] = attachmentAdapter;
|
|
590
|
+
$[47] = setAttachments;
|
|
591
|
+
$[48] = upsertAttachment;
|
|
592
|
+
$[49] = t16;
|
|
593
|
+
} else t16 = $[49];
|
|
594
|
+
let t17;
|
|
595
|
+
if ($[50] !== attachmentsRef || $[51] !== removePendingAttachments || $[52] !== setAttachments) {
|
|
596
|
+
t17 = async () => {
|
|
597
|
+
const removed_0 = attachmentsRef.current;
|
|
465
598
|
setAttachments([]);
|
|
599
|
+
await removePendingAttachments(removed_0);
|
|
466
600
|
};
|
|
467
|
-
$[
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
601
|
+
$[50] = attachmentsRef;
|
|
602
|
+
$[51] = removePendingAttachments;
|
|
603
|
+
$[52] = setAttachments;
|
|
604
|
+
$[53] = t17;
|
|
605
|
+
} else t17 = $[53];
|
|
606
|
+
let t18;
|
|
607
|
+
if ($[54] !== attachmentClients) {
|
|
608
|
+
t18 = (selector) => {
|
|
472
609
|
if ("id" in selector) return attachmentClients.get({ key: selector.id });
|
|
473
610
|
return attachmentClients.get(selector);
|
|
474
611
|
};
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
} else
|
|
478
|
-
let
|
|
479
|
-
if ($[
|
|
480
|
-
|
|
612
|
+
$[54] = attachmentClients;
|
|
613
|
+
$[55] = t18;
|
|
614
|
+
} else t18 = $[55];
|
|
615
|
+
let t19;
|
|
616
|
+
if ($[56] !== attachmentsRef || $[57] !== removePendingAttachments || $[58] !== setAttachments || $[59] !== setQuote || $[60] !== setRole || $[61] !== setRunConfig || $[62] !== setText) {
|
|
617
|
+
t19 = async () => {
|
|
618
|
+
const removed_1 = attachmentsRef.current;
|
|
481
619
|
setText("");
|
|
482
620
|
setRole("user");
|
|
483
621
|
setRunConfig({});
|
|
484
622
|
setAttachments([]);
|
|
485
623
|
setQuote(void 0);
|
|
624
|
+
await removePendingAttachments(removed_1);
|
|
486
625
|
};
|
|
487
|
-
$[
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
runConfig,
|
|
505
|
-
startRun: opts?.startRun,
|
|
506
|
-
metadata: { custom: { ...currentQuote ? { quote: currentQuote } : {} } }
|
|
507
|
-
};
|
|
508
|
-
if (queue) queue.enqueue(composedMessage, { steer: opts?.steer ?? false });
|
|
509
|
-
else onSend?.(composedMessage);
|
|
626
|
+
$[56] = attachmentsRef;
|
|
627
|
+
$[57] = removePendingAttachments;
|
|
628
|
+
$[58] = setAttachments;
|
|
629
|
+
$[59] = setQuote;
|
|
630
|
+
$[60] = setRole;
|
|
631
|
+
$[61] = setRunConfig;
|
|
632
|
+
$[62] = setText;
|
|
633
|
+
$[63] = t19;
|
|
634
|
+
} else t19 = $[63];
|
|
635
|
+
let t20;
|
|
636
|
+
if ($[64] !== attachmentAdapter || $[65] !== attachmentsRef || $[66] !== isEditing || $[67] !== isSendDisabled || $[68] !== onSend || $[69] !== queue || $[70] !== quoteRef || $[71] !== roleRef || $[72] !== runConfigRef || $[73] !== setAttachments || $[74] !== setQuote || $[75] !== setText || $[76] !== textRef) {
|
|
637
|
+
t20 = (opts) => {
|
|
638
|
+
const currentQuote = quoteRef.current;
|
|
639
|
+
const currentText = textRef.current;
|
|
640
|
+
const currentAttachments = attachmentsRef.current;
|
|
641
|
+
const isEmpty_0 = !currentText.trim() && !currentAttachments.length;
|
|
642
|
+
if (!isEditing || isEmpty_0 || isSendDisabled) return;
|
|
510
643
|
setText("");
|
|
511
644
|
setAttachments([]);
|
|
512
645
|
setQuote(void 0);
|
|
646
|
+
const dispatch = (sendAttachments) => {
|
|
647
|
+
const composedMessage = {
|
|
648
|
+
role: roleRef.current,
|
|
649
|
+
content: currentText ? [{
|
|
650
|
+
type: "text",
|
|
651
|
+
text: currentText
|
|
652
|
+
}] : [],
|
|
653
|
+
attachments: sendAttachments,
|
|
654
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
655
|
+
parentId: null,
|
|
656
|
+
sourceId: null,
|
|
657
|
+
runConfig: runConfigRef.current,
|
|
658
|
+
startRun: opts?.startRun,
|
|
659
|
+
metadata: { custom: { ...currentQuote ? { quote: currentQuote } : {} } }
|
|
660
|
+
};
|
|
661
|
+
if (queue) queue.enqueue(composedMessage, { steer: opts?.steer ?? false });
|
|
662
|
+
else onSend?.(composedMessage);
|
|
663
|
+
};
|
|
664
|
+
if (attachmentAdapter && currentAttachments.length > 0) Promise.all(currentAttachments.map((attachment_1) => attachment_1.status.type === "complete" ? attachment_1 : attachmentAdapter.send(attachment_1))).then(dispatch, (error) => {
|
|
665
|
+
setText((prev_3) => currentText && prev_3 ? currentText + "\n" + prev_3 : currentText || prev_3);
|
|
666
|
+
setQuote((prev_4) => prev_4 ?? currentQuote);
|
|
667
|
+
setAttachments((prev_5) => [...currentAttachments, ...prev_5]);
|
|
668
|
+
console.error("Failed to send attachments", error);
|
|
669
|
+
});
|
|
670
|
+
else dispatch(currentAttachments);
|
|
513
671
|
};
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
672
|
+
$[64] = attachmentAdapter;
|
|
673
|
+
$[65] = attachmentsRef;
|
|
674
|
+
$[66] = isEditing;
|
|
675
|
+
$[67] = isSendDisabled;
|
|
676
|
+
$[68] = onSend;
|
|
677
|
+
$[69] = queue;
|
|
678
|
+
$[70] = quoteRef;
|
|
679
|
+
$[71] = roleRef;
|
|
680
|
+
$[72] = runConfigRef;
|
|
681
|
+
$[73] = setAttachments;
|
|
682
|
+
$[74] = setQuote;
|
|
683
|
+
$[75] = setText;
|
|
684
|
+
$[76] = textRef;
|
|
685
|
+
$[77] = t20;
|
|
686
|
+
} else t20 = $[77];
|
|
687
|
+
let t21;
|
|
688
|
+
if ($[78] !== onBeginEdit) {
|
|
689
|
+
t21 = () => {
|
|
527
690
|
onBeginEdit?.();
|
|
528
691
|
};
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
} else
|
|
532
|
-
let
|
|
533
|
-
if ($[
|
|
534
|
-
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
} else
|
|
538
|
-
let
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
541
|
-
getState:
|
|
692
|
+
$[78] = onBeginEdit;
|
|
693
|
+
$[79] = t21;
|
|
694
|
+
} else t21 = $[79];
|
|
695
|
+
let t22;
|
|
696
|
+
if ($[80] !== queueItemClients) {
|
|
697
|
+
t22 = (selector_0) => queueItemClients.get(selector_0);
|
|
698
|
+
$[80] = queueItemClients;
|
|
699
|
+
$[81] = t22;
|
|
700
|
+
} else t22 = $[81];
|
|
701
|
+
let t23;
|
|
702
|
+
if ($[82] !== onCancel || $[83] !== setQuote || $[84] !== setRole || $[85] !== setRunConfig || $[86] !== setText || $[87] !== t15 || $[88] !== t16 || $[89] !== t17 || $[90] !== t18 || $[91] !== t19 || $[92] !== t20 || $[93] !== t21 || $[94] !== t22) {
|
|
703
|
+
t23 = {
|
|
704
|
+
getState: t15,
|
|
542
705
|
setText,
|
|
543
706
|
setRole,
|
|
544
707
|
setRunConfig,
|
|
545
|
-
addAttachment:
|
|
546
|
-
clearAttachments:
|
|
547
|
-
attachment:
|
|
548
|
-
reset:
|
|
549
|
-
send:
|
|
708
|
+
addAttachment: t16,
|
|
709
|
+
clearAttachments: t17,
|
|
710
|
+
attachment: t18,
|
|
711
|
+
reset: t19,
|
|
712
|
+
send: t20,
|
|
550
713
|
cancel: onCancel,
|
|
551
|
-
beginEdit:
|
|
552
|
-
startDictation:
|
|
553
|
-
stopDictation:
|
|
714
|
+
beginEdit: t21,
|
|
715
|
+
startDictation: _temp0,
|
|
716
|
+
stopDictation: _temp1,
|
|
554
717
|
setQuote,
|
|
555
|
-
queueItem:
|
|
718
|
+
queueItem: t22
|
|
556
719
|
};
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
|
|
566
|
-
|
|
720
|
+
$[82] = onCancel;
|
|
721
|
+
$[83] = setQuote;
|
|
722
|
+
$[84] = setRole;
|
|
723
|
+
$[85] = setRunConfig;
|
|
724
|
+
$[86] = setText;
|
|
725
|
+
$[87] = t15;
|
|
726
|
+
$[88] = t16;
|
|
727
|
+
$[89] = t17;
|
|
728
|
+
$[90] = t18;
|
|
729
|
+
$[91] = t19;
|
|
730
|
+
$[92] = t20;
|
|
731
|
+
$[93] = t21;
|
|
732
|
+
$[94] = t22;
|
|
733
|
+
$[95] = t23;
|
|
734
|
+
} else t23 = $[95];
|
|
735
|
+
return t23;
|
|
567
736
|
};
|
|
568
737
|
const ComposerClientResource = resource(useComposerClientResource);
|
|
738
|
+
const dedupeMessagesById = (messages) => {
|
|
739
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
740
|
+
const deduped = [];
|
|
741
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
742
|
+
const message = messages[i];
|
|
743
|
+
if (seenIds.has(message.id)) {
|
|
744
|
+
console.warn(`ExternalThread: duplicate message id "${message.id}" in the provided messages array; keeping the last occurrence.`);
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
seenIds.add(message.id);
|
|
748
|
+
deduped.push(message);
|
|
749
|
+
}
|
|
750
|
+
return deduped.length === messages.length ? messages : deduped.reverse();
|
|
751
|
+
};
|
|
569
752
|
const useExternalThread = (t0) => {
|
|
570
|
-
const $ = c(
|
|
571
|
-
const { messages, isRunning: t1,
|
|
753
|
+
const $ = c(80);
|
|
754
|
+
const { messages: messagesProp, isRunning: t1, isLoading: t2, state: threadState, extras, isSendDisabled: t3, onNew, onEdit, onReload, onStartRun, onCancel, onResume, onAddToolResult, onResumeToolCall, onLoadExternalState, attachmentAdapter, queue, branches, onRespondToToolApproval } = t0;
|
|
572
755
|
const isRunning = t1 === void 0 ? false : t1;
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
756
|
+
const isLoading = t2 === void 0 ? false : t2;
|
|
757
|
+
const isSendDisabled = t3 === void 0 ? false : t3;
|
|
758
|
+
let t4;
|
|
759
|
+
if ($[0] !== messagesProp) {
|
|
760
|
+
t4 = dedupeMessagesById(messagesProp);
|
|
761
|
+
$[0] = messagesProp;
|
|
762
|
+
$[1] = t4;
|
|
763
|
+
} else t4 = $[1];
|
|
764
|
+
const messages = t4;
|
|
765
|
+
let t5;
|
|
766
|
+
if ($[2] !== messages || $[3] !== onReload || $[4] !== queue) {
|
|
767
|
+
t5 = (messageId) => {
|
|
577
768
|
const messageIndex = messages.findIndex((m) => m.id === messageId);
|
|
578
769
|
if (messageIndex === -1) return;
|
|
579
770
|
const parentId = messageIndex > 0 ? messages[messageIndex - 1].id : null;
|
|
580
771
|
queue?.clear("reload");
|
|
581
772
|
onReload?.(parentId);
|
|
582
773
|
};
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
} else
|
|
588
|
-
const handleReload =
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
return withKey(msg.id, MessageClient(props));
|
|
774
|
+
$[2] = messages;
|
|
775
|
+
$[3] = onReload;
|
|
776
|
+
$[4] = queue;
|
|
777
|
+
$[5] = t5;
|
|
778
|
+
} else t5 = $[5];
|
|
779
|
+
const handleReload = t5;
|
|
780
|
+
let t6;
|
|
781
|
+
if ($[6] !== attachmentAdapter || $[7] !== branches || $[8] !== handleReload || $[9] !== messages || $[10] !== onAddToolResult || $[11] !== onEdit || $[12] !== onRespondToToolApproval || $[13] !== onResumeToolCall || $[14] !== queue) {
|
|
782
|
+
t6 = messages.map((msg, index) => {
|
|
783
|
+
const props = {
|
|
784
|
+
message: msg,
|
|
785
|
+
index,
|
|
786
|
+
parentId: index > 0 ? messages[index - 1].id : null,
|
|
787
|
+
onReload: () => handleReload(msg.id),
|
|
788
|
+
queue,
|
|
789
|
+
branches,
|
|
790
|
+
onRespondToToolApproval,
|
|
791
|
+
onAddToolResult,
|
|
792
|
+
onResumeToolCall,
|
|
793
|
+
attachmentAdapter
|
|
604
794
|
};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
617
|
-
$[
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
if ($[17] !== onCancel || $[18] !== queue) {
|
|
624
|
-
t5 = () => {
|
|
795
|
+
if (onEdit) props.onEdit = onEdit;
|
|
796
|
+
return withKey(msg.id, MessageClient(props));
|
|
797
|
+
});
|
|
798
|
+
$[6] = attachmentAdapter;
|
|
799
|
+
$[7] = branches;
|
|
800
|
+
$[8] = handleReload;
|
|
801
|
+
$[9] = messages;
|
|
802
|
+
$[10] = onAddToolResult;
|
|
803
|
+
$[11] = onEdit;
|
|
804
|
+
$[12] = onRespondToToolApproval;
|
|
805
|
+
$[13] = onResumeToolCall;
|
|
806
|
+
$[14] = queue;
|
|
807
|
+
$[15] = t6;
|
|
808
|
+
} else t6 = $[15];
|
|
809
|
+
const messageClients = useClientLookup(t6);
|
|
810
|
+
let t7;
|
|
811
|
+
if ($[16] !== onCancel || $[17] !== queue) {
|
|
812
|
+
t7 = () => {
|
|
625
813
|
queue?.clear("cancel-run");
|
|
626
814
|
onCancel?.();
|
|
627
815
|
};
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
} else
|
|
632
|
-
const handleCancelRun =
|
|
633
|
-
let
|
|
634
|
-
if ($[20] !== onNew) {
|
|
635
|
-
|
|
636
|
-
onNew?.(
|
|
816
|
+
$[16] = onCancel;
|
|
817
|
+
$[17] = queue;
|
|
818
|
+
$[18] = t7;
|
|
819
|
+
} else t7 = $[18];
|
|
820
|
+
const handleCancelRun = t7;
|
|
821
|
+
let t8;
|
|
822
|
+
if ($[19] !== messages || $[20] !== onNew) {
|
|
823
|
+
t8 = (message) => {
|
|
824
|
+
onNew?.({
|
|
825
|
+
...message,
|
|
826
|
+
parentId: messages.at(-1)?.id ?? null
|
|
827
|
+
});
|
|
637
828
|
};
|
|
829
|
+
$[19] = messages;
|
|
638
830
|
$[20] = onNew;
|
|
639
|
-
$[21] =
|
|
640
|
-
} else
|
|
641
|
-
const handleSendNew =
|
|
642
|
-
let
|
|
643
|
-
if ($[22] !==
|
|
644
|
-
|
|
831
|
+
$[21] = t8;
|
|
832
|
+
} else t8 = $[21];
|
|
833
|
+
const handleSendNew = t8;
|
|
834
|
+
let t9;
|
|
835
|
+
if ($[22] !== messages) {
|
|
836
|
+
t9 = messages.at(-1)?.id ?? null;
|
|
837
|
+
$[22] = messages;
|
|
838
|
+
$[23] = t9;
|
|
839
|
+
} else t9 = $[23];
|
|
840
|
+
const headId = t9;
|
|
841
|
+
let t10;
|
|
842
|
+
if ($[24] !== headId || $[25] !== queue) {
|
|
843
|
+
t10 = queue && {
|
|
844
|
+
...queue,
|
|
845
|
+
enqueue: (message_0, options) => queue.enqueue({
|
|
846
|
+
...message_0,
|
|
847
|
+
parentId: message_0.parentId ?? headId
|
|
848
|
+
}, options)
|
|
849
|
+
};
|
|
850
|
+
$[24] = headId;
|
|
851
|
+
$[25] = queue;
|
|
852
|
+
$[26] = t10;
|
|
853
|
+
} else t10 = $[26];
|
|
854
|
+
const composerQueue = t10;
|
|
855
|
+
let t11;
|
|
856
|
+
if ($[27] !== attachmentAdapter || $[28] !== composerQueue || $[29] !== handleCancelRun || $[30] !== handleSendNew || $[31] !== isRunning || $[32] !== isSendDisabled) {
|
|
857
|
+
t11 = ComposerClientResource({
|
|
645
858
|
type: "thread",
|
|
646
859
|
isEditing: true,
|
|
647
860
|
canCancel: isRunning,
|
|
648
861
|
isSendDisabled,
|
|
649
862
|
onCancel: handleCancelRun,
|
|
650
863
|
onSend: handleSendNew,
|
|
651
|
-
queue
|
|
864
|
+
queue: composerQueue,
|
|
865
|
+
attachmentAdapter
|
|
652
866
|
});
|
|
653
|
-
$[
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
659
|
-
|
|
660
|
-
|
|
867
|
+
$[27] = attachmentAdapter;
|
|
868
|
+
$[28] = composerQueue;
|
|
869
|
+
$[29] = handleCancelRun;
|
|
870
|
+
$[30] = handleSendNew;
|
|
871
|
+
$[31] = isRunning;
|
|
872
|
+
$[32] = isSendDisabled;
|
|
873
|
+
$[33] = t11;
|
|
874
|
+
} else t11 = $[33];
|
|
875
|
+
const composerClient = useClientResource(t11);
|
|
661
876
|
const hasQueue = !!queue;
|
|
662
877
|
const hasBranches = !!branches;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
878
|
+
const hasEdit = !!onEdit;
|
|
879
|
+
const hasReload = !!onReload;
|
|
880
|
+
const hasAttachments = !!attachmentAdapter;
|
|
881
|
+
let t12;
|
|
882
|
+
if ($[34] !== messageClients.state) {
|
|
883
|
+
t12 = messageClients.state.map(_temp10);
|
|
884
|
+
$[34] = messageClients.state;
|
|
885
|
+
$[35] = t12;
|
|
886
|
+
} else t12 = $[35];
|
|
887
|
+
const messageStates = t12;
|
|
888
|
+
const t13 = messages.length === 0;
|
|
889
|
+
let t14;
|
|
890
|
+
if ($[36] !== hasAttachments || $[37] !== hasBranches || $[38] !== hasEdit || $[39] !== hasQueue || $[40] !== hasReload || $[41] !== isRunning) {
|
|
891
|
+
t14 = {
|
|
892
|
+
edit: hasEdit,
|
|
675
893
|
delete: false,
|
|
676
|
-
reload:
|
|
894
|
+
reload: hasReload,
|
|
677
895
|
cancel: isRunning,
|
|
678
896
|
speech: false,
|
|
679
|
-
attachments:
|
|
897
|
+
attachments: hasAttachments,
|
|
680
898
|
feedback: false,
|
|
681
899
|
voice: false,
|
|
682
900
|
switchToBranch: hasBranches,
|
|
@@ -685,62 +903,68 @@ const useExternalThread = (t0) => {
|
|
|
685
903
|
dictation: false,
|
|
686
904
|
queue: hasQueue
|
|
687
905
|
};
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
$[
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
906
|
+
$[36] = hasAttachments;
|
|
907
|
+
$[37] = hasBranches;
|
|
908
|
+
$[38] = hasEdit;
|
|
909
|
+
$[39] = hasQueue;
|
|
910
|
+
$[40] = hasReload;
|
|
911
|
+
$[41] = isRunning;
|
|
912
|
+
$[42] = t14;
|
|
913
|
+
} else t14 = $[42];
|
|
914
|
+
let t15;
|
|
915
|
+
if ($[43] !== threadState) {
|
|
916
|
+
t15 = threadState ?? {};
|
|
917
|
+
$[43] = threadState;
|
|
918
|
+
$[44] = t15;
|
|
919
|
+
} else t15 = $[44];
|
|
920
|
+
let t16;
|
|
921
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
922
|
+
t16 = [];
|
|
923
|
+
$[45] = t16;
|
|
924
|
+
} else t16 = $[45];
|
|
925
|
+
let t17;
|
|
926
|
+
if ($[46] !== composerClient.state || $[47] !== extras || $[48] !== isLoading || $[49] !== isRunning || $[50] !== messageStates || $[51] !== t13 || $[52] !== t14 || $[53] !== t15) {
|
|
927
|
+
t17 = {
|
|
928
|
+
isEmpty: t13,
|
|
708
929
|
isDisabled: false,
|
|
709
|
-
isLoading
|
|
930
|
+
isLoading,
|
|
710
931
|
isRunning,
|
|
711
|
-
capabilities:
|
|
932
|
+
capabilities: t14,
|
|
712
933
|
messages: messageStates,
|
|
713
|
-
state:
|
|
714
|
-
suggestions:
|
|
715
|
-
extras
|
|
934
|
+
state: t15,
|
|
935
|
+
suggestions: t16,
|
|
936
|
+
extras,
|
|
716
937
|
speech: void 0,
|
|
717
938
|
voice: void 0,
|
|
718
939
|
composer: composerClient.state
|
|
719
940
|
};
|
|
720
|
-
$[
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[
|
|
725
|
-
$[
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
941
|
+
$[46] = composerClient.state;
|
|
942
|
+
$[47] = extras;
|
|
943
|
+
$[48] = isLoading;
|
|
944
|
+
$[49] = isRunning;
|
|
945
|
+
$[50] = messageStates;
|
|
946
|
+
$[51] = t13;
|
|
947
|
+
$[52] = t14;
|
|
948
|
+
$[53] = t15;
|
|
949
|
+
$[54] = t17;
|
|
950
|
+
} else t17 = $[54];
|
|
951
|
+
const state = t17;
|
|
952
|
+
let t18;
|
|
953
|
+
if ($[55] !== state) {
|
|
954
|
+
t18 = () => state;
|
|
955
|
+
$[55] = state;
|
|
956
|
+
$[56] = t18;
|
|
957
|
+
} else t18 = $[56];
|
|
958
|
+
let t19;
|
|
959
|
+
if ($[57] !== composerClient.methods) {
|
|
960
|
+
t19 = () => composerClient.methods;
|
|
961
|
+
$[57] = composerClient.methods;
|
|
962
|
+
$[58] = t19;
|
|
963
|
+
} else t19 = $[58];
|
|
964
|
+
let t20;
|
|
965
|
+
if ($[59] !== messages || $[60] !== onNew || $[61] !== queue) {
|
|
966
|
+
t20 = (message_1) => {
|
|
967
|
+
const appendMessage = typeof message_1 === "string" ? {
|
|
744
968
|
createdAt: /* @__PURE__ */ new Date(),
|
|
745
969
|
parentId: messages.at(-1)?.id ?? null,
|
|
746
970
|
sourceId: null,
|
|
@@ -748,78 +972,99 @@ const useExternalThread = (t0) => {
|
|
|
748
972
|
role: "user",
|
|
749
973
|
content: [{
|
|
750
974
|
type: "text",
|
|
751
|
-
text:
|
|
975
|
+
text: message_1
|
|
752
976
|
}],
|
|
753
977
|
attachments: [],
|
|
754
978
|
metadata: { custom: {} }
|
|
755
979
|
} : {
|
|
756
|
-
createdAt:
|
|
757
|
-
parentId:
|
|
758
|
-
sourceId:
|
|
759
|
-
role:
|
|
760
|
-
content:
|
|
761
|
-
attachments:
|
|
762
|
-
metadata:
|
|
763
|
-
runConfig:
|
|
764
|
-
startRun:
|
|
980
|
+
createdAt: message_1.createdAt ?? /* @__PURE__ */ new Date(),
|
|
981
|
+
parentId: message_1.parentId ?? messages.at(-1)?.id ?? null,
|
|
982
|
+
sourceId: message_1.sourceId ?? null,
|
|
983
|
+
role: message_1.role ?? "user",
|
|
984
|
+
content: message_1.content,
|
|
985
|
+
attachments: message_1.attachments ?? [],
|
|
986
|
+
metadata: message_1.metadata ?? { custom: {} },
|
|
987
|
+
runConfig: message_1.runConfig ?? {},
|
|
988
|
+
startRun: message_1.startRun
|
|
765
989
|
};
|
|
766
990
|
if (queue) queue.enqueue(appendMessage, { steer: false });
|
|
767
991
|
else onNew?.(appendMessage);
|
|
768
992
|
};
|
|
769
|
-
$[
|
|
770
|
-
$[
|
|
771
|
-
$[
|
|
772
|
-
$[
|
|
773
|
-
} else
|
|
774
|
-
let
|
|
775
|
-
if ($[
|
|
776
|
-
|
|
993
|
+
$[59] = messages;
|
|
994
|
+
$[60] = onNew;
|
|
995
|
+
$[61] = queue;
|
|
996
|
+
$[62] = t20;
|
|
997
|
+
} else t20 = $[62];
|
|
998
|
+
let t21;
|
|
999
|
+
if ($[63] !== onStartRun) {
|
|
1000
|
+
t21 = () => {
|
|
777
1001
|
onStartRun?.();
|
|
778
1002
|
};
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
781
|
-
} else
|
|
782
|
-
let
|
|
783
|
-
if ($[
|
|
784
|
-
|
|
1003
|
+
$[63] = onStartRun;
|
|
1004
|
+
$[64] = t21;
|
|
1005
|
+
} else t21 = $[64];
|
|
1006
|
+
let t22;
|
|
1007
|
+
if ($[65] !== onResume) {
|
|
1008
|
+
t22 = () => {
|
|
1009
|
+
if (!onResume) throw new Error("Runtime does not support resuming runs (onResume is not set).");
|
|
1010
|
+
onResume();
|
|
1011
|
+
};
|
|
1012
|
+
$[65] = onResume;
|
|
1013
|
+
$[66] = t22;
|
|
1014
|
+
} else t22 = $[66];
|
|
1015
|
+
let t23;
|
|
1016
|
+
if ($[67] !== onLoadExternalState) {
|
|
1017
|
+
t23 = (state_0) => {
|
|
1018
|
+
if (!onLoadExternalState) throw new Error("Runtime does not support importing external states (onLoadExternalState is not set).");
|
|
1019
|
+
onLoadExternalState(state_0);
|
|
1020
|
+
};
|
|
1021
|
+
$[67] = onLoadExternalState;
|
|
1022
|
+
$[68] = t23;
|
|
1023
|
+
} else t23 = $[68];
|
|
1024
|
+
let t24;
|
|
1025
|
+
if ($[69] !== messageClients) {
|
|
1026
|
+
t24 = (selector) => {
|
|
785
1027
|
if ("id" in selector) return messageClients.get({ key: selector.id });
|
|
786
1028
|
return messageClients.get(selector);
|
|
787
1029
|
};
|
|
788
|
-
$[
|
|
789
|
-
$[
|
|
790
|
-
} else
|
|
791
|
-
let
|
|
792
|
-
if ($[
|
|
793
|
-
|
|
794
|
-
getState:
|
|
795
|
-
composer:
|
|
796
|
-
append:
|
|
797
|
-
deleteMessage:
|
|
798
|
-
startRun:
|
|
799
|
-
resumeRun:
|
|
1030
|
+
$[69] = messageClients;
|
|
1031
|
+
$[70] = t24;
|
|
1032
|
+
} else t24 = $[70];
|
|
1033
|
+
let t25;
|
|
1034
|
+
if ($[71] !== handleCancelRun || $[72] !== t18 || $[73] !== t19 || $[74] !== t20 || $[75] !== t21 || $[76] !== t22 || $[77] !== t23 || $[78] !== t24) {
|
|
1035
|
+
t25 = {
|
|
1036
|
+
getState: t18,
|
|
1037
|
+
composer: t19,
|
|
1038
|
+
append: t20,
|
|
1039
|
+
deleteMessage: _temp11,
|
|
1040
|
+
startRun: t21,
|
|
1041
|
+
resumeRun: t22,
|
|
800
1042
|
cancelRun: handleCancelRun,
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
$[
|
|
816
|
-
$[
|
|
817
|
-
$[
|
|
818
|
-
$[
|
|
819
|
-
$[
|
|
820
|
-
$[
|
|
821
|
-
|
|
822
|
-
|
|
1043
|
+
importExternalState: t23,
|
|
1044
|
+
getModelContext: _temp12,
|
|
1045
|
+
export: _temp13,
|
|
1046
|
+
import: _temp14,
|
|
1047
|
+
reset: _temp15,
|
|
1048
|
+
message: t24,
|
|
1049
|
+
stopSpeaking: _temp16,
|
|
1050
|
+
connectVoice: _temp17,
|
|
1051
|
+
disconnectVoice: _temp18,
|
|
1052
|
+
getVoiceVolume: _temp19,
|
|
1053
|
+
subscribeVoiceVolume: _temp21,
|
|
1054
|
+
muteVoice: _temp22,
|
|
1055
|
+
unmuteVoice: _temp23
|
|
1056
|
+
};
|
|
1057
|
+
$[71] = handleCancelRun;
|
|
1058
|
+
$[72] = t18;
|
|
1059
|
+
$[73] = t19;
|
|
1060
|
+
$[74] = t20;
|
|
1061
|
+
$[75] = t21;
|
|
1062
|
+
$[76] = t22;
|
|
1063
|
+
$[77] = t23;
|
|
1064
|
+
$[78] = t24;
|
|
1065
|
+
$[79] = t25;
|
|
1066
|
+
} else t25 = $[79];
|
|
1067
|
+
return t25;
|
|
823
1068
|
};
|
|
824
1069
|
const ExternalThread = resource(useExternalThread);
|
|
825
1070
|
attachTransformScopes(useExternalThread, (scopes, parent) => {
|
|
@@ -858,47 +1103,47 @@ function _temp3() {}
|
|
|
858
1103
|
function _temp4() {}
|
|
859
1104
|
function _temp5() {}
|
|
860
1105
|
function _temp6() {}
|
|
861
|
-
function _temp7() {
|
|
862
|
-
function _temp8() {}
|
|
863
|
-
function _temp9(part) {
|
|
1106
|
+
function _temp7(part) {
|
|
864
1107
|
return part.type === "text";
|
|
865
1108
|
}
|
|
866
|
-
function
|
|
1109
|
+
function _temp8(part_0) {
|
|
867
1110
|
return "text" in part_0 ? part_0.text : "";
|
|
868
1111
|
}
|
|
1112
|
+
function _temp9(a_0) {
|
|
1113
|
+
return a_0.status.type !== "complete";
|
|
1114
|
+
}
|
|
1115
|
+
function _temp0() {}
|
|
869
1116
|
function _temp1() {}
|
|
870
|
-
function _temp10() {
|
|
871
|
-
function _temp11(s, idx, arr) {
|
|
1117
|
+
function _temp10(s, idx, arr) {
|
|
872
1118
|
return {
|
|
873
1119
|
...s,
|
|
874
1120
|
isLast: idx === arr.length - 1
|
|
875
1121
|
};
|
|
876
1122
|
}
|
|
877
|
-
function
|
|
878
|
-
function
|
|
879
|
-
function _temp14() {
|
|
1123
|
+
function _temp11() {}
|
|
1124
|
+
function _temp12() {
|
|
880
1125
|
return {
|
|
881
1126
|
tools: {},
|
|
882
1127
|
config: {}
|
|
883
1128
|
};
|
|
884
1129
|
}
|
|
885
|
-
function
|
|
1130
|
+
function _temp13() {
|
|
886
1131
|
return { messages: [] };
|
|
887
1132
|
}
|
|
1133
|
+
function _temp14() {}
|
|
1134
|
+
function _temp15() {}
|
|
888
1135
|
function _temp16() {}
|
|
889
1136
|
function _temp17() {}
|
|
890
1137
|
function _temp18() {}
|
|
891
|
-
function _temp19() {
|
|
1138
|
+
function _temp19() {
|
|
1139
|
+
return 0;
|
|
1140
|
+
}
|
|
892
1141
|
function _temp20() {}
|
|
893
1142
|
function _temp21() {
|
|
894
|
-
return
|
|
1143
|
+
return _temp20;
|
|
895
1144
|
}
|
|
896
1145
|
function _temp22() {}
|
|
897
|
-
function _temp23() {
|
|
898
|
-
return _temp22;
|
|
899
|
-
}
|
|
900
|
-
function _temp24() {}
|
|
901
|
-
function _temp25() {}
|
|
1146
|
+
function _temp23() {}
|
|
902
1147
|
//#endregion
|
|
903
1148
|
export { ExternalThread };
|
|
904
1149
|
|