@superinterface/react 2.15.0 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +32 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -302,6 +302,11 @@ declare const useCreateMessage: ({ onError, }?: {
|
|
|
302
302
|
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<any, any, any, any>;
|
|
303
303
|
};
|
|
304
304
|
|
|
305
|
+
declare const useMessageFormContext: () => {
|
|
306
|
+
isDisabled: boolean;
|
|
307
|
+
isLoading: boolean;
|
|
308
|
+
};
|
|
309
|
+
|
|
305
310
|
declare const ThreadDialog: {
|
|
306
311
|
(): react_jsx_runtime.JSX.Element;
|
|
307
312
|
Root: ({ children, }: {
|
|
@@ -487,4 +492,4 @@ declare const RunStep: {
|
|
|
487
492
|
};
|
|
488
493
|
};
|
|
489
494
|
|
|
490
|
-
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
495
|
+
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -302,6 +302,11 @@ declare const useCreateMessage: ({ onError, }?: {
|
|
|
302
302
|
mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<any, any, any, any>;
|
|
303
303
|
};
|
|
304
304
|
|
|
305
|
+
declare const useMessageFormContext: () => {
|
|
306
|
+
isDisabled: boolean;
|
|
307
|
+
isLoading: boolean;
|
|
308
|
+
};
|
|
309
|
+
|
|
305
310
|
declare const ThreadDialog: {
|
|
306
311
|
(): react_jsx_runtime.JSX.Element;
|
|
307
312
|
Root: ({ children, }: {
|
|
@@ -487,4 +492,4 @@ declare const RunStep: {
|
|
|
487
492
|
};
|
|
488
493
|
};
|
|
489
494
|
|
|
490
|
-
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
495
|
+
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.js
CHANGED
|
@@ -709,6 +709,7 @@ var AssistantNameContext = createContext4("Assistant");
|
|
|
709
709
|
import { Flex as Flex10 } from "@radix-ui/themes";
|
|
710
710
|
// src/components/threads/Thread/Message/index.tsx
|
|
711
711
|
import { useMemo as useMemo5, Fragment } from "react";
|
|
712
|
+
import { isEmpty } from "radash";
|
|
712
713
|
import { Box as Box9 } from "@radix-ui/themes";
|
|
713
714
|
// src/components/skeletons/StartingContentSkeleton/index.tsx
|
|
714
715
|
import { Skeleton as Skeleton2 } from "@radix-ui/themes";
|
|
@@ -1257,11 +1258,14 @@ var Message = function(param) {
|
|
|
1257
1258
|
})
|
|
1258
1259
|
}, index);
|
|
1259
1260
|
}),
|
|
1260
|
-
isInProgress && /* @__PURE__ */ jsx31(StartingContentSkeleton, {})
|
|
1261
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx31(StartingContentSkeleton, {})
|
|
1261
1262
|
]
|
|
1262
1263
|
}),
|
|
1263
1264
|
/* @__PURE__ */ jsx31(RunSteps, {
|
|
1264
1265
|
runSteps: laterRunSteps
|
|
1266
|
+
}),
|
|
1267
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx31(Box9, {
|
|
1268
|
+
children: /* @__PURE__ */ jsx31(StartingContentSkeleton, {})
|
|
1265
1269
|
})
|
|
1266
1270
|
]
|
|
1267
1271
|
})
|
|
@@ -2998,7 +3002,7 @@ import nlp from "compromise";
|
|
|
2998
3002
|
import { Howler } from "howler";
|
|
2999
3003
|
import { useAudioPlayer as useAudioPlayer2 } from "react-use-audio-player";
|
|
3000
3004
|
// src/hooks/audioThreads/useMessageAudio/lib/input.ts
|
|
3001
|
-
import { isEmpty } from "radash";
|
|
3005
|
+
import { isEmpty as isEmpty2 } from "radash";
|
|
3002
3006
|
var input = function(param) {
|
|
3003
3007
|
var message = param.message;
|
|
3004
3008
|
var textContents = message.content.filter(function(c) {
|
|
@@ -3007,7 +3011,7 @@ var input = function(param) {
|
|
|
3007
3011
|
var result = textContents.map(function(c) {
|
|
3008
3012
|
return c.text.value;
|
|
3009
3013
|
}).join(" ");
|
|
3010
|
-
if (
|
|
3014
|
+
if (isEmpty2(result)) return null;
|
|
3011
3015
|
return result;
|
|
3012
3016
|
};
|
|
3013
3017
|
// src/hooks/audioThreads/useMessageAudio/lib/isHtmlAudioSupported.ts
|
|
@@ -3640,7 +3644,7 @@ AudioThreadDialog.Content = Content4;
|
|
|
3640
3644
|
import { useMemo as useMemo14 } from "react";
|
|
3641
3645
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
3642
3646
|
import { useMemo as useMemo13 } from "react";
|
|
3643
|
-
import { isEmpty as
|
|
3647
|
+
import { isEmpty as isEmpty3 } from "radash";
|
|
3644
3648
|
import { onlyText } from "react-children-utilities";
|
|
3645
3649
|
import { Flex as Flex26 } from "@radix-ui/themes";
|
|
3646
3650
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
@@ -3698,14 +3702,14 @@ var Content6 = function(param) {
|
|
|
3698
3702
|
var isMutatingMessage = useIsMutatingMessage();
|
|
3699
3703
|
var suggestions = useMemo13(function() {
|
|
3700
3704
|
return onlyText(children).split(/\r?\n/).filter(function(c) {
|
|
3701
|
-
return !
|
|
3705
|
+
return !isEmpty3(c);
|
|
3702
3706
|
}).map(function(c) {
|
|
3703
3707
|
return c.trim();
|
|
3704
3708
|
});
|
|
3705
3709
|
}, [
|
|
3706
3710
|
children
|
|
3707
3711
|
]);
|
|
3708
|
-
if (
|
|
3712
|
+
if (isEmpty3(suggestions)) return null;
|
|
3709
3713
|
return /* @__PURE__ */ jsx67(Flex26, {
|
|
3710
3714
|
gap: "2",
|
|
3711
3715
|
py: "2",
|
|
@@ -3781,5 +3785,5 @@ var ComponentsProvider = function(_param) {
|
|
|
3781
3785
|
children: children
|
|
3782
3786
|
});
|
|
3783
3787
|
};
|
|
3784
|
-
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
3788
|
+
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useComponents, useCreateMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
3785
3789
|
//# sourceMappingURL=index.js.map
|