@flamingo-stack/openframe-frontend-core 0.0.421-snapshot.20260713170448 → 0.0.421
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/{chunk-O3FSSWV4.cjs → chunk-4PS4F4WL.cjs} +7 -7
- package/dist/{chunk-O3FSSWV4.cjs.map → chunk-4PS4F4WL.cjs.map} +1 -1
- package/dist/{chunk-LHM2VUTO.js → chunk-4XTIANMS.js} +2 -2
- package/dist/{chunk-HFK33T6A.js → chunk-5TL2VVEN.js} +4 -4
- package/dist/{chunk-ULUH2X53.cjs → chunk-5U6C3RXX.cjs} +11 -11
- package/dist/{chunk-ULUH2X53.cjs.map → chunk-5U6C3RXX.cjs.map} +1 -1
- package/dist/{chunk-YZQNKMFQ.cjs → chunk-5UZULT35.cjs} +31 -31
- package/dist/{chunk-YZQNKMFQ.cjs.map → chunk-5UZULT35.cjs.map} +1 -1
- package/dist/{chunk-YJDVAT7J.js → chunk-5WXUR7LF.js} +3 -39
- package/dist/chunk-5WXUR7LF.js.map +1 -0
- package/dist/{chunk-2JNFQEVX.cjs → chunk-6HCWW4YM.cjs} +26 -26
- package/dist/{chunk-2JNFQEVX.cjs.map → chunk-6HCWW4YM.cjs.map} +1 -1
- package/dist/{chunk-LWC2U5OC.cjs → chunk-E5HKIBRS.cjs} +9 -9
- package/dist/{chunk-LWC2U5OC.cjs.map → chunk-E5HKIBRS.cjs.map} +1 -1
- package/dist/{chunk-4TMMYZTY.js → chunk-FHAG7O27.js} +2 -2
- package/dist/{chunk-WQEEGFDM.js → chunk-ISUMLEJ6.js} +2 -2
- package/dist/{chunk-DUHM44CQ.js → chunk-JMHU37Y6.js} +2 -2
- package/dist/{chunk-YUMFRC3D.js → chunk-LHJHMZYU.js} +4 -4
- package/dist/{chunk-WAQH35VG.cjs → chunk-PCM4HJO4.cjs} +26 -26
- package/dist/{chunk-WAQH35VG.cjs.map → chunk-PCM4HJO4.cjs.map} +1 -1
- package/dist/{chunk-PO4PXWZN.cjs → chunk-PMFK7ZKC.cjs} +5 -5
- package/dist/{chunk-PO4PXWZN.cjs.map → chunk-PMFK7ZKC.cjs.map} +1 -1
- package/dist/{chunk-RGKGRS2T.cjs → chunk-RKNF2DHY.cjs} +59 -59
- package/dist/{chunk-RGKGRS2T.cjs.map → chunk-RKNF2DHY.cjs.map} +1 -1
- package/dist/{chunk-B62DI2SC.cjs → chunk-RQXFDMRY.cjs} +15 -15
- package/dist/{chunk-B62DI2SC.cjs.map → chunk-RQXFDMRY.cjs.map} +1 -1
- package/dist/{chunk-3BGWK5QI.js → chunk-TJ7HD4KI.js} +4 -4
- package/dist/{chunk-JSL3VXGJ.js → chunk-UHSVSDF5.js} +2 -2
- package/dist/{chunk-6F5OKJTW.js → chunk-UKIVJU3A.js} +4 -4
- package/dist/{chunk-BF5BXKM7.cjs → chunk-UZOYTAK7.cjs} +62 -62
- package/dist/{chunk-BF5BXKM7.cjs.map → chunk-UZOYTAK7.cjs.map} +1 -1
- package/dist/{chunk-KUDLV25M.cjs → chunk-WDZATJTF.cjs} +127 -163
- package/dist/chunk-WDZATJTF.cjs.map +1 -0
- package/dist/{chunk-XFYQV2K2.js → chunk-XVWDKBBF.js} +2 -2
- package/dist/{chunk-A2IRUIUJ.cjs → chunk-YLSDXDD7.cjs} +37 -37
- package/dist/{chunk-A2IRUIUJ.cjs.map → chunk-YLSDXDD7.cjs.map} +1 -1
- package/dist/{chunk-4BWQYGIY.js → chunk-ZXWSOOEH.js} +2 -2
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/types/api.types.d.ts +0 -10
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +128 -128
- package/dist/components/index.js +9 -9
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-input.tsx +1 -5
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +3 -52
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +3 -25
- package/src/components/chat/types/api.types.ts +0 -10
- package/dist/chunk-KUDLV25M.cjs.map +0 -1
- package/dist/chunk-YJDVAT7J.js.map +0 -1
- package/src/stories/ApprovalRequestMessageClient.stories.tsx +0 -89
- package/src/stories/ChatMessageEnhanced.stories.tsx +0 -219
- package/src/stories/ChatTypingIndicator.stories.tsx +0 -51
- package/src/stories/ContextCompactionDisplay.stories.tsx +0 -44
- package/src/stories/ErrorMessageDisplay.stories.tsx +0 -66
- package/src/stories/ThinkingDisplay.stories.tsx +0 -63
- /package/dist/{chunk-LHM2VUTO.js.map → chunk-4XTIANMS.js.map} +0 -0
- /package/dist/{chunk-HFK33T6A.js.map → chunk-5TL2VVEN.js.map} +0 -0
- /package/dist/{chunk-4TMMYZTY.js.map → chunk-FHAG7O27.js.map} +0 -0
- /package/dist/{chunk-WQEEGFDM.js.map → chunk-ISUMLEJ6.js.map} +0 -0
- /package/dist/{chunk-DUHM44CQ.js.map → chunk-JMHU37Y6.js.map} +0 -0
- /package/dist/{chunk-YUMFRC3D.js.map → chunk-LHJHMZYU.js.map} +0 -0
- /package/dist/{chunk-3BGWK5QI.js.map → chunk-TJ7HD4KI.js.map} +0 -0
- /package/dist/{chunk-JSL3VXGJ.js.map → chunk-UHSVSDF5.js.map} +0 -0
- /package/dist/{chunk-6F5OKJTW.js.map → chunk-UKIVJU3A.js.map} +0 -0
- /package/dist/{chunk-XFYQV2K2.js.map → chunk-XVWDKBBF.js.map} +0 -0
- /package/dist/{chunk-4BWQYGIY.js.map → chunk-ZXWSOOEH.js.map} +0 -0
|
@@ -4657,11 +4657,7 @@ var ChatInput = forwardRef9((allProps, ref) => {
|
|
|
4657
4657
|
disabled: isStopMode ? isStopping : sendDisabled,
|
|
4658
4658
|
className: cn(
|
|
4659
4659
|
"flex h-6 shrink-0 items-center text-ods-text-secondary transition-colors duration-200",
|
|
4660
|
-
|
|
4661
|
-
// regardless of where focus sits — otherwise it reads yellow after
|
|
4662
|
-
// an Enter-send (editor keeps focus) but gray after an approve
|
|
4663
|
-
// click (focus moved to the card button).
|
|
4664
|
-
focused && !isStopMode && "text-ods-accent",
|
|
4660
|
+
focused && "text-ods-accent",
|
|
4665
4661
|
"[&_svg]:size-4 md:[&_svg]:size-6",
|
|
4666
4662
|
"cursor-pointer hover:text-ods-text-primary",
|
|
4667
4663
|
"focus-visible:outline-none focus-visible:text-ods-accent",
|
|
@@ -48169,7 +48165,6 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48169
48165
|
const hasEverStreamedRef = useRef66(false);
|
|
48170
48166
|
const directModeFlagRef = useRef66(isDirectMode);
|
|
48171
48167
|
const sawDirectMessageRef = useRef66(false);
|
|
48172
|
-
const directTeardownFiredRef = useRef66(false);
|
|
48173
48168
|
useEffect79(() => {
|
|
48174
48169
|
directModeFlagRef.current = isDirectMode;
|
|
48175
48170
|
}, [isDirectMode]);
|
|
@@ -48183,9 +48178,8 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48183
48178
|
const emitSegments = (s, meta) => callbacks.onSegmentsUpdate?.(s, streamSeq != null ? { ...meta, streamSeq } : meta);
|
|
48184
48179
|
if (action.action === "direct_message") sawDirectMessageRef.current = true;
|
|
48185
48180
|
if ((directModeFlagRef.current || sawDirectMessageRef.current) && !DIRECT_MODE_ALLOWED.has(action.action)) {
|
|
48186
|
-
if (isInStreamRef.current
|
|
48181
|
+
if (isInStreamRef.current) {
|
|
48187
48182
|
isInStreamRef.current = false;
|
|
48188
|
-
directTeardownFiredRef.current = true;
|
|
48189
48183
|
callbacks.onStreamEnd?.();
|
|
48190
48184
|
accumulator.resetSegments();
|
|
48191
48185
|
}
|
|
@@ -48225,9 +48219,6 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48225
48219
|
break;
|
|
48226
48220
|
}
|
|
48227
48221
|
case "tool_execution": {
|
|
48228
|
-
if (action.segment.data.type === "EXECUTING_TOOL") {
|
|
48229
|
-
callbacks.onAgentBusy?.();
|
|
48230
|
-
}
|
|
48231
48222
|
if (!isInStreamRef.current && callbacks.onToolExecuted) {
|
|
48232
48223
|
callbacks.onToolExecuted(action.segment);
|
|
48233
48224
|
break;
|
|
@@ -48294,7 +48285,6 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48294
48285
|
}
|
|
48295
48286
|
case "approval_result": {
|
|
48296
48287
|
const { requestId, approved, approvalType, resolvedByName } = action;
|
|
48297
|
-
if (approved) callbacks.onAgentBusy?.();
|
|
48298
48288
|
const escalatedData = pendingEscalatedRef.current.get(requestId);
|
|
48299
48289
|
const status = approved ? "approved" : "rejected";
|
|
48300
48290
|
if (escalatedData) {
|
|
@@ -48416,7 +48406,6 @@ function useRealtimeChunkProcessor(options) {
|
|
|
48416
48406
|
pendingEscalatedRef.current.clear();
|
|
48417
48407
|
hasInitializedWithData.current = false;
|
|
48418
48408
|
sawDirectMessageRef.current = false;
|
|
48419
|
-
directTeardownFiredRef.current = false;
|
|
48420
48409
|
}, []);
|
|
48421
48410
|
const updateApprovalStatus = useCallback46(
|
|
48422
48411
|
(requestId, status, resolvedByName) => {
|
|
@@ -50403,9 +50392,6 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50403
50392
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
50404
50393
|
const [messages, setMessages] = useState114([]);
|
|
50405
50394
|
const [streamingPhase, setStreamingPhase] = useState114("idle");
|
|
50406
|
-
const streamingPhaseRef = useRef73(streamingPhase);
|
|
50407
|
-
streamingPhaseRef.current = streamingPhase;
|
|
50408
|
-
const suppressAgentBusyRef = useRef73(false);
|
|
50409
50395
|
const [approvalStatuses, setApprovalStatuses] = useState114({});
|
|
50410
50396
|
const [dialogs, setDialogs] = useState114([]);
|
|
50411
50397
|
const [dialogsNextCursor, setDialogsNextCursor] = useState114(null);
|
|
@@ -50423,8 +50409,6 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50423
50409
|
async (requestId) => {
|
|
50424
50410
|
if (!approveRequestCallback) return;
|
|
50425
50411
|
setApprovalStatuses((prev) => ({ ...prev, [requestId]: "approved" }));
|
|
50426
|
-
const tookLock = streamingPhaseRef.current === "idle";
|
|
50427
|
-
setStreamingPhase((p) => p === "idle" ? "thinking" : p);
|
|
50428
50412
|
try {
|
|
50429
50413
|
await approveRequestCallback(requestId);
|
|
50430
50414
|
} catch (err) {
|
|
@@ -50433,9 +50417,6 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50433
50417
|
delete next[requestId];
|
|
50434
50418
|
return next;
|
|
50435
50419
|
});
|
|
50436
|
-
if (tookLock) {
|
|
50437
|
-
setStreamingPhase((p) => p === "thinking" ? "idle" : p);
|
|
50438
|
-
}
|
|
50439
50420
|
console.error("[useNatsChatAdapter] approveRequest failed:", err);
|
|
50440
50421
|
}
|
|
50441
50422
|
},
|
|
@@ -50476,18 +50457,6 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50476
50457
|
},
|
|
50477
50458
|
onStreamStart: () => setStreamingPhase("streaming"),
|
|
50478
50459
|
onStreamEnd: () => setStreamingPhase("idle"),
|
|
50479
|
-
// Agent is executing (approved) commands outside an open stream — keep
|
|
50480
|
-
// the composer locked exactly like the in-stream phases. An open stream
|
|
50481
|
-
// keeps ownership: only 'idle' upgrades to 'thinking'. Suppressed during
|
|
50482
|
-
// initial catchup so a replayed dead tail can't lock a finished dialog.
|
|
50483
|
-
onAgentBusy: () => {
|
|
50484
|
-
if (suppressAgentBusyRef.current) return;
|
|
50485
|
-
setStreamingPhase((p) => p === "idle" ? "thinking" : p);
|
|
50486
|
-
},
|
|
50487
|
-
// Terminal turn failures can arrive without a MESSAGE_END; unlock the
|
|
50488
|
-
// composer unless an open stream still owns the phase (in-stream errors
|
|
50489
|
-
// are followed by the stream's own MESSAGE_END).
|
|
50490
|
-
onError: () => setStreamingPhase((p) => p === "streaming" ? p : "idle"),
|
|
50491
50460
|
// Live cumulative token counter for the active dialog — drives the
|
|
50492
50461
|
// composer's "X / Y tokens used" tail as the assistant streams.
|
|
50493
50462
|
onTokenUsage: (data) => setDialogTokenUsage(data),
|
|
@@ -50503,8 +50472,6 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50503
50472
|
onSegmentsUpdate: (segments) => callbacksRef.current.onSegmentsUpdate(segments),
|
|
50504
50473
|
onStreamStart: () => callbacksRef.current.onStreamStart(),
|
|
50505
50474
|
onStreamEnd: () => callbacksRef.current.onStreamEnd(),
|
|
50506
|
-
onAgentBusy: () => callbacksRef.current.onAgentBusy(),
|
|
50507
|
-
onError: () => callbacksRef.current.onError(),
|
|
50508
50475
|
onTokenUsage: (data) => callbacksRef.current.onTokenUsage(data),
|
|
50509
50476
|
onMetadata: (meta) => callbacksRef.current.onMetadata(meta),
|
|
50510
50477
|
onApprove: accumApprove,
|
|
@@ -50594,13 +50561,10 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
50594
50561
|
}, [active, dialogId, loadDialogHistory, resetAccumulator]);
|
|
50595
50562
|
useEffect86(() => {
|
|
50596
50563
|
if (!active || !dialogId) return;
|
|
50597
|
-
suppressAgentBusyRef.current = true;
|
|
50598
50564
|
resetChunkTracking();
|
|
50599
50565
|
startInitialBuffering();
|
|
50600
50566
|
catchUpChunks().catch((err) => {
|
|
50601
50567
|
console.error("[useNatsChatAdapter] initial catchup failed:", err);
|
|
50602
|
-
}).finally(() => {
|
|
50603
|
-
suppressAgentBusyRef.current = false;
|
|
50604
50568
|
});
|
|
50605
50569
|
}, [active, dialogId, resetChunkTracking, startInitialBuffering, catchUpChunks]);
|
|
50606
50570
|
useNatsDialogSubscription({
|
|
@@ -53533,4 +53497,4 @@ export {
|
|
|
53533
53497
|
LogsList,
|
|
53534
53498
|
assets
|
|
53535
53499
|
};
|
|
53536
|
-
//# sourceMappingURL=chunk-
|
|
53500
|
+
//# sourceMappingURL=chunk-5WXUR7LF.js.map
|