@opengeni/react 3.8.0-canary.0 → 4.0.1-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.
Files changed (111) hide show
  1. package/README.md +11 -24
  2. package/dist/artifacts.js +7 -7
  3. package/dist/{browser-viewer-SS46LUAC.js → browser-viewer-NTD6UIPR.js} +3 -3
  4. package/dist/{chunk-VEPNNDNG.js → chunk-24M4YBCL.js} +4 -4
  5. package/dist/chunk-5M6VTFJ5.js +171 -0
  6. package/dist/chunk-5M6VTFJ5.js.map +1 -0
  7. package/dist/{chunk-IOLVN74D.js → chunk-6J56T3MG.js} +15 -1
  8. package/dist/chunk-6J56T3MG.js.map +1 -0
  9. package/dist/{chunk-ELIYWBZR.js → chunk-BV5A4OTE.js} +4 -4
  10. package/dist/{chunk-3HIF5IFC.js → chunk-HO6X4FHG.js} +2597 -1030
  11. package/dist/chunk-HO6X4FHG.js.map +1 -0
  12. package/dist/{chunk-BXJOQFCD.js → chunk-HUMIRRYI.js} +84 -221
  13. package/dist/chunk-HUMIRRYI.js.map +1 -0
  14. package/dist/{chunk-ZFOFY5ST.js → chunk-NLTS7JHI.js} +16 -31
  15. package/dist/chunk-NLTS7JHI.js.map +1 -0
  16. package/dist/chunk-NOSYBS2D.js +208 -0
  17. package/dist/chunk-NOSYBS2D.js.map +1 -0
  18. package/dist/chunk-YBM6CQRU.js +292 -0
  19. package/dist/chunk-YBM6CQRU.js.map +1 -0
  20. package/dist/{chunk-BQGIXRKV.js → chunk-Z7WBDB4E.js} +416 -290
  21. package/dist/chunk-Z7WBDB4E.js.map +1 -0
  22. package/dist/chunk-ZYRGEKWS.js +216 -0
  23. package/dist/chunk-ZYRGEKWS.js.map +1 -0
  24. package/dist/components/composer.d.ts +4 -2
  25. package/dist/components/human-input-form.d.ts +3 -1
  26. package/dist/components/human-input-surface.d.ts +3 -2
  27. package/dist/components/message-timeline.d.ts +9 -2
  28. package/dist/components/session-conversation.d.ts +2 -0
  29. package/dist/components/timeline-annotation-chrome.d.ts +25 -0
  30. package/dist/components/timeline-annotation-layout.d.ts +42 -0
  31. package/dist/components/timeline-annotation-markers.d.ts +8 -0
  32. package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
  33. package/dist/components/timeline-annotation-shared.d.ts +31 -0
  34. package/dist/components/timeline-annotations-dialog.d.ts +1 -1
  35. package/dist/components/timeline-annotations.d.ts +8 -2
  36. package/dist/composer.js +3 -4
  37. package/dist/{computer-viewer-FWEZISW4.js → computer-viewer-7TEZC6Y2.js} +3 -3
  38. package/dist/hooks/use-codex-accounts.d.ts +11 -1
  39. package/dist/hooks/use-composer.d.ts +2 -0
  40. package/dist/hooks/use-session-events.d.ts +2 -2
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +50 -37
  43. package/dist/index.js.map +1 -1
  44. package/dist/interaction.js +3 -3
  45. package/dist/machines.js +1 -1
  46. package/dist/older-history.d.ts +3 -2
  47. package/dist/{platform-activity-row-BJHUHXAT.js → platform-activity-row-27LKAWZD.js} +2 -2
  48. package/dist/platform-activity-row-27LKAWZD.js.map +1 -0
  49. package/dist/{queue-surface-implementation-XL2A6PBM.js → queue-surface-implementation-LK3S4BIW.js} +5 -2
  50. package/dist/{queue-surface-implementation-XL2A6PBM.js.map → queue-surface-implementation-LK3S4BIW.js.map} +1 -1
  51. package/dist/realtime.js +3 -3
  52. package/dist/session-ui.js +11 -11
  53. package/dist/session.js +2 -2
  54. package/dist/timeline/types.d.ts +3 -0
  55. package/dist/timeline-annotation-markers-DRSTLEM6.js +165 -0
  56. package/dist/timeline-annotation-markers-DRSTLEM6.js.map +1 -0
  57. package/dist/timeline-annotation-selection-IHLUGVND.js +236 -0
  58. package/dist/timeline-annotation-selection-IHLUGVND.js.map +1 -0
  59. package/dist/timeline-annotations-dialog-6Q53N5FG.js +262 -0
  60. package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +1 -0
  61. package/package.json +2 -6
  62. package/src/components/chat-composer.tsx +5 -2
  63. package/src/components/composer.tsx +40 -5
  64. package/src/components/copy-button.tsx +1 -0
  65. package/src/components/human-input-form.tsx +185 -53
  66. package/src/components/human-input-surface.tsx +3 -0
  67. package/src/components/machines-dashboard.tsx +1 -16
  68. package/src/components/message-timeline.tsx +397 -302
  69. package/src/components/session-commands-panel.tsx +7 -1
  70. package/src/components/session-conversation.tsx +4 -1
  71. package/src/components/timeline-annotation-chrome.tsx +183 -0
  72. package/src/components/timeline-annotation-layout.ts +268 -0
  73. package/src/components/timeline-annotation-markers.tsx +185 -0
  74. package/src/components/timeline-annotation-reveal-context.ts +9 -0
  75. package/src/components/timeline-annotation-selection.tsx +99 -54
  76. package/src/components/timeline-annotation-shared.ts +245 -0
  77. package/src/components/timeline-annotations-dialog.tsx +172 -128
  78. package/src/components/timeline-annotations.tsx +178 -45
  79. package/src/hooks/use-codex-accounts.ts +32 -5
  80. package/src/hooks/use-composer.ts +17 -0
  81. package/src/hooks/use-session-events.ts +16 -277
  82. package/src/index.ts +0 -1
  83. package/src/older-history.ts +22 -4
  84. package/src/timeline/platform-activity-row.tsx +4 -1
  85. package/src/timeline/projection.ts +99 -9
  86. package/src/timeline/types.ts +3 -0
  87. package/styles/compiled.css +86 -22
  88. package/dist/chat.d.ts +0 -37
  89. package/dist/chat.js +0 -315
  90. package/dist/chat.js.map +0 -1
  91. package/dist/chunk-3HIF5IFC.js.map +0 -1
  92. package/dist/chunk-BQGIXRKV.js.map +0 -1
  93. package/dist/chunk-BXJOQFCD.js.map +0 -1
  94. package/dist/chunk-F2CFHN3Y.js +0 -1415
  95. package/dist/chunk-F2CFHN3Y.js.map +0 -1
  96. package/dist/chunk-HQV2I5HV.js +0 -124
  97. package/dist/chunk-HQV2I5HV.js.map +0 -1
  98. package/dist/chunk-IOLVN74D.js.map +0 -1
  99. package/dist/chunk-W3OUAH6M.js +0 -170
  100. package/dist/chunk-W3OUAH6M.js.map +0 -1
  101. package/dist/chunk-ZFOFY5ST.js.map +0 -1
  102. package/dist/platform-activity-row-BJHUHXAT.js.map +0 -1
  103. package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
  104. package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
  105. package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
  106. package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
  107. package/src/chat.tsx +0 -393
  108. /package/dist/{browser-viewer-SS46LUAC.js.map → browser-viewer-NTD6UIPR.js.map} +0 -0
  109. /package/dist/{chunk-VEPNNDNG.js.map → chunk-24M4YBCL.js.map} +0 -0
  110. /package/dist/{chunk-ELIYWBZR.js.map → chunk-BV5A4OTE.js.map} +0 -0
  111. /package/dist/{computer-viewer-FWEZISW4.js.map → computer-viewer-7TEZC6Y2.js.map} +0 -0
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  healthPulses,
29
29
  pointsFor,
30
30
  useMachines
31
- } from "./chunk-ZFOFY5ST.js";
31
+ } from "./chunk-NLTS7JHI.js";
32
32
  import {
33
33
  DesktopViewer,
34
34
  useDesktopStream,
@@ -51,9 +51,13 @@ import {
51
51
  BUILT_IN_TURN_SUMMARY_FACET_IDS,
52
52
  BodyNote,
53
53
  ChatComposer,
54
+ CopyButton,
55
+ CopyHoverFrame,
54
56
  DisclosureDefaultsProvider,
55
57
  GeneratedVideoPlayer,
58
+ HumanInputForm,
56
59
  HumanInputSurface,
60
+ Markdown,
57
61
  MediaEmpty,
58
62
  MediaSkeleton,
59
63
  MessageTimeline,
@@ -72,11 +76,13 @@ import {
72
76
  TimelineRow,
73
77
  TurnSummary,
74
78
  UserMessageBody,
79
+ answersFromDrafts,
75
80
  applyPatchOps,
76
81
  applyPatchOpsFromToolItem,
77
82
  controlCaret,
78
83
  createDefaultToolRegistry,
79
84
  createToolRegistry,
85
+ defaultHumanInputFormMessages,
80
86
  defaultToolRegistry,
81
87
  execTruncated,
82
88
  gitFileDiffToPatch,
@@ -86,8 +92,11 @@ import {
86
92
  parseExecBannerSessionId,
87
93
  parseFreeformApplyPatch,
88
94
  parseToolArgs,
95
+ prefersReducedMotion,
89
96
  rawTypeOf,
90
97
  sandboxCommandExitCode,
98
+ sandboxFileLocationFromHref,
99
+ sandboxFilePathFromHref,
91
100
  sessionChromeGoalPillExplanation,
92
101
  sessionChromeGoalPillLabel,
93
102
  sessionChromeGoalPillState,
@@ -99,11 +108,18 @@ import {
99
108
  useWorkspaceModelCatalog,
100
109
  userMessageLikelyNeedsDisclosure,
101
110
  v4aToGitFileDiff
102
- } from "./chunk-3HIF5IFC.js";
103
- import "./chunk-W3OUAH6M.js";
111
+ } from "./chunk-HO6X4FHG.js";
112
+ import "./chunk-YBM6CQRU.js";
113
+ import "./chunk-5M6VTFJ5.js";
114
+ import "./chunk-ZYRGEKWS.js";
115
+ import "./chunk-NOSYBS2D.js";
104
116
  import {
105
117
  OpenGeniProvider
106
118
  } from "./chunk-PAJU5KKL.js";
119
+ import {
120
+ copyTextToClipboard,
121
+ tableElementToTsv
122
+ } from "./chunk-JVYQRRC4.js";
107
123
  import {
108
124
  CommandPalette,
109
125
  ComposerTranscriptionControl,
@@ -112,6 +128,10 @@ import {
112
128
  LightboxProvider,
113
129
  ModelPicker,
114
130
  OPEN_WORKSTREAM_CONTROL_EVENT,
131
+ Tooltip,
132
+ TooltipContent,
133
+ TooltipProvider,
134
+ TooltipTrigger,
115
135
  VOICE_RECORDING_CLIENT_MAX_DURATION_SECONDS,
116
136
  VOICE_RECORDING_OWNER_HEARTBEAT_MILLISECONDS,
117
137
  VOICE_RECORDING_OWNER_STALE_MILLISECONDS,
@@ -139,7 +159,7 @@ import {
139
159
  useSlashCommands,
140
160
  useTranscription,
141
161
  useVoiceInput
142
- } from "./chunk-BQGIXRKV.js";
162
+ } from "./chunk-Z7WBDB4E.js";
143
163
  import {
144
164
  BillingClassMark,
145
165
  ModelPolicyPicker,
@@ -148,6 +168,10 @@ import {
148
168
  PickerNavRow,
149
169
  defaultModelPolicyPickerMessages
150
170
  } from "./chunk-R4KRSFGA.js";
171
+ import {
172
+ usePortalTokenSource,
173
+ usePortalTokenStyle
174
+ } from "./chunk-VZTQ73XT.js";
151
175
  import {
152
176
  approvalsFromRequiresAction,
153
177
  createEmbeddedSessionClient,
@@ -166,7 +190,6 @@ import {
166
190
  SESSION_EVENT_BROWSER_MAX_COUNT,
167
191
  SESSION_EVENT_BROWSER_PENDING_MAX_BYTES,
168
192
  SESSION_EVENT_BROWSER_PENDING_MAX_COUNT,
169
- SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES,
170
193
  boundBrowserSessionEventWindow,
171
194
  buildTimeline,
172
195
  createOlderHistoryLoadReceipt,
@@ -184,14 +207,14 @@ import {
184
207
  useSession,
185
208
  useSessionEvents,
186
209
  useTurnQueue
187
- } from "./chunk-BXJOQFCD.js";
210
+ } from "./chunk-HUMIRRYI.js";
188
211
  import {
189
212
  FILE_ONLY_MESSAGE_TEXT,
190
213
  composeSendInput,
191
214
  shouldSteerOnKey,
192
215
  shouldSubmitOnKey,
193
216
  useComposer
194
- } from "./chunk-IOLVN74D.js";
217
+ } from "./chunk-6J56T3MG.js";
195
218
  import {
196
219
  COMPOSER_PAYMENT_REQUIRED_MESSAGE,
197
220
  CREDIT_EXHAUSTION_MESSAGE,
@@ -216,31 +239,6 @@ import {
216
239
  useOpenGeni,
217
240
  useOpenGeniClient
218
241
  } from "./chunk-NEXLLTP4.js";
219
- import {
220
- CopyButton,
221
- CopyHoverFrame,
222
- HumanInputForm,
223
- Markdown,
224
- answersFromDrafts,
225
- defaultHumanInputFormMessages,
226
- prefersReducedMotion,
227
- sandboxFileLocationFromHref,
228
- sandboxFilePathFromHref
229
- } from "./chunk-F2CFHN3Y.js";
230
- import {
231
- copyTextToClipboard,
232
- tableElementToTsv
233
- } from "./chunk-JVYQRRC4.js";
234
- import {
235
- Tooltip,
236
- TooltipContent,
237
- TooltipProvider,
238
- TooltipTrigger
239
- } from "./chunk-HQV2I5HV.js";
240
- import {
241
- usePortalTokenSource,
242
- usePortalTokenStyle
243
- } from "./chunk-VZTQ73XT.js";
244
242
  import {
245
243
  advancedSourceSummary,
246
244
  availabilityReasonLabel,
@@ -8328,11 +8326,11 @@ import {
8328
8326
  } from "lucide-react";
8329
8327
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
8330
8328
  var LazyBrowserViewer = lazy2(async () => {
8331
- const { BrowserViewer } = await import("./browser-viewer-SS46LUAC.js");
8329
+ const { BrowserViewer } = await import("./browser-viewer-NTD6UIPR.js");
8332
8330
  return { default: BrowserViewer };
8333
8331
  });
8334
8332
  var LazyComputerViewer = lazy2(async () => {
8335
- const { ComputerViewer } = await import("./computer-viewer-FWEZISW4.js");
8333
+ const { ComputerViewer } = await import("./computer-viewer-7TEZC6Y2.js");
8336
8334
  return { default: ComputerViewer };
8337
8335
  });
8338
8336
  var WORKBENCH_TAB_CHANGES = "changes";
@@ -9274,7 +9272,16 @@ function CenteredState({
9274
9272
  // src/hooks/use-codex-accounts.ts
9275
9273
  import { useCallback as useCallback25, useState as useState18 } from "react";
9276
9274
  function isCodexAccountEvent(event) {
9277
- return event.type === "codex.account.switched";
9275
+ return [
9276
+ "codex.account.switched",
9277
+ "codex.account.selection.changed",
9278
+ "codex.capacity.waiting",
9279
+ "codex.capacity.resumed",
9280
+ "codex.capacity.superseded",
9281
+ "turn.completed",
9282
+ "turn.failed",
9283
+ "turn.cancelled"
9284
+ ].includes(event.type);
9278
9285
  }
9279
9286
  var EMPTY_SETTINGS = {
9280
9287
  rotationEnabled: false,
@@ -9282,6 +9289,7 @@ var EMPTY_SETTINGS = {
9282
9289
  activeCredentialId: null
9283
9290
  };
9284
9291
  var EMPTY_STATE = {
9292
+ currentSelection: null,
9285
9293
  accounts: [],
9286
9294
  activeAccountId: null,
9287
9295
  settings: EMPTY_SETTINGS,
@@ -9298,6 +9306,7 @@ function useCodexAccounts(options = {}) {
9298
9306
  const sessionP = sessionId && codexClient.getSession ? codexClient.getSession(workspaceId, sessionId).catch(() => null) : Promise.resolve(null);
9299
9307
  const [acc, session] = await Promise.all([accountsP, sessionP]);
9300
9308
  return {
9309
+ currentSelection: session?.codexCurrentSelection ?? null,
9301
9310
  accounts: acc.accounts,
9302
9311
  activeAccountId: acc.activeAccountId,
9303
9312
  settings: acc.settings,
@@ -9316,6 +9325,7 @@ function useCodexAccounts(options = {}) {
9316
9325
  const { run: runMutation, mutating: pinning, mutationError } = useMutationRunner();
9317
9326
  const { run: runUsageMutation, mutating: refreshingUsage } = useMutationRunner();
9318
9327
  const [pinningTarget, setPinningTarget] = useState18(null);
9328
+ const [switchReceipt, setSwitchReceipt] = useState18(null);
9319
9329
  useSessionEventTrigger(
9320
9330
  client,
9321
9331
  workspaceId,
@@ -9333,8 +9343,10 @@ function useCodexAccounts(options = {}) {
9333
9343
  return false;
9334
9344
  }
9335
9345
  setPinningTarget(target);
9346
+ setSwitchReceipt(null);
9336
9347
  const result = await runMutation(async () => {
9337
- await codexClient.pinSessionCodexAccount(workspaceId, sessionId, target);
9348
+ const receipt = await codexClient.pinSessionCodexAccount(workspaceId, sessionId, target);
9349
+ setSwitchReceipt({ sessionId, appliedTo: receipt.appliedTo ?? "next_turn" });
9338
9350
  return true;
9339
9351
  });
9340
9352
  setPinningTarget(null);
@@ -9357,6 +9369,8 @@ function useCodexAccounts(options = {}) {
9357
9369
  const data = loadedData ?? EMPTY_STATE;
9358
9370
  const effectiveAccountId = data.pinnedAccountId ?? data.activeAccountId;
9359
9371
  return {
9372
+ currentSelection: data.currentSelection,
9373
+ switchAppliedTo: switchReceipt?.sessionId === sessionId ? switchReceipt?.appliedTo ?? null : null,
9360
9374
  accounts: data.accounts,
9361
9375
  activeAccountId: data.activeAccountId,
9362
9376
  pinnedAccountId: data.pinnedAccountId,
@@ -9492,7 +9506,6 @@ export {
9492
9506
  SESSION_EVENT_BROWSER_MAX_COUNT,
9493
9507
  SESSION_EVENT_BROWSER_PENDING_MAX_BYTES,
9494
9508
  SESSION_EVENT_BROWSER_PENDING_MAX_COUNT,
9495
- SESSION_EVENT_BROWSER_SINGLE_EVENT_MAX_BYTES,
9496
9509
  SESSION_STATUS_META,
9497
9510
  SandboxFiles,
9498
9511
  SandboxTerminal,