@arbidocs/blocks 0.5.125 → 0.5.127
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 +19 -0
- package/dist/{ClippingMediaViewer-ZFEX5A3U.cjs → ClippingMediaViewer-47BAXNLO.cjs} +10 -11
- package/dist/ClippingMediaViewer-47BAXNLO.cjs.map +1 -0
- package/dist/{ClippingPdfViewer-3LRTEPHV.cjs → ClippingPdfViewer-D5BYHEAH.cjs} +16 -14
- package/dist/ClippingPdfViewer-D5BYHEAH.cjs.map +1 -0
- package/dist/ConnectedCallDock-XJOYVVAH.cjs +6 -6
- package/dist/ConnectedCallRoom-CUDYAPQK.cjs +6 -6
- package/dist/{ConnectedNativeDocxComparison-7QQ55JIO.cjs → ConnectedNativeDocxComparison-JUF2TI2P.cjs} +12 -12
- package/dist/{ConnectedNativeDocxComparison-7QQ55JIO.cjs.map → ConnectedNativeDocxComparison-JUF2TI2P.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-L32JPRFI.cjs → ConnectedPresentation-SI3L77J4.cjs} +35 -36
- package/dist/ConnectedPresentation-SI3L77J4.cjs.map +1 -0
- package/dist/{ConnectedProductionSetDialog-4EAY6KAZ.cjs → ConnectedProductionSetDialog-LHB4VQWC.cjs} +3 -3
- package/dist/{ConnectedProductionSetDialog-4EAY6KAZ.cjs.map → ConnectedProductionSetDialog-LHB4VQWC.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-P7GGNUTO.cjs → ConnectedSlidesTab-E76OVY34.cjs} +38 -44
- package/dist/ConnectedSlidesTab-E76OVY34.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-7NJ3N52V.cjs → ConnectedStreamedWordArtifact-Q64DRRQD.cjs} +12 -12
- package/dist/{ConnectedStreamedWordArtifact-7NJ3N52V.cjs.map → ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-BFPOFQXI.cjs → DocumentReviewCard-M53XFLI2.cjs} +16 -16
- package/dist/{DocumentReviewCard-BFPOFQXI.cjs.map → DocumentReviewCard-M53XFLI2.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-MHUVEZ7M.cjs → FilesViewerDialog-V6FSRQTP.cjs} +33 -34
- package/dist/FilesViewerDialog-V6FSRQTP.cjs.map +1 -0
- package/dist/{NativeDocxEditor-SIRYPMBN.cjs → NativeDocxEditor-2PTEK6ND.cjs} +6 -6
- package/dist/{NativeDocxEditor-SIRYPMBN.cjs.map → NativeDocxEditor-2PTEK6ND.cjs.map} +1 -1
- package/dist/{SpotlightStrip-ED22UYTM.cjs → SpotlightStrip-QQ2WUI32.cjs} +28 -29
- package/dist/SpotlightStrip-QQ2WUI32.cjs.map +1 -0
- package/dist/{WorkspaceTableView-MIFYXV3G.cjs → WorkspaceTableView-3XYAV4BV.cjs} +8 -8
- package/dist/{WorkspaceTableView-MIFYXV3G.cjs.map → WorkspaceTableView-3XYAV4BV.cjs.map} +1 -1
- package/dist/agents/index.cjs +215 -215
- package/dist/ai-IEIR7SC2.cjs +3 -3
- package/dist/auth/index.cjs +1 -1
- package/dist/calls/index.cjs +2 -2
- package/dist/chat/index.cjs +6 -6
- package/dist/{chunk-GAMRVB3I.cjs → chunk-23I5EUZA.cjs} +65 -10
- package/dist/chunk-23I5EUZA.cjs.map +1 -0
- package/dist/{chunk-ZZZITHGK.cjs → chunk-26SFI2BH.cjs} +16 -3
- package/dist/chunk-26SFI2BH.cjs.map +1 -0
- package/dist/{chunk-OGK377NL.cjs → chunk-2SU37RZA.cjs} +409 -42
- package/dist/chunk-2SU37RZA.cjs.map +1 -0
- package/dist/{chunk-CQ2RJYE2.cjs → chunk-3IH55CDE.cjs} +3 -3
- package/dist/{chunk-CQ2RJYE2.cjs.map → chunk-3IH55CDE.cjs.map} +1 -1
- package/dist/{chunk-AS6QZETU.cjs → chunk-5QERK4PK.cjs} +35 -35
- package/dist/{chunk-AS6QZETU.cjs.map → chunk-5QERK4PK.cjs.map} +1 -1
- package/dist/{chunk-AISYXX4M.cjs → chunk-7NLO7ASW.cjs} +4 -4
- package/dist/{chunk-AISYXX4M.cjs.map → chunk-7NLO7ASW.cjs.map} +1 -1
- package/dist/{chunk-QIK7E6VF.cjs → chunk-7PN3YENO.cjs} +4 -4
- package/dist/{chunk-QIK7E6VF.cjs.map → chunk-7PN3YENO.cjs.map} +1 -1
- package/dist/{chunk-JY7UUZQG.cjs → chunk-7Q46YAX4.cjs} +74 -71
- package/dist/chunk-7Q46YAX4.cjs.map +1 -0
- package/dist/{chunk-J3FFSEKO.cjs → chunk-ADDQKZ5I.cjs} +4 -4
- package/dist/{chunk-J3FFSEKO.cjs.map → chunk-ADDQKZ5I.cjs.map} +1 -1
- package/dist/{chunk-L6HTZIBD.cjs → chunk-ALK3PUUB.cjs} +3 -3
- package/dist/{chunk-L6HTZIBD.cjs.map → chunk-ALK3PUUB.cjs.map} +1 -1
- package/dist/{chunk-3ZZZO4F7.cjs → chunk-BY3QA3S5.cjs} +9 -9
- package/dist/{chunk-3ZZZO4F7.cjs.map → chunk-BY3QA3S5.cjs.map} +1 -1
- package/dist/{chunk-3UP32FM3.cjs → chunk-CQQQIZU4.cjs} +5 -5
- package/dist/{chunk-3UP32FM3.cjs.map → chunk-CQQQIZU4.cjs.map} +1 -1
- package/dist/{chunk-YOEP3I4V.cjs → chunk-E3L5DB5F.cjs} +5 -5
- package/dist/{chunk-YOEP3I4V.cjs.map → chunk-E3L5DB5F.cjs.map} +1 -1
- package/dist/{chunk-UA7HOLAZ.cjs → chunk-ESVRVZ53.cjs} +5 -5
- package/dist/{chunk-UA7HOLAZ.cjs.map → chunk-ESVRVZ53.cjs.map} +1 -1
- package/dist/{chunk-2K6IMIVL.cjs → chunk-GNZAH6UI.cjs} +3 -3
- package/dist/{chunk-2K6IMIVL.cjs.map → chunk-GNZAH6UI.cjs.map} +1 -1
- package/dist/{chunk-KA3F6TIH.cjs → chunk-IWHP7FAB.cjs} +12 -5
- package/dist/chunk-IWHP7FAB.cjs.map +1 -0
- package/dist/{chunk-ORNLCBNE.cjs → chunk-JVEDKKNO.cjs} +43 -4
- package/dist/chunk-JVEDKKNO.cjs.map +1 -0
- package/dist/{chunk-6JMW3IJ2.cjs → chunk-JVLOIIA7.cjs} +103 -100
- package/dist/chunk-JVLOIIA7.cjs.map +1 -0
- package/dist/{chunk-UUENH4BJ.cjs → chunk-KXIRVKCJ.cjs} +3 -3
- package/dist/{chunk-UUENH4BJ.cjs.map → chunk-KXIRVKCJ.cjs.map} +1 -1
- package/dist/{chunk-YVO6Z5BS.cjs → chunk-M6WVIGYP.cjs} +10 -10
- package/dist/{chunk-YVO6Z5BS.cjs.map → chunk-M6WVIGYP.cjs.map} +1 -1
- package/dist/{chunk-PSB64T43.cjs → chunk-MLA2BJ2Y.cjs} +28 -28
- package/dist/{chunk-PSB64T43.cjs.map → chunk-MLA2BJ2Y.cjs.map} +1 -1
- package/dist/{chunk-B3R62764.cjs → chunk-MMSHIIKG.cjs} +6 -6
- package/dist/{chunk-B3R62764.cjs.map → chunk-MMSHIIKG.cjs.map} +1 -1
- package/dist/{chunk-ENOPKX7E.cjs → chunk-MXBXZXXQ.cjs} +3 -3
- package/dist/{chunk-ENOPKX7E.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
- package/dist/chunk-NTDQQLDD.cjs +18 -0
- package/dist/{chunk-IRGRMJPP.cjs.map → chunk-NTDQQLDD.cjs.map} +1 -1
- package/dist/{chunk-PVJ5ODDB.cjs → chunk-Q6IKXWPG.cjs} +4 -4
- package/dist/{chunk-PVJ5ODDB.cjs.map → chunk-Q6IKXWPG.cjs.map} +1 -1
- package/dist/{chunk-4LP5MJGQ.cjs → chunk-QG2U2JGX.cjs} +4 -4
- package/dist/{chunk-4LP5MJGQ.cjs.map → chunk-QG2U2JGX.cjs.map} +1 -1
- package/dist/{chunk-MVXHTAJ4.cjs → chunk-QWVUBTW3.cjs} +9 -9
- package/dist/{chunk-MVXHTAJ4.cjs.map → chunk-QWVUBTW3.cjs.map} +1 -1
- package/dist/{chunk-OHWHYVKG.cjs → chunk-T73BHNQX.cjs} +3 -3
- package/dist/{chunk-OHWHYVKG.cjs.map → chunk-T73BHNQX.cjs.map} +1 -1
- package/dist/{chunk-PWBRE7JA.cjs → chunk-VLQCLQAS.cjs} +23 -10
- package/dist/chunk-VLQCLQAS.cjs.map +1 -0
- package/dist/{chunk-ADPRIBSH.cjs → chunk-X7ALF4MP.cjs} +7 -7
- package/dist/{chunk-ADPRIBSH.cjs.map → chunk-X7ALF4MP.cjs.map} +1 -1
- package/dist/{chunk-7RJZIPLE.cjs → chunk-YP5EBGLU.cjs} +33 -33
- package/dist/{chunk-7RJZIPLE.cjs.map → chunk-YP5EBGLU.cjs.map} +1 -1
- package/dist/{chunk-TSFNLY3K.cjs → chunk-ZCU72Q76.cjs} +192 -166
- package/dist/chunk-ZCU72Q76.cjs.map +1 -0
- package/dist/{chunk-BLIO3B7Z.cjs → chunk-ZYGAXD3N.cjs} +3 -3
- package/dist/{chunk-BLIO3B7Z.cjs.map → chunk-ZYGAXD3N.cjs.map} +1 -1
- package/dist/connect/docx.cjs +16 -16
- package/dist/connect/index.cjs +1095 -1114
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +26 -27
- package/dist/connection/ai.d.ts +1 -0
- package/dist/connection/docx/ConnectedNativeDocxEditor.js +4 -5
- package/dist/connection/docx/ConnectedNativeDocxEditor.js.map +2 -2
- package/dist/connection/docx/save-native-version.d.ts +3 -0
- package/dist/connection/docx/save-native-version.js +19 -0
- package/dist/connection/docx/save-native-version.js.map +7 -0
- package/dist/connection/presentation/ClippingPdfViewer.js +8 -5
- package/dist/connection/presentation/ClippingPdfViewer.js.map +2 -2
- package/dist/connection/presentation/ConnectedSlidesTab.js +8 -13
- package/dist/connection/presentation/ConnectedSlidesTab.js.map +2 -2
- package/dist/connection/presentation/usePresentationController.js +24 -15
- package/dist/connection/presentation/usePresentationController.js.map +2 -2
- package/dist/connection/presentation/usePresentationFiles.d.ts +2 -1
- package/dist/connection/presentation/usePresentationFiles.js +15 -6
- package/dist/connection/presentation/usePresentationFiles.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js +6 -3
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js +12 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js +1 -1
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js.map +1 -1
- package/dist/connection/remote-control/browser-diagnostics.d.ts +7 -0
- package/dist/connection/remote-control/browser-diagnostics.js +109 -0
- package/dist/connection/remote-control/browser-diagnostics.js.map +7 -0
- package/dist/connection/remote-control/remoteControl.d.ts +9 -1
- package/dist/connection/remote-control/remoteControl.js +130 -10
- package/dist/connection/remote-control/remoteControl.js.map +2 -2
- package/dist/connection/remote-control/screen-sharing.d.ts +11 -0
- package/dist/connection/remote-control/screen-sharing.js +78 -0
- package/dist/connection/remote-control/screen-sharing.js.map +7 -0
- package/dist/connection/report-problem/screen-capture.d.ts +1 -0
- package/dist/connection/report-problem/screen-capture.js +2 -1
- package/dist/connection/report-problem/screen-capture.js.map +2 -2
- package/dist/connection/search/ConnectedSearchPage.d.ts +0 -11
- package/dist/connection/search/ConnectedSearchPage.js +3 -0
- package/dist/connection/search/ConnectedSearchPage.js.map +2 -2
- package/dist/connection/search/SearchResultRows.js +75 -43
- package/dist/connection/search/SearchResultRows.js.map +2 -2
- package/dist/connection/viewer/CleanViewControl.d.ts +3 -1
- package/dist/connection/viewer/CleanViewControl.js +5 -1
- package/dist/connection/viewer/CleanViewControl.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +1 -1
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/useCleanView.d.ts +1 -1
- package/dist/connection/viewer/useCleanView.js +2 -2
- package/dist/connection/viewer/useCleanView.js.map +2 -2
- package/dist/connection/viewer/useViewedDocument.d.ts +1 -0
- package/dist/document-tools/index.cjs +20 -20
- package/dist/docx/NativeDocxEditor.d.ts +2 -1
- package/dist/docx/NativeDocxEditor.js +34 -7
- package/dist/docx/NativeDocxEditor.js.map +2 -2
- package/dist/docx/index.cjs +38 -38
- package/dist/docx/useVersionAutosave.d.ts +10 -0
- package/dist/docx/useVersionAutosave.js +36 -0
- package/dist/docx/useVersionAutosave.js.map +7 -0
- package/dist/embed/index.cjs +19 -19
- package/dist/facts/index.cjs +64 -64
- package/dist/files/index.cjs +223 -223
- package/dist/index.cjs +542 -542
- package/dist/presentation/ClipCaptureOverlay.js +14 -1
- package/dist/presentation/ClipCaptureOverlay.js.map +2 -2
- package/dist/presentation/ClipImage.js +7 -4
- package/dist/presentation/ClipImage.js.map +2 -2
- package/dist/presentation/ClipTray.js +11 -7
- package/dist/presentation/ClipTray.js.map +2 -2
- package/dist/presentation/SlidesEditor.js +6 -2
- package/dist/presentation/SlidesEditor.js.map +2 -2
- package/dist/presentation/store.d.ts +2 -0
- package/dist/presentation/store.js +15 -0
- package/dist/presentation/store.js.map +3 -3
- package/dist/settings/index.cjs +146 -146
- package/dist/shell/RemoteControlPill.d.ts +2 -1
- package/dist/shell/RemoteControlPill.js +10 -3
- package/dist/shell/RemoteControlPill.js.map +2 -2
- package/dist/shell/index.cjs +21 -21
- package/dist/site/index.cjs +6 -6
- package/dist/studio/index.cjs +9 -9
- package/dist/workflow-canvas/index.cjs +34 -34
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ClippingMediaViewer-ZFEX5A3U.cjs.map +0 -1
- package/dist/ClippingPdfViewer-3LRTEPHV.cjs.map +0 -1
- package/dist/ConnectedPresentation-L32JPRFI.cjs.map +0 -1
- package/dist/ConnectedSlidesTab-P7GGNUTO.cjs.map +0 -1
- package/dist/FilesViewerDialog-MHUVEZ7M.cjs.map +0 -1
- package/dist/SpotlightStrip-ED22UYTM.cjs.map +0 -1
- package/dist/chunk-6JMW3IJ2.cjs.map +0 -1
- package/dist/chunk-GAMRVB3I.cjs.map +0 -1
- package/dist/chunk-GFUOCGY6.cjs +0 -32
- package/dist/chunk-GFUOCGY6.cjs.map +0 -1
- package/dist/chunk-IRGRMJPP.cjs +0 -18
- package/dist/chunk-JY7UUZQG.cjs.map +0 -1
- package/dist/chunk-KA3F6TIH.cjs.map +0 -1
- package/dist/chunk-OGK377NL.cjs.map +0 -1
- package/dist/chunk-ORNLCBNE.cjs.map +0 -1
- package/dist/chunk-PWBRE7JA.cjs.map +0 -1
- package/dist/chunk-TSFNLY3K.cjs.map +0 -1
- package/dist/chunk-ZZZITHGK.cjs.map +0 -1
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkXF355M7O_cjs = require('./chunk-XF355M7O.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunk7NLO7ASW_cjs = require('./chunk-7NLO7ASW.cjs');
|
|
6
|
+
var chunk7PN3YENO_cjs = require('./chunk-7PN3YENO.cjs');
|
|
7
7
|
var chunkTJY7XPDE_cjs = require('./chunk-TJY7XPDE.cjs');
|
|
8
8
|
var chunkXNW62J54_cjs = require('./chunk-XNW62J54.cjs');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var chunkKXIRVKCJ_cjs = require('./chunk-KXIRVKCJ.cjs');
|
|
10
|
+
var chunkT73BHNQX_cjs = require('./chunk-T73BHNQX.cjs');
|
|
11
11
|
var chunk223D4727_cjs = require('./chunk-223D4727.cjs');
|
|
12
12
|
var chunkQQMMCXBP_cjs = require('./chunk-QQMMCXBP.cjs');
|
|
13
13
|
var chunk4B6HYQTW_cjs = require('./chunk-4B6HYQTW.cjs');
|
|
@@ -33,8 +33,8 @@ var chunk75BNMCUX_cjs = require('./chunk-75BNMCUX.cjs');
|
|
|
33
33
|
var chunkHSLPFBK2_cjs = require('./chunk-HSLPFBK2.cjs');
|
|
34
34
|
var chunkQGVOT7E4_cjs = require('./chunk-QGVOT7E4.cjs');
|
|
35
35
|
var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
|
|
36
|
-
var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
|
|
37
36
|
var chunkTKHCIHE2_cjs = require('./chunk-TKHCIHE2.cjs');
|
|
37
|
+
var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
|
|
38
38
|
var jsxRuntime = require('react/jsx-runtime');
|
|
39
39
|
var React6 = require('react');
|
|
40
40
|
var client = require('@arbidocs/client');
|
|
@@ -61,20 +61,353 @@ var renderConnectedUser = (user, { tooltip, variant = "icon" }) => /* @__PURE__
|
|
|
61
61
|
showTooltip: tooltip
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
// src/connection/report-problem/screen-capture.ts
|
|
66
|
+
var ScreenCaptureError = class extends Error {
|
|
67
|
+
constructor(code, message) {
|
|
68
|
+
super(message);
|
|
69
|
+
this.code = code;
|
|
70
|
+
this.name = "ScreenCaptureError";
|
|
71
|
+
}
|
|
72
|
+
code;
|
|
73
|
+
};
|
|
74
|
+
function canCaptureScreen() {
|
|
75
|
+
return typeof navigator !== "undefined" && !!navigator.mediaDevices?.getDisplayMedia;
|
|
76
|
+
}
|
|
77
|
+
async function captureCurrentTab() {
|
|
78
|
+
if (!canCaptureScreen()) {
|
|
79
|
+
throw new ScreenCaptureError("unsupported", "This browser can't capture the screen.");
|
|
80
|
+
}
|
|
81
|
+
let stream;
|
|
82
|
+
try {
|
|
83
|
+
stream = await navigator.mediaDevices.getDisplayMedia({
|
|
84
|
+
video: { displaySurface: "browser" },
|
|
85
|
+
audio: false,
|
|
86
|
+
// Chromium hints: offer this tab first, and don't let the person switch surfaces mid-capture.
|
|
87
|
+
preferCurrentTab: true,
|
|
88
|
+
selfBrowserSurface: "include",
|
|
89
|
+
surfaceSwitching: "exclude"
|
|
90
|
+
});
|
|
91
|
+
} catch (error) {
|
|
92
|
+
const name = error instanceof DOMException ? error.name : "";
|
|
93
|
+
if (name === "NotAllowedError" || name === "AbortError") {
|
|
94
|
+
throw new ScreenCaptureError("cancelled", "Screen capture was cancelled.");
|
|
95
|
+
}
|
|
96
|
+
throw new ScreenCaptureError("failed", "Couldn't start screen capture.");
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
return await grabFrame(stream);
|
|
100
|
+
} finally {
|
|
101
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function grabFrame(stream) {
|
|
105
|
+
const video = document.createElement("video");
|
|
106
|
+
video.muted = true;
|
|
107
|
+
video.playsInline = true;
|
|
108
|
+
video.srcObject = stream;
|
|
109
|
+
await video.play();
|
|
110
|
+
for (let i = 0; i < 50 && (!video.videoWidth || !video.videoHeight); i++) {
|
|
111
|
+
await new Promise((resolve) => setTimeout(resolve, 40));
|
|
112
|
+
}
|
|
113
|
+
await new Promise((resolve) => requestAnimationFrame(() => resolve(null)));
|
|
114
|
+
const canvas = document.createElement("canvas");
|
|
115
|
+
canvas.width = video.videoWidth;
|
|
116
|
+
canvas.height = video.videoHeight;
|
|
117
|
+
const ctx = canvas.getContext("2d");
|
|
118
|
+
if (!ctx || !canvas.width) throw new ScreenCaptureError("failed", "Couldn't read the screen.");
|
|
119
|
+
ctx.drawImage(video, 0, 0);
|
|
120
|
+
video.srcObject = null;
|
|
121
|
+
return canvasToBlob(canvas);
|
|
122
|
+
}
|
|
123
|
+
function canvasToBlob(canvas) {
|
|
124
|
+
return new Promise(
|
|
125
|
+
(resolve, reject) => canvas.toBlob(
|
|
126
|
+
(blob) => blob ? resolve(blob) : reject(new ScreenCaptureError("failed", "Couldn't save the image.")),
|
|
127
|
+
"image/png"
|
|
128
|
+
)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// src/connection/remote-control/browser-diagnostics.ts
|
|
133
|
+
function collectBrowserDiagnostics() {
|
|
134
|
+
const lines = [];
|
|
135
|
+
const add = (message) => {
|
|
136
|
+
lines.push(`${(/* @__PURE__ */ new Date()).toISOString()} ${sanitizeDiagnostic(message).slice(0, 1800)}`);
|
|
137
|
+
if (lines.length > 30) lines.shift();
|
|
138
|
+
};
|
|
139
|
+
const stringify = (value) => {
|
|
140
|
+
if (value instanceof Error)
|
|
141
|
+
return chunkT73BHNQX_cjs.formatErrorReport({ error: value, url: safeUrl(location.href) });
|
|
142
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
|
|
143
|
+
return String(value);
|
|
144
|
+
return "[object omitted]";
|
|
145
|
+
};
|
|
146
|
+
const originalError = console.error;
|
|
147
|
+
const originalWarn = console.warn;
|
|
148
|
+
const error = (...args) => {
|
|
149
|
+
add(`error: ${args.map(stringify).join(" ")}`);
|
|
150
|
+
originalError.apply(console, args);
|
|
151
|
+
};
|
|
152
|
+
const warn = (...args) => {
|
|
153
|
+
add(`warning: ${args.map(stringify).join(" ")}`);
|
|
154
|
+
originalWarn.apply(console, args);
|
|
155
|
+
};
|
|
156
|
+
console.error = error;
|
|
157
|
+
console.warn = warn;
|
|
158
|
+
const onError = (event) => add(`uncaught: ${stringify(event.error ?? event.message)}`);
|
|
159
|
+
const onRejection = (event) => add(`unhandled rejection: ${stringify(event.reason)}`);
|
|
160
|
+
window.addEventListener("error", onError);
|
|
161
|
+
window.addEventListener("unhandledrejection", onRejection);
|
|
162
|
+
const originalFetch = window.fetch;
|
|
163
|
+
const wrappedFetch = async (...args) => {
|
|
164
|
+
const input = args[0];
|
|
165
|
+
const url = safeUrl(
|
|
166
|
+
typeof input === "string" ? input : input instanceof URL ? input.href : input.url
|
|
167
|
+
);
|
|
168
|
+
try {
|
|
169
|
+
const response = await originalFetch.apply(window, args);
|
|
170
|
+
if (!response.ok) add(`HTTP ${response.status}: ${url}`);
|
|
171
|
+
return response;
|
|
172
|
+
} catch (failure) {
|
|
173
|
+
add(`request failed: ${url}`);
|
|
174
|
+
throw failure;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
window.fetch = wrappedFetch;
|
|
178
|
+
let resources;
|
|
179
|
+
if (typeof PerformanceObserver !== "undefined") {
|
|
180
|
+
try {
|
|
181
|
+
resources = new PerformanceObserver((list) => {
|
|
182
|
+
for (const entry of list.getEntries()) {
|
|
183
|
+
const resource = entry;
|
|
184
|
+
if ("responseStatus" in resource && Number(resource.responseStatus) >= 400)
|
|
185
|
+
add(`HTTP ${resource.responseStatus}: ${safeUrl(resource.name)}`);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
resources.observe({ type: "resource" });
|
|
189
|
+
} catch {
|
|
190
|
+
resources = void 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
snapshot: () => [
|
|
195
|
+
`ARBI tab: ${safeUrl(location.href)}`,
|
|
196
|
+
`Viewport: ${innerWidth} x ${innerHeight}; DPR ${devicePixelRatio}`,
|
|
197
|
+
"Visible ARBI controls (selectors for control_ui):",
|
|
198
|
+
...Array.from(
|
|
199
|
+
document.querySelectorAll(
|
|
200
|
+
'button[data-testid],a[data-testid],input[data-testid]:not([type="password"]),select[data-testid],[role="button"][data-testid]'
|
|
201
|
+
)
|
|
202
|
+
).filter(
|
|
203
|
+
(el) => el.getBoundingClientRect().width > 0 && !el.closest("[data-remote-control-surface]")
|
|
204
|
+
).slice(0, 60).map(
|
|
205
|
+
(el) => `[data-testid=${JSON.stringify(el.dataset.testid)}] ${sanitizeDiagnostic(el.getAttribute("aria-label") ?? el.getAttribute("title") ?? el.textContent ?? "").slice(0, 80)}`
|
|
206
|
+
),
|
|
207
|
+
...lines
|
|
208
|
+
].join("\n").slice(-18e3),
|
|
209
|
+
stop: () => {
|
|
210
|
+
if (console.error === error) console.error = originalError;
|
|
211
|
+
if (console.warn === warn) console.warn = originalWarn;
|
|
212
|
+
if (window.fetch === wrappedFetch) window.fetch = originalFetch;
|
|
213
|
+
window.removeEventListener("error", onError);
|
|
214
|
+
window.removeEventListener("unhandledrejection", onRejection);
|
|
215
|
+
resources?.disconnect();
|
|
216
|
+
lines.length = 0;
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function safeUrl(value) {
|
|
221
|
+
try {
|
|
222
|
+
const url = new URL(value, location.href);
|
|
223
|
+
return `${url.origin}${url.pathname}`;
|
|
224
|
+
} catch {
|
|
225
|
+
return "[invalid URL]";
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function sanitizeDiagnostic(value) {
|
|
229
|
+
return value.replace(/https?:\/\/[^\s<>"']+/g, (url) => safeUrl(url)).replace(/\bBearer\s+[^\s,;]+/gi, "Bearer [redacted]").replace(
|
|
230
|
+
/\b(token|password|secret|authorization|api[_-]?key)\s*[:=]\s*[^\s,;]+/gi,
|
|
231
|
+
"$1=[redacted]"
|
|
232
|
+
).replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, "[redacted token]");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/connection/remote-control/screen-sharing.ts
|
|
236
|
+
function createScreenSharing() {
|
|
237
|
+
let stream = null;
|
|
238
|
+
let diagnostics = null;
|
|
239
|
+
let generation = 0;
|
|
240
|
+
const stop = () => {
|
|
241
|
+
generation++;
|
|
242
|
+
const previous = stream;
|
|
243
|
+
stream = null;
|
|
244
|
+
previous?.getTracks().forEach((track) => track.stop());
|
|
245
|
+
diagnostics?.stop();
|
|
246
|
+
diagnostics = null;
|
|
247
|
+
};
|
|
248
|
+
return {
|
|
249
|
+
get active() {
|
|
250
|
+
return !!stream?.getVideoTracks().some((track) => track.readyState === "live");
|
|
251
|
+
},
|
|
252
|
+
async start(onEnded) {
|
|
253
|
+
const token = ++generation;
|
|
254
|
+
if (!navigator.mediaDevices?.getDisplayMedia)
|
|
255
|
+
throw new ScreenCaptureError(
|
|
256
|
+
"unsupported",
|
|
257
|
+
"Screen sharing is unavailable in this browser."
|
|
258
|
+
);
|
|
259
|
+
const next = await navigator.mediaDevices.getDisplayMedia({
|
|
260
|
+
video: { displaySurface: "browser" },
|
|
261
|
+
audio: false,
|
|
262
|
+
preferCurrentTab: true,
|
|
263
|
+
selfBrowserSurface: "include",
|
|
264
|
+
surfaceSwitching: "exclude"
|
|
265
|
+
});
|
|
266
|
+
if (token !== generation) {
|
|
267
|
+
next.getTracks().forEach((track) => track.stop());
|
|
268
|
+
throw new ScreenCaptureError("cancelled", "Sharing stopped.");
|
|
269
|
+
}
|
|
270
|
+
stream = next;
|
|
271
|
+
diagnostics = collectBrowserDiagnostics();
|
|
272
|
+
next.getVideoTracks().forEach(
|
|
273
|
+
(track) => track.addEventListener(
|
|
274
|
+
"ended",
|
|
275
|
+
() => {
|
|
276
|
+
if (stream === next) {
|
|
277
|
+
stop();
|
|
278
|
+
onEnded();
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{ once: true }
|
|
282
|
+
)
|
|
283
|
+
);
|
|
284
|
+
},
|
|
285
|
+
async frame() {
|
|
286
|
+
if (!stream) throw new ScreenCaptureError("cancelled", "Sharing stopped.");
|
|
287
|
+
const token = generation;
|
|
288
|
+
const blob = await grabFrame(stream);
|
|
289
|
+
if (token !== generation) throw new ScreenCaptureError("cancelled", "Sharing stopped.");
|
|
290
|
+
if (blob.size > 8 * 1024 * 1024)
|
|
291
|
+
throw new ScreenCaptureError(
|
|
292
|
+
"failed",
|
|
293
|
+
"The shared screen image is too large. Share a smaller window."
|
|
294
|
+
);
|
|
295
|
+
const screenshot_png = await new Promise((resolve, reject) => {
|
|
296
|
+
const reader = new FileReader();
|
|
297
|
+
reader.onload = () => resolve(String(reader.result).split(",")[1]);
|
|
298
|
+
reader.onerror = () => reject(new Error("Could not read the screen frame."));
|
|
299
|
+
reader.readAsDataURL(blob);
|
|
300
|
+
});
|
|
301
|
+
if (token !== generation) throw new ScreenCaptureError("cancelled", "Sharing stopped.");
|
|
302
|
+
return { screenshot_png, diagnostics: diagnostics?.snapshot() ?? "" };
|
|
303
|
+
},
|
|
304
|
+
stop
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// src/connection/remote-control/remoteControl.ts
|
|
309
|
+
var screenRuntimes = /* @__PURE__ */ new WeakMap();
|
|
310
|
+
function screenRuntime(session) {
|
|
311
|
+
let runtime = screenRuntimes.get(session);
|
|
312
|
+
if (!runtime) {
|
|
313
|
+
runtime = { sharing: createScreenSharing(), generation: 0, setup: "" };
|
|
314
|
+
screenRuntimes.set(session, runtime);
|
|
315
|
+
}
|
|
316
|
+
return runtime;
|
|
317
|
+
}
|
|
318
|
+
function stopScreen(session) {
|
|
319
|
+
const runtime = screenRuntimes.get(session);
|
|
320
|
+
if (!runtime) return;
|
|
321
|
+
runtime.generation++;
|
|
322
|
+
runtime.sharing.stop();
|
|
323
|
+
runtime.setup = "";
|
|
324
|
+
const actions = react.remoteControlActions(session);
|
|
325
|
+
if (react.remoteControlStateOf(session.getState()).sharing) actions.setSharing(false);
|
|
326
|
+
}
|
|
327
|
+
function createRemoteControl(session, guided, screenTransport) {
|
|
65
328
|
const actions = react.remoteControlActions(session);
|
|
66
329
|
const state = () => react.remoteControlStateOf(session.getState());
|
|
330
|
+
const runtime = screenRuntime(session);
|
|
331
|
+
const reply = async (req, status) => {
|
|
332
|
+
if ((req.screenRequestId || req.actionRequestId) && screenTransport) {
|
|
333
|
+
await screenTransport.reply(req.screenRequestId || req.actionRequestId, { status }).catch(() => {
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
const disable = () => {
|
|
338
|
+
const pending = state().pending;
|
|
339
|
+
if (pending) void reply(pending, "stopped");
|
|
340
|
+
stopScreen(session);
|
|
341
|
+
actions.setEnabled(false);
|
|
342
|
+
chunkORELHENJ_cjs.cancelGuidedRun();
|
|
343
|
+
};
|
|
344
|
+
const inspect = async (req, keepSharing) => {
|
|
345
|
+
if (!req.screenRequestId || !screenTransport) return;
|
|
346
|
+
const workspace = session.getState().workspaceId;
|
|
347
|
+
if (workspace !== req.workspaceExtId) {
|
|
348
|
+
await reply(req, "unavailable");
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const token = runtime.generation;
|
|
352
|
+
const current = () => token === runtime.generation && session.getState().workspaceId === workspace;
|
|
353
|
+
actions.setControllingAgent({ name: req.agentName, extId: req.agentExtId });
|
|
354
|
+
try {
|
|
355
|
+
if (!runtime.sharing.active) {
|
|
356
|
+
await runtime.sharing.start(disable);
|
|
357
|
+
if (!current()) {
|
|
358
|
+
runtime.sharing.stop();
|
|
359
|
+
await reply(req, "stopped");
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
actions.setSharing(true);
|
|
363
|
+
if (screenTransport.diagnose)
|
|
364
|
+
runtime.setup = await screenTransport.diagnose().catch(() => "Setup checks unavailable.");
|
|
365
|
+
}
|
|
366
|
+
if (!current()) {
|
|
367
|
+
await reply(req, "stopped");
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const frame = await runtime.sharing.frame();
|
|
371
|
+
if (!current()) {
|
|
372
|
+
await reply(req, "stopped");
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
await screenTransport.reply(req.screenRequestId, {
|
|
376
|
+
status: "captured",
|
|
377
|
+
...frame,
|
|
378
|
+
diagnostics: `${frame.diagnostics}
|
|
379
|
+
${runtime.setup}`.slice(0, 24e3)
|
|
380
|
+
});
|
|
381
|
+
} catch {
|
|
382
|
+
await reply(req, current() ? "unavailable" : "stopped");
|
|
383
|
+
if (current()) disable();
|
|
384
|
+
} finally {
|
|
385
|
+
if (current()) {
|
|
386
|
+
actions.setControllingAgent(null);
|
|
387
|
+
if (!keepSharing) disable();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
};
|
|
67
391
|
const resolveRun = (req) => {
|
|
68
392
|
if (req.steps && req.steps.length > 0) return req.steps;
|
|
69
393
|
if (req.sequenceId && guided.isSequenceId(req.sequenceId)) return req.sequenceId;
|
|
70
394
|
return null;
|
|
71
395
|
};
|
|
72
|
-
const runRemoteRequest = async (req) => {
|
|
396
|
+
const runRemoteRequest = async (req, keepSharing = state().enabled) => {
|
|
397
|
+
if (req.screenRequestId) {
|
|
398
|
+
await inspect(req, keepSharing);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
73
401
|
const run = resolveRun(req);
|
|
74
402
|
if (!run) return;
|
|
403
|
+
const token = runtime.generation;
|
|
75
404
|
actions.setControllingAgent({ name: req.agentName, extId: req.agentExtId });
|
|
76
405
|
try {
|
|
77
406
|
await guided.run(run, { remote: true });
|
|
407
|
+
if (req.actionRequestId)
|
|
408
|
+
await reply(req, token === runtime.generation ? "action_finished" : "stopped");
|
|
409
|
+
} catch {
|
|
410
|
+
await reply(req, "unavailable");
|
|
78
411
|
} finally {
|
|
79
412
|
const current = state().controllingAgent;
|
|
80
413
|
if (current && current.name === req.agentName && current.extId === req.agentExtId) {
|
|
@@ -94,31 +427,49 @@ function createRemoteControl(session, guided) {
|
|
|
94
427
|
}
|
|
95
428
|
const req = react.toRemoteControlRequest(msg, guided.isSequenceId);
|
|
96
429
|
if (!req) return;
|
|
97
|
-
if (
|
|
430
|
+
if ((req.screenRequestId || req.actionRequestId) && (!screenTransport || session.getState().workspaceId !== req.workspaceExtId)) {
|
|
431
|
+
void reply(req, "unavailable");
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
if (state().enabled && (!req.screenRequestId || runtime.sharing.active)) {
|
|
98
435
|
client.logger.info("[RemoteControl] Enabled \u2014 running requested action from", req.agentName);
|
|
99
436
|
void runRemoteRequest(req);
|
|
100
437
|
return;
|
|
101
438
|
}
|
|
102
439
|
client.logger.info("[RemoteControl] Consent required \u2014 prompting for", req.agentName);
|
|
440
|
+
if (state().pending) void reply(state().pending, "denied");
|
|
103
441
|
actions.request(req);
|
|
104
442
|
},
|
|
105
443
|
grantAndRun(opts) {
|
|
106
444
|
const pending = state().pending;
|
|
445
|
+
const keepSharing = opts.forSession || state().enabled;
|
|
107
446
|
actions.grant(opts);
|
|
108
|
-
if (pending) void runRemoteRequest(pending);
|
|
447
|
+
if (pending) void runRemoteRequest(pending, keepSharing);
|
|
109
448
|
},
|
|
110
|
-
deny: () =>
|
|
111
|
-
|
|
112
|
-
actions.
|
|
113
|
-
|
|
449
|
+
deny: () => {
|
|
450
|
+
const pending = state().pending;
|
|
451
|
+
actions.deny();
|
|
452
|
+
if (pending) void reply(pending, "denied");
|
|
114
453
|
},
|
|
454
|
+
disable,
|
|
115
455
|
enable: () => actions.setEnabled(true)
|
|
116
456
|
};
|
|
117
457
|
}
|
|
118
458
|
function useRemoteControlActions() {
|
|
119
459
|
const session = react.useArbiSessionStore();
|
|
120
460
|
const guided = chunkORELHENJ_cjs.useGuidedRuns();
|
|
121
|
-
|
|
461
|
+
const { arbi } = react.useArbiHost();
|
|
462
|
+
return React6.useMemo(
|
|
463
|
+
() => createRemoteControl(
|
|
464
|
+
session,
|
|
465
|
+
guided,
|
|
466
|
+
arbi ? {
|
|
467
|
+
reply: (id, result) => arbi.remoteControl.replyScreen(id, result),
|
|
468
|
+
diagnose: async () => JSON.stringify(await arbi.diagnose())
|
|
469
|
+
} : void 0
|
|
470
|
+
),
|
|
471
|
+
[session, guided, arbi]
|
|
472
|
+
);
|
|
122
473
|
}
|
|
123
474
|
function useRemoteControlSessionReset() {
|
|
124
475
|
const session = react.useArbiSessionStore();
|
|
@@ -126,6 +477,7 @@ function useRemoteControlSessionReset() {
|
|
|
126
477
|
const userId = react.useArbiSession().user?.external_id ?? null;
|
|
127
478
|
React6.useEffect(() => {
|
|
128
479
|
const reset = () => {
|
|
480
|
+
stopScreen(session);
|
|
129
481
|
react.remoteControlActions(session).reset();
|
|
130
482
|
chunkORELHENJ_cjs.cancelGuidedRun();
|
|
131
483
|
};
|
|
@@ -141,6 +493,7 @@ function useRemoteControlSessionReset() {
|
|
|
141
493
|
React6.useEffect(() => {
|
|
142
494
|
if (lastUser.current === userId) return;
|
|
143
495
|
lastUser.current = userId;
|
|
496
|
+
stopScreen(session);
|
|
144
497
|
react.remoteControlActions(session).reset();
|
|
145
498
|
chunkORELHENJ_cjs.cancelGuidedRun();
|
|
146
499
|
}, [userId, session]);
|
|
@@ -149,6 +502,16 @@ function useRemoteControlHandlers() {
|
|
|
149
502
|
useRemoteControlSessionReset();
|
|
150
503
|
const remote = useRemoteControlActions();
|
|
151
504
|
const { remoteControl } = chunkORELHENJ_cjs.useGuidedRuns();
|
|
505
|
+
const session = react.useArbiSessionStore();
|
|
506
|
+
const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
507
|
+
React6.useEffect(
|
|
508
|
+
() => () => {
|
|
509
|
+
stopScreen(session);
|
|
510
|
+
react.remoteControlActions(session).setEnabled(false);
|
|
511
|
+
chunkORELHENJ_cjs.cancelGuidedRun();
|
|
512
|
+
},
|
|
513
|
+
[session, workspaceId]
|
|
514
|
+
);
|
|
152
515
|
return React6.useMemo(
|
|
153
516
|
() => remoteControl ? {
|
|
154
517
|
remote_control: (message) => remote.handleMessage(message)
|
|
@@ -283,11 +646,11 @@ function ConnectedProfileCard({
|
|
|
283
646
|
const display = profile?.fullName || "Unnamed";
|
|
284
647
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkQQMMCXBP_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title: "Profile", children: [
|
|
285
648
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
286
|
-
|
|
649
|
+
chunkT73BHNQX_cjs.ProfileCard,
|
|
287
650
|
{
|
|
288
651
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
289
652
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
290
|
-
|
|
653
|
+
chunkT73BHNQX_cjs.AvatarPicker,
|
|
291
654
|
{
|
|
292
655
|
pictureUrl: profile?.picture,
|
|
293
656
|
initials: chunkIPSHAMO2_cjs.initials(display),
|
|
@@ -337,7 +700,7 @@ function ConnectedIdentityVerification({
|
|
|
337
700
|
});
|
|
338
701
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
339
702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
340
|
-
|
|
703
|
+
chunkT73BHNQX_cjs.IdentityVerificationCard,
|
|
341
704
|
{
|
|
342
705
|
flow,
|
|
343
706
|
labels,
|
|
@@ -346,7 +709,7 @@ function ConnectedIdentityVerification({
|
|
|
346
709
|
}
|
|
347
710
|
),
|
|
348
711
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
349
|
-
|
|
712
|
+
chunkT73BHNQX_cjs.IdentityVerificationDialog,
|
|
350
713
|
{
|
|
351
714
|
flow,
|
|
352
715
|
accountName: profile?.fullName ?? "",
|
|
@@ -379,7 +742,7 @@ function ConnectedPasswordChangeDialog({
|
|
|
379
742
|
onRecoveryComplete
|
|
380
743
|
});
|
|
381
744
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
-
|
|
745
|
+
chunkT73BHNQX_cjs.PasswordChangeDialog,
|
|
383
746
|
{
|
|
384
747
|
open,
|
|
385
748
|
onClose: form.onCancel,
|
|
@@ -419,22 +782,22 @@ function ConnectedSecuritySection({ children }) {
|
|
|
419
782
|
] });
|
|
420
783
|
}
|
|
421
784
|
function ConnectedNotificationPreferences({
|
|
422
|
-
categories =
|
|
785
|
+
categories = chunkT73BHNQX_cjs.EMAIL_NOTIFICATION_CATEGORIES
|
|
423
786
|
}) {
|
|
424
787
|
const keys = React6.useMemo(
|
|
425
|
-
() => categories ===
|
|
788
|
+
() => categories === chunkT73BHNQX_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkT73BHNQX_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
426
789
|
[categories]
|
|
427
790
|
);
|
|
428
791
|
const prefs = react.useNotificationPreferences(keys);
|
|
429
792
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsSection, { title: "Notifications", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQQMMCXBP_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
430
|
-
|
|
793
|
+
chunkT73BHNQX_cjs.NotificationCategoryList,
|
|
431
794
|
{
|
|
432
795
|
masterId: "emailNotifications",
|
|
433
796
|
masterTitle: "Email Notifications",
|
|
434
797
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
435
798
|
masterChecked: prefs.masterChecked,
|
|
436
799
|
onMasterChange: prefs.setAll,
|
|
437
|
-
categories:
|
|
800
|
+
categories: chunkT73BHNQX_cjs.toNotificationCategories(prefs.checked, categories),
|
|
438
801
|
onCategoryChange: prefs.setCategory
|
|
439
802
|
}
|
|
440
803
|
) }) });
|
|
@@ -447,7 +810,7 @@ function ConnectedSessionsRow({
|
|
|
447
810
|
const sessions = react.useSessions({ enabled: open });
|
|
448
811
|
const currentSessionId = react.useCurrentSessionId();
|
|
449
812
|
const terminate = react.useTerminateSession();
|
|
450
|
-
const views =
|
|
813
|
+
const views = chunkT73BHNQX_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
451
814
|
currentSessionId,
|
|
452
815
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
453
816
|
renderIcon: renderSessionIcon
|
|
@@ -476,7 +839,7 @@ function ConnectedSessionsRow({
|
|
|
476
839
|
}
|
|
477
840
|
),
|
|
478
841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
-
|
|
842
|
+
chunkT73BHNQX_cjs.ActiveSessionsDialog,
|
|
480
843
|
{
|
|
481
844
|
open,
|
|
482
845
|
onOpenChange: setOpen,
|
|
@@ -520,7 +883,7 @@ function ConnectedLogoutDialog({
|
|
|
520
883
|
signOut.mutate({ everywhere, reason: "manual" });
|
|
521
884
|
};
|
|
522
885
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
-
|
|
886
|
+
chunkT73BHNQX_cjs.LogoutDialog,
|
|
524
887
|
{
|
|
525
888
|
open,
|
|
526
889
|
onClose,
|
|
@@ -528,7 +891,7 @@ function ConnectedLogoutDialog({
|
|
|
528
891
|
onLogoutAll: () => void run(true),
|
|
529
892
|
canLogoutAll: !(user && ui.isAgent(user)),
|
|
530
893
|
isOnline,
|
|
531
|
-
sessions:
|
|
894
|
+
sessions: chunkT73BHNQX_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
532
895
|
renderSessionIcon
|
|
533
896
|
}
|
|
534
897
|
);
|
|
@@ -570,12 +933,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
570
933
|
}
|
|
571
934
|
),
|
|
572
935
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
573
|
-
|
|
936
|
+
chunkT73BHNQX_cjs.DeleteAccountDialog,
|
|
574
937
|
{
|
|
575
938
|
open: dialogOpen,
|
|
576
939
|
onClose: flow.onClose,
|
|
577
940
|
step: flow.step,
|
|
578
|
-
blockers:
|
|
941
|
+
blockers: chunkT73BHNQX_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
579
942
|
onContinue: flow.onContinue,
|
|
580
943
|
onBack: flow.onBack,
|
|
581
944
|
userEmail,
|
|
@@ -1375,7 +1738,7 @@ var AgentStepsComponent = ({
|
|
|
1375
1738
|
summary && !isActive && (step.narration ? (
|
|
1376
1739
|
/* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
|
|
1377
1740
|
Tool summaries stay plain text: one-line headlines where a clamp matters. */
|
|
1378
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1741
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
|
|
1379
1742
|
) : /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
|
|
1380
1743
|
details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepDetail, { index: step.index, children: d }, di)),
|
|
1381
1744
|
showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
|
|
@@ -1757,13 +2120,13 @@ function withAnswerTable(components) {
|
|
|
1757
2120
|
}
|
|
1758
2121
|
return merged;
|
|
1759
2122
|
}
|
|
1760
|
-
var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2123
|
+
var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
|
|
1761
2124
|
function LinkInAnswer({ href, children, ...props }) {
|
|
1762
2125
|
const docId = chunkZ2XZ2D4N_cjs.workspaceDocIdFromHref(href, chunkTKHCIHE2_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
|
|
1763
2126
|
if (docId) {
|
|
1764
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2127
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.InternalDocLink, { docId, href, ...props, children });
|
|
1765
2128
|
}
|
|
1766
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2129
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ExternalLink, { href, ...props, children });
|
|
1767
2130
|
}
|
|
1768
2131
|
var ConnectedCitationRendererComponent = (props) => {
|
|
1769
2132
|
const session = react.useArbiSessionStore();
|
|
@@ -1865,7 +2228,7 @@ function MessageDetailsModal({
|
|
|
1865
2228
|
]
|
|
1866
2229
|
}
|
|
1867
2230
|
),
|
|
1868
|
-
messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2231
|
+
messageDetails && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "message-details-content", children: /* @__PURE__ */ jsxRuntime.jsx(chunkT73BHNQX_cjs.MessageJsonTree, { data: messageDetails, name: "message", defaultExpanded: true }) })
|
|
1869
2232
|
] })
|
|
1870
2233
|
]
|
|
1871
2234
|
}
|
|
@@ -2359,7 +2722,7 @@ var MessageComponent = ({
|
|
|
2359
2722
|
align: isOtherPerson ? "start" : "end",
|
|
2360
2723
|
leading: isUser ? (
|
|
2361
2724
|
// Someone else's author is the pill above their run; only mine is marked here.
|
|
2362
|
-
!isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2725
|
+
!isOtherPerson && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunk7PN3YENO_cjs.DocumentUser, { user: messageAuthorUser })
|
|
2363
2726
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2364
2727
|
"span",
|
|
2365
2728
|
{
|
|
@@ -2464,7 +2827,7 @@ var MessageComponent = ({
|
|
|
2464
2827
|
messageId,
|
|
2465
2828
|
align: isOtherPerson ? "start" : "end",
|
|
2466
2829
|
children: [
|
|
2467
|
-
startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2830
|
+
startsAuthorRun && messageAuthorUser && /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageAuthor, { children: /* @__PURE__ */ jsxRuntime.jsx(chunk7PN3YENO_cjs.DocumentUser, { user: messageAuthorUser, variant: "pill" }) }),
|
|
2468
2831
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2469
2832
|
chunkM2FOXGJU_cjs.MessageBubble,
|
|
2470
2833
|
{
|
|
@@ -2493,7 +2856,7 @@ var MessageComponent = ({
|
|
|
2493
2856
|
),
|
|
2494
2857
|
subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageSubagentBadge, { messageId }),
|
|
2495
2858
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkM2FOXGJU_cjs.MessageBody, { messageId, children: [
|
|
2496
|
-
settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2859
|
+
settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
|
|
2497
2860
|
liveContent ? role === "assistant" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2498
2861
|
ConnectedCitationRenderer,
|
|
2499
2862
|
{
|
|
@@ -2503,7 +2866,7 @@ var MessageComponent = ({
|
|
|
2503
2866
|
messageId: message.external_id || "unknown",
|
|
2504
2867
|
isStreaming: isGenerating
|
|
2505
2868
|
}
|
|
2506
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2869
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
|
|
2507
2870
|
isUser && liveContent.startsWith("/pa ") ? liveContent.slice(4) : liveContent,
|
|
2508
2871
|
message.mentions
|
|
2509
2872
|
) }) : null,
|
|
@@ -2848,7 +3211,7 @@ function ConnectedMessageList({ messages, scrollElementRef }) {
|
|
|
2848
3211
|
React6.useEffect(() => {
|
|
2849
3212
|
scrollContainerRef.current = scrollElementRef?.current ?? resolveScrollContainer(null);
|
|
2850
3213
|
}, [scrollElementRef]);
|
|
2851
|
-
const { items: activityItems } =
|
|
3214
|
+
const { items: activityItems } = chunk7NLO7ASW_cjs.useConnectedThreadActivity(currentConversationId);
|
|
2852
3215
|
const transcript = [
|
|
2853
3216
|
...displayMessages.map((message, index) => ({
|
|
2854
3217
|
type: "message",
|
|
@@ -5051,7 +5414,7 @@ function EmbeddedWorkspaceHeader({ title }) {
|
|
|
5051
5414
|
const signedIn = react.useArbiSession();
|
|
5052
5415
|
const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
5053
5416
|
const { data: workspaces = [], isLoading, error: listError } = react.useWorkspaces();
|
|
5054
|
-
const select =
|
|
5417
|
+
const select = chunk7NLO7ASW_cjs.useSelectWorkspace();
|
|
5055
5418
|
const connection = chunkJR2YSBD5_cjs.useOptionalConnection();
|
|
5056
5419
|
const [pending, setPending] = React6.useState(false);
|
|
5057
5420
|
const [error, setError] = React6.useState(null);
|
|
@@ -5221,8 +5584,12 @@ exports.PENDING_RECOVERY_KEY = PENDING_RECOVERY_KEY;
|
|
|
5221
5584
|
exports.PREMIUM_TIER_TAG = PREMIUM_TIER_TAG;
|
|
5222
5585
|
exports.RunningSubagents = RunningSubagents;
|
|
5223
5586
|
exports.STANDARD_TIER_TAG = STANDARD_TIER_TAG;
|
|
5587
|
+
exports.ScreenCaptureError = ScreenCaptureError;
|
|
5224
5588
|
exports.WorkflowStepMessage = WorkflowStepMessage;
|
|
5225
5589
|
exports.backUpOnSignup = backUpOnSignup;
|
|
5590
|
+
exports.canCaptureScreen = canCaptureScreen;
|
|
5591
|
+
exports.canvasToBlob = canvasToBlob;
|
|
5592
|
+
exports.captureCurrentTab = captureCurrentTab;
|
|
5226
5593
|
exports.completeSsoSignIn = completeSsoSignIn;
|
|
5227
5594
|
exports.createRemoteControl = createRemoteControl;
|
|
5228
5595
|
exports.defaultHost = defaultHost;
|
|
@@ -5240,5 +5607,5 @@ exports.useRemoteControlHandlers = useRemoteControlHandlers;
|
|
|
5240
5607
|
exports.useRemoteControlSessionReset = useRemoteControlSessionReset;
|
|
5241
5608
|
exports.useSsoSignIn = useSsoSignIn;
|
|
5242
5609
|
exports.useWorkspaceDocTitles = useWorkspaceDocTitles;
|
|
5243
|
-
//# sourceMappingURL=chunk-
|
|
5244
|
-
//# sourceMappingURL=chunk-
|
|
5610
|
+
//# sourceMappingURL=chunk-2SU37RZA.cjs.map
|
|
5611
|
+
//# sourceMappingURL=chunk-2SU37RZA.cjs.map
|