@opengeni/react 0.37.0 → 0.40.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 +88 -2
- package/dist/{chunk-7CJOAW3V.js → chunk-EB67J347.js} +1 -135
- package/dist/chunk-EB67J347.js.map +1 -0
- package/dist/chunk-EKZH6IDG.js +141 -0
- package/dist/chunk-EKZH6IDG.js.map +1 -0
- package/dist/{chunk-FSPDND3P.js → chunk-JALF5FI3.js} +8 -6
- package/dist/{chunk-FSPDND3P.js.map → chunk-JALF5FI3.js.map} +1 -1
- package/dist/{chunk-UCZPNXV3.js → chunk-KR2SK5GJ.js} +1292 -711
- package/dist/chunk-KR2SK5GJ.js.map +1 -0
- package/dist/{chunk-IP22SLO6.js → chunk-OMCFRWHL.js} +28 -441
- package/dist/chunk-OMCFRWHL.js.map +1 -0
- package/dist/{chunk-HJ4OQVGW.js → chunk-Q2NCKWTK.js} +10 -5
- package/dist/chunk-Q2NCKWTK.js.map +1 -0
- package/dist/{chunk-ALA3UGWB.js → chunk-SXIQK54Z.js} +8 -6
- package/dist/{chunk-ALA3UGWB.js.map → chunk-SXIQK54Z.js.map} +1 -1
- package/dist/chunk-WZT5G5OR.js +433 -0
- package/dist/chunk-WZT5G5OR.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/components/chat-composer.d.ts +5 -1
- package/dist/components/human-input-form.d.ts +16 -6
- package/dist/components/human-input-surface.d.ts +19 -0
- package/dist/components/machine-input-display.d.ts +12 -0
- package/dist/components/message-timeline.d.ts +6 -1
- package/dist/components/session-chrome.d.ts +1 -0
- package/dist/components/tip-follow.d.ts +30 -0
- package/dist/composer.js +14 -11
- package/dist/hooks/use-composer.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2246 -2236
- package/dist/index.js.map +1 -1
- package/dist/machines.js +4 -3
- package/dist/realtime/dropdown-menu.d.ts +16 -0
- package/dist/realtime/realtime-control.d.ts +126 -0
- package/dist/realtime.d.ts +11 -0
- package/dist/realtime.js +1023 -0
- package/dist/realtime.js.map +1 -0
- package/dist/session-context.d.ts +7 -1
- package/dist/session-ui.d.ts +2 -0
- package/dist/session-ui.js +5 -3
- package/dist/session.js +4 -3
- package/dist/timeline/compute-label.d.ts +2 -0
- package/dist/timeline/index.d.ts +1 -0
- package/package.json +7 -2
- package/src/client.ts +13 -0
- package/src/components/chat-composer.tsx +11 -2
- package/src/components/composer-transcription-control.tsx +2 -2
- package/src/components/composer.tsx +14 -5
- package/src/components/human-input-form.tsx +506 -186
- package/src/components/human-input-surface.tsx +80 -0
- package/src/components/machine-input-display.ts +83 -0
- package/src/components/message-timeline.tsx +348 -308
- package/src/components/model-policy-picker.tsx +8 -3
- package/src/components/sandbox-files.tsx +1 -1
- package/src/components/session-chrome.tsx +3 -1
- package/src/components/tip-follow.ts +127 -6
- package/src/hooks/use-composer.ts +16 -13
- package/src/index.ts +4 -0
- package/src/realtime/dropdown-menu.tsx +123 -0
- package/src/realtime/realtime-control.tsx +1178 -0
- package/src/realtime.ts +27 -0
- package/src/session-context.ts +16 -0
- package/src/session-ui.ts +2 -0
- package/src/timeline/compute-label.tsx +18 -0
- package/src/timeline/index.ts +3 -0
- package/src/timeline/tool-renderers.tsx +232 -43
- package/styles/index.css +61 -0
- package/styles/tokens.css +2 -0
- package/dist/chunk-7CJOAW3V.js.map +0 -1
- package/dist/chunk-HJ4OQVGW.js.map +0 -1
- package/dist/chunk-IP22SLO6.js.map +0 -1
- package/dist/chunk-UCZPNXV3.js.map +0 -1
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* | `--og-session-chrome-chip-pad-x` / `--og-session-chrome-chip-gap` | Chip padding / rail gap |
|
|
19
19
|
* | `--og-session-chrome-rail-pad` | Outer rail inset |
|
|
20
20
|
* | `--og-session-chrome-panel-pad-x` / `-y` | Expanded panel padding |
|
|
21
|
+
* | `--og-session-chrome-panel-max-height` | Cap for expanded body (scrolls inside) |
|
|
21
22
|
* | `--og-session-chrome-duration` / `--og-session-chrome-ease` | Expand + pill motion |
|
|
22
23
|
* | `--og-session-chrome-crossfade-duration` | Segment content opacity crossfade |
|
|
23
24
|
* | `--og-session-chrome-row-hover` | Inbox / queue row hover wash |
|
|
@@ -56,6 +56,13 @@ export declare const TIP_FOLLOW_VELOCITY_ARM_DEBT_PX = 72;
|
|
|
56
56
|
export declare const TIP_FOLLOW_VELOCITY_DECAY_MS: number;
|
|
57
57
|
/** Reader-up pixels above clamp budget that count as leaving the tip. */
|
|
58
58
|
export declare const TIP_FOLLOW_READER_UP_EPS_PX = 2;
|
|
59
|
+
/**
|
|
60
|
+
* Browsers snap scrollTop writes to device pixels (whole px at dpr 1). A DOM
|
|
61
|
+
* position within this window of the camera's own fractional position is that
|
|
62
|
+
* quantization echo, not external motion — keep the fraction so sub-pixel
|
|
63
|
+
* settle steps accumulate. Anything larger (clamp, user, glue) re-bases.
|
|
64
|
+
*/
|
|
65
|
+
export declare const TIP_FOLLOW_QUANTIZE_WINDOW_PX = 1;
|
|
59
66
|
/** @internal */ export declare function setScrollEndSupportForTests(value: boolean | null): void;
|
|
60
67
|
/** True when the engine exposes element `scrollend` (prefer over rAF leave). */
|
|
61
68
|
export declare function supportsScrollEndEvent(): boolean;
|
|
@@ -74,11 +81,20 @@ export type TipFollowState = {
|
|
|
74
81
|
hotUntil: number;
|
|
75
82
|
lastTs: number;
|
|
76
83
|
lastHeight: number;
|
|
84
|
+
/** Last observed scroller clientHeight — viewport shrink heats like tip growth. */
|
|
85
|
+
lastClientHeight: number;
|
|
77
86
|
lastGrowthAt: number;
|
|
78
87
|
/** EMA of recent height growth (px/s); nudges τ / ceiling under bursts. */
|
|
79
88
|
growthVelocity: number;
|
|
80
89
|
/** Camera velocity toward tip (px/s). Smoothed — never jumps with debt. */
|
|
81
90
|
scrollVelocity: number;
|
|
91
|
+
/**
|
|
92
|
+
* Fractional camera position. The DOM quantizes scrollTop to device pixels,
|
|
93
|
+
* so settle steps under 1px would be discarded every frame if the camera
|
|
94
|
+
* re-based on the DOM — it then parks 20-50px short of the tip forever.
|
|
95
|
+
* `null` = no fraction in flight; adopt the DOM position.
|
|
96
|
+
*/
|
|
97
|
+
cameraTop: number | null;
|
|
82
98
|
};
|
|
83
99
|
export type TipFollowStepInput = {
|
|
84
100
|
scrollTop: number;
|
|
@@ -100,6 +116,14 @@ export declare function tipFollowCancel(state: TipFollowState): TipFollowState;
|
|
|
100
116
|
* lines do not tear down the follow loop between appends.
|
|
101
117
|
*/
|
|
102
118
|
export declare function tipFollowNoteGrowth(state: TipFollowState, height: number, now: number): TipFollowState;
|
|
119
|
+
/**
|
|
120
|
+
* Record scroller viewport height. A shrink (composer / SessionChrome /
|
|
121
|
+
* window) raises tip debt (`scrollHeight - clientHeight`) without growing
|
|
122
|
+
* content — the same debt content-growth would create. Heat the camera so
|
|
123
|
+
* catch-up does not fall into cold soft-settle (~42px/s) and leave the tip
|
|
124
|
+
* parked under the chrome.
|
|
125
|
+
*/
|
|
126
|
+
export declare function tipFollowNoteViewportShrink(state: TipFollowState, clientHeight: number, now: number): TipFollowState;
|
|
103
127
|
/**
|
|
104
128
|
* Adaptive τ: small debt → calm; large debt / armed velocity → catch-up.
|
|
105
129
|
* While hot, floor urgency so live streams are not stuck on calm τ.
|
|
@@ -136,6 +160,12 @@ export declare function tipFollowClearSoftRise(el: HTMLElement): void;
|
|
|
136
160
|
* on screen: scrollTop -= Δh, clamped to the new max.
|
|
137
161
|
*/
|
|
138
162
|
export declare function tipFollowCompensateShrink(scrollTop: number, previousHeight: number, nextHeight: number, clientHeight: number, epsPx?: number): number;
|
|
163
|
+
/**
|
|
164
|
+
* Viewport shrank (SessionChrome / composer / window). maxScroll rises by ≈Δc;
|
|
165
|
+
* keep the same tip distance: scrollTop += Δc. Without this, pinned follow only
|
|
166
|
+
* sees new tip debt and soft-settles under the chrome.
|
|
167
|
+
*/
|
|
168
|
+
export declare function tipFollowCompensateViewportShrink(scrollTop: number, previousClientHeight: number, nextClientHeight: number, scrollHeight: number, epsPx?: number): number;
|
|
139
169
|
/**
|
|
140
170
|
* One camera step. Shell schedules the next rAF while `result.state.running`.
|
|
141
171
|
*/
|
package/dist/composer.js
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
Actions,
|
|
3
3
|
AttachButton,
|
|
4
4
|
Attachments,
|
|
5
|
-
BillingClassMark,
|
|
6
5
|
CommandPalette2 as CommandPalette,
|
|
7
6
|
ComposerTranscriptionControl,
|
|
8
7
|
Confirmation,
|
|
@@ -13,31 +12,35 @@ import {
|
|
|
13
12
|
Hint,
|
|
14
13
|
Input,
|
|
15
14
|
ModelPicker2 as ModelPicker,
|
|
16
|
-
ModelPolicyPicker,
|
|
17
|
-
ModelPolicyPickerMenu,
|
|
18
15
|
OPEN_WORKSTREAM_CONTROL_EVENT,
|
|
19
16
|
PauseButton,
|
|
20
17
|
PausedState,
|
|
21
|
-
PickerAnimatedPage,
|
|
22
|
-
PickerBackHeader,
|
|
23
|
-
PickerNavRow,
|
|
24
18
|
RestoredResources,
|
|
25
19
|
Root,
|
|
26
20
|
SendButton,
|
|
27
21
|
Status,
|
|
28
22
|
Surface,
|
|
29
23
|
defaultChatComposerMessages,
|
|
30
|
-
defaultModelPolicyPickerMessages,
|
|
31
24
|
useChatComposer,
|
|
32
25
|
useChatComposerController,
|
|
33
26
|
useVoiceInput
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-OMCFRWHL.js";
|
|
28
|
+
import "./chunk-Q2NCKWTK.js";
|
|
29
|
+
import "./chunk-EB67J347.js";
|
|
30
|
+
import {
|
|
31
|
+
BillingClassMark,
|
|
32
|
+
ModelPolicyPicker,
|
|
33
|
+
ModelPolicyPickerMenu,
|
|
34
|
+
PickerAnimatedPage,
|
|
35
|
+
PickerBackHeader,
|
|
36
|
+
PickerNavRow,
|
|
37
|
+
defaultModelPolicyPickerMessages
|
|
38
|
+
} from "./chunk-WZT5G5OR.js";
|
|
39
|
+
import "./chunk-EKZH6IDG.js";
|
|
37
40
|
import "./chunk-SJKT4TKW.js";
|
|
38
41
|
import "./chunk-ATSTR5P3.js";
|
|
39
|
-
import "./chunk-TK7G6XLT.js";
|
|
40
42
|
import "./chunk-LAKLF4PA.js";
|
|
43
|
+
import "./chunk-TK7G6XLT.js";
|
|
41
44
|
export {
|
|
42
45
|
Actions,
|
|
43
46
|
AttachButton,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComposerDraft, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
|
|
2
2
|
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
3
|
import { type SessionEventFeedOptions } from "./internal";
|
|
4
4
|
export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId">;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ export { isHumanInputEvent, useHumanInputRequests } from "./hooks/use-human-inpu
|
|
|
80
80
|
export type { UseHumanInputRequestsOptions, UseHumanInputRequestsResult, } from "./hooks/use-human-input";
|
|
81
81
|
export { HumanInputForm, answersFromDrafts, defaultHumanInputFormMessages, } from "./components/human-input-form";
|
|
82
82
|
export type { HumanInputAnswerDraft, HumanInputFormMessages, HumanInputFormProps, } from "./components/human-input-form";
|
|
83
|
+
export { HumanInputSurface } from "./components/human-input-surface";
|
|
84
|
+
export type { HumanInputSurfaceProps } from "./components/human-input-surface";
|
|
83
85
|
export { buildTimeline, creditExhaustedFromEvents, extractSessionRef, groupTimeline, sessionStatusFromEvents, toolDisplayName, } from "./timeline";
|
|
84
86
|
export type { ActivityItem, AgentMessageItem, AuthNeededItem, ContextCompactionItem, GoalItem, MachineInputBatchItem, MachineInputMember, NoticeItem, ReasoningItem, SandboxItem, SessionStatusItem, TimelineGroup, TimelineItem, TurnEndItem, ToolCallItem, UserMessageItem, WorkerItem, } from "./timeline";
|
|
85
87
|
export { createDefaultToolRegistry, createToolRegistry, defaultToolRegistry, rawTypeOf, } from "./timeline";
|
|
@@ -121,6 +123,8 @@ export { SandboxTerminal } from "./components/sandbox-terminal";
|
|
|
121
123
|
export type { SandboxTerminalProps, XtermTheme } from "./components/sandbox-terminal";
|
|
122
124
|
export { FileBrowser } from "./components/file-browser";
|
|
123
125
|
export type { FileBrowserProps } from "./components/file-browser";
|
|
126
|
+
export { WorkbenchChanges } from "./components/workbench-changes";
|
|
127
|
+
export type { WorkbenchChangesProps } from "./components/workbench-changes";
|
|
124
128
|
export { DiffView } from "./components/diff-view";
|
|
125
129
|
export type { DiffViewProps, DiffTheme } from "./components/diff-view";
|
|
126
130
|
export { PierreDiff } from "./components/pierre-diff";
|