@carlonicora/nextjs-jsonapi 3.16.0 → 3.17.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/{BlockNoteEditor-SGISBQD5.mjs → BlockNoteEditor-6DYL5NZD.mjs} +2 -2
- package/dist/{BlockNoteEditor-S43PQJEC.js → BlockNoteEditor-DGPIAJI4.js} +9 -9
- package/dist/{BlockNoteEditor-S43PQJEC.js.map → BlockNoteEditor-DGPIAJI4.js.map} +1 -1
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-AOWHVECO.js → chunk-5EV234WK.js} +17 -25
- package/dist/chunk-5EV234WK.js.map +1 -0
- package/dist/{chunk-47CLHN2G.mjs → chunk-MHR553J3.mjs} +17 -25
- package/dist/{chunk-47CLHN2G.mjs.map → chunk-MHR553J3.mjs.map} +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +3 -2
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/features/assistant/components/parts/AssistantThread.tsx +6 -3
- package/src/features/assistant/components/parts/__tests__/AssistantThread.spec.tsx +36 -5
- package/src/features/assistant-message/components/MessageList.tsx +14 -10
- package/src/features/notification/components/modals/NotificationModal.tsx +8 -16
- package/src/features/notification/components/modals/__tests__/NotificationModal.spec.tsx +156 -0
- package/dist/chunk-AOWHVECO.js.map +0 -1
- /package/dist/{BlockNoteEditor-SGISBQD5.mjs.map → BlockNoteEditor-6DYL5NZD.mjs.map} +0 -0
|
@@ -10392,7 +10392,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10392
10392
|
import dynamic from "next/dynamic";
|
|
10393
10393
|
import React18 from "react";
|
|
10394
10394
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10395
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10395
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-6DYL5NZD.mjs"), {
|
|
10396
10396
|
ssr: false
|
|
10397
10397
|
});
|
|
10398
10398
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -22084,7 +22084,8 @@ function MessageList({
|
|
|
22084
22084
|
failedMessageIds,
|
|
22085
22085
|
onRetry,
|
|
22086
22086
|
renderApprovalAction,
|
|
22087
|
-
renderMention
|
|
22087
|
+
renderMention,
|
|
22088
|
+
lastMessageRef
|
|
22088
22089
|
}) {
|
|
22089
22090
|
const ordered = [...messages].sort((a, b) => a.position - b.position);
|
|
22090
22091
|
let lastAssistantIndex = -1;
|
|
@@ -22094,7 +22095,7 @@ function MessageList({
|
|
|
22094
22095
|
break;
|
|
22095
22096
|
}
|
|
22096
22097
|
}
|
|
22097
|
-
return /* @__PURE__ */ jsx251("div", { className: "flex min-w-0 flex-col gap-y-3", children: ordered.map((m, i) => /* @__PURE__ */ jsx251(
|
|
22098
|
+
return /* @__PURE__ */ jsx251("div", { className: "flex min-w-0 flex-col gap-y-3", children: ordered.map((m, i) => /* @__PURE__ */ jsx251("div", { ref: i === ordered.length - 1 ? lastMessageRef : void 0, className: "flex min-w-0 flex-col", children: /* @__PURE__ */ jsx251(
|
|
22098
22099
|
MessageItem,
|
|
22099
22100
|
{
|
|
22100
22101
|
message: m,
|
|
@@ -22104,9 +22105,8 @@ function MessageList({
|
|
|
22104
22105
|
onRetry,
|
|
22105
22106
|
renderApprovalAction,
|
|
22106
22107
|
renderMention
|
|
22107
|
-
}
|
|
22108
|
-
|
|
22109
|
-
)) });
|
|
22108
|
+
}
|
|
22109
|
+
) }, m.id)) });
|
|
22110
22110
|
}
|
|
22111
22111
|
__name(MessageList, "MessageList");
|
|
22112
22112
|
|
|
@@ -22136,9 +22136,9 @@ function AssistantThread({
|
|
|
22136
22136
|
renderApprovalAction,
|
|
22137
22137
|
renderMention
|
|
22138
22138
|
}) {
|
|
22139
|
-
const
|
|
22139
|
+
const lastMessageRef = useRef37(null);
|
|
22140
22140
|
useEffect69(() => {
|
|
22141
|
-
|
|
22141
|
+
lastMessageRef.current?.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
22142
22142
|
}, [messages.length, sending]);
|
|
22143
22143
|
return /* @__PURE__ */ jsxs146("div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
|
|
22144
22144
|
/* @__PURE__ */ jsx253(
|
|
@@ -22149,11 +22149,11 @@ function AssistantThread({
|
|
|
22149
22149
|
failedMessageIds,
|
|
22150
22150
|
onRetry,
|
|
22151
22151
|
renderApprovalAction,
|
|
22152
|
-
renderMention
|
|
22152
|
+
renderMention,
|
|
22153
|
+
lastMessageRef
|
|
22153
22154
|
}
|
|
22154
22155
|
),
|
|
22155
|
-
sending && /* @__PURE__ */ jsx253(AssistantStatusLine, { status })
|
|
22156
|
-
/* @__PURE__ */ jsx253("div", { ref: endRef })
|
|
22156
|
+
sending && /* @__PURE__ */ jsx253(AssistantStatusLine, { status })
|
|
22157
22157
|
] });
|
|
22158
22158
|
}
|
|
22159
22159
|
__name(AssistantThread, "AssistantThread");
|
|
@@ -23812,7 +23812,6 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
23812
23812
|
useEffect76(() => {
|
|
23813
23813
|
setNewNotifications(unreadCount > 0);
|
|
23814
23814
|
}, [unreadCount]);
|
|
23815
|
-
const processSocketNotificationsRef = useRef39(null);
|
|
23816
23815
|
const processSocketNotifications = useCallback48(() => {
|
|
23817
23816
|
if (socketNotifications.length === 0) {
|
|
23818
23817
|
return;
|
|
@@ -23835,7 +23834,10 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
23835
23834
|
const toastNotification = generateToastNotification(notification, t, generateUrl);
|
|
23836
23835
|
showToast(toastNotification.title, {
|
|
23837
23836
|
description: toastNotification.description,
|
|
23838
|
-
action: toastNotification.action
|
|
23837
|
+
action: toastNotification.action,
|
|
23838
|
+
// A toast that offers something to press stays until dismissed; a
|
|
23839
|
+
// plain notice keeps sonner's default timeout.
|
|
23840
|
+
duration: toastNotification.action ? Infinity : void 0
|
|
23839
23841
|
});
|
|
23840
23842
|
});
|
|
23841
23843
|
if (batchIndex === batches.length - 1) {
|
|
@@ -23853,17 +23855,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
23853
23855
|
checkCircuitBreaker
|
|
23854
23856
|
]);
|
|
23855
23857
|
useEffect76(() => {
|
|
23856
|
-
|
|
23857
|
-
clearTimeout(processSocketNotificationsRef.current);
|
|
23858
|
-
}
|
|
23859
|
-
processSocketNotificationsRef.current = setTimeout(() => {
|
|
23860
|
-
processSocketNotifications();
|
|
23861
|
-
}, 300);
|
|
23862
|
-
return () => {
|
|
23863
|
-
if (processSocketNotificationsRef.current) {
|
|
23864
|
-
clearTimeout(processSocketNotificationsRef.current);
|
|
23865
|
-
}
|
|
23866
|
-
};
|
|
23858
|
+
processSocketNotifications();
|
|
23867
23859
|
}, [processSocketNotifications]);
|
|
23868
23860
|
const handleOpenChange = /* @__PURE__ */ __name((newlyRequestedOpenState) => {
|
|
23869
23861
|
if (!newlyRequestedOpenState && preventAutoClose.current) {
|
|
@@ -27026,4 +27018,4 @@ export {
|
|
|
27026
27018
|
useOAuthClients,
|
|
27027
27019
|
useOAuthClient
|
|
27028
27020
|
};
|
|
27029
|
-
//# sourceMappingURL=chunk-
|
|
27021
|
+
//# sourceMappingURL=chunk-MHR553J3.mjs.map
|