@opengeni/react 5.0.5-canary.2 → 5.1.0-canary.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/README.md +13 -1
- package/dist/{chunk-V3WX3TQG.js → chunk-45XEUVTK.js} +2 -2
- package/dist/{chunk-6J56T3MG.js → chunk-NYESIADM.js} +14 -5
- package/dist/chunk-NYESIADM.js.map +1 -0
- package/dist/{chunk-H63SQTGI.js → chunk-WS6D5BHH.js} +37 -19
- package/dist/chunk-WS6D5BHH.js.map +1 -0
- package/dist/components/message-timeline.d.ts +4 -1
- package/dist/components/session-conversation.d.ts +3 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/composer.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/session-ui.d.ts +1 -1
- package/dist/session-ui.js +3 -3
- package/dist/session.js +1 -1
- package/package.json +3 -3
- package/src/components/message-timeline.tsx +49 -29
- package/src/components/session-conversation.tsx +5 -0
- package/src/components/user-message-body.tsx +20 -2
- package/src/hooks/use-composer.ts +15 -2
- package/src/index.ts +4 -1
- package/src/session-ui.ts +4 -1
- package/dist/chunk-6J56T3MG.js.map +0 -1
- package/dist/chunk-H63SQTGI.js.map +0 -1
- /package/dist/{chunk-V3WX3TQG.js.map → chunk-45XEUVTK.js.map} +0 -0
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
Surface,
|
|
39
39
|
useChatComposerController,
|
|
40
40
|
useLightboxOptional
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-45XEUVTK.js";
|
|
42
42
|
import {
|
|
43
43
|
Tooltip,
|
|
44
44
|
TooltipContent,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-HUMIRRYI.js";
|
|
63
63
|
import {
|
|
64
64
|
useComposer
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-NYESIADM.js";
|
|
66
66
|
import {
|
|
67
67
|
formatBytes,
|
|
68
68
|
formatClockTime,
|
|
@@ -1157,7 +1157,13 @@ function userMessageLikelyNeedsDisclosure(text) {
|
|
|
1157
1157
|
const lines = text.split(/\r?\n/);
|
|
1158
1158
|
return lines.length > FALLBACK_LINE_THRESHOLD || text.length > FALLBACK_TEXT_THRESHOLD || lines.some((line) => line.length > FALLBACK_UNBROKEN_THRESHOLD);
|
|
1159
1159
|
}
|
|
1160
|
-
function UserMessageBody({
|
|
1160
|
+
function UserMessageBody({
|
|
1161
|
+
messageId,
|
|
1162
|
+
text,
|
|
1163
|
+
children,
|
|
1164
|
+
className,
|
|
1165
|
+
disclosureLabels
|
|
1166
|
+
}) {
|
|
1161
1167
|
const disclosure = useContext(UserMessageDisclosureContext);
|
|
1162
1168
|
const [expanded, setExpanded] = useState3(
|
|
1163
1169
|
() => disclosure?.expandedByMessageId.get(messageId) ?? false
|
|
@@ -1359,7 +1365,7 @@ function UserMessageBody({ messageId, text, children, className }) {
|
|
|
1359
1365
|
"data-og-user-message-disclosure": "",
|
|
1360
1366
|
className: "mt-1.5 inline-flex min-h-7 items-center rounded-og-sm px-1.5 text-og-xs font-medium text-og-fg-muted outline-hidden transition-colors hover:bg-og-surface-3/60 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/45 pointer-coarse:min-h-11",
|
|
1361
1367
|
onClick: (event) => toggle(event.currentTarget),
|
|
1362
|
-
children: expanded ? "Show less" : "Show more"
|
|
1368
|
+
children: expanded ? disclosureLabels?.showLess ?? disclosure?.labels?.showLess ?? "Show less" : disclosureLabels?.showMore ?? disclosure?.labels?.showMore ?? "Show more"
|
|
1363
1369
|
}
|
|
1364
1370
|
)
|
|
1365
1371
|
]
|
|
@@ -5960,6 +5966,7 @@ function cssEscapeAttribute(value) {
|
|
|
5960
5966
|
return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
5961
5967
|
}
|
|
5962
5968
|
function MessageTimeline({
|
|
5969
|
+
userMessageDisclosureLabels,
|
|
5963
5970
|
events,
|
|
5964
5971
|
items,
|
|
5965
5972
|
status: _status,
|
|
@@ -6307,9 +6314,17 @@ function MessageTimeline({
|
|
|
6307
6314
|
const userMessageDisclosureContext = useMemo3(
|
|
6308
6315
|
() => ({
|
|
6309
6316
|
expandedByMessageId: userMessageDisclosureMemoryRef.current,
|
|
6310
|
-
beginChange: beginUserMessageDisclosureChange
|
|
6317
|
+
beginChange: beginUserMessageDisclosureChange,
|
|
6318
|
+
labels: {
|
|
6319
|
+
showMore: userMessageDisclosureLabels?.showMore,
|
|
6320
|
+
showLess: userMessageDisclosureLabels?.showLess
|
|
6321
|
+
}
|
|
6311
6322
|
}),
|
|
6312
|
-
[
|
|
6323
|
+
[
|
|
6324
|
+
beginUserMessageDisclosureChange,
|
|
6325
|
+
userMessageDisclosureLabels?.showMore,
|
|
6326
|
+
userMessageDisclosureLabels?.showLess
|
|
6327
|
+
]
|
|
6313
6328
|
);
|
|
6314
6329
|
const timelineGroupEntryContext = useMemo3(
|
|
6315
6330
|
() => ({
|
|
@@ -7312,23 +7327,24 @@ var TimelineGroupEntry = memo(function TimelineGroupEntry2({
|
|
|
7312
7327
|
const reducedMotion = useReducedMotion2();
|
|
7313
7328
|
const { behavior, userMessageDisclosureContext } = context;
|
|
7314
7329
|
const contextCompactionCount = group.kind === "turn" ? group.contextCompactionCount ?? 0 : group.kind === "activity" && nextGroup?.kind === "item" && nextGroup.item.kind === "context-compaction" && nextGroup.item.phase === "compacted" ? 1 : 0;
|
|
7315
|
-
|
|
7330
|
+
const content = /* @__PURE__ */ jsx17(
|
|
7331
|
+
TimelineGroupView,
|
|
7332
|
+
{
|
|
7333
|
+
...behavior,
|
|
7334
|
+
group,
|
|
7335
|
+
foldLiveCluster: isAgentProgress(nextGroup),
|
|
7336
|
+
startupDismissed,
|
|
7337
|
+
trailingAgentText: trailingAgentTextAfterTurn(group, nextGroup),
|
|
7338
|
+
contextCompactionCount: contextCompactionCount > 0 ? contextCompactionCount : void 0
|
|
7339
|
+
}
|
|
7340
|
+
);
|
|
7341
|
+
return /* @__PURE__ */ jsx17(GenieLoadingOptionsContext.Provider, { value: behavior.genieLoading, children: /* @__PURE__ */ jsx17("div", { "data-og-timeline-group-anchor": "", "data-og-group-key": groupKey, children: /* @__PURE__ */ jsx17(EntranceAnimationProvider, { value: entranceEnabled, liveValue: liveEntranceEnabled, children: /* @__PURE__ */ jsx17(TimelineGroupRenderBoundary, { resetKeys: [group, behavior], children: /* @__PURE__ */ jsx17(UserMessageDisclosureProvider, { value: userMessageDisclosureContext, children: group.kind === "item" ? /* @__PURE__ */ jsx17("div", { children: content }) : /* @__PURE__ */ jsx17(AnimatePresence2, { initial: false, children: /* @__PURE__ */ jsx17(
|
|
7316
7342
|
motion2.div,
|
|
7317
7343
|
{
|
|
7318
7344
|
initial: false,
|
|
7319
7345
|
exit: { opacity: 0, height: 0 },
|
|
7320
7346
|
transition: { duration: reducedMotion ? 0 : 0.2 },
|
|
7321
|
-
children:
|
|
7322
|
-
TimelineGroupView,
|
|
7323
|
-
{
|
|
7324
|
-
...behavior,
|
|
7325
|
-
group,
|
|
7326
|
-
foldLiveCluster: isAgentProgress(nextGroup),
|
|
7327
|
-
startupDismissed,
|
|
7328
|
-
trailingAgentText: trailingAgentTextAfterTurn(group, nextGroup),
|
|
7329
|
-
contextCompactionCount: contextCompactionCount > 0 ? contextCompactionCount : void 0
|
|
7330
|
-
}
|
|
7331
|
-
)
|
|
7347
|
+
children: content
|
|
7332
7348
|
},
|
|
7333
7349
|
!startupDismissed && group.kind === "activity" && group.items.every(
|
|
7334
7350
|
(item) => item.kind === "startup-phase" || item.kind === "reasoning" && !item.text.trim()
|
|
@@ -8923,6 +8939,7 @@ function SessionConversation(props) {
|
|
|
8923
8939
|
}
|
|
8924
8940
|
function Conversation({
|
|
8925
8941
|
sessionId,
|
|
8942
|
+
userMessageDisclosureLabels,
|
|
8926
8943
|
loadSkillReview,
|
|
8927
8944
|
client,
|
|
8928
8945
|
workspaceId,
|
|
@@ -8965,6 +8982,7 @@ function Conversation({
|
|
|
8965
8982
|
/* @__PURE__ */ jsx20(
|
|
8966
8983
|
MessageTimeline,
|
|
8967
8984
|
{
|
|
8985
|
+
userMessageDisclosureLabels,
|
|
8968
8986
|
className: "min-h-0 flex-1",
|
|
8969
8987
|
items: conversationTimeline(feed.timeline, queue, composer),
|
|
8970
8988
|
status,
|
|
@@ -10457,4 +10475,4 @@ export {
|
|
|
10457
10475
|
SessionChrome,
|
|
10458
10476
|
SessionCommandsPanel
|
|
10459
10477
|
};
|
|
10460
|
-
//# sourceMappingURL=chunk-
|
|
10478
|
+
//# sourceMappingURL=chunk-WS6D5BHH.js.map
|