@opengeni/react 1.2.1-canary.37222965366001 → 1.4.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 +52 -1
- package/dist/artifacts.js +2 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/{chunk-ERGYJIBB.js → chunk-AWZLIMKX.js} +2 -2
- package/dist/{chunk-ERGYJIBB.js.map → chunk-AWZLIMKX.js.map} +1 -1
- package/dist/{chunk-FZCP527Y.js → chunk-CJUO7J5Z.js} +2 -2
- package/dist/{chunk-742CZ3L3.js → chunk-H5X55XH7.js} +16 -200
- package/dist/chunk-H5X55XH7.js.map +1 -0
- package/dist/{chunk-4OTO7KBK.js → chunk-LJ2UTJJE.js} +2737 -1580
- package/dist/chunk-LJ2UTJJE.js.map +1 -0
- package/dist/{chunk-CY7WK5FD.js → chunk-LN6TCXD3.js} +22 -1
- package/dist/chunk-LN6TCXD3.js.map +1 -0
- package/dist/{chunk-TMYGL6X5.js → chunk-MBMPHOMA.js} +71 -6
- package/dist/chunk-MBMPHOMA.js.map +1 -0
- package/dist/{chunk-RC6BZ44Q.js → chunk-OA6HFRQP.js} +2 -2
- package/dist/{chunk-X34BSY2R.js → chunk-WZMYFJD3.js} +242 -63
- package/dist/chunk-WZMYFJD3.js.map +1 -0
- package/dist/components/approval-surface.d.ts +11 -13
- package/dist/components/composer-transcription-control.d.ts +3 -0
- package/dist/components/open-geni-chat.d.ts +26 -7
- package/dist/components/session-conversation.d.ts +26 -3
- package/dist/components/session-list.d.ts +4 -1
- package/dist/components/session-proxy-scope.d.ts +16 -2
- package/dist/components/tool-action-review.d.ts +47 -0
- package/dist/components/tool-review-history.d.ts +25 -0
- package/dist/composer.js +1 -1
- package/dist/connect.js +1 -1
- package/dist/hooks/use-client-config-flags.d.ts +37 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +27 -11
- package/dist/index.js.map +1 -1
- package/dist/{latest-question-YTOBHCWR.js → latest-question-GPYM2JNU.js} +3 -3
- package/dist/realtime/realtime-control.d.ts +2 -0
- package/dist/realtime.js +25 -4
- package/dist/realtime.js.map +1 -1
- package/dist/session-capability-policy.d.ts +20 -1
- package/dist/session-ui.d.ts +4 -1
- package/dist/session-ui.js +12 -6
- package/dist/session-ui.js.map +1 -1
- package/dist/session.js +6 -6
- package/dist/timeline/index.d.ts +2 -0
- package/dist/timeline/retained-loaders.d.ts +27 -0
- package/package.json +3 -3
- package/src/components/approval-surface.tsx +368 -239
- package/src/components/artifacts/session-artifact-viewer.tsx +4 -2
- package/src/components/composer-transcription-control.tsx +14 -0
- package/src/components/composer.tsx +1 -0
- package/src/components/open-geni-chat.tsx +245 -72
- package/src/components/session-conversation.tsx +243 -58
- package/src/components/session-list.tsx +9 -2
- package/src/components/session-proxy-scope.tsx +47 -7
- package/src/components/tool-action-review.tsx +649 -0
- package/src/components/tool-review-history.tsx +88 -0
- package/src/hooks/use-client-config-flags.ts +102 -0
- package/src/hooks/use-session-events.ts +19 -16
- package/src/hooks/use-transcription.ts +6 -0
- package/src/hooks/use-voice-input.ts +6 -0
- package/src/index.ts +18 -1
- package/src/realtime/realtime-control.tsx +28 -1
- package/src/session-capability-policy.ts +119 -6
- package/src/session-ui.ts +9 -1
- package/src/timeline/index.ts +10 -0
- package/src/timeline/retained-loaders.ts +86 -0
- package/src/timeline/tool-display-name.ts +5 -1
- package/src/timeline/tool-renderers.tsx +148 -8
- package/styles/compiled.css +79 -15
- package/styles/tokens.css +1 -1
- package/dist/chunk-4OTO7KBK.js.map +0 -1
- package/dist/chunk-742CZ3L3.js.map +0 -1
- package/dist/chunk-CY7WK5FD.js.map +0 -1
- package/dist/chunk-TMYGL6X5.js.map +0 -1
- package/dist/chunk-X34BSY2R.js.map +0 -1
- /package/dist/{chunk-FZCP527Y.js.map → chunk-CJUO7J5Z.js.map} +0 -0
- /package/dist/{chunk-RC6BZ44Q.js.map → chunk-OA6HFRQP.js.map} +0 -0
- /package/dist/{latest-question-YTOBHCWR.js.map → latest-question-GPYM2JNU.js.map} +0 -0
|
@@ -1229,6 +1229,7 @@ var Surface = forwardRef(function ComposerSurface({ className, children, ...prop
|
|
|
1229
1229
|
return /* @__PURE__ */ jsxs3(
|
|
1230
1230
|
"div",
|
|
1231
1231
|
{
|
|
1232
|
+
"data-og-composer-surface": "",
|
|
1232
1233
|
...props,
|
|
1233
1234
|
ref,
|
|
1234
1235
|
onDragOver: controller.attachments ? controller.handleDragOver : void 0,
|
|
@@ -2850,6 +2851,12 @@ function classifyStartError(error) {
|
|
|
2850
2851
|
}
|
|
2851
2852
|
function normalizeTranscriptionErrorCode(code) {
|
|
2852
2853
|
switch (code) {
|
|
2854
|
+
case "insufficient_credits":
|
|
2855
|
+
case "allowance_exhausted":
|
|
2856
|
+
case "monthly_model_cost_limit":
|
|
2857
|
+
case "unavailable":
|
|
2858
|
+
case "too_large":
|
|
2859
|
+
case "invalid_audio":
|
|
2853
2860
|
case "permission_denied":
|
|
2854
2861
|
case "not_supported":
|
|
2855
2862
|
case "network":
|
|
@@ -4295,6 +4302,10 @@ function errorCode(error) {
|
|
|
4295
4302
|
return "unknown";
|
|
4296
4303
|
}
|
|
4297
4304
|
function isRetryableVoiceInputError(error) {
|
|
4305
|
+
if (["insufficient_credits", "allowance_exhausted", "monthly_model_cost_limit"].includes(
|
|
4306
|
+
errorCode(error)
|
|
4307
|
+
))
|
|
4308
|
+
return false;
|
|
4298
4309
|
if (error instanceof OpenGeniApiError) {
|
|
4299
4310
|
return error.retryable && error.status !== 409;
|
|
4300
4311
|
}
|
|
@@ -4344,6 +4355,9 @@ var defaultMessages = {
|
|
|
4344
4355
|
errorPermissionDenied: "Microphone permission was denied. Your draft was not changed.",
|
|
4345
4356
|
errorNotSupported: "Voice input is not supported on this device.",
|
|
4346
4357
|
errorUnavailable: "Voice input is not configured.",
|
|
4358
|
+
errorInsufficientCredits: "Voice input needs Opengeni credits. Add credits, then retry your saved recording.",
|
|
4359
|
+
errorAllowanceExhausted: "Your usage limit was reached. Your recording is saved for later.",
|
|
4360
|
+
errorPolicyBlocked: "Voice input isn't allowed for this account or workspace.",
|
|
4347
4361
|
errorTooLarge: "Recording is too large. Try a shorter message.",
|
|
4348
4362
|
errorInvalidAudio: "The recording could not be read. Try again.",
|
|
4349
4363
|
errorStorageUnavailable: "Voice input stopped because audio could not be saved safely.",
|
|
@@ -4672,6 +4686,13 @@ function restingLevels(count) {
|
|
|
4672
4686
|
}
|
|
4673
4687
|
function transcriptionErrorMessage(code, messages) {
|
|
4674
4688
|
switch (code) {
|
|
4689
|
+
case "insufficient_credits":
|
|
4690
|
+
return messages.errorInsufficientCredits;
|
|
4691
|
+
case "allowance_exhausted":
|
|
4692
|
+
case "monthly_model_cost_limit":
|
|
4693
|
+
return messages.errorAllowanceExhausted;
|
|
4694
|
+
case "policy_blocked":
|
|
4695
|
+
return messages.errorPolicyBlocked;
|
|
4675
4696
|
case "permission_denied":
|
|
4676
4697
|
return messages.errorPermissionDenied;
|
|
4677
4698
|
case "not_supported":
|
|
@@ -4752,4 +4773,4 @@ export {
|
|
|
4752
4773
|
useVoiceInput,
|
|
4753
4774
|
ComposerTranscriptionControl
|
|
4754
4775
|
};
|
|
4755
|
-
//# sourceMappingURL=chunk-
|
|
4776
|
+
//# sourceMappingURL=chunk-LN6TCXD3.js.map
|