@superinterface/react 2.22.4 → 2.24.0
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 +776 -428
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -20
- package/dist/index.d.ts +40 -20
- package/dist/index.js +713 -369
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,8 @@ import * as _tanstack_query_core from '@tanstack/query-core';
|
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { Dispatch, SetStateAction } from 'react';
|
|
10
10
|
import * as openai_resources from 'openai/resources';
|
|
11
|
+
import * as remark_gfm from 'remark-gfm';
|
|
12
|
+
import * as _radix_ui_themes_dist_cjs_components_table from '@radix-ui/themes/dist/cjs/components/table';
|
|
11
13
|
import OpenAI from 'openai';
|
|
12
14
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
13
15
|
|
|
@@ -21,7 +23,7 @@ declare const options: {
|
|
|
21
23
|
}) => any;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
type Args$
|
|
26
|
+
type Args$9 = {
|
|
25
27
|
children: React.ReactNode;
|
|
26
28
|
baseUrl?: string;
|
|
27
29
|
variables?: {
|
|
@@ -33,7 +35,7 @@ type Args$8 = {
|
|
|
33
35
|
};
|
|
34
36
|
threadIdCookieOptions?: typeof options | null;
|
|
35
37
|
};
|
|
36
|
-
declare const SuperinterfaceProvider: ({ children, baseUrl, variables, defaultOptions, threadIdCookieOptions, }: Args$
|
|
38
|
+
declare const SuperinterfaceProvider: ({ children, baseUrl, variables, defaultOptions, threadIdCookieOptions, }: Args$9) => react_jsx_runtime.JSX.Element;
|
|
37
39
|
|
|
38
40
|
declare const useSuperinterfaceContext: () => {
|
|
39
41
|
baseUrl: string | null;
|
|
@@ -46,14 +48,14 @@ declare const useSuperinterfaceContext: () => {
|
|
|
46
48
|
createMessageAbortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
type Args$
|
|
51
|
+
type Args$8 = Args$9;
|
|
50
52
|
|
|
51
|
-
type Args$
|
|
53
|
+
type Args$7 = Args$8;
|
|
52
54
|
|
|
53
|
-
type Args$
|
|
55
|
+
type Args$6 = Omit<Args$7, 'children'>;
|
|
54
56
|
declare const Thread: {
|
|
55
|
-
(props: Args$
|
|
56
|
-
Root: ({ children, ...rest }: Args$
|
|
57
|
+
(props: Args$6): react_jsx_runtime.JSX.Element;
|
|
58
|
+
Root: ({ children, ...rest }: Args$7) => react_jsx_runtime.JSX.Element;
|
|
57
59
|
Messages: {
|
|
58
60
|
({ children, style, }: {
|
|
59
61
|
children?: React.ReactNode;
|
|
@@ -338,10 +340,10 @@ declare const useMessageFormContext: () => {
|
|
|
338
340
|
isFileLoading: boolean;
|
|
339
341
|
};
|
|
340
342
|
|
|
341
|
-
type Args$
|
|
343
|
+
type Args$5 = {
|
|
342
344
|
assistantId: string;
|
|
343
345
|
};
|
|
344
|
-
declare const useAssistant: ({ assistantId, }: Args$
|
|
346
|
+
declare const useAssistant: ({ assistantId, }: Args$5) => {
|
|
345
347
|
assistant: any;
|
|
346
348
|
data: any;
|
|
347
349
|
error: Error;
|
|
@@ -540,15 +542,16 @@ declare const AudioThreadDialog: {
|
|
|
540
542
|
};
|
|
541
543
|
};
|
|
542
544
|
|
|
543
|
-
type Args$
|
|
545
|
+
type Args$4 = {
|
|
544
546
|
children: React.ReactNode;
|
|
545
547
|
};
|
|
546
548
|
|
|
547
|
-
type Args$
|
|
549
|
+
type Args$3 = Omit<Args$4, 'children'>;
|
|
548
550
|
declare const AudioThread: {
|
|
549
|
-
(props: Args$
|
|
550
|
-
Root: ({ children, }: Args$
|
|
551
|
+
(props: Args$3): react_jsx_runtime.JSX.Element;
|
|
552
|
+
Root: ({ children, }: Args$4) => react_jsx_runtime.JSX.Element;
|
|
551
553
|
Visualization: () => react_jsx_runtime.JSX.Element;
|
|
554
|
+
Status: () => react_jsx_runtime.JSX.Element;
|
|
552
555
|
Form: () => react_jsx_runtime.JSX.Element;
|
|
553
556
|
};
|
|
554
557
|
|
|
@@ -596,10 +599,16 @@ declare const MarkdownContext: react.Context<{
|
|
|
596
599
|
h4: (props: JSX.IntrinsicElements["h4"]) => react_jsx_runtime.JSX.Element;
|
|
597
600
|
h5: (props: JSX.IntrinsicElements["h5"]) => react_jsx_runtime.JSX.Element;
|
|
598
601
|
h6: (props: JSX.IntrinsicElements["h6"]) => react_jsx_runtime.JSX.Element;
|
|
602
|
+
table: (props: JSX.IntrinsicElements["table"]) => react_jsx_runtime.JSX.Element;
|
|
603
|
+
thead: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.HeaderProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
604
|
+
tbody: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.BodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
605
|
+
tr: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.RowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
606
|
+
td: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.CellProps & react.RefAttributes<HTMLTableDataCellElement>>;
|
|
607
|
+
th: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.ColumnHeaderCellProps & react.RefAttributes<HTMLTableHeaderCellElement>>;
|
|
599
608
|
};
|
|
600
609
|
getRemarkPlugins: ({ content, }: {
|
|
601
610
|
content: openai_resources_beta_threads_messages.TextContentBlock;
|
|
602
|
-
}) => (() => (tree: any) => void)[];
|
|
611
|
+
}) => ((() => (tree: any) => void) | typeof remark_gfm.default)[];
|
|
603
612
|
}>;
|
|
604
613
|
|
|
605
614
|
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
@@ -627,10 +636,16 @@ declare const useMarkdownContext: () => {
|
|
|
627
636
|
h4: (props: JSX.IntrinsicElements["h4"]) => react_jsx_runtime.JSX.Element;
|
|
628
637
|
h5: (props: JSX.IntrinsicElements["h5"]) => react_jsx_runtime.JSX.Element;
|
|
629
638
|
h6: (props: JSX.IntrinsicElements["h6"]) => react_jsx_runtime.JSX.Element;
|
|
639
|
+
table: (props: JSX.IntrinsicElements["table"]) => react_jsx_runtime.JSX.Element;
|
|
640
|
+
thead: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.HeaderProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
641
|
+
tbody: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.BodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
642
|
+
tr: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.RowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
643
|
+
td: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.CellProps & react.RefAttributes<HTMLTableDataCellElement>>;
|
|
644
|
+
th: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.ColumnHeaderCellProps & react.RefAttributes<HTMLTableHeaderCellElement>>;
|
|
630
645
|
};
|
|
631
646
|
getRemarkPlugins: ({ content, }: {
|
|
632
647
|
content: openai_resources_beta_threads_messages.TextContentBlock;
|
|
633
|
-
}) => (() => (tree: any) => void)[];
|
|
648
|
+
}) => ((() => (tree: any) => void) | typeof remark_gfm.default)[];
|
|
634
649
|
};
|
|
635
650
|
|
|
636
651
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
@@ -649,12 +664,12 @@ type FunctionComponents = {
|
|
|
649
664
|
};
|
|
650
665
|
declare const FunctionComponentsContext: react.Context<FunctionComponents>;
|
|
651
666
|
|
|
652
|
-
type Args$
|
|
667
|
+
type Args$2 = {
|
|
653
668
|
fn: OpenAI.Beta.Threads.Runs.FunctionToolCall.Function;
|
|
654
669
|
runStep: OpenAI.Beta.Threads.Runs.RunStep;
|
|
655
670
|
title: string;
|
|
656
671
|
};
|
|
657
|
-
declare const FunctionBase: ({ fn, runStep, title, }: Args$
|
|
672
|
+
declare const FunctionBase: ({ fn, runStep, title, }: Args$2) => react_jsx_runtime.JSX.Element;
|
|
658
673
|
|
|
659
674
|
declare const ComponentsProvider: ({ children, ...rest }: {
|
|
660
675
|
children: React.ReactNode;
|
|
@@ -684,11 +699,11 @@ declare const useComponents: () => {
|
|
|
684
699
|
};
|
|
685
700
|
};
|
|
686
701
|
|
|
687
|
-
type Args = {
|
|
702
|
+
type Args$1 = {
|
|
688
703
|
runStep: SerializedRunStep;
|
|
689
704
|
};
|
|
690
705
|
declare const RunStep: {
|
|
691
|
-
({ runStep, }: Args): react_jsx_runtime.JSX.Element | null;
|
|
706
|
+
({ runStep, }: Args$1): react_jsx_runtime.JSX.Element | null;
|
|
692
707
|
ToolCalls: {
|
|
693
708
|
({ stepDetails, runStep, }: {
|
|
694
709
|
stepDetails: openai_resources_beta_threads_runs_steps.ToolCallsStepDetails;
|
|
@@ -705,4 +720,9 @@ declare const RunStep: {
|
|
|
705
720
|
};
|
|
706
721
|
};
|
|
707
722
|
|
|
708
|
-
|
|
723
|
+
type Args = {
|
|
724
|
+
children: React.ReactNode;
|
|
725
|
+
};
|
|
726
|
+
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element | null;
|
|
727
|
+
|
|
728
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import * as _tanstack_query_core from '@tanstack/query-core';
|
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { Dispatch, SetStateAction } from 'react';
|
|
10
10
|
import * as openai_resources from 'openai/resources';
|
|
11
|
+
import * as remark_gfm from 'remark-gfm';
|
|
12
|
+
import * as _radix_ui_themes_dist_cjs_components_table from '@radix-ui/themes/dist/cjs/components/table';
|
|
11
13
|
import OpenAI from 'openai';
|
|
12
14
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
13
15
|
|
|
@@ -21,7 +23,7 @@ declare const options: {
|
|
|
21
23
|
}) => any;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
type Args$
|
|
26
|
+
type Args$9 = {
|
|
25
27
|
children: React.ReactNode;
|
|
26
28
|
baseUrl?: string;
|
|
27
29
|
variables?: {
|
|
@@ -33,7 +35,7 @@ type Args$8 = {
|
|
|
33
35
|
};
|
|
34
36
|
threadIdCookieOptions?: typeof options | null;
|
|
35
37
|
};
|
|
36
|
-
declare const SuperinterfaceProvider: ({ children, baseUrl, variables, defaultOptions, threadIdCookieOptions, }: Args$
|
|
38
|
+
declare const SuperinterfaceProvider: ({ children, baseUrl, variables, defaultOptions, threadIdCookieOptions, }: Args$9) => react_jsx_runtime.JSX.Element;
|
|
37
39
|
|
|
38
40
|
declare const useSuperinterfaceContext: () => {
|
|
39
41
|
baseUrl: string | null;
|
|
@@ -46,14 +48,14 @@ declare const useSuperinterfaceContext: () => {
|
|
|
46
48
|
createMessageAbortControllerRef: React.MutableRefObject<AbortController | null>;
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
type Args$
|
|
51
|
+
type Args$8 = Args$9;
|
|
50
52
|
|
|
51
|
-
type Args$
|
|
53
|
+
type Args$7 = Args$8;
|
|
52
54
|
|
|
53
|
-
type Args$
|
|
55
|
+
type Args$6 = Omit<Args$7, 'children'>;
|
|
54
56
|
declare const Thread: {
|
|
55
|
-
(props: Args$
|
|
56
|
-
Root: ({ children, ...rest }: Args$
|
|
57
|
+
(props: Args$6): react_jsx_runtime.JSX.Element;
|
|
58
|
+
Root: ({ children, ...rest }: Args$7) => react_jsx_runtime.JSX.Element;
|
|
57
59
|
Messages: {
|
|
58
60
|
({ children, style, }: {
|
|
59
61
|
children?: React.ReactNode;
|
|
@@ -338,10 +340,10 @@ declare const useMessageFormContext: () => {
|
|
|
338
340
|
isFileLoading: boolean;
|
|
339
341
|
};
|
|
340
342
|
|
|
341
|
-
type Args$
|
|
343
|
+
type Args$5 = {
|
|
342
344
|
assistantId: string;
|
|
343
345
|
};
|
|
344
|
-
declare const useAssistant: ({ assistantId, }: Args$
|
|
346
|
+
declare const useAssistant: ({ assistantId, }: Args$5) => {
|
|
345
347
|
assistant: any;
|
|
346
348
|
data: any;
|
|
347
349
|
error: Error;
|
|
@@ -540,15 +542,16 @@ declare const AudioThreadDialog: {
|
|
|
540
542
|
};
|
|
541
543
|
};
|
|
542
544
|
|
|
543
|
-
type Args$
|
|
545
|
+
type Args$4 = {
|
|
544
546
|
children: React.ReactNode;
|
|
545
547
|
};
|
|
546
548
|
|
|
547
|
-
type Args$
|
|
549
|
+
type Args$3 = Omit<Args$4, 'children'>;
|
|
548
550
|
declare const AudioThread: {
|
|
549
|
-
(props: Args$
|
|
550
|
-
Root: ({ children, }: Args$
|
|
551
|
+
(props: Args$3): react_jsx_runtime.JSX.Element;
|
|
552
|
+
Root: ({ children, }: Args$4) => react_jsx_runtime.JSX.Element;
|
|
551
553
|
Visualization: () => react_jsx_runtime.JSX.Element;
|
|
554
|
+
Status: () => react_jsx_runtime.JSX.Element;
|
|
552
555
|
Form: () => react_jsx_runtime.JSX.Element;
|
|
553
556
|
};
|
|
554
557
|
|
|
@@ -596,10 +599,16 @@ declare const MarkdownContext: react.Context<{
|
|
|
596
599
|
h4: (props: JSX.IntrinsicElements["h4"]) => react_jsx_runtime.JSX.Element;
|
|
597
600
|
h5: (props: JSX.IntrinsicElements["h5"]) => react_jsx_runtime.JSX.Element;
|
|
598
601
|
h6: (props: JSX.IntrinsicElements["h6"]) => react_jsx_runtime.JSX.Element;
|
|
602
|
+
table: (props: JSX.IntrinsicElements["table"]) => react_jsx_runtime.JSX.Element;
|
|
603
|
+
thead: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.HeaderProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
604
|
+
tbody: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.BodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
605
|
+
tr: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.RowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
606
|
+
td: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.CellProps & react.RefAttributes<HTMLTableDataCellElement>>;
|
|
607
|
+
th: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.ColumnHeaderCellProps & react.RefAttributes<HTMLTableHeaderCellElement>>;
|
|
599
608
|
};
|
|
600
609
|
getRemarkPlugins: ({ content, }: {
|
|
601
610
|
content: openai_resources_beta_threads_messages.TextContentBlock;
|
|
602
|
-
}) => (() => (tree: any) => void)[];
|
|
611
|
+
}) => ((() => (tree: any) => void) | typeof remark_gfm.default)[];
|
|
603
612
|
}>;
|
|
604
613
|
|
|
605
614
|
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
@@ -627,10 +636,16 @@ declare const useMarkdownContext: () => {
|
|
|
627
636
|
h4: (props: JSX.IntrinsicElements["h4"]) => react_jsx_runtime.JSX.Element;
|
|
628
637
|
h5: (props: JSX.IntrinsicElements["h5"]) => react_jsx_runtime.JSX.Element;
|
|
629
638
|
h6: (props: JSX.IntrinsicElements["h6"]) => react_jsx_runtime.JSX.Element;
|
|
639
|
+
table: (props: JSX.IntrinsicElements["table"]) => react_jsx_runtime.JSX.Element;
|
|
640
|
+
thead: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.HeaderProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
641
|
+
tbody: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.BodyProps & react.RefAttributes<HTMLTableSectionElement>>;
|
|
642
|
+
tr: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.RowProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
643
|
+
td: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.CellProps & react.RefAttributes<HTMLTableDataCellElement>>;
|
|
644
|
+
th: react.ForwardRefExoticComponent<_radix_ui_themes_dist_cjs_components_table.ColumnHeaderCellProps & react.RefAttributes<HTMLTableHeaderCellElement>>;
|
|
630
645
|
};
|
|
631
646
|
getRemarkPlugins: ({ content, }: {
|
|
632
647
|
content: openai_resources_beta_threads_messages.TextContentBlock;
|
|
633
|
-
}) => (() => (tree: any) => void)[];
|
|
648
|
+
}) => ((() => (tree: any) => void) | typeof remark_gfm.default)[];
|
|
634
649
|
};
|
|
635
650
|
|
|
636
651
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
@@ -649,12 +664,12 @@ type FunctionComponents = {
|
|
|
649
664
|
};
|
|
650
665
|
declare const FunctionComponentsContext: react.Context<FunctionComponents>;
|
|
651
666
|
|
|
652
|
-
type Args$
|
|
667
|
+
type Args$2 = {
|
|
653
668
|
fn: OpenAI.Beta.Threads.Runs.FunctionToolCall.Function;
|
|
654
669
|
runStep: OpenAI.Beta.Threads.Runs.RunStep;
|
|
655
670
|
title: string;
|
|
656
671
|
};
|
|
657
|
-
declare const FunctionBase: ({ fn, runStep, title, }: Args$
|
|
672
|
+
declare const FunctionBase: ({ fn, runStep, title, }: Args$2) => react_jsx_runtime.JSX.Element;
|
|
658
673
|
|
|
659
674
|
declare const ComponentsProvider: ({ children, ...rest }: {
|
|
660
675
|
children: React.ReactNode;
|
|
@@ -684,11 +699,11 @@ declare const useComponents: () => {
|
|
|
684
699
|
};
|
|
685
700
|
};
|
|
686
701
|
|
|
687
|
-
type Args = {
|
|
702
|
+
type Args$1 = {
|
|
688
703
|
runStep: SerializedRunStep;
|
|
689
704
|
};
|
|
690
705
|
declare const RunStep: {
|
|
691
|
-
({ runStep, }: Args): react_jsx_runtime.JSX.Element | null;
|
|
706
|
+
({ runStep, }: Args$1): react_jsx_runtime.JSX.Element | null;
|
|
692
707
|
ToolCalls: {
|
|
693
708
|
({ stepDetails, runStep, }: {
|
|
694
709
|
stepDetails: openai_resources_beta_threads_runs_steps.ToolCallsStepDetails;
|
|
@@ -705,4 +720,9 @@ declare const RunStep: {
|
|
|
705
720
|
};
|
|
706
721
|
};
|
|
707
722
|
|
|
708
|
-
|
|
723
|
+
type Args = {
|
|
724
|
+
children: React.ReactNode;
|
|
725
|
+
};
|
|
726
|
+
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element | null;
|
|
727
|
+
|
|
728
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|