@superinterface/react 2.15.7 → 2.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -64
- package/dist/index.d.ts +64 -64
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +6 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/types/index.cjs +5 -1
- package/dist/utils.cjs +5 -1
- package/package.json +14 -14
package/dist/index.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { MessagesPage, SerializedMessage, SerializedRunStep } from './types/index.cjs';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
5
|
-
import * as react from 'react';
|
|
6
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
7
5
|
import * as react_hook_form from 'react-hook-form';
|
|
8
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
|
+
import * as react from 'react';
|
|
8
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
9
9
|
import OpenAI from 'openai';
|
|
10
10
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
11
11
|
|
|
@@ -40,16 +40,8 @@ declare const useSuperinterfaceContext: () => {
|
|
|
40
40
|
queries: Record<string, any>;
|
|
41
41
|
mutations: Record<string, any>;
|
|
42
42
|
};
|
|
43
|
-
threadIdCookieOptions:
|
|
44
|
-
|
|
45
|
-
assistantId: string;
|
|
46
|
-
}) => string | undefined;
|
|
47
|
-
set: ({ assistantId, threadId, }: {
|
|
48
|
-
assistantId: string;
|
|
49
|
-
threadId: string;
|
|
50
|
-
}) => string | undefined;
|
|
51
|
-
} | null;
|
|
52
|
-
createMessageAbortControllerRef: react.MutableRefObject<AbortController | null>;
|
|
43
|
+
threadIdCookieOptions: typeof options | null;
|
|
44
|
+
createMessageAbortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
53
45
|
};
|
|
54
46
|
|
|
55
47
|
type Args$6 = Args$7;
|
|
@@ -59,15 +51,15 @@ type Args$5 = Args$6;
|
|
|
59
51
|
type Args$4 = Omit<Args$5, 'children'>;
|
|
60
52
|
declare const Thread: {
|
|
61
53
|
(props: Args$4): react_jsx_runtime.JSX.Element;
|
|
62
|
-
Root: ({ children, ...rest }: Args$
|
|
54
|
+
Root: ({ children, ...rest }: Args$5) => react_jsx_runtime.JSX.Element;
|
|
63
55
|
Messages: {
|
|
64
56
|
({ children, style, }: {
|
|
65
|
-
children?:
|
|
66
|
-
style?:
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
style?: React.CSSProperties;
|
|
67
59
|
}): react_jsx_runtime.JSX.Element;
|
|
68
60
|
Root: ({ children, style, }: {
|
|
69
|
-
children:
|
|
70
|
-
style?:
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
style?: React.CSSProperties;
|
|
71
63
|
}) => react_jsx_runtime.JSX.Element;
|
|
72
64
|
Message: ({ message, }: {
|
|
73
65
|
message: SerializedMessage;
|
|
@@ -77,17 +69,17 @@ declare const Thread: {
|
|
|
77
69
|
MessageForm: {
|
|
78
70
|
(): react_jsx_runtime.JSX.Element;
|
|
79
71
|
Root: ({ children, onSubmit: onSubmitArg, }: {
|
|
80
|
-
children:
|
|
72
|
+
children: React.ReactNode;
|
|
81
73
|
onSubmit?: react_hook_form.SubmitHandler<{
|
|
82
74
|
content: string;
|
|
83
75
|
} & {
|
|
84
76
|
reset: any;
|
|
85
77
|
createMessage: any;
|
|
86
|
-
}
|
|
78
|
+
}>;
|
|
87
79
|
}) => react_jsx_runtime.JSX.Element;
|
|
88
80
|
Field: {
|
|
89
81
|
Root: ({ children, }: {
|
|
90
|
-
children:
|
|
82
|
+
children: React.ReactNode;
|
|
91
83
|
}) => react_jsx_runtime.JSX.Element;
|
|
92
84
|
Control: () => react_jsx_runtime.JSX.Element;
|
|
93
85
|
};
|
|
@@ -104,10 +96,12 @@ declare const useMessages: () => {
|
|
|
104
96
|
isLoading: false;
|
|
105
97
|
isLoadingError: false;
|
|
106
98
|
isRefetchError: true;
|
|
99
|
+
isFetchNextPageError: false;
|
|
100
|
+
isFetchPreviousPageError: false;
|
|
107
101
|
isSuccess: false;
|
|
108
102
|
status: "error";
|
|
109
|
-
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions
|
|
110
|
-
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions
|
|
103
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
104
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
111
105
|
hasNextPage: boolean;
|
|
112
106
|
hasPreviousPage: boolean;
|
|
113
107
|
isFetchingNextPage: boolean;
|
|
@@ -125,7 +119,7 @@ declare const useMessages: () => {
|
|
|
125
119
|
isPlaceholderData: boolean;
|
|
126
120
|
isRefetching: boolean;
|
|
127
121
|
isStale: boolean;
|
|
128
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions
|
|
122
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
129
123
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
130
124
|
} | {
|
|
131
125
|
messages: SerializedMessage[];
|
|
@@ -136,10 +130,12 @@ declare const useMessages: () => {
|
|
|
136
130
|
isLoading: false;
|
|
137
131
|
isLoadingError: false;
|
|
138
132
|
isRefetchError: false;
|
|
133
|
+
isFetchNextPageError: false;
|
|
134
|
+
isFetchPreviousPageError: false;
|
|
139
135
|
isSuccess: true;
|
|
140
136
|
status: "success";
|
|
141
|
-
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions
|
|
142
|
-
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions
|
|
137
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
138
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
143
139
|
hasNextPage: boolean;
|
|
144
140
|
hasPreviousPage: boolean;
|
|
145
141
|
isFetchingNextPage: boolean;
|
|
@@ -157,12 +153,12 @@ declare const useMessages: () => {
|
|
|
157
153
|
isPlaceholderData: boolean;
|
|
158
154
|
isRefetching: boolean;
|
|
159
155
|
isStale: boolean;
|
|
160
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions
|
|
156
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
161
157
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
162
158
|
};
|
|
163
159
|
|
|
164
160
|
declare const useMessageContext: () => {
|
|
165
|
-
message:
|
|
161
|
+
message: Message | null;
|
|
166
162
|
};
|
|
167
163
|
|
|
168
164
|
declare const useLatestMessage: () => {
|
|
@@ -175,10 +171,12 @@ declare const useLatestMessage: () => {
|
|
|
175
171
|
isLoading: false;
|
|
176
172
|
isLoadingError: false;
|
|
177
173
|
isRefetchError: true;
|
|
174
|
+
isFetchNextPageError: false;
|
|
175
|
+
isFetchPreviousPageError: false;
|
|
178
176
|
isSuccess: false;
|
|
179
177
|
status: "error";
|
|
180
|
-
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions
|
|
181
|
-
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions
|
|
178
|
+
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
179
|
+
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
182
180
|
hasNextPage: boolean;
|
|
183
181
|
hasPreviousPage: boolean;
|
|
184
182
|
isFetchingNextPage: boolean;
|
|
@@ -196,7 +194,7 @@ declare const useLatestMessage: () => {
|
|
|
196
194
|
isPlaceholderData: boolean;
|
|
197
195
|
isRefetching: boolean;
|
|
198
196
|
isStale: boolean;
|
|
199
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions
|
|
197
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
200
198
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
201
199
|
} | {
|
|
202
200
|
latestMessage: SerializedMessage;
|
|
@@ -208,10 +206,12 @@ declare const useLatestMessage: () => {
|
|
|
208
206
|
isLoading: false;
|
|
209
207
|
isLoadingError: false;
|
|
210
208
|
isRefetchError: false;
|
|
209
|
+
isFetchNextPageError: false;
|
|
210
|
+
isFetchPreviousPageError: false;
|
|
211
211
|
isSuccess: true;
|
|
212
212
|
status: "success";
|
|
213
|
-
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions
|
|
214
|
-
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions
|
|
213
|
+
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
214
|
+
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
215
215
|
hasNextPage: boolean;
|
|
216
216
|
hasPreviousPage: boolean;
|
|
217
217
|
isFetchingNextPage: boolean;
|
|
@@ -229,7 +229,7 @@ declare const useLatestMessage: () => {
|
|
|
229
229
|
isPlaceholderData: boolean;
|
|
230
230
|
isRefetching: boolean;
|
|
231
231
|
isStale: boolean;
|
|
232
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions
|
|
232
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
233
233
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
234
234
|
};
|
|
235
235
|
|
|
@@ -317,20 +317,20 @@ declare const useMessageFormContext: () => {
|
|
|
317
317
|
declare const ThreadDialog: {
|
|
318
318
|
(): react_jsx_runtime.JSX.Element;
|
|
319
319
|
Root: ({ children, }: {
|
|
320
|
-
children:
|
|
320
|
+
children: React.ReactNode;
|
|
321
321
|
}) => react_jsx_runtime.JSX.Element;
|
|
322
322
|
Trigger: ({ children, style, }: {
|
|
323
|
-
children:
|
|
324
|
-
style?:
|
|
323
|
+
children: React.ReactNode;
|
|
324
|
+
style?: React.CSSProperties;
|
|
325
325
|
}) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
Button: () => react_jsx_runtime.JSX.Element;
|
|
327
327
|
Content: {
|
|
328
328
|
({ style, }: {
|
|
329
|
-
style?:
|
|
329
|
+
style?: React.CSSProperties;
|
|
330
330
|
}): react_jsx_runtime.JSX.Element;
|
|
331
331
|
Root: ({ children, style, }: {
|
|
332
|
-
children:
|
|
333
|
-
style?:
|
|
332
|
+
children: React.ReactNode;
|
|
333
|
+
style?: React.CSSProperties;
|
|
334
334
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
335
335
|
};
|
|
336
336
|
};
|
|
@@ -343,20 +343,20 @@ declare const ThreadDialogContext: react.Context<{
|
|
|
343
343
|
declare const AudioThreadDialog: {
|
|
344
344
|
(): react_jsx_runtime.JSX.Element;
|
|
345
345
|
Root: ({ children, }: {
|
|
346
|
-
children:
|
|
346
|
+
children: React.ReactNode;
|
|
347
347
|
}) => react_jsx_runtime.JSX.Element;
|
|
348
348
|
Trigger: ({ children, style, }: {
|
|
349
|
-
children:
|
|
350
|
-
style?:
|
|
349
|
+
children: React.ReactNode;
|
|
350
|
+
style?: React.CSSProperties;
|
|
351
351
|
}) => react_jsx_runtime.JSX.Element;
|
|
352
352
|
Button: () => react_jsx_runtime.JSX.Element;
|
|
353
353
|
Content: {
|
|
354
354
|
({ style, }: {
|
|
355
|
-
style?:
|
|
355
|
+
style?: React.CSSProperties;
|
|
356
356
|
}): react_jsx_runtime.JSX.Element;
|
|
357
357
|
Root: ({ children, style, }: {
|
|
358
|
-
children:
|
|
359
|
-
style?:
|
|
358
|
+
children: React.ReactNode;
|
|
359
|
+
style?: React.CSSProperties;
|
|
360
360
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
361
361
|
};
|
|
362
362
|
};
|
|
@@ -391,7 +391,7 @@ declare const Suggestions: {
|
|
|
391
391
|
onClick: () => void;
|
|
392
392
|
isDisabled: boolean;
|
|
393
393
|
isPending: boolean;
|
|
394
|
-
children:
|
|
394
|
+
children: React.ReactNode;
|
|
395
395
|
}) => react_jsx_runtime.JSX.Element;
|
|
396
396
|
};
|
|
397
397
|
};
|
|
@@ -400,15 +400,15 @@ declare const MarkdownContext: react.Context<{
|
|
|
400
400
|
remarkPlugins: any[];
|
|
401
401
|
rehypeReactOptions: {
|
|
402
402
|
components: {
|
|
403
|
-
p: ({ children }:
|
|
403
|
+
p: ({ children }: JSX.IntrinsicElements["p"]) => react_jsx_runtime.JSX.Element;
|
|
404
404
|
a: ({ children, href }: react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => react_jsx_runtime.JSX.Element;
|
|
405
|
-
strong: ({ children }:
|
|
406
|
-
ul: ({ children }:
|
|
407
|
-
ol: ({ children }:
|
|
408
|
-
li: ({ children }:
|
|
409
|
-
pre: ({ children }:
|
|
410
|
-
code: ({ children }:
|
|
411
|
-
img: (props:
|
|
405
|
+
strong: ({ children }: JSX.IntrinsicElements["strong"]) => react_jsx_runtime.JSX.Element;
|
|
406
|
+
ul: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
407
|
+
ol: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
408
|
+
li: ({ children }: JSX.IntrinsicElements["li"]) => react_jsx_runtime.JSX.Element;
|
|
409
|
+
pre: ({ children }: JSX.IntrinsicElements["pre"]) => react_jsx_runtime.JSX.Element;
|
|
410
|
+
code: ({ children }: JSX.IntrinsicElements["code"]) => react_jsx_runtime.JSX.Element;
|
|
411
|
+
img: (props: JSX.IntrinsicElements["img"]) => react_jsx_runtime.JSX.Element;
|
|
412
412
|
};
|
|
413
413
|
};
|
|
414
414
|
}>;
|
|
@@ -421,15 +421,15 @@ declare const useMarkdownContext: () => {
|
|
|
421
421
|
remarkPlugins: any[];
|
|
422
422
|
rehypeReactOptions: {
|
|
423
423
|
components: {
|
|
424
|
-
p: ({ children }:
|
|
424
|
+
p: ({ children }: JSX.IntrinsicElements["p"]) => react_jsx_runtime.JSX.Element;
|
|
425
425
|
a: ({ children, href }: react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => react_jsx_runtime.JSX.Element;
|
|
426
|
-
strong: ({ children }:
|
|
427
|
-
ul: ({ children }:
|
|
428
|
-
ol: ({ children }:
|
|
429
|
-
li: ({ children }:
|
|
430
|
-
pre: ({ children }:
|
|
431
|
-
code: ({ children }:
|
|
432
|
-
img: (props:
|
|
426
|
+
strong: ({ children }: JSX.IntrinsicElements["strong"]) => react_jsx_runtime.JSX.Element;
|
|
427
|
+
ul: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
428
|
+
ol: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
429
|
+
li: ({ children }: JSX.IntrinsicElements["li"]) => react_jsx_runtime.JSX.Element;
|
|
430
|
+
pre: ({ children }: JSX.IntrinsicElements["pre"]) => react_jsx_runtime.JSX.Element;
|
|
431
|
+
code: ({ children }: JSX.IntrinsicElements["code"]) => react_jsx_runtime.JSX.Element;
|
|
432
|
+
img: (props: JSX.IntrinsicElements["img"]) => react_jsx_runtime.JSX.Element;
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
};
|
|
@@ -468,7 +468,7 @@ declare const useComponents: () => {
|
|
|
468
468
|
runStep: SerializedRunStep;
|
|
469
469
|
}): react_jsx_runtime.JSX.Element;
|
|
470
470
|
Root: ({ children, }: {
|
|
471
|
-
children:
|
|
471
|
+
children: React.ReactNode;
|
|
472
472
|
}) => react_jsx_runtime.JSX.Element;
|
|
473
473
|
Starting: () => react_jsx_runtime.JSX.Element;
|
|
474
474
|
ToolCall: ({ toolCall, runStep, }: {
|
|
@@ -491,7 +491,7 @@ declare const RunStep: {
|
|
|
491
491
|
runStep: SerializedRunStep;
|
|
492
492
|
}): react_jsx_runtime.JSX.Element;
|
|
493
493
|
Root: ({ children, }: {
|
|
494
|
-
children:
|
|
494
|
+
children: React.ReactNode;
|
|
495
495
|
}) => react_jsx_runtime.JSX.Element;
|
|
496
496
|
Starting: () => react_jsx_runtime.JSX.Element;
|
|
497
497
|
ToolCall: ({ toolCall, runStep, }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { MessagesPage, SerializedMessage, SerializedRunStep } from './types/index.js';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
5
|
-
import * as react from 'react';
|
|
6
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
7
5
|
import * as react_hook_form from 'react-hook-form';
|
|
8
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
|
+
import * as react from 'react';
|
|
8
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
9
9
|
import OpenAI from 'openai';
|
|
10
10
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
11
11
|
|
|
@@ -40,16 +40,8 @@ declare const useSuperinterfaceContext: () => {
|
|
|
40
40
|
queries: Record<string, any>;
|
|
41
41
|
mutations: Record<string, any>;
|
|
42
42
|
};
|
|
43
|
-
threadIdCookieOptions:
|
|
44
|
-
|
|
45
|
-
assistantId: string;
|
|
46
|
-
}) => string | undefined;
|
|
47
|
-
set: ({ assistantId, threadId, }: {
|
|
48
|
-
assistantId: string;
|
|
49
|
-
threadId: string;
|
|
50
|
-
}) => string | undefined;
|
|
51
|
-
} | null;
|
|
52
|
-
createMessageAbortControllerRef: react.MutableRefObject<AbortController | null>;
|
|
43
|
+
threadIdCookieOptions: typeof options | null;
|
|
44
|
+
createMessageAbortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
53
45
|
};
|
|
54
46
|
|
|
55
47
|
type Args$6 = Args$7;
|
|
@@ -59,15 +51,15 @@ type Args$5 = Args$6;
|
|
|
59
51
|
type Args$4 = Omit<Args$5, 'children'>;
|
|
60
52
|
declare const Thread: {
|
|
61
53
|
(props: Args$4): react_jsx_runtime.JSX.Element;
|
|
62
|
-
Root: ({ children, ...rest }: Args$
|
|
54
|
+
Root: ({ children, ...rest }: Args$5) => react_jsx_runtime.JSX.Element;
|
|
63
55
|
Messages: {
|
|
64
56
|
({ children, style, }: {
|
|
65
|
-
children?:
|
|
66
|
-
style?:
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
style?: React.CSSProperties;
|
|
67
59
|
}): react_jsx_runtime.JSX.Element;
|
|
68
60
|
Root: ({ children, style, }: {
|
|
69
|
-
children:
|
|
70
|
-
style?:
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
style?: React.CSSProperties;
|
|
71
63
|
}) => react_jsx_runtime.JSX.Element;
|
|
72
64
|
Message: ({ message, }: {
|
|
73
65
|
message: SerializedMessage;
|
|
@@ -77,17 +69,17 @@ declare const Thread: {
|
|
|
77
69
|
MessageForm: {
|
|
78
70
|
(): react_jsx_runtime.JSX.Element;
|
|
79
71
|
Root: ({ children, onSubmit: onSubmitArg, }: {
|
|
80
|
-
children:
|
|
72
|
+
children: React.ReactNode;
|
|
81
73
|
onSubmit?: react_hook_form.SubmitHandler<{
|
|
82
74
|
content: string;
|
|
83
75
|
} & {
|
|
84
76
|
reset: any;
|
|
85
77
|
createMessage: any;
|
|
86
|
-
}
|
|
78
|
+
}>;
|
|
87
79
|
}) => react_jsx_runtime.JSX.Element;
|
|
88
80
|
Field: {
|
|
89
81
|
Root: ({ children, }: {
|
|
90
|
-
children:
|
|
82
|
+
children: React.ReactNode;
|
|
91
83
|
}) => react_jsx_runtime.JSX.Element;
|
|
92
84
|
Control: () => react_jsx_runtime.JSX.Element;
|
|
93
85
|
};
|
|
@@ -104,10 +96,12 @@ declare const useMessages: () => {
|
|
|
104
96
|
isLoading: false;
|
|
105
97
|
isLoadingError: false;
|
|
106
98
|
isRefetchError: true;
|
|
99
|
+
isFetchNextPageError: false;
|
|
100
|
+
isFetchPreviousPageError: false;
|
|
107
101
|
isSuccess: false;
|
|
108
102
|
status: "error";
|
|
109
|
-
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions
|
|
110
|
-
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions
|
|
103
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
104
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
111
105
|
hasNextPage: boolean;
|
|
112
106
|
hasPreviousPage: boolean;
|
|
113
107
|
isFetchingNextPage: boolean;
|
|
@@ -125,7 +119,7 @@ declare const useMessages: () => {
|
|
|
125
119
|
isPlaceholderData: boolean;
|
|
126
120
|
isRefetching: boolean;
|
|
127
121
|
isStale: boolean;
|
|
128
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions
|
|
122
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
129
123
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
130
124
|
} | {
|
|
131
125
|
messages: SerializedMessage[];
|
|
@@ -136,10 +130,12 @@ declare const useMessages: () => {
|
|
|
136
130
|
isLoading: false;
|
|
137
131
|
isLoadingError: false;
|
|
138
132
|
isRefetchError: false;
|
|
133
|
+
isFetchNextPageError: false;
|
|
134
|
+
isFetchPreviousPageError: false;
|
|
139
135
|
isSuccess: true;
|
|
140
136
|
status: "success";
|
|
141
|
-
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions
|
|
142
|
-
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions
|
|
137
|
+
fetchNextPage: (options?: _tanstack_react_query.FetchNextPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
138
|
+
fetchPreviousPage: (options?: _tanstack_react_query.FetchPreviousPageOptions) => Promise<_tanstack_react_query.InfiniteQueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
143
139
|
hasNextPage: boolean;
|
|
144
140
|
hasPreviousPage: boolean;
|
|
145
141
|
isFetchingNextPage: boolean;
|
|
@@ -157,12 +153,12 @@ declare const useMessages: () => {
|
|
|
157
153
|
isPlaceholderData: boolean;
|
|
158
154
|
isRefetching: boolean;
|
|
159
155
|
isStale: boolean;
|
|
160
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions
|
|
156
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
161
157
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
162
158
|
};
|
|
163
159
|
|
|
164
160
|
declare const useMessageContext: () => {
|
|
165
|
-
message:
|
|
161
|
+
message: Message | null;
|
|
166
162
|
};
|
|
167
163
|
|
|
168
164
|
declare const useLatestMessage: () => {
|
|
@@ -175,10 +171,12 @@ declare const useLatestMessage: () => {
|
|
|
175
171
|
isLoading: false;
|
|
176
172
|
isLoadingError: false;
|
|
177
173
|
isRefetchError: true;
|
|
174
|
+
isFetchNextPageError: false;
|
|
175
|
+
isFetchPreviousPageError: false;
|
|
178
176
|
isSuccess: false;
|
|
179
177
|
status: "error";
|
|
180
|
-
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions
|
|
181
|
-
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions
|
|
178
|
+
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
179
|
+
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
182
180
|
hasNextPage: boolean;
|
|
183
181
|
hasPreviousPage: boolean;
|
|
184
182
|
isFetchingNextPage: boolean;
|
|
@@ -196,7 +194,7 @@ declare const useLatestMessage: () => {
|
|
|
196
194
|
isPlaceholderData: boolean;
|
|
197
195
|
isRefetching: boolean;
|
|
198
196
|
isStale: boolean;
|
|
199
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions
|
|
197
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
200
198
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
201
199
|
} | {
|
|
202
200
|
latestMessage: SerializedMessage;
|
|
@@ -208,10 +206,12 @@ declare const useLatestMessage: () => {
|
|
|
208
206
|
isLoading: false;
|
|
209
207
|
isLoadingError: false;
|
|
210
208
|
isRefetchError: false;
|
|
209
|
+
isFetchNextPageError: false;
|
|
210
|
+
isFetchPreviousPageError: false;
|
|
211
211
|
isSuccess: true;
|
|
212
212
|
status: "success";
|
|
213
|
-
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions
|
|
214
|
-
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions
|
|
213
|
+
fetchNextPage: (options?: _tanstack_query_core.FetchNextPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
214
|
+
fetchPreviousPage: (options?: _tanstack_query_core.FetchPreviousPageOptions) => Promise<_tanstack_query_core.InfiniteQueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
215
215
|
hasNextPage: boolean;
|
|
216
216
|
hasPreviousPage: boolean;
|
|
217
217
|
isFetchingNextPage: boolean;
|
|
@@ -229,7 +229,7 @@ declare const useLatestMessage: () => {
|
|
|
229
229
|
isPlaceholderData: boolean;
|
|
230
230
|
isRefetching: boolean;
|
|
231
231
|
isStale: boolean;
|
|
232
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions
|
|
232
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<_tanstack_query_core.InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
233
233
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
234
234
|
};
|
|
235
235
|
|
|
@@ -317,20 +317,20 @@ declare const useMessageFormContext: () => {
|
|
|
317
317
|
declare const ThreadDialog: {
|
|
318
318
|
(): react_jsx_runtime.JSX.Element;
|
|
319
319
|
Root: ({ children, }: {
|
|
320
|
-
children:
|
|
320
|
+
children: React.ReactNode;
|
|
321
321
|
}) => react_jsx_runtime.JSX.Element;
|
|
322
322
|
Trigger: ({ children, style, }: {
|
|
323
|
-
children:
|
|
324
|
-
style?:
|
|
323
|
+
children: React.ReactNode;
|
|
324
|
+
style?: React.CSSProperties;
|
|
325
325
|
}) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
Button: () => react_jsx_runtime.JSX.Element;
|
|
327
327
|
Content: {
|
|
328
328
|
({ style, }: {
|
|
329
|
-
style?:
|
|
329
|
+
style?: React.CSSProperties;
|
|
330
330
|
}): react_jsx_runtime.JSX.Element;
|
|
331
331
|
Root: ({ children, style, }: {
|
|
332
|
-
children:
|
|
333
|
-
style?:
|
|
332
|
+
children: React.ReactNode;
|
|
333
|
+
style?: React.CSSProperties;
|
|
334
334
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
335
335
|
};
|
|
336
336
|
};
|
|
@@ -343,20 +343,20 @@ declare const ThreadDialogContext: react.Context<{
|
|
|
343
343
|
declare const AudioThreadDialog: {
|
|
344
344
|
(): react_jsx_runtime.JSX.Element;
|
|
345
345
|
Root: ({ children, }: {
|
|
346
|
-
children:
|
|
346
|
+
children: React.ReactNode;
|
|
347
347
|
}) => react_jsx_runtime.JSX.Element;
|
|
348
348
|
Trigger: ({ children, style, }: {
|
|
349
|
-
children:
|
|
350
|
-
style?:
|
|
349
|
+
children: React.ReactNode;
|
|
350
|
+
style?: React.CSSProperties;
|
|
351
351
|
}) => react_jsx_runtime.JSX.Element;
|
|
352
352
|
Button: () => react_jsx_runtime.JSX.Element;
|
|
353
353
|
Content: {
|
|
354
354
|
({ style, }: {
|
|
355
|
-
style?:
|
|
355
|
+
style?: React.CSSProperties;
|
|
356
356
|
}): react_jsx_runtime.JSX.Element;
|
|
357
357
|
Root: ({ children, style, }: {
|
|
358
|
-
children:
|
|
359
|
-
style?:
|
|
358
|
+
children: React.ReactNode;
|
|
359
|
+
style?: React.CSSProperties;
|
|
360
360
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
361
361
|
};
|
|
362
362
|
};
|
|
@@ -391,7 +391,7 @@ declare const Suggestions: {
|
|
|
391
391
|
onClick: () => void;
|
|
392
392
|
isDisabled: boolean;
|
|
393
393
|
isPending: boolean;
|
|
394
|
-
children:
|
|
394
|
+
children: React.ReactNode;
|
|
395
395
|
}) => react_jsx_runtime.JSX.Element;
|
|
396
396
|
};
|
|
397
397
|
};
|
|
@@ -400,15 +400,15 @@ declare const MarkdownContext: react.Context<{
|
|
|
400
400
|
remarkPlugins: any[];
|
|
401
401
|
rehypeReactOptions: {
|
|
402
402
|
components: {
|
|
403
|
-
p: ({ children }:
|
|
403
|
+
p: ({ children }: JSX.IntrinsicElements["p"]) => react_jsx_runtime.JSX.Element;
|
|
404
404
|
a: ({ children, href }: react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => react_jsx_runtime.JSX.Element;
|
|
405
|
-
strong: ({ children }:
|
|
406
|
-
ul: ({ children }:
|
|
407
|
-
ol: ({ children }:
|
|
408
|
-
li: ({ children }:
|
|
409
|
-
pre: ({ children }:
|
|
410
|
-
code: ({ children }:
|
|
411
|
-
img: (props:
|
|
405
|
+
strong: ({ children }: JSX.IntrinsicElements["strong"]) => react_jsx_runtime.JSX.Element;
|
|
406
|
+
ul: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
407
|
+
ol: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
408
|
+
li: ({ children }: JSX.IntrinsicElements["li"]) => react_jsx_runtime.JSX.Element;
|
|
409
|
+
pre: ({ children }: JSX.IntrinsicElements["pre"]) => react_jsx_runtime.JSX.Element;
|
|
410
|
+
code: ({ children }: JSX.IntrinsicElements["code"]) => react_jsx_runtime.JSX.Element;
|
|
411
|
+
img: (props: JSX.IntrinsicElements["img"]) => react_jsx_runtime.JSX.Element;
|
|
412
412
|
};
|
|
413
413
|
};
|
|
414
414
|
}>;
|
|
@@ -421,15 +421,15 @@ declare const useMarkdownContext: () => {
|
|
|
421
421
|
remarkPlugins: any[];
|
|
422
422
|
rehypeReactOptions: {
|
|
423
423
|
components: {
|
|
424
|
-
p: ({ children }:
|
|
424
|
+
p: ({ children }: JSX.IntrinsicElements["p"]) => react_jsx_runtime.JSX.Element;
|
|
425
425
|
a: ({ children, href }: react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => react_jsx_runtime.JSX.Element;
|
|
426
|
-
strong: ({ children }:
|
|
427
|
-
ul: ({ children }:
|
|
428
|
-
ol: ({ children }:
|
|
429
|
-
li: ({ children }:
|
|
430
|
-
pre: ({ children }:
|
|
431
|
-
code: ({ children }:
|
|
432
|
-
img: (props:
|
|
426
|
+
strong: ({ children }: JSX.IntrinsicElements["strong"]) => react_jsx_runtime.JSX.Element;
|
|
427
|
+
ul: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
428
|
+
ol: ({ children }: JSX.IntrinsicElements["ul"]) => react_jsx_runtime.JSX.Element;
|
|
429
|
+
li: ({ children }: JSX.IntrinsicElements["li"]) => react_jsx_runtime.JSX.Element;
|
|
430
|
+
pre: ({ children }: JSX.IntrinsicElements["pre"]) => react_jsx_runtime.JSX.Element;
|
|
431
|
+
code: ({ children }: JSX.IntrinsicElements["code"]) => react_jsx_runtime.JSX.Element;
|
|
432
|
+
img: (props: JSX.IntrinsicElements["img"]) => react_jsx_runtime.JSX.Element;
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
};
|
|
@@ -468,7 +468,7 @@ declare const useComponents: () => {
|
|
|
468
468
|
runStep: SerializedRunStep;
|
|
469
469
|
}): react_jsx_runtime.JSX.Element;
|
|
470
470
|
Root: ({ children, }: {
|
|
471
|
-
children:
|
|
471
|
+
children: React.ReactNode;
|
|
472
472
|
}) => react_jsx_runtime.JSX.Element;
|
|
473
473
|
Starting: () => react_jsx_runtime.JSX.Element;
|
|
474
474
|
ToolCall: ({ toolCall, runStep, }: {
|
|
@@ -491,7 +491,7 @@ declare const RunStep: {
|
|
|
491
491
|
runStep: SerializedRunStep;
|
|
492
492
|
}): react_jsx_runtime.JSX.Element;
|
|
493
493
|
Root: ({ children, }: {
|
|
494
|
-
children:
|
|
494
|
+
children: React.ReactNode;
|
|
495
495
|
}) => react_jsx_runtime.JSX.Element;
|
|
496
496
|
Starting: () => react_jsx_runtime.JSX.Element;
|
|
497
497
|
ToolCall: ({ toolCall, runStep, }: {
|
package/dist/index.js
CHANGED
|
@@ -1699,13 +1699,13 @@ var threadCreated = function(param) {
|
|
|
1699
1699
|
var value = param.value, superinterfaceContext = param.superinterfaceContext;
|
|
1700
1700
|
var _superinterfaceContext_threadIdCookieOptions, _value_data_metadata, _value_data_metadata1;
|
|
1701
1701
|
if (!((_superinterfaceContext_threadIdCookieOptions = superinterfaceContext.threadIdCookieOptions) === null || _superinterfaceContext_threadIdCookieOptions === void 0 ? void 0 : _superinterfaceContext_threadIdCookieOptions.set)) return;
|
|
1702
|
-
if (!((_value_data_metadata = value.data.metadata) === null || _value_data_metadata === void 0 ? void 0 : _value_data_metadata.
|
|
1703
|
-
if (!((_value_data_metadata1 = value.data.metadata) === null || _value_data_metadata1 === void 0 ? void 0 : _value_data_metadata1.
|
|
1702
|
+
if (!((_value_data_metadata = value.data.metadata) === null || _value_data_metadata === void 0 ? void 0 : _value_data_metadata.assistantId)) return;
|
|
1703
|
+
if (!((_value_data_metadata1 = value.data.metadata) === null || _value_data_metadata1 === void 0 ? void 0 : _value_data_metadata1.threadId)) return;
|
|
1704
1704
|
superinterfaceContext.threadIdCookieOptions.set({
|
|
1705
1705
|
// @ts-ignore-next-line
|
|
1706
|
-
assistantId: value.data.metadata.
|
|
1706
|
+
assistantId: value.data.metadata.assistantId,
|
|
1707
1707
|
// @ts-ignore-next-line
|
|
1708
|
-
threadId: value.data.metadata.
|
|
1708
|
+
threadId: value.data.metadata.threadId
|
|
1709
1709
|
});
|
|
1710
1710
|
};
|
|
1711
1711
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/mutationFn/handleResponse/handlers/extendMessage.ts
|