@assistant-ui/react 0.12.14 → 0.12.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.d.ts +1 -4
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.js +2 -527
- package/dist/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.js.map +1 -1
- package/dist/legacy-runtime/hooks/AttachmentContext.d.ts +96 -96
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.d.ts +1 -16
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.js +1 -14
- package/dist/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.d.ts +1 -13
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.js +2 -82
- package/dist/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.d.ts +1 -23
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js +1 -305
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.d.ts +1 -16
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.js +1 -48
- package/dist/legacy-runtime/runtime-cores/external-store/createMessageConverter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.d.ts +1 -33
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js +1 -295
- package/dist/legacy-runtime/runtime-cores/external-store/external-message-converter.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.d.ts +1 -3
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.js +1 -17
- package/dist/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts +1 -96
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.js +1 -110
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts +1 -112
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js +1 -439
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.d.ts +1 -12
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.js +1 -102
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.d.ts +1 -3
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.js +1 -46
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarInteractionContext.d.ts +6 -0
- package/dist/primitives/actionBar/ActionBarInteractionContext.d.ts.map +1 -0
- package/dist/primitives/actionBar/ActionBarInteractionContext.js +5 -0
- package/dist/primitives/actionBar/ActionBarInteractionContext.js.map +1 -0
- package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarRoot.js +18 -4
- package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts +2 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.d.ts.map +1 -1
- package/dist/primitives/actionBar/useActionBarFloatStatus.js +3 -2
- package/dist/primitives/actionBar/useActionBarFloatStatus.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js +35 -2
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js.map +1 -1
- package/dist/utils/createActionButton.js +1 -1
- package/dist/utils/createActionButton.js.map +1 -1
- package/dist/utils/json/is-json-equal.d.ts +2 -0
- package/dist/utils/json/is-json-equal.d.ts.map +1 -0
- package/dist/utils/json/is-json-equal.js +31 -0
- package/dist/utils/json/is-json-equal.js.map +1 -0
- package/dist/utils/json/is-json.d.ts +1 -0
- package/dist/utils/json/is-json.d.ts.map +1 -1
- package/dist/utils/json/is-json.js +5 -3
- package/dist/utils/json/is-json.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +1 -1
- package/src/internal.ts +1 -1
- package/src/legacy-runtime/cloud/AssistantCloudThreadHistoryAdapter.ts +2 -784
- package/src/legacy-runtime/runtime-cores/adapters/RuntimeAdapterProvider.tsx +5 -43
- package/src/legacy-runtime/runtime-cores/adapters/attachment/CloudFileAttachmentAdapter.ts +2 -100
- package/src/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.test.ts +225 -2
- package/src/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.ts +4 -439
- package/src/legacy-runtime/runtime-cores/external-store/createMessageConverter.ts +1 -76
- package/src/legacy-runtime/runtime-cores/external-store/external-message-converter.ts +4 -465
- package/src/legacy-runtime/runtime-cores/external-store/useExternalStoreRuntime.ts +1 -27
- package/src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListHookInstanceManager.tsx +1 -178
- package/src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx +1 -529
- package/src/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.tsx +1 -152
- package/src/legacy-runtime/runtime-cores/remote-thread-list/useRemoteThreadListRuntime.ts +1 -80
- package/src/primitives/actionBar/ActionBarInteractionContext.ts +13 -0
- package/src/primitives/actionBar/ActionBarRoot.tsx +38 -8
- package/src/primitives/actionBar/useActionBarFloatStatus.ts +4 -1
- package/src/primitives/actionBarMore/ActionBarMoreRoot.tsx +52 -2
- package/src/tests/BaseComposerRuntimeCore.test.ts +2 -3
- package/src/tests/external-message-converter.test.ts +80 -0
- package/src/utils/createActionButton.tsx +1 -1
- package/src/utils/json/is-json-equal.ts +48 -0
- package/src/utils/json/is-json.ts +6 -3
|
@@ -1,113 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseSubscribable, type RemoteThreadData, type THREAD_MAPPING_ID, type RemoteThreadListOptions } from "@assistant-ui/core/internal";
|
|
3
|
-
import { FC } from "react";
|
|
4
|
-
import { ModelContextProvider } from "../../../model-context/index.js";
|
|
5
|
-
export declare class RemoteThreadListThreadListRuntimeCore extends BaseSubscribable implements ThreadListRuntimeCore {
|
|
6
|
-
private readonly contextProvider;
|
|
7
|
-
private _options;
|
|
8
|
-
private readonly _hookManager;
|
|
9
|
-
private _loadThreadsPromise;
|
|
10
|
-
private _mainThreadId;
|
|
11
|
-
private readonly _state;
|
|
12
|
-
get threadItems(): Readonly<Record<THREAD_MAPPING_ID, RemoteThreadData>>;
|
|
13
|
-
getLoadThreadsPromise(): Promise<void>;
|
|
14
|
-
constructor(options: RemoteThreadListOptions, contextProvider: ModelContextProvider);
|
|
15
|
-
private useProvider;
|
|
16
|
-
__internal_setOptions(options: RemoteThreadListOptions): void;
|
|
17
|
-
__internal_load(): void;
|
|
18
|
-
get isLoading(): boolean;
|
|
19
|
-
get threadIds(): readonly string[];
|
|
20
|
-
get archivedThreadIds(): readonly string[];
|
|
21
|
-
get newThreadId(): string | undefined;
|
|
22
|
-
get mainThreadId(): string;
|
|
23
|
-
getMainThreadRuntimeCore(): Readonly<{
|
|
24
|
-
getMessageById: (messageId: string) => {
|
|
25
|
-
parentId: string | null;
|
|
26
|
-
message: import("@assistant-ui/core").ThreadMessage;
|
|
27
|
-
index: number;
|
|
28
|
-
} | undefined;
|
|
29
|
-
getBranches: (messageId: string) => readonly string[];
|
|
30
|
-
switchToBranch: (branchId: string) => void;
|
|
31
|
-
append: (message: import("@assistant-ui/core").AppendMessage) => void;
|
|
32
|
-
startRun: (config: import("@assistant-ui/core").StartRunConfig) => void;
|
|
33
|
-
resumeRun: (config: import("@assistant-ui/core").ResumeRunConfig) => void;
|
|
34
|
-
cancelRun: () => void;
|
|
35
|
-
addToolResult: (options: import("@assistant-ui/core").AddToolResultOptions) => void;
|
|
36
|
-
resumeToolCall: (options: import("@assistant-ui/core").ResumeToolCallOptions) => void;
|
|
37
|
-
speak: (messageId: string) => void;
|
|
38
|
-
stopSpeaking: () => void;
|
|
39
|
-
submitFeedback: (feedback: import("@assistant-ui/core").SubmitFeedbackOptions) => void;
|
|
40
|
-
getModelContext: () => import("@assistant-ui/core").ModelContext;
|
|
41
|
-
composer: import("@assistant-ui/core").ThreadComposerRuntimeCore;
|
|
42
|
-
getEditComposer: (messageId: string) => import("@assistant-ui/core").ComposerRuntimeCore | undefined;
|
|
43
|
-
beginEdit: (messageId: string) => void;
|
|
44
|
-
speech: import("@assistant-ui/core").SpeechState | undefined;
|
|
45
|
-
capabilities: Readonly<import("@assistant-ui/core").RuntimeCapabilities>;
|
|
46
|
-
isDisabled: boolean;
|
|
47
|
-
isLoading: boolean;
|
|
48
|
-
messages: readonly import("@assistant-ui/core").ThreadMessage[];
|
|
49
|
-
state: import("assistant-stream/utils").ReadonlyJSONValue;
|
|
50
|
-
suggestions: readonly import("@assistant-ui/core").ThreadSuggestion[];
|
|
51
|
-
extras: unknown;
|
|
52
|
-
subscribe: (callback: () => void) => import("@assistant-ui/core").Unsubscribe;
|
|
53
|
-
import(repository: import("@assistant-ui/core").ExportedMessageRepository): void;
|
|
54
|
-
export(): import("@assistant-ui/core").ExportedMessageRepository;
|
|
55
|
-
exportExternalState(): any;
|
|
56
|
-
importExternalState(state: any): void;
|
|
57
|
-
reset(initialMessages?: readonly import("@assistant-ui/core").ThreadMessageLike[]): void;
|
|
58
|
-
unstable_on(event: import("@assistant-ui/core").ThreadRuntimeEventType, callback: () => void): import("@assistant-ui/core").Unsubscribe;
|
|
59
|
-
unstable_loadExternalState: (state: any) => void;
|
|
60
|
-
}>;
|
|
61
|
-
getThreadRuntimeCore(threadIdOrRemoteId: string): Readonly<{
|
|
62
|
-
getMessageById: (messageId: string) => {
|
|
63
|
-
parentId: string | null;
|
|
64
|
-
message: import("@assistant-ui/core").ThreadMessage;
|
|
65
|
-
index: number;
|
|
66
|
-
} | undefined;
|
|
67
|
-
getBranches: (messageId: string) => readonly string[];
|
|
68
|
-
switchToBranch: (branchId: string) => void;
|
|
69
|
-
append: (message: import("@assistant-ui/core").AppendMessage) => void;
|
|
70
|
-
startRun: (config: import("@assistant-ui/core").StartRunConfig) => void;
|
|
71
|
-
resumeRun: (config: import("@assistant-ui/core").ResumeRunConfig) => void;
|
|
72
|
-
cancelRun: () => void;
|
|
73
|
-
addToolResult: (options: import("@assistant-ui/core").AddToolResultOptions) => void;
|
|
74
|
-
resumeToolCall: (options: import("@assistant-ui/core").ResumeToolCallOptions) => void;
|
|
75
|
-
speak: (messageId: string) => void;
|
|
76
|
-
stopSpeaking: () => void;
|
|
77
|
-
submitFeedback: (feedback: import("@assistant-ui/core").SubmitFeedbackOptions) => void;
|
|
78
|
-
getModelContext: () => import("@assistant-ui/core").ModelContext;
|
|
79
|
-
composer: import("@assistant-ui/core").ThreadComposerRuntimeCore;
|
|
80
|
-
getEditComposer: (messageId: string) => import("@assistant-ui/core").ComposerRuntimeCore | undefined;
|
|
81
|
-
beginEdit: (messageId: string) => void;
|
|
82
|
-
speech: import("@assistant-ui/core").SpeechState | undefined;
|
|
83
|
-
capabilities: Readonly<import("@assistant-ui/core").RuntimeCapabilities>;
|
|
84
|
-
isDisabled: boolean;
|
|
85
|
-
isLoading: boolean;
|
|
86
|
-
messages: readonly import("@assistant-ui/core").ThreadMessage[];
|
|
87
|
-
state: import("assistant-stream/utils").ReadonlyJSONValue;
|
|
88
|
-
suggestions: readonly import("@assistant-ui/core").ThreadSuggestion[];
|
|
89
|
-
extras: unknown;
|
|
90
|
-
subscribe: (callback: () => void) => import("@assistant-ui/core").Unsubscribe;
|
|
91
|
-
import(repository: import("@assistant-ui/core").ExportedMessageRepository): void;
|
|
92
|
-
export(): import("@assistant-ui/core").ExportedMessageRepository;
|
|
93
|
-
exportExternalState(): any;
|
|
94
|
-
importExternalState(state: any): void;
|
|
95
|
-
reset(initialMessages?: readonly import("@assistant-ui/core").ThreadMessageLike[]): void;
|
|
96
|
-
unstable_on(event: import("@assistant-ui/core").ThreadRuntimeEventType, callback: () => void): import("@assistant-ui/core").Unsubscribe;
|
|
97
|
-
unstable_loadExternalState: (state: any) => void;
|
|
98
|
-
}>;
|
|
99
|
-
getItemById(threadIdOrRemoteId: string): RemoteThreadData | undefined;
|
|
100
|
-
switchToThread(threadIdOrRemoteId: string): Promise<void>;
|
|
101
|
-
switchToNewThread(): Promise<void>;
|
|
102
|
-
initialize: (threadId: string) => Promise<import("@assistant-ui/core").RemoteThreadInitializeResponse>;
|
|
103
|
-
generateTitle: (threadId: string) => Promise<void>;
|
|
104
|
-
rename(threadIdOrRemoteId: string, newTitle: string): Promise<void>;
|
|
105
|
-
private _ensureThreadIsNotMain;
|
|
106
|
-
archive(threadIdOrRemoteId: string): Promise<void>;
|
|
107
|
-
unarchive(threadIdOrRemoteId: string): Promise<void>;
|
|
108
|
-
delete(threadIdOrRemoteId: string): Promise<void>;
|
|
109
|
-
detach(threadIdOrRemoteId: string): Promise<void>;
|
|
110
|
-
private useBoundIds;
|
|
111
|
-
__internal_RenderComponent: FC;
|
|
112
|
-
}
|
|
1
|
+
export { RemoteThreadListThreadListRuntimeCore } from "@assistant-ui/core/react";
|
|
113
2
|
//# sourceMappingURL=RemoteThreadListThreadListRuntimeCore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteThreadListThreadListRuntimeCore.d.ts","sourceRoot":"","sources":["../../../../src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"RemoteThreadListThreadListRuntimeCore.d.ts","sourceRoot":"","sources":["../../../../src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,qCAAqC,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,441 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { generateId, BaseSubscribable, OptimisticState, EMPTY_THREAD_CORE, createThreadMappingId, getThreadData, updateStatusReducer, } from "@assistant-ui/core/internal";
|
|
4
|
-
import { RemoteThreadListHookInstanceManager } from "./RemoteThreadListHookInstanceManager.js";
|
|
5
|
-
import { Fragment, useEffect, useId, } from "react";
|
|
6
|
-
import { create } from "zustand";
|
|
7
|
-
import { AssistantMessageStream } from "assistant-stream";
|
|
8
|
-
import { RuntimeAdapterProvider } from "../adapters/RuntimeAdapterProvider.js";
|
|
9
|
-
export class RemoteThreadListThreadListRuntimeCore extends BaseSubscribable {
|
|
10
|
-
contextProvider;
|
|
11
|
-
_options;
|
|
12
|
-
_hookManager;
|
|
13
|
-
_loadThreadsPromise;
|
|
14
|
-
_mainThreadId;
|
|
15
|
-
_state = new OptimisticState({
|
|
16
|
-
isLoading: false,
|
|
17
|
-
newThreadId: undefined,
|
|
18
|
-
threadIds: [],
|
|
19
|
-
archivedThreadIds: [],
|
|
20
|
-
threadIdMap: {},
|
|
21
|
-
threadData: {},
|
|
22
|
-
});
|
|
23
|
-
get threadItems() {
|
|
24
|
-
return this._state.value.threadData;
|
|
25
|
-
}
|
|
26
|
-
getLoadThreadsPromise() {
|
|
27
|
-
// TODO this needs to be cached in case this promise is loaded during suspense
|
|
28
|
-
if (!this._loadThreadsPromise) {
|
|
29
|
-
this._loadThreadsPromise = this._state
|
|
30
|
-
.optimisticUpdate({
|
|
31
|
-
execute: () => this._options.adapter.list(),
|
|
32
|
-
loading: (state) => {
|
|
33
|
-
return {
|
|
34
|
-
...state,
|
|
35
|
-
isLoading: true,
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
then: (state, l) => {
|
|
39
|
-
const newThreadIds = [];
|
|
40
|
-
const newArchivedThreadIds = [];
|
|
41
|
-
const newThreadIdMap = {};
|
|
42
|
-
const newThreadData = {};
|
|
43
|
-
for (const thread of l.threads) {
|
|
44
|
-
switch (thread.status) {
|
|
45
|
-
case "regular":
|
|
46
|
-
newThreadIds.push(thread.remoteId);
|
|
47
|
-
break;
|
|
48
|
-
case "archived":
|
|
49
|
-
newArchivedThreadIds.push(thread.remoteId);
|
|
50
|
-
break;
|
|
51
|
-
default: {
|
|
52
|
-
const _exhaustiveCheck = thread.status;
|
|
53
|
-
throw new Error(`Unsupported state: ${_exhaustiveCheck}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const mappingId = createThreadMappingId(thread.remoteId);
|
|
57
|
-
newThreadIdMap[thread.remoteId] = mappingId;
|
|
58
|
-
newThreadData[mappingId] = {
|
|
59
|
-
id: thread.remoteId,
|
|
60
|
-
remoteId: thread.remoteId,
|
|
61
|
-
externalId: thread.externalId,
|
|
62
|
-
status: thread.status,
|
|
63
|
-
title: thread.title,
|
|
64
|
-
initializeTask: Promise.resolve({
|
|
65
|
-
remoteId: thread.remoteId,
|
|
66
|
-
externalId: thread.externalId,
|
|
67
|
-
}),
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return {
|
|
71
|
-
...state,
|
|
72
|
-
threadIds: newThreadIds,
|
|
73
|
-
archivedThreadIds: newArchivedThreadIds,
|
|
74
|
-
threadIdMap: {
|
|
75
|
-
...state.threadIdMap,
|
|
76
|
-
...newThreadIdMap,
|
|
77
|
-
},
|
|
78
|
-
threadData: {
|
|
79
|
-
...state.threadData,
|
|
80
|
-
...newThreadData,
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
})
|
|
85
|
-
.then(() => { });
|
|
86
|
-
}
|
|
87
|
-
return this._loadThreadsPromise;
|
|
88
|
-
}
|
|
89
|
-
constructor(options, contextProvider) {
|
|
90
|
-
super();
|
|
91
|
-
this.contextProvider = contextProvider;
|
|
92
|
-
this._state.subscribe(() => this._notifySubscribers());
|
|
93
|
-
this._hookManager = new RemoteThreadListHookInstanceManager(options.runtimeHook, this);
|
|
94
|
-
this.useProvider = create(() => ({
|
|
95
|
-
Provider: (options.adapter.unstable_Provider ??
|
|
96
|
-
Fragment),
|
|
97
|
-
}));
|
|
98
|
-
this.__internal_setOptions(options);
|
|
99
|
-
this.switchToNewThread();
|
|
100
|
-
}
|
|
101
|
-
useProvider;
|
|
102
|
-
__internal_setOptions(options) {
|
|
103
|
-
if (this._options === options)
|
|
104
|
-
return;
|
|
105
|
-
this._options = options;
|
|
106
|
-
const Provider = (options.adapter.unstable_Provider ??
|
|
107
|
-
Fragment);
|
|
108
|
-
if (Provider !== this.useProvider.getState().Provider) {
|
|
109
|
-
this.useProvider.setState({ Provider }, true);
|
|
110
|
-
}
|
|
111
|
-
this._hookManager.setRuntimeHook(options.runtimeHook);
|
|
112
|
-
}
|
|
113
|
-
__internal_load() {
|
|
114
|
-
this.getLoadThreadsPromise(); // begin loading on initial bind
|
|
115
|
-
}
|
|
116
|
-
get isLoading() {
|
|
117
|
-
return this._state.value.isLoading;
|
|
118
|
-
}
|
|
119
|
-
get threadIds() {
|
|
120
|
-
return this._state.value.threadIds;
|
|
121
|
-
}
|
|
122
|
-
get archivedThreadIds() {
|
|
123
|
-
return this._state.value.archivedThreadIds;
|
|
124
|
-
}
|
|
125
|
-
get newThreadId() {
|
|
126
|
-
return this._state.value.newThreadId;
|
|
127
|
-
}
|
|
128
|
-
get mainThreadId() {
|
|
129
|
-
return this._mainThreadId;
|
|
130
|
-
}
|
|
131
|
-
getMainThreadRuntimeCore() {
|
|
132
|
-
const result = this._hookManager.getThreadRuntimeCore(this._mainThreadId);
|
|
133
|
-
if (!result)
|
|
134
|
-
return EMPTY_THREAD_CORE;
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
getThreadRuntimeCore(threadIdOrRemoteId) {
|
|
138
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
139
|
-
if (!data)
|
|
140
|
-
throw new Error("Thread not found");
|
|
141
|
-
const result = this._hookManager.getThreadRuntimeCore(data.id);
|
|
142
|
-
if (!result)
|
|
143
|
-
throw new Error("Thread not found");
|
|
144
|
-
return result;
|
|
145
|
-
}
|
|
146
|
-
getItemById(threadIdOrRemoteId) {
|
|
147
|
-
return getThreadData(this._state.value, threadIdOrRemoteId);
|
|
148
|
-
}
|
|
149
|
-
async switchToThread(threadIdOrRemoteId) {
|
|
150
|
-
let data = this.getItemById(threadIdOrRemoteId);
|
|
151
|
-
if (!data) {
|
|
152
|
-
const remoteMetadata = await this._options.adapter.fetch(threadIdOrRemoteId);
|
|
153
|
-
const state = this._state.value;
|
|
154
|
-
const mappingId = createThreadMappingId(remoteMetadata.remoteId);
|
|
155
|
-
const newThreadData = {
|
|
156
|
-
...state.threadData,
|
|
157
|
-
[mappingId]: {
|
|
158
|
-
id: mappingId,
|
|
159
|
-
initializeTask: Promise.resolve({
|
|
160
|
-
remoteId: remoteMetadata.remoteId,
|
|
161
|
-
externalId: remoteMetadata.externalId,
|
|
162
|
-
}),
|
|
163
|
-
remoteId: remoteMetadata.remoteId,
|
|
164
|
-
externalId: remoteMetadata.externalId,
|
|
165
|
-
status: remoteMetadata.status,
|
|
166
|
-
title: remoteMetadata.title,
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
const newThreadIdMap = {
|
|
170
|
-
...state.threadIdMap,
|
|
171
|
-
[remoteMetadata.remoteId]: mappingId,
|
|
172
|
-
};
|
|
173
|
-
const newThreadIds = remoteMetadata.status === "regular"
|
|
174
|
-
? [...state.threadIds, remoteMetadata.remoteId]
|
|
175
|
-
: state.threadIds;
|
|
176
|
-
const newArchivedThreadIds = remoteMetadata.status === "archived"
|
|
177
|
-
? [...state.archivedThreadIds, remoteMetadata.remoteId]
|
|
178
|
-
: state.archivedThreadIds;
|
|
179
|
-
this._state.update({
|
|
180
|
-
...state,
|
|
181
|
-
threadIds: newThreadIds,
|
|
182
|
-
archivedThreadIds: newArchivedThreadIds,
|
|
183
|
-
threadIdMap: newThreadIdMap,
|
|
184
|
-
threadData: newThreadData,
|
|
185
|
-
});
|
|
186
|
-
data = this.getItemById(threadIdOrRemoteId);
|
|
187
|
-
}
|
|
188
|
-
if (!data)
|
|
189
|
-
throw new Error("Thread not found");
|
|
190
|
-
if (this._mainThreadId === data.id)
|
|
191
|
-
return;
|
|
192
|
-
const task = this._hookManager.startThreadRuntime(data.id);
|
|
193
|
-
if (this.mainThreadId !== undefined) {
|
|
194
|
-
await task;
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
task.then(() => this._notifySubscribers());
|
|
198
|
-
}
|
|
199
|
-
if (data.status === "archived")
|
|
200
|
-
await this.unarchive(data.id);
|
|
201
|
-
this._mainThreadId = data.id;
|
|
202
|
-
this._notifySubscribers();
|
|
203
|
-
}
|
|
204
|
-
async switchToNewThread() {
|
|
205
|
-
// an initialization transaction is in progress, wait for it to settle
|
|
206
|
-
while (this._state.baseValue.newThreadId !== undefined &&
|
|
207
|
-
this._state.value.newThreadId === undefined) {
|
|
208
|
-
await this._state.waitForUpdate();
|
|
209
|
-
}
|
|
210
|
-
const state = this._state.value;
|
|
211
|
-
let id = this._state.value.newThreadId;
|
|
212
|
-
if (id === undefined) {
|
|
213
|
-
do {
|
|
214
|
-
id = `__LOCALID_${generateId()}`;
|
|
215
|
-
} while (state.threadIdMap[id]);
|
|
216
|
-
const mappingId = createThreadMappingId(id);
|
|
217
|
-
this._state.update({
|
|
218
|
-
...state,
|
|
219
|
-
newThreadId: id,
|
|
220
|
-
threadIdMap: {
|
|
221
|
-
...state.threadIdMap,
|
|
222
|
-
[id]: mappingId,
|
|
223
|
-
},
|
|
224
|
-
threadData: {
|
|
225
|
-
...state.threadData,
|
|
226
|
-
[mappingId]: {
|
|
227
|
-
status: "new",
|
|
228
|
-
id,
|
|
229
|
-
remoteId: undefined,
|
|
230
|
-
externalId: undefined,
|
|
231
|
-
title: undefined,
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
return this.switchToThread(id);
|
|
237
|
-
}
|
|
238
|
-
initialize = async (threadId) => {
|
|
239
|
-
if (this._state.value.newThreadId !== threadId) {
|
|
240
|
-
const data = this.getItemById(threadId);
|
|
241
|
-
if (!data)
|
|
242
|
-
throw new Error("Thread not found");
|
|
243
|
-
if (data.status === "new")
|
|
244
|
-
throw new Error("Unexpected new state");
|
|
245
|
-
return data.initializeTask;
|
|
246
|
-
}
|
|
247
|
-
return this._state.optimisticUpdate({
|
|
248
|
-
execute: () => {
|
|
249
|
-
return this._options.adapter.initialize(threadId);
|
|
250
|
-
},
|
|
251
|
-
optimistic: (state) => {
|
|
252
|
-
return updateStatusReducer(state, threadId, "regular");
|
|
253
|
-
},
|
|
254
|
-
loading: (state, task) => {
|
|
255
|
-
const mappingId = createThreadMappingId(threadId);
|
|
256
|
-
return {
|
|
257
|
-
...state,
|
|
258
|
-
threadData: {
|
|
259
|
-
...state.threadData,
|
|
260
|
-
[mappingId]: {
|
|
261
|
-
...state.threadData[mappingId],
|
|
262
|
-
initializeTask: task,
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
};
|
|
266
|
-
},
|
|
267
|
-
then: (state, { remoteId, externalId }) => {
|
|
268
|
-
const data = getThreadData(state, threadId);
|
|
269
|
-
if (!data)
|
|
270
|
-
return state;
|
|
271
|
-
const mappingId = createThreadMappingId(threadId);
|
|
272
|
-
return {
|
|
273
|
-
...state,
|
|
274
|
-
threadIdMap: {
|
|
275
|
-
...state.threadIdMap,
|
|
276
|
-
[remoteId]: mappingId,
|
|
277
|
-
},
|
|
278
|
-
threadData: {
|
|
279
|
-
...state.threadData,
|
|
280
|
-
[mappingId]: {
|
|
281
|
-
...data,
|
|
282
|
-
initializeTask: Promise.resolve({ remoteId, externalId }),
|
|
283
|
-
remoteId,
|
|
284
|
-
externalId,
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
};
|
|
288
|
-
},
|
|
289
|
-
});
|
|
290
|
-
};
|
|
291
|
-
generateTitle = async (threadId) => {
|
|
292
|
-
const data = this.getItemById(threadId);
|
|
293
|
-
if (!data)
|
|
294
|
-
throw new Error("Thread not found");
|
|
295
|
-
if (data.status === "new")
|
|
296
|
-
throw new Error("Thread is not yet initialized");
|
|
297
|
-
const { remoteId } = await data.initializeTask;
|
|
298
|
-
const runtimeCore = this._hookManager.getThreadRuntimeCore(data.id);
|
|
299
|
-
if (!runtimeCore)
|
|
300
|
-
return; // thread is no longer running
|
|
301
|
-
const messages = runtimeCore.messages;
|
|
302
|
-
const stream = await this._options.adapter.generateTitle(remoteId, messages);
|
|
303
|
-
const messageStream = AssistantMessageStream.fromAssistantStream(stream);
|
|
304
|
-
for await (const result of messageStream) {
|
|
305
|
-
const newTitle = result.parts.filter((c) => c.type === "text")[0]?.text;
|
|
306
|
-
const state = this._state.baseValue;
|
|
307
|
-
const currentData = getThreadData(state, data.id);
|
|
308
|
-
if (!currentData)
|
|
309
|
-
continue;
|
|
310
|
-
this._state.update({
|
|
311
|
-
...state,
|
|
312
|
-
threadData: {
|
|
313
|
-
...state.threadData,
|
|
314
|
-
[currentData.id]: {
|
|
315
|
-
...currentData,
|
|
316
|
-
title: newTitle,
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
rename(threadIdOrRemoteId, newTitle) {
|
|
323
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
324
|
-
if (!data)
|
|
325
|
-
throw new Error("Thread not found");
|
|
326
|
-
if (data.status === "new")
|
|
327
|
-
throw new Error("Thread is not yet initialized");
|
|
328
|
-
return this._state.optimisticUpdate({
|
|
329
|
-
execute: async () => {
|
|
330
|
-
const { remoteId } = await data.initializeTask;
|
|
331
|
-
return this._options.adapter.rename(remoteId, newTitle);
|
|
332
|
-
},
|
|
333
|
-
optimistic: (state) => {
|
|
334
|
-
const data = getThreadData(state, threadIdOrRemoteId);
|
|
335
|
-
if (!data)
|
|
336
|
-
return state;
|
|
337
|
-
return {
|
|
338
|
-
...state,
|
|
339
|
-
threadData: {
|
|
340
|
-
...state.threadData,
|
|
341
|
-
[data.id]: {
|
|
342
|
-
...data,
|
|
343
|
-
title: newTitle,
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
};
|
|
347
|
-
},
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
async _ensureThreadIsNotMain(threadId) {
|
|
351
|
-
if (threadId === this.newThreadId)
|
|
352
|
-
throw new Error("Cannot ensure new thread is not main");
|
|
353
|
-
if (threadId === this._mainThreadId) {
|
|
354
|
-
await this.switchToNewThread();
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
async archive(threadIdOrRemoteId) {
|
|
358
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
359
|
-
if (!data)
|
|
360
|
-
throw new Error("Thread not found");
|
|
361
|
-
if (data.status !== "regular")
|
|
362
|
-
throw new Error("Thread is not yet initialized or already archived");
|
|
363
|
-
await this._ensureThreadIsNotMain(data.id);
|
|
364
|
-
return this._state.optimisticUpdate({
|
|
365
|
-
execute: async () => {
|
|
366
|
-
const { remoteId } = await data.initializeTask;
|
|
367
|
-
return this._options.adapter.archive(remoteId);
|
|
368
|
-
},
|
|
369
|
-
optimistic: (state) => {
|
|
370
|
-
return updateStatusReducer(state, data.id, "archived");
|
|
371
|
-
},
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
unarchive(threadIdOrRemoteId) {
|
|
375
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
376
|
-
if (!data)
|
|
377
|
-
throw new Error("Thread not found");
|
|
378
|
-
if (data.status !== "archived")
|
|
379
|
-
throw new Error("Thread is not archived");
|
|
380
|
-
return this._state.optimisticUpdate({
|
|
381
|
-
execute: async () => {
|
|
382
|
-
try {
|
|
383
|
-
const { remoteId } = await data.initializeTask;
|
|
384
|
-
return await this._options.adapter.unarchive(remoteId);
|
|
385
|
-
}
|
|
386
|
-
catch (error) {
|
|
387
|
-
await this._ensureThreadIsNotMain(data.id);
|
|
388
|
-
throw error;
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
optimistic: (state) => {
|
|
392
|
-
return updateStatusReducer(state, data.id, "regular");
|
|
393
|
-
},
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
async delete(threadIdOrRemoteId) {
|
|
397
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
398
|
-
if (!data)
|
|
399
|
-
throw new Error("Thread not found");
|
|
400
|
-
if (data.status !== "regular" && data.status !== "archived")
|
|
401
|
-
throw new Error("Thread is not yet initialized");
|
|
402
|
-
await this._ensureThreadIsNotMain(data.id);
|
|
403
|
-
return this._state.optimisticUpdate({
|
|
404
|
-
execute: async () => {
|
|
405
|
-
const { remoteId } = await data.initializeTask;
|
|
406
|
-
return await this._options.adapter.delete(remoteId);
|
|
407
|
-
},
|
|
408
|
-
optimistic: (state) => {
|
|
409
|
-
return updateStatusReducer(state, data.id, "deleted");
|
|
410
|
-
},
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
async detach(threadIdOrRemoteId) {
|
|
414
|
-
const data = this.getItemById(threadIdOrRemoteId);
|
|
415
|
-
if (!data)
|
|
416
|
-
throw new Error("Thread not found");
|
|
417
|
-
if (data.status !== "regular" && data.status !== "archived")
|
|
418
|
-
throw new Error("Thread is not yet initialized");
|
|
419
|
-
await this._ensureThreadIsNotMain(data.id);
|
|
420
|
-
this._hookManager.stopThreadRuntime(data.id);
|
|
421
|
-
}
|
|
422
|
-
useBoundIds = create(() => []);
|
|
423
|
-
__internal_RenderComponent = () => {
|
|
424
|
-
const id = useId();
|
|
425
|
-
useEffect(() => {
|
|
426
|
-
this.useBoundIds.setState((s) => [...s, id], true);
|
|
427
|
-
return () => {
|
|
428
|
-
this.useBoundIds.setState((s) => s.filter((i) => i !== id), true);
|
|
429
|
-
};
|
|
430
|
-
}, [id]);
|
|
431
|
-
const boundIds = this.useBoundIds();
|
|
432
|
-
const { Provider } = this.useProvider();
|
|
433
|
-
const adapters = {
|
|
434
|
-
modelContext: this.contextProvider,
|
|
435
|
-
};
|
|
436
|
-
return ((boundIds.length === 0 || boundIds[0] === id) && (
|
|
437
|
-
// only render if the component is the first one mounted
|
|
438
|
-
_jsx(RuntimeAdapterProvider, { adapters: adapters, children: _jsx(this._hookManager.__internal_RenderThreadRuntimes, { provider: Provider }) })));
|
|
439
|
-
};
|
|
440
|
-
}
|
|
2
|
+
export { RemoteThreadListThreadListRuntimeCore } from "@assistant-ui/core/react";
|
|
441
3
|
//# sourceMappingURL=RemoteThreadListThreadListRuntimeCore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteThreadListThreadListRuntimeCore.js","sourceRoot":"","sources":["../../../../src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAIjB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,GAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mCAAmC,EAAE,iDAA8C;AAC5F,OAAO,EAGL,QAAQ,EAER,SAAS,EACT,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,8CAA2C;AAE5E,MAAM,OAAO,qCACX,SAAQ,gBAAgB;IA+FL;IA5FX,QAAQ,CAA2B;IAC1B,YAAY,CAAsC;IAE3D,mBAAmB,CAA4B;IAE/C,aAAa,CAAU;IACd,MAAM,GAAG,IAAI,eAAe,CAAoB;QAC/D,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,SAAS;QACtB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;QACrB,WAAW,EAAE,EAAE;QACf,UAAU,EAA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AW,GAAG,MAAM,CAAW,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAE1C,0BAA0B,GAAO,GAAG,EAAE;QAC3C,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;QACnB,SAAS,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YACnD,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YACpE,CAAC,CAAC;QACJ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAET,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAExC,MAAM,QAAQ,GAAG;YACf,YAAY,EAAE,IAAI,CAAC,eAAe;SACnC,CAAC;QAEF,OAAO,CACL,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI;QAC/C,wDAAwD;QACxD,KAAC,sBAAsB,IAAC,QAAQ,EAAE,QAAQ,YACxC,KAAC,IAAI,CAAC,YAAY,CAAC,+BAA+B,IAChD,QAAQ,EAAE,QAAQ,GAClB,GACqB,CAC1B,CACF,CAAC;IACJ,CAAC,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"RemoteThreadListThreadListRuntimeCore.js","sourceRoot":"","sources":["../../../../src/legacy-runtime/runtime-cores/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,qCAAqC,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { RemoteThreadListAdapter } from "@assistant-ui/core";
|
|
3
|
-
type ThreadData = {
|
|
4
|
-
externalId: string | undefined;
|
|
5
|
-
};
|
|
6
|
-
type CloudThreadListAdapterOptions = {
|
|
7
|
-
cloud?: AssistantCloud | undefined;
|
|
8
|
-
create?: (() => Promise<ThreadData>) | undefined;
|
|
9
|
-
delete?: ((threadId: string) => Promise<void>) | undefined;
|
|
10
|
-
};
|
|
11
|
-
export declare const useCloudThreadListAdapter: (adapter: CloudThreadListAdapterOptions) => RemoteThreadListAdapter;
|
|
12
|
-
export {};
|
|
1
|
+
export { useCloudThreadListAdapter } from "@assistant-ui/core/react";
|
|
13
2
|
//# sourceMappingURL=cloud.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../../../src/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../../../../src/legacy-runtime/runtime-cores/remote-thread-list/adapter/cloud.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC"}
|