@flamingo-stack/openframe-frontend-core 0.0.692 → 0.0.693
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/chat-protocol/events.d.ts +3 -0
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/frames.d.ts +6 -0
- package/dist/chat-protocol/frames.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +26 -1
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.d.ts +1 -0
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +23 -2
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/leading-frames.d.ts.map +1 -1
- package/dist/chat-protocol/progress.d.ts +35 -0
- package/dist/chat-protocol/progress.d.ts.map +1 -0
- package/dist/{chunk-ATREVNIN.cjs → chunk-3HGVRJTC.cjs} +33 -33
- package/dist/{chunk-ATREVNIN.cjs.map → chunk-3HGVRJTC.cjs.map} +1 -1
- package/dist/{chunk-F6LXGP6S.cjs → chunk-4KM5MVBM.cjs} +3 -3
- package/dist/{chunk-F6LXGP6S.cjs.map → chunk-4KM5MVBM.cjs.map} +1 -1
- package/dist/{chunk-CKO6NKNE.js → chunk-5CZZ4JLE.js} +2 -2
- package/dist/{chunk-RK47E3PP.js → chunk-5NUOZZRR.js} +2 -2
- package/dist/{chunk-DUURFYGS.cjs → chunk-6H5PPQWP.cjs} +3 -3
- package/dist/{chunk-DUURFYGS.cjs.map → chunk-6H5PPQWP.cjs.map} +1 -1
- package/dist/{chunk-FTK3S57R.cjs → chunk-7BC3NJAV.cjs} +15 -15
- package/dist/{chunk-FTK3S57R.cjs.map → chunk-7BC3NJAV.cjs.map} +1 -1
- package/dist/{chunk-Q25VYAEL.cjs → chunk-BDGNKIHU.cjs} +22 -22
- package/dist/{chunk-Q25VYAEL.cjs.map → chunk-BDGNKIHU.cjs.map} +1 -1
- package/dist/{chunk-TEIHEFXP.js → chunk-BFV4L3D7.js} +5 -5
- package/dist/{chunk-GZRU2A4L.cjs → chunk-CMA74BXW.cjs} +40 -3
- package/dist/chunk-CMA74BXW.cjs.map +1 -0
- package/dist/{chunk-WTYQCT4A.cjs → chunk-DDCQG3WO.cjs} +10 -10
- package/dist/{chunk-WTYQCT4A.cjs.map → chunk-DDCQG3WO.cjs.map} +1 -1
- package/dist/{chunk-KDCIYRZV.cjs → chunk-DVEFZ5DU.cjs} +22 -22
- package/dist/{chunk-KDCIYRZV.cjs.map → chunk-DVEFZ5DU.cjs.map} +1 -1
- package/dist/{chunk-X5XFKI6N.js → chunk-EZFSUHNP.js} +2 -2
- package/dist/{chunk-IQTQIBZ3.js → chunk-F2ZBNRTF.js} +5 -5
- package/dist/{chunk-EXWS2QSD.cjs → chunk-FMPH6G3E.cjs} +339 -339
- package/dist/{chunk-EXWS2QSD.cjs.map → chunk-FMPH6G3E.cjs.map} +1 -1
- package/dist/{chunk-RLNNV46K.js → chunk-GVMVPMDE.js} +3 -3
- package/dist/{chunk-7BNWMOPM.cjs → chunk-HRGG56GC.cjs} +45 -45
- package/dist/{chunk-7BNWMOPM.cjs.map → chunk-HRGG56GC.cjs.map} +1 -1
- package/dist/{chunk-ZAV2F4VX.js → chunk-I72FRMF6.js} +2 -2
- package/dist/{chunk-PKZGXRU2.js → chunk-IC2SDW6U.js} +4 -4
- package/dist/{chunk-Y7ZEVTLC.js → chunk-ID5QPM3X.js} +40 -3
- package/dist/chunk-ID5QPM3X.js.map +1 -0
- package/dist/{chunk-LYQULSK4.js → chunk-INVP4WLX.js} +5 -5
- package/dist/{chunk-DKJDO7YM.cjs → chunk-JAQK3GQJ.cjs} +26 -26
- package/dist/{chunk-DKJDO7YM.cjs.map → chunk-JAQK3GQJ.cjs.map} +1 -1
- package/dist/{chunk-LYJJH4D6.js → chunk-PPRD3PTW.js} +3 -3
- package/dist/{chunk-MCNQKS6I.js → chunk-QDH62H4N.js} +3 -3
- package/dist/{chunk-5XPK2QGU.cjs → chunk-RKIMG67Q.cjs} +10 -10
- package/dist/{chunk-5XPK2QGU.cjs.map → chunk-RKIMG67Q.cjs.map} +1 -1
- package/dist/{chunk-RTKF5AYA.cjs → chunk-S54QA2VE.cjs} +5 -5
- package/dist/{chunk-RTKF5AYA.cjs.map → chunk-S54QA2VE.cjs.map} +1 -1
- package/dist/{chunk-CG7OWW7X.cjs → chunk-SG57SBYG.cjs} +10 -10
- package/dist/{chunk-CG7OWW7X.cjs.map → chunk-SG57SBYG.cjs.map} +1 -1
- package/dist/{chunk-A5NHAHV6.js → chunk-TFSRPBVT.js} +2 -2
- package/dist/{chunk-KQZMM3QJ.cjs → chunk-UWJZRI5J.cjs} +71 -71
- package/dist/{chunk-KQZMM3QJ.cjs.map → chunk-UWJZRI5J.cjs.map} +1 -1
- package/dist/{chunk-TXFGG47A.js → chunk-WJAMBSMW.js} +3 -3
- package/dist/{chunk-CKUPANVU.cjs → chunk-WSYCPIRG.cjs} +4 -4
- package/dist/{chunk-CKUPANVU.cjs.map → chunk-WSYCPIRG.cjs.map} +1 -1
- package/dist/{chunk-AVAZ6BD6.js → chunk-XI2BAIKJ.js} +3 -3
- package/dist/{chunk-Z7QCNCBN.js → chunk-XWAT6ZP5.js} +6 -6
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-unified-chat.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/stream/chat-dialog-store.d.ts.map +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts +4 -0
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +2 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +5 -0
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +73 -73
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +40 -40
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +25 -25
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/progress.test.ts +39 -0
- package/src/chat-protocol/events.ts +3 -0
- package/src/chat-protocol/frames.ts +7 -0
- package/src/chat-protocol/index.ts +2 -0
- package/src/chat-protocol/leading-frames.ts +4 -1
- package/src/chat-protocol/progress.ts +55 -0
- package/src/components/chat/chat-message-list.tsx +10 -1
- package/src/components/chat/embeddable-chat.tsx +5 -0
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -0
- package/src/components/chat/hooks/use-unified-chat.ts +1 -0
- package/src/components/chat/stream/__tests__/chat-stream-reducer-progress.test.ts +40 -0
- package/src/components/chat/stream/chat-dialog-store.ts +1 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +13 -0
- package/src/components/chat/types/component.types.ts +2 -0
- package/src/components/chat/types/unified-chat-state.types.ts +6 -0
- package/dist/chunk-GZRU2A4L.cjs.map +0 -1
- package/dist/chunk-Y7ZEVTLC.js.map +0 -1
- /package/dist/{chunk-CKO6NKNE.js.map → chunk-5CZZ4JLE.js.map} +0 -0
- /package/dist/{chunk-RK47E3PP.js.map → chunk-5NUOZZRR.js.map} +0 -0
- /package/dist/{chunk-TEIHEFXP.js.map → chunk-BFV4L3D7.js.map} +0 -0
- /package/dist/{chunk-X5XFKI6N.js.map → chunk-EZFSUHNP.js.map} +0 -0
- /package/dist/{chunk-IQTQIBZ3.js.map → chunk-F2ZBNRTF.js.map} +0 -0
- /package/dist/{chunk-RLNNV46K.js.map → chunk-GVMVPMDE.js.map} +0 -0
- /package/dist/{chunk-ZAV2F4VX.js.map → chunk-I72FRMF6.js.map} +0 -0
- /package/dist/{chunk-PKZGXRU2.js.map → chunk-IC2SDW6U.js.map} +0 -0
- /package/dist/{chunk-LYQULSK4.js.map → chunk-INVP4WLX.js.map} +0 -0
- /package/dist/{chunk-LYJJH4D6.js.map → chunk-PPRD3PTW.js.map} +0 -0
- /package/dist/{chunk-MCNQKS6I.js.map → chunk-QDH62H4N.js.map} +0 -0
- /package/dist/{chunk-A5NHAHV6.js.map → chunk-TFSRPBVT.js.map} +0 -0
- /package/dist/{chunk-TXFGG47A.js.map → chunk-WJAMBSMW.js.map} +0 -0
- /package/dist/{chunk-AVAZ6BD6.js.map → chunk-XI2BAIKJ.js.map} +0 -0
- /package/dist/{chunk-Z7QCNCBN.js.map → chunk-XWAT6ZP5.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PageLayout
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5CZZ4JLE.js";
|
|
5
5
|
import {
|
|
6
6
|
formatBioText,
|
|
7
7
|
formatDateWithTimezone,
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
DetailPageSkeleton,
|
|
138
138
|
ArticleAuthorByline
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-I72FRMF6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useOptionalTicketLive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QDH62H4N.js";
|
|
5
5
|
import {
|
|
6
6
|
AppLayoutDrawerContainerContext,
|
|
7
7
|
AppLayoutDrawerCoordinationContext,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
UnreadDot,
|
|
14
14
|
buildTicketOpenHref,
|
|
15
15
|
useOptionalNotifications
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5CZZ4JLE.js";
|
|
17
17
|
import {
|
|
18
18
|
useFocusTrap,
|
|
19
19
|
useLocalStorage
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
OVERLAY_BACKDROP_CLASS,
|
|
23
23
|
Tag,
|
|
24
24
|
useIsHydrated
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ID5QPM3X.js";
|
|
26
26
|
import {
|
|
27
27
|
useHeaderHeight,
|
|
28
28
|
useIsomorphicLayoutEffect,
|
|
@@ -1918,4 +1918,4 @@ export {
|
|
|
1918
1918
|
MobileBurgerMenu,
|
|
1919
1919
|
AppLayout
|
|
1920
1920
|
};
|
|
1921
|
-
//# sourceMappingURL=chunk-
|
|
1921
|
+
//# sourceMappingURL=chunk-IC2SDW6U.js.map
|
|
@@ -8021,6 +8021,7 @@ var ChatMessageList = forwardRef18(
|
|
|
8021
8021
|
dialogId,
|
|
8022
8022
|
isLoading = false,
|
|
8023
8023
|
isTyping = false,
|
|
8024
|
+
typingMessage,
|
|
8024
8025
|
autoScroll = true,
|
|
8025
8026
|
overscrollContain = true,
|
|
8026
8027
|
pinBottom = false,
|
|
@@ -8466,7 +8467,7 @@ var ChatMessageList = forwardRef18(
|
|
|
8466
8467
|
"aria-live": "polite",
|
|
8467
8468
|
children: [
|
|
8468
8469
|
/* @__PURE__ */ jsx39(DotsLoaderIcon, { className: "h-6 w-6" }),
|
|
8469
|
-
/* @__PURE__ */ jsx39(CyclingPhrase, { words: STREAMING_WORDS, className: "text-h6" })
|
|
8470
|
+
typingMessage ? /* @__PURE__ */ jsx39("span", { className: "text-h6", "aria-atomic": "true", children: typingMessage }) : /* @__PURE__ */ jsx39(CyclingPhrase, { words: STREAMING_WORDS, className: "text-h6" })
|
|
8470
8471
|
]
|
|
8471
8472
|
}
|
|
8472
8473
|
),
|
|
@@ -19310,6 +19311,26 @@ var FRAME_TERMINATOR = "\0";
|
|
|
19310
19311
|
var END_OF_LEADING = "";
|
|
19311
19312
|
var TRAILER_SENTINEL = "";
|
|
19312
19313
|
|
|
19314
|
+
// src/chat-protocol/progress.ts
|
|
19315
|
+
var CHAT_PROGRESS_STAGES = ["understanding", "searching", "searching_again", "reading"];
|
|
19316
|
+
function isChatProgressStage(value) {
|
|
19317
|
+
return typeof value === "string" && CHAT_PROGRESS_STAGES.includes(value);
|
|
19318
|
+
}
|
|
19319
|
+
function chatProgressOf(frame) {
|
|
19320
|
+
if (!isChatProgressStage(frame.stage)) return null;
|
|
19321
|
+
const count = typeof frame.count === "number" && Number.isFinite(frame.count) && frame.count > 0 ? Math.floor(frame.count) : void 0;
|
|
19322
|
+
return count === void 0 ? { stage: frame.stage } : { stage: frame.stage, count };
|
|
19323
|
+
}
|
|
19324
|
+
var PROGRESS_LABEL = {
|
|
19325
|
+
understanding: () => "Understanding your question",
|
|
19326
|
+
searching: (count) => count ? `Searching ${count} ${count === 1 ? "source" : "sources"}` : "Searching",
|
|
19327
|
+
searching_again: () => "Searching more broadly",
|
|
19328
|
+
reading: (count) => count ? `Reading ${count} ${count === 1 ? "result" : "results"}` : "Reading the results"
|
|
19329
|
+
};
|
|
19330
|
+
function chatProgressLabel(progress) {
|
|
19331
|
+
return PROGRESS_LABEL[progress.stage](progress.count);
|
|
19332
|
+
}
|
|
19333
|
+
|
|
19313
19334
|
// src/chat-protocol/leading-frames.ts
|
|
19314
19335
|
function escapeThinkingTags(text2) {
|
|
19315
19336
|
return text2.replace(/</g, "<");
|
|
@@ -19322,7 +19343,8 @@ function frameNum(value) {
|
|
|
19322
19343
|
}
|
|
19323
19344
|
function mapLeadingFrame(meta, out) {
|
|
19324
19345
|
if (meta.status === "thinking") {
|
|
19325
|
-
|
|
19346
|
+
const progress = chatProgressOf(meta);
|
|
19347
|
+
out.push(progress ? { type: "status", phase: "thinking", progress } : { type: "status", phase: "thinking" });
|
|
19326
19348
|
} else if (meta.kind === "thinking-delta" && typeof meta.text === "string") {
|
|
19327
19349
|
out.push({ type: "thinking-delta", text: meta.text });
|
|
19328
19350
|
} else if (meta.kind === "usage" && meta.stage === "start") {
|
|
@@ -20603,6 +20625,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20603
20625
|
} = options;
|
|
20604
20626
|
let messages = [];
|
|
20605
20627
|
let streamingPhase = "idle";
|
|
20628
|
+
let streamingProgress = null;
|
|
20606
20629
|
let dialogTokenUsage = null;
|
|
20607
20630
|
let liveModel = null;
|
|
20608
20631
|
let approvalStatuses = {
|
|
@@ -20661,6 +20684,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
20661
20684
|
stateCache = {
|
|
20662
20685
|
messages,
|
|
20663
20686
|
streamingPhase,
|
|
20687
|
+
// A stage describes the wait before the first token only.
|
|
20688
|
+
streamingProgress: streamingPhase === "thinking" ? streamingProgress : null,
|
|
20664
20689
|
turnMeta: { meta: metaMap, sources: sourcesMap, sendCount },
|
|
20665
20690
|
dialogTokenUsage,
|
|
20666
20691
|
liveModel,
|
|
@@ -21281,6 +21306,10 @@ function createChatStreamReducer(options = {}) {
|
|
|
21281
21306
|
const sendIdx = sendCount - 1;
|
|
21282
21307
|
switch (event.type) {
|
|
21283
21308
|
case "status":
|
|
21309
|
+
if (event.progress) {
|
|
21310
|
+
streamingProgress = event.progress;
|
|
21311
|
+
invalidate();
|
|
21312
|
+
}
|
|
21284
21313
|
setPhaseInternal("thinking");
|
|
21285
21314
|
break;
|
|
21286
21315
|
case "thinking-delta":
|
|
@@ -21513,6 +21542,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
21513
21542
|
{ id: nextId("assistant"), role: "assistant", content: "", segments: [] }
|
|
21514
21543
|
];
|
|
21515
21544
|
streamingPhase = "thinking";
|
|
21545
|
+
streamingProgress = null;
|
|
21516
21546
|
invalidate();
|
|
21517
21547
|
},
|
|
21518
21548
|
clearThread() {
|
|
@@ -21557,6 +21587,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
21557
21587
|
sendCount += 1;
|
|
21558
21588
|
sseCurrentText = "";
|
|
21559
21589
|
streamingPhase = "thinking";
|
|
21590
|
+
streamingProgress = null;
|
|
21560
21591
|
invalidate();
|
|
21561
21592
|
},
|
|
21562
21593
|
endSseTurn() {
|
|
@@ -21652,6 +21683,7 @@ var MAX_PENDING_RETAIN_KEYS = 256;
|
|
|
21652
21683
|
var EMPTY_STATE = Object.freeze({
|
|
21653
21684
|
messages: Object.freeze([]),
|
|
21654
21685
|
streamingPhase: "idle",
|
|
21686
|
+
streamingProgress: null,
|
|
21655
21687
|
turnMeta: Object.freeze({
|
|
21656
21688
|
meta: /* @__PURE__ */ new Map(),
|
|
21657
21689
|
sources: /* @__PURE__ */ new Map(),
|
|
@@ -22839,6 +22871,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22839
22871
|
stopMessage,
|
|
22840
22872
|
clearMessages,
|
|
22841
22873
|
streamingPhase,
|
|
22874
|
+
/** The stage the pending turn reports before its first token, or null. */
|
|
22875
|
+
streamingProgress: state.streamingProgress,
|
|
22842
22876
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
22843
22877
|
isHydratingHistory,
|
|
22844
22878
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
@@ -24392,6 +24426,7 @@ function useUnifiedChat(options) {
|
|
|
24392
24426
|
messages: activeState.messages,
|
|
24393
24427
|
isLoading: activeState.isLoading,
|
|
24394
24428
|
streamingPhase: activeState.streamingPhase,
|
|
24429
|
+
streamingProgress: activeState.streamingProgress ?? null,
|
|
24395
24430
|
sendMessage,
|
|
24396
24431
|
stopMessage,
|
|
24397
24432
|
clearMessages,
|
|
@@ -26037,6 +26072,7 @@ function EmbeddableChatInner({
|
|
|
26037
26072
|
const {
|
|
26038
26073
|
messages: rawMessages,
|
|
26039
26074
|
isLoading: chatLoading,
|
|
26075
|
+
streamingProgress,
|
|
26040
26076
|
sendMessage: sendMessageRaw,
|
|
26041
26077
|
discussRef,
|
|
26042
26078
|
stopMessage,
|
|
@@ -26777,6 +26813,7 @@ function EmbeddableChatInner({
|
|
|
26777
26813
|
{
|
|
26778
26814
|
messages,
|
|
26779
26815
|
isTyping: chatLoading,
|
|
26816
|
+
typingMessage: streamingProgress ? chatProgressLabel(streamingProgress) : void 0,
|
|
26780
26817
|
pendingApprovals,
|
|
26781
26818
|
autoScroll: !previewMode,
|
|
26782
26819
|
pinBottom: previewMode,
|
|
@@ -27706,4 +27743,4 @@ export {
|
|
|
27706
27743
|
EmbeddableChat,
|
|
27707
27744
|
ProxyCredentialsPanel
|
|
27708
27745
|
};
|
|
27709
|
-
//# sourceMappingURL=chunk-
|
|
27746
|
+
//# sourceMappingURL=chunk-ID5QPM3X.js.map
|