@opengeni/react 0.42.1 → 0.44.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/{chunk-SJKT4TKW.js → chunk-23EJ676W.js} +3 -1
- package/dist/chunk-23EJ676W.js.map +1 -0
- package/dist/{chunk-Q2NCKWTK.js → chunk-HFO4ERGQ.js} +51 -4
- package/dist/chunk-HFO4ERGQ.js.map +1 -0
- package/dist/{chunk-4IJCL7YO.js → chunk-LWR4MXSS.js} +4 -1
- package/dist/chunk-LWR4MXSS.js.map +1 -0
- package/dist/{chunk-UWYTCQWW.js → chunk-QQRM3DO3.js} +93 -22
- package/dist/{chunk-UWYTCQWW.js.map → chunk-QQRM3DO3.js.map} +1 -1
- package/dist/{chunk-JALF5FI3.js → chunk-SRFUT2ZU.js} +2 -2
- package/dist/{chunk-WZT5G5OR.js → chunk-U6K24XQD.js} +5 -4
- package/dist/{chunk-WZT5G5OR.js.map → chunk-U6K24XQD.js.map} +1 -1
- package/dist/{chunk-KR2SK5GJ.js → chunk-YNYIAYXQ.js} +427 -94
- package/dist/chunk-YNYIAYXQ.js.map +1 -0
- package/dist/components/chat-composer.d.ts +5 -1
- package/dist/components/composer-transcription-control.d.ts +3 -1
- package/dist/components/composer.d.ts +6 -4
- package/dist/components/session-chrome.d.ts +1 -1
- package/dist/composer.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +70 -21
- package/dist/index.js.map +1 -1
- package/dist/model-policy.d.ts +2 -0
- package/dist/model-policy.js +1 -1
- package/dist/realtime/realtime-control.d.ts +29 -1
- package/dist/realtime.d.ts +1 -1
- package/dist/realtime.js +269 -151
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.js +2 -2
- package/dist/session.js +3 -3
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/parsers.d.ts +13 -8
- package/package.json +2 -2
- package/src/components/chat-composer.tsx +58 -19
- package/src/components/composer-transcription-control.tsx +194 -165
- package/src/components/composer.tsx +78 -14
- package/src/components/model-policy-picker.tsx +7 -2
- package/src/components/session-chrome.tsx +89 -78
- package/src/hooks/use-composer.ts +79 -9
- package/src/index.ts +2 -0
- package/src/model-policy.ts +4 -0
- package/src/realtime/realtime-control.tsx +307 -137
- package/src/realtime.ts +1 -0
- package/src/timeline/index.ts +2 -0
- package/src/timeline/parsers.ts +201 -19
- package/src/timeline/projection.ts +11 -0
- package/src/timeline/tool-renderers.tsx +213 -8
- package/src/timeline/turn-summary.tsx +7 -2
- package/styles/tokens.css +8 -5
- package/dist/chunk-4IJCL7YO.js.map +0 -1
- package/dist/chunk-KR2SK5GJ.js.map +0 -1
- package/dist/chunk-Q2NCKWTK.js.map +0 -1
- package/dist/chunk-SJKT4TKW.js.map +0 -1
- /package/dist/{chunk-JALF5FI3.js.map → chunk-SRFUT2ZU.js.map} +0 -0
|
@@ -33,6 +33,10 @@ export type ChatComposerProps = {
|
|
|
33
33
|
attachButtonClassName?: string | undefined;
|
|
34
34
|
/** Provider-neutral speech capability. Provider configuration stays in workspace settings. */
|
|
35
35
|
transcription?: ComposerTranscriptionControlProps | undefined;
|
|
36
|
+
/** Extra classes on the transcription control. */
|
|
37
|
+
transcriptionClassName?: string | undefined;
|
|
38
|
+
/** Soft-hide dictate while realtime voice is active (animated collapse). */
|
|
39
|
+
transcriptionSuppressed?: boolean | undefined;
|
|
36
40
|
/** Content rendered above the textarea, inside the field chrome. */
|
|
37
41
|
header?: ReactNode | undefined;
|
|
38
42
|
/** Paste hook composed with the attachment paste path. */
|
|
@@ -55,4 +59,4 @@ export type ChatComposerProps = {
|
|
|
55
59
|
* the public controller and compound primitives exported by the composer
|
|
56
60
|
* subpath, so custom and default layouts share one behavioral implementation.
|
|
57
61
|
*/
|
|
58
|
-
export declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare function ChatComposer({ composer, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,6 +44,8 @@ export type ComposerTranscriptionControlProps = {
|
|
|
44
44
|
createRecordingStore?: (() => VoiceRecordingStore) | undefined;
|
|
45
45
|
/** Test/embed seam. Production acquires a coordinated browser-document owner lease. */
|
|
46
46
|
createOwnerId?: (() => string) | undefined;
|
|
47
|
+
/** Hide while realtime voice owns the mic — collapses with a layout-friendly exit. */
|
|
48
|
+
suppressed?: boolean | undefined;
|
|
47
49
|
};
|
|
48
50
|
/** One provider-neutral microphone control for the nearest editable composer. */
|
|
49
|
-
export declare function ComposerTranscriptionControl({ client, workspaceId, capability, workspaceEnabled, messages: overrides, className, createRecordingStore, createOwnerId, }: ComposerTranscriptionControlProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function ComposerTranscriptionControl({ client, workspaceId, capability, workspaceEnabled, messages: overrides, className, createRecordingStore, createOwnerId, suppressed, }: ComposerTranscriptionControlProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -93,11 +93,13 @@ export type UseChatComposerControllerOptions = {
|
|
|
93
93
|
messages?: Partial<ChatComposerMessages> | undefined;
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
|
-
* Autosize a composer textarea up to `maxPx
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* Autosize a composer textarea up to `maxPx`. Never writes intermediate
|
|
97
|
+
* `height: auto` / `0` on the live element — only the final pixel height.
|
|
98
|
+
*
|
|
99
|
+
* `measure` is injectable for unit tests; production always uses the off-DOM
|
|
100
|
+
* mirror so shrink/steady never collapses the laid-out box.
|
|
99
101
|
*/
|
|
100
|
-
export declare function applyComposerTextareaHeight(textarea: HTMLTextAreaElement, maxPx?: number): void;
|
|
102
|
+
export declare function applyComposerTextareaHeight(textarea: HTMLTextAreaElement, maxPx?: number, measure?: (el: HTMLTextAreaElement) => number): void;
|
|
101
103
|
/**
|
|
102
104
|
* Headless interaction layer for a chat composer. It is the single owner of
|
|
103
105
|
* delivery guards, keyboard routing, command interception, drag/drop, focus,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* | --- | --- |
|
|
12
12
|
* | `--og-session-chrome-surface` / `-open` | Dock fill (collapsed / expanded) |
|
|
13
13
|
* | `--og-session-chrome-border` / `-open` | Dock edge |
|
|
14
|
-
* | `--og-session-chrome-highlight` | Sliding chip selection
|
|
14
|
+
* | `--og-session-chrome-highlight` / `-ring` | Sliding chip selection fill + edge |
|
|
15
15
|
* | `--og-session-chrome-shadow` / `-open` | Elevation |
|
|
16
16
|
* | `--og-session-chrome-radius` | Dock corner radius |
|
|
17
17
|
* | `--og-session-chrome-chip-min-height` | Signal chip height |
|
package/dist/composer.js
CHANGED
|
@@ -37,8 +37,8 @@ import {
|
|
|
37
37
|
useChatComposer,
|
|
38
38
|
useChatComposerController,
|
|
39
39
|
useVoiceInput
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-QQRM3DO3.js";
|
|
41
|
+
import "./chunk-HFO4ERGQ.js";
|
|
42
42
|
import "./chunk-EB67J347.js";
|
|
43
43
|
import {
|
|
44
44
|
BillingClassMark,
|
|
@@ -48,9 +48,9 @@ import {
|
|
|
48
48
|
PickerBackHeader,
|
|
49
49
|
PickerNavRow,
|
|
50
50
|
defaultModelPolicyPickerMessages
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-U6K24XQD.js";
|
|
52
52
|
import "./chunk-EKZH6IDG.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-23EJ676W.js";
|
|
54
54
|
import "./chunk-ATSTR5P3.js";
|
|
55
55
|
import "./chunk-LAKLF4PA.js";
|
|
56
56
|
import "./chunk-TK7G6XLT.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ export { createDefaultToolRegistry, createToolRegistry, defaultToolRegistry, raw
|
|
|
90
90
|
export type { CreateToolRegistryOptions, ToolRegistry, ToolRegistryEntry, ToolRenderer, ToolRendererProps, } from "./timeline";
|
|
91
91
|
export { ActivityDisclosure, ActivityRail, BodyNote, DisclosureDefaultsProvider, LightboxProvider, MediaEmpty, MediaSkeleton, PayloadBlock, ScreenshotFigure, TermBlock, Thumbnail, TurnSummary, BUILT_IN_TURN_SUMMARY_FACET_IDS, useLightbox, useLightboxOptional, } from "./timeline";
|
|
92
92
|
export type { ActivityDisclosureProps, ActivityRailProps, DisclosureChip, BuiltInTurnSummaryFacetId, TurnOutcome, TurnSummaryContext, TurnSummaryFacet, TurnSummaryFacetConfiguration, TurnSummaryFacetResult, TurnSummaryOptions, TurnSummaryProps, } from "./timeline";
|
|
93
|
-
export { applyPatchOps, controlCaret, execTruncated, isApplyPatch, isExecSessionLostBanner, looksBinary, parseExecBannerSessionId, parseToolArgs, redactSecrets, sandboxCommandExitCode, stripExecBanner, tailPeek, unwrapMcpOutput, v4aToGitFileDiff, } from "./timeline";
|
|
93
|
+
export { applyPatchOps, applyPatchOpsFromToolItem, controlCaret, execTruncated, isApplyPatch, isExecSessionLostBanner, looksBinary, parseExecBannerSessionId, parseFreeformApplyPatch, parseToolArgs, redactSecrets, sandboxCommandExitCode, stripExecBanner, tailPeek, unwrapMcpOutput, v4aToGitFileDiff, } from "./timeline";
|
|
94
94
|
export type { ApplyPatchOperation } from "./timeline";
|
|
95
95
|
export { argHint, defaultCommands, filterCommands, firstMissingRequiredArg, hasPermission, matchCommand, parseCommandLine, } from "./commands/registry";
|
|
96
96
|
export type { ParsedCommandLine } from "./commands/registry";
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
useSessionLineage,
|
|
53
53
|
useSessionMcpApprovalPolicy,
|
|
54
54
|
useTurnQueue
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-SRFUT2ZU.js";
|
|
56
56
|
import {
|
|
57
57
|
ActivityDisclosure,
|
|
58
58
|
ActivityRail,
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
TurnSummary,
|
|
83
83
|
answersFromDrafts,
|
|
84
84
|
applyPatchOps,
|
|
85
|
+
applyPatchOpsFromToolItem,
|
|
85
86
|
controlCaret,
|
|
86
87
|
copyTextToClipboard,
|
|
87
88
|
createDefaultToolRegistry,
|
|
@@ -94,6 +95,7 @@ import {
|
|
|
94
95
|
isExecSessionLostBanner,
|
|
95
96
|
looksBinary,
|
|
96
97
|
parseExecBannerSessionId,
|
|
98
|
+
parseFreeformApplyPatch,
|
|
97
99
|
parseToolArgs,
|
|
98
100
|
rawTypeOf,
|
|
99
101
|
redactSecrets,
|
|
@@ -107,7 +109,7 @@ import {
|
|
|
107
109
|
useLightboxOptional,
|
|
108
110
|
useThemeType,
|
|
109
111
|
v4aToGitFileDiff
|
|
110
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-YNYIAYXQ.js";
|
|
111
113
|
import "./chunk-YDNWMKXO.js";
|
|
112
114
|
import {
|
|
113
115
|
buildTimeline,
|
|
@@ -116,7 +118,7 @@ import {
|
|
|
116
118
|
groupTimeline,
|
|
117
119
|
sessionStatusFromEvents,
|
|
118
120
|
toolDisplayName
|
|
119
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-LWR4MXSS.js";
|
|
120
122
|
import {
|
|
121
123
|
Actions,
|
|
122
124
|
AttachButton,
|
|
@@ -169,14 +171,14 @@ import {
|
|
|
169
171
|
useSlashCommands,
|
|
170
172
|
useTranscription,
|
|
171
173
|
useVoiceInput
|
|
172
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-QQRM3DO3.js";
|
|
173
175
|
import {
|
|
174
176
|
FILE_ONLY_MESSAGE_TEXT,
|
|
175
177
|
composeSendInput,
|
|
176
178
|
shouldSteerOnKey,
|
|
177
179
|
shouldSubmitOnKey,
|
|
178
180
|
useComposer
|
|
179
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-HFO4ERGQ.js";
|
|
180
182
|
import {
|
|
181
183
|
useMutationRunner,
|
|
182
184
|
usePolledValue,
|
|
@@ -190,7 +192,7 @@ import {
|
|
|
190
192
|
PickerBackHeader,
|
|
191
193
|
PickerNavRow,
|
|
192
194
|
defaultModelPolicyPickerMessages
|
|
193
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-U6K24XQD.js";
|
|
194
196
|
import {
|
|
195
197
|
useOpenGeni,
|
|
196
198
|
useOpenGeniClient
|
|
@@ -212,7 +214,7 @@ import {
|
|
|
212
214
|
projectPickerRows,
|
|
213
215
|
runnableLatencyModesForModel,
|
|
214
216
|
sortPickerRows
|
|
215
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-23EJ676W.js";
|
|
216
218
|
import {
|
|
217
219
|
Tooltip,
|
|
218
220
|
TooltipContent,
|
|
@@ -3340,6 +3342,7 @@ function ApprovalSurface({
|
|
|
3340
3342
|
}
|
|
3341
3343
|
|
|
3342
3344
|
// src/components/chat-composer.tsx
|
|
3345
|
+
import { LayoutGroup, motion } from "motion/react";
|
|
3343
3346
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
3344
3347
|
function ChatComposer({
|
|
3345
3348
|
composer,
|
|
@@ -3356,6 +3359,8 @@ function ChatComposer({
|
|
|
3356
3359
|
actionsStart,
|
|
3357
3360
|
attachButtonClassName,
|
|
3358
3361
|
transcription,
|
|
3362
|
+
transcriptionClassName,
|
|
3363
|
+
transcriptionSuppressed = false,
|
|
3359
3364
|
header,
|
|
3360
3365
|
onPaste,
|
|
3361
3366
|
attachments,
|
|
@@ -3397,20 +3402,62 @@ function ChatComposer({
|
|
|
3397
3402
|
/* @__PURE__ */ jsx2(Attachments, {}),
|
|
3398
3403
|
header,
|
|
3399
3404
|
/* @__PURE__ */ jsx2(Input, { placeholder, autoFocus }),
|
|
3400
|
-
controller.confirmState ? /* @__PURE__ */ jsx2(Confirmation, {}) : /* @__PURE__ */
|
|
3401
|
-
hasControls ? /* @__PURE__ */ jsxs2(
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3405
|
+
controller.confirmState ? /* @__PURE__ */ jsx2(Confirmation, {}) : /* @__PURE__ */ jsx2(Footer, { className: stackActions ? "max-sm:flex-nowrap sm:flex-wrap" : void 0, children: /* @__PURE__ */ jsxs2(LayoutGroup, { id: "og-composer-footer", children: [
|
|
3406
|
+
hasControls ? /* @__PURE__ */ jsxs2(
|
|
3407
|
+
Controls,
|
|
3408
|
+
{
|
|
3409
|
+
className: stackActions ? "min-w-0 max-sm:flex-1 sm:w-auto" : void 0,
|
|
3410
|
+
children: [
|
|
3411
|
+
controlsLeading,
|
|
3412
|
+
/* @__PURE__ */ jsx2(AttachButton, { className: attachButtonClassName }),
|
|
3413
|
+
transcription ? /* @__PURE__ */ jsx2(
|
|
3414
|
+
ComposerTranscriptionControl,
|
|
3415
|
+
{
|
|
3416
|
+
...transcription,
|
|
3417
|
+
suppressed: transcriptionSuppressed,
|
|
3418
|
+
className: [transcription.className, transcriptionClassName].filter(Boolean).join(" ")
|
|
3419
|
+
}
|
|
3420
|
+
) : null,
|
|
3421
|
+
models ? /* @__PURE__ */ jsx2(
|
|
3422
|
+
motion.span,
|
|
3423
|
+
{
|
|
3424
|
+
layout: true,
|
|
3425
|
+
transition: { duration: 0.36, ease: [0.22, 1, 0.36, 1] },
|
|
3426
|
+
className: "inline-flex min-w-0",
|
|
3427
|
+
children: /* @__PURE__ */ jsx2(
|
|
3428
|
+
ModelPicker2,
|
|
3429
|
+
{
|
|
3430
|
+
models,
|
|
3431
|
+
value: selectedModel,
|
|
3432
|
+
onChange: onSelectModel
|
|
3433
|
+
}
|
|
3434
|
+
)
|
|
3435
|
+
}
|
|
3436
|
+
) : null,
|
|
3437
|
+
controlsStart ? /* @__PURE__ */ jsx2(
|
|
3438
|
+
motion.span,
|
|
3439
|
+
{
|
|
3440
|
+
layout: true,
|
|
3441
|
+
transition: { duration: 0.36, ease: [0.22, 1, 0.36, 1] },
|
|
3442
|
+
className: "inline-flex min-w-0 items-center gap-1.5",
|
|
3443
|
+
children: controlsStart
|
|
3444
|
+
}
|
|
3445
|
+
) : null
|
|
3446
|
+
]
|
|
3447
|
+
}
|
|
3448
|
+
) : /* @__PURE__ */ jsx2(Hint, { children: hint }),
|
|
3449
|
+
/* @__PURE__ */ jsxs2(
|
|
3450
|
+
Actions,
|
|
3451
|
+
{
|
|
3452
|
+
className: stackActions ? "max-sm:shrink-0 sm:w-auto sm:justify-end" : void 0,
|
|
3453
|
+
children: [
|
|
3454
|
+
actionsStart,
|
|
3455
|
+
/* @__PURE__ */ jsx2(PauseButton, {}),
|
|
3456
|
+
/* @__PURE__ */ jsx2(SendButton, {})
|
|
3457
|
+
]
|
|
3458
|
+
}
|
|
3459
|
+
)
|
|
3460
|
+
] }) })
|
|
3414
3461
|
] })
|
|
3415
3462
|
] }),
|
|
3416
3463
|
/* @__PURE__ */ jsx2(Help, {}),
|
|
@@ -8509,6 +8556,7 @@ export {
|
|
|
8509
8556
|
answersFromDrafts,
|
|
8510
8557
|
appendFinalTranscript,
|
|
8511
8558
|
applyPatchOps,
|
|
8559
|
+
applyPatchOpsFromToolItem,
|
|
8512
8560
|
approvalsFromRequiresAction,
|
|
8513
8561
|
argHint,
|
|
8514
8562
|
availabilityReasonLabel,
|
|
@@ -8572,6 +8620,7 @@ export {
|
|
|
8572
8620
|
matchCommand,
|
|
8573
8621
|
parseCommandLine,
|
|
8574
8622
|
parseExecBannerSessionId,
|
|
8623
|
+
parseFreeformApplyPatch,
|
|
8575
8624
|
parseToolArgs,
|
|
8576
8625
|
payerSummaryForModel,
|
|
8577
8626
|
planVoiceRecordingChunkCommit,
|