@arbidocs/blocks 0.5.38 → 0.5.39
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 +10 -0
- package/dist/{ConnectedCallDock-V7DPSE6X.cjs → ConnectedCallDock-NGHSDLJS.cjs} +4 -4
- package/dist/{ConnectedCallDock-V7DPSE6X.cjs.map → ConnectedCallDock-NGHSDLJS.cjs.map} +1 -1
- package/dist/{ConnectedCallDock-CT3D6LLI.js → ConnectedCallDock-YJSO52N4.js} +4 -4
- package/dist/{ConnectedCallDock-CT3D6LLI.js.map → ConnectedCallDock-YJSO52N4.js.map} +1 -1
- package/dist/{ConnectedCallRoom-TNOCSTX2.cjs → ConnectedCallRoom-4XGFFYHE.cjs} +4 -4
- package/dist/{ConnectedCallRoom-TNOCSTX2.cjs.map → ConnectedCallRoom-4XGFFYHE.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-A27AM7IQ.js → ConnectedCallRoom-T6NS2MY4.js} +4 -4
- package/dist/{ConnectedCallRoom-A27AM7IQ.js.map → ConnectedCallRoom-T6NS2MY4.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-RWKFPJPJ.js → ConnectedNativeDocxComparison-52KQKJGY.js} +7 -7
- package/dist/{ConnectedNativeDocxComparison-RWKFPJPJ.js.map → ConnectedNativeDocxComparison-52KQKJGY.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-H2OZMWHT.cjs → ConnectedNativeDocxComparison-UVLZGS2V.cjs} +8 -8
- package/dist/{ConnectedNativeDocxComparison-H2OZMWHT.cjs.map → ConnectedNativeDocxComparison-UVLZGS2V.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-43BI5LN6.js → ConnectedNativeDocxEditor-BRBL3MOV.js} +6 -6
- package/dist/{ConnectedNativeDocxEditor-43BI5LN6.js.map → ConnectedNativeDocxEditor-BRBL3MOV.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-6DQEM6SD.cjs → ConnectedNativeDocxEditor-KHR5I7W6.cjs} +8 -8
- package/dist/{ConnectedNativeDocxEditor-6DQEM6SD.cjs.map → ConnectedNativeDocxEditor-KHR5I7W6.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-3VKYIG6C.cjs → ConnectedStreamedWordArtifact-DSVFI7BX.cjs} +8 -8
- package/dist/ConnectedStreamedWordArtifact-DSVFI7BX.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-TEB332E3.js → ConnectedStreamedWordArtifact-EQUE6WT5.js} +7 -7
- package/dist/ConnectedStreamedWordArtifact-EQUE6WT5.js.map +1 -0
- package/dist/{WorkspaceTableView-KG546U7M.cjs → WorkspaceTableView-2CGEO5KK.cjs} +6 -6
- package/dist/{WorkspaceTableView-KG546U7M.cjs.map → WorkspaceTableView-2CGEO5KK.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-OSFIWJ5C.js → WorkspaceTableView-3ARFQYNO.js} +4 -4
- package/dist/{WorkspaceTableView-OSFIWJ5C.js.map → WorkspaceTableView-3ARFQYNO.js.map} +1 -1
- package/dist/agents/index.cjs +376 -376
- package/dist/agents/index.js +2 -2
- package/dist/calls/index.cjs +35 -35
- package/dist/calls/index.js +7 -7
- package/dist/chat/index.cjs +89 -89
- package/dist/chat/index.js +2 -2
- package/dist/{chunk-BRYRZOS3.cjs → chunk-3YZ3RUSB.cjs} +4 -4
- package/dist/{chunk-BRYRZOS3.cjs.map → chunk-3YZ3RUSB.cjs.map} +1 -1
- package/dist/{chunk-VPWCARVO.js → chunk-4DDPMLGU.js} +4 -4
- package/dist/{chunk-VPWCARVO.js.map → chunk-4DDPMLGU.js.map} +1 -1
- package/dist/{chunk-24H5WTGM.js → chunk-4U4NXFV5.js} +4 -4
- package/dist/{chunk-24H5WTGM.js.map → chunk-4U4NXFV5.js.map} +1 -1
- package/dist/{chunk-6EQSP77K.cjs → chunk-5ZHAHJ4H.cjs} +5 -5
- package/dist/{chunk-6EQSP77K.cjs.map → chunk-5ZHAHJ4H.cjs.map} +1 -1
- package/dist/{chunk-BIWPXSGS.cjs → chunk-6AJJJ5HR.cjs} +7 -7
- package/dist/{chunk-BIWPXSGS.cjs.map → chunk-6AJJJ5HR.cjs.map} +1 -1
- package/dist/{chunk-2YCCCXYV.js → chunk-7LN3ISPG.js} +3 -3
- package/dist/{chunk-2YCCCXYV.js.map → chunk-7LN3ISPG.js.map} +1 -1
- package/dist/{chunk-5NTSJV5H.cjs → chunk-BY2EW2QU.cjs} +16 -91
- package/dist/chunk-BY2EW2QU.cjs.map +1 -0
- package/dist/{chunk-FHB4G77H.js → chunk-CEO7YI7I.js} +3 -3
- package/dist/{chunk-FHB4G77H.js.map → chunk-CEO7YI7I.js.map} +1 -1
- package/dist/{chunk-LTO4JYU3.cjs → chunk-DWWRLKEZ.cjs} +188 -2
- package/dist/chunk-DWWRLKEZ.cjs.map +1 -0
- package/dist/chunk-E3IEZMRK.cjs +507 -0
- package/dist/chunk-E3IEZMRK.cjs.map +1 -0
- package/dist/{chunk-MLHOG7YH.js → chunk-EFDZRAW6.js} +3 -3
- package/dist/{chunk-MLHOG7YH.js.map → chunk-EFDZRAW6.js.map} +1 -1
- package/dist/chunk-FOIDBAZB.js +497 -0
- package/dist/chunk-FOIDBAZB.js.map +1 -0
- package/dist/{chunk-MB3S2ETI.cjs → chunk-G2BKHCI2.cjs} +2 -2
- package/dist/chunk-G2BKHCI2.cjs.map +1 -0
- package/dist/{chunk-EFSL4O3B.cjs → chunk-GT5FCYV5.cjs} +7 -7
- package/dist/{chunk-EFSL4O3B.cjs.map → chunk-GT5FCYV5.cjs.map} +1 -1
- package/dist/{chunk-QWKT4DO6.cjs → chunk-GX5MKJ3F.cjs} +433 -2
- package/dist/chunk-GX5MKJ3F.cjs.map +1 -0
- package/dist/{chunk-C3YIVBTU.cjs → chunk-HDEOORSV.cjs} +9 -9
- package/dist/{chunk-C3YIVBTU.cjs.map → chunk-HDEOORSV.cjs.map} +1 -1
- package/dist/{chunk-T4P237N6.js → chunk-ILBBV2ZY.js} +2 -2
- package/dist/chunk-ILBBV2ZY.js.map +1 -0
- package/dist/{chunk-XFSEPGF7.cjs → chunk-K53QRFPJ.cjs} +4 -4
- package/dist/{chunk-XFSEPGF7.cjs.map → chunk-K53QRFPJ.cjs.map} +1 -1
- package/dist/{chunk-NOKTUWTN.cjs → chunk-K7S5BMAB.cjs} +7 -7
- package/dist/{chunk-NOKTUWTN.cjs.map → chunk-K7S5BMAB.cjs.map} +1 -1
- package/dist/{chunk-FY4C7HU5.cjs → chunk-O3MRE2HL.cjs} +2233 -8
- package/dist/chunk-O3MRE2HL.cjs.map +1 -0
- package/dist/{chunk-N3HVTMQK.js → chunk-OPZBIGW4.js} +3 -3
- package/dist/{chunk-N3HVTMQK.js.map → chunk-OPZBIGW4.js.map} +1 -1
- package/dist/{chunk-JVXHVFUA.cjs → chunk-P6HVJP6Z.cjs} +4 -4
- package/dist/{chunk-JVXHVFUA.cjs.map → chunk-P6HVJP6Z.cjs.map} +1 -1
- package/dist/{chunk-PXYP3DM5.js → chunk-PD4AKBYZ.js} +432 -6
- package/dist/chunk-PD4AKBYZ.js.map +1 -0
- package/dist/{chunk-VKY4SQMH.js → chunk-REHG7VRQ.js} +5 -5
- package/dist/{chunk-VKY4SQMH.js.map → chunk-REHG7VRQ.js.map} +1 -1
- package/dist/{chunk-M4MZPH2S.js → chunk-SEZEEHLU.js} +190 -6
- package/dist/chunk-SEZEEHLU.js.map +1 -0
- package/dist/{chunk-5JEM3BWT.js → chunk-SYP2A4GQ.js} +4 -4
- package/dist/{chunk-5JEM3BWT.js.map → chunk-SYP2A4GQ.js.map} +1 -1
- package/dist/{chunk-QFYRXQTD.js → chunk-TTPXMCJL.js} +6 -80
- package/dist/chunk-TTPXMCJL.js.map +1 -0
- package/dist/{chunk-VMLEISRZ.cjs → chunk-UZVXVTTB.cjs} +17 -17
- package/dist/{chunk-VMLEISRZ.cjs.map → chunk-UZVXVTTB.cjs.map} +1 -1
- package/dist/{chunk-YDY4GIC2.cjs → chunk-V7JDMKNQ.cjs} +4 -4
- package/dist/{chunk-YDY4GIC2.cjs.map → chunk-V7JDMKNQ.cjs.map} +1 -1
- package/dist/{chunk-YPR4FSDJ.js → chunk-VA3YYR7R.js} +8 -192
- package/dist/chunk-VA3YYR7R.js.map +1 -0
- package/dist/{chunk-NUV5F6MM.js → chunk-WAIHNFUH.js} +3 -3
- package/dist/{chunk-NUV5F6MM.js.map → chunk-WAIHNFUH.js.map} +1 -1
- package/dist/{chunk-H5BFOVVL.cjs → chunk-WRERJFEV.cjs} +2 -188
- package/dist/chunk-WRERJFEV.cjs.map +1 -0
- package/dist/{chunk-4DKI37QQ.js → chunk-YAGSGBVM.js} +2213 -13
- package/dist/chunk-YAGSGBVM.js.map +1 -0
- package/dist/{chunk-K6W2GWCN.js → chunk-ZAYUJFPI.js} +3 -3
- package/dist/{chunk-K6W2GWCN.js.map → chunk-ZAYUJFPI.js.map} +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/docx.js +6 -6
- package/dist/connect/index.cjs +1237 -591
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +3 -0
- package/dist/connect/index.js +665 -23
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +27 -27
- package/dist/connect/viewer.js +10 -10
- package/dist/connection/panels/ConnectedPanelHost.d.ts +48 -0
- package/dist/connection/panels/useSessionPanelMode.d.ts +18 -0
- package/dist/connection/threads-page/ConnectedThreadsPage.d.ts +14 -0
- package/dist/connection/threads-page/ThreadSearch.d.ts +24 -0
- package/dist/connection/workflows/index.d.ts +1 -0
- package/dist/connection/workflows/useWorkflowsPageState.d.ts +134 -0
- package/dist/index.cjs +601 -585
- package/dist/index.js +8 -8
- package/dist/provider/host.d.ts +3 -0
- package/dist/shell/PanelPortal.d.ts +30 -0
- package/dist/shell/index.cjs +78 -61
- package/dist/shell/index.d.ts +3 -0
- package/dist/shell/index.js +3 -2
- package/dist/shell/panel-host.d.ts +8 -0
- package/dist/shell/panel-windows.d.ts +33 -0
- package/dist/studio/index.cjs +5 -5
- package/dist/studio/index.js +3 -3
- package/dist/workflow-canvas/index.cjs +21 -21
- package/dist/workflow-canvas/index.js +5 -5
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-3VKYIG6C.cjs.map +0 -1
- package/dist/ConnectedStreamedWordArtifact-TEB332E3.js.map +0 -1
- package/dist/chunk-4DKI37QQ.js.map +0 -1
- package/dist/chunk-5NTSJV5H.cjs.map +0 -1
- package/dist/chunk-EZSYYENN.js +0 -2700
- package/dist/chunk-EZSYYENN.js.map +0 -1
- package/dist/chunk-FY4C7HU5.cjs.map +0 -1
- package/dist/chunk-H5BFOVVL.cjs.map +0 -1
- package/dist/chunk-LTO4JYU3.cjs.map +0 -1
- package/dist/chunk-M4MZPH2S.js.map +0 -1
- package/dist/chunk-MB3S2ETI.cjs.map +0 -1
- package/dist/chunk-PUX4M22Q.cjs +0 -2735
- package/dist/chunk-PUX4M22Q.cjs.map +0 -1
- package/dist/chunk-PXYP3DM5.js.map +0 -1
- package/dist/chunk-QFYRXQTD.js.map +0 -1
- package/dist/chunk-QWKT4DO6.cjs.map +0 -1
- package/dist/chunk-T4P237N6.js.map +0 -1
- package/dist/chunk-YPR4FSDJ.js.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkV7JDMKNQ_cjs = require('../chunk-V7JDMKNQ.cjs');
|
|
5
5
|
var chunkKFQ6E6LE_cjs = require('../chunk-KFQ6E6LE.cjs');
|
|
6
6
|
var chunkKWJW5TMH_cjs = require('../chunk-KWJW5TMH.cjs');
|
|
7
7
|
var chunkPSIKUQYM_cjs = require('../chunk-PSIKUQYM.cjs');
|
|
@@ -10,9 +10,9 @@ var chunkH6K7EWL2_cjs = require('../chunk-H6K7EWL2.cjs');
|
|
|
10
10
|
var chunkOU3RGQFX_cjs = require('../chunk-OU3RGQFX.cjs');
|
|
11
11
|
require('../chunk-UAEYU2NN.cjs');
|
|
12
12
|
var chunkFEVJA4BP_cjs = require('../chunk-FEVJA4BP.cjs');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
13
|
+
var chunkK7S5BMAB_cjs = require('../chunk-K7S5BMAB.cjs');
|
|
14
|
+
var chunkUZVXVTTB_cjs = require('../chunk-UZVXVTTB.cjs');
|
|
15
|
+
var chunkGT5FCYV5_cjs = require('../chunk-GT5FCYV5.cjs');
|
|
16
16
|
var chunkWALADS2S_cjs = require('../chunk-WALADS2S.cjs');
|
|
17
17
|
var chunk2WLXQGWC_cjs = require('../chunk-2WLXQGWC.cjs');
|
|
18
18
|
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
@@ -24,7 +24,7 @@ require('../chunk-464YPRAE.cjs');
|
|
|
24
24
|
require('../chunk-PICGTGEB.cjs');
|
|
25
25
|
var chunk5FYU7ZIU_cjs = require('../chunk-5FYU7ZIU.cjs');
|
|
26
26
|
require('../chunk-ZESMRGDV.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunk5ZHAHJ4H_cjs = require('../chunk-5ZHAHJ4H.cjs');
|
|
28
28
|
var chunkC2ECYOPP_cjs = require('../chunk-C2ECYOPP.cjs');
|
|
29
29
|
var chunkGOWXP5KT_cjs = require('../chunk-GOWXP5KT.cjs');
|
|
30
30
|
var chunkHV7XHZLW_cjs = require('../chunk-HV7XHZLW.cjs');
|
|
@@ -38,13 +38,13 @@ var chunk5V4HH7EH_cjs = require('../chunk-5V4HH7EH.cjs');
|
|
|
38
38
|
require('../chunk-7G2LJMUG.cjs');
|
|
39
39
|
var chunkTM2D4XT4_cjs = require('../chunk-TM2D4XT4.cjs');
|
|
40
40
|
var chunk5Y6V7F6W_cjs = require('../chunk-5Y6V7F6W.cjs');
|
|
41
|
-
var
|
|
41
|
+
var chunkGX5MKJ3F_cjs = require('../chunk-GX5MKJ3F.cjs');
|
|
42
42
|
var chunkY42LJ4TF_cjs = require('../chunk-Y42LJ4TF.cjs');
|
|
43
43
|
require('../chunk-VLCY46K6.cjs');
|
|
44
44
|
require('../chunk-D54JXTPG.cjs');
|
|
45
45
|
var chunkJIOHDVWH_cjs = require('../chunk-JIOHDVWH.cjs');
|
|
46
46
|
var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
|
|
47
|
-
var
|
|
47
|
+
var chunkO3MRE2HL_cjs = require('../chunk-O3MRE2HL.cjs');
|
|
48
48
|
var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
|
|
49
49
|
var chunk2QDNQM63_cjs = require('../chunk-2QDNQM63.cjs');
|
|
50
50
|
var chunk3ZLNI7ZA_cjs = require('../chunk-3ZLNI7ZA.cjs');
|
|
@@ -62,15 +62,15 @@ var chunkCG757WKY_cjs = require('../chunk-CG757WKY.cjs');
|
|
|
62
62
|
var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
|
|
63
63
|
var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
|
|
64
64
|
var chunkVZOOGA47_cjs = require('../chunk-VZOOGA47.cjs');
|
|
65
|
-
var
|
|
65
|
+
var chunk6AJJJ5HR_cjs = require('../chunk-6AJJJ5HR.cjs');
|
|
66
66
|
var chunkEGSSLWNZ_cjs = require('../chunk-EGSSLWNZ.cjs');
|
|
67
|
-
var
|
|
68
|
-
var
|
|
67
|
+
var chunkHDEOORSV_cjs = require('../chunk-HDEOORSV.cjs');
|
|
68
|
+
var chunkP6HVJP6Z_cjs = require('../chunk-P6HVJP6Z.cjs');
|
|
69
69
|
var chunkMOIZ2R5X_cjs = require('../chunk-MOIZ2R5X.cjs');
|
|
70
|
-
var
|
|
70
|
+
var chunkG2BKHCI2_cjs = require('../chunk-G2BKHCI2.cjs');
|
|
71
71
|
var chunkMEMWZ72Y_cjs = require('../chunk-MEMWZ72Y.cjs');
|
|
72
72
|
var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
|
|
73
|
-
var
|
|
73
|
+
var chunkDWWRLKEZ_cjs = require('../chunk-DWWRLKEZ.cjs');
|
|
74
74
|
var chunkLNYEYR7W_cjs = require('../chunk-LNYEYR7W.cjs');
|
|
75
75
|
var chunkZ2XZ2D4N_cjs = require('../chunk-Z2XZ2D4N.cjs');
|
|
76
76
|
require('../chunk-B6MVQCXW.cjs');
|
|
@@ -133,7 +133,7 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
133
133
|
hasUnreadMessages = false,
|
|
134
134
|
selfLabel
|
|
135
135
|
}) {
|
|
136
|
-
const { userId: currentUserId } =
|
|
136
|
+
const { userId: currentUserId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
137
137
|
const { openDirectChat, openSettings } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
138
138
|
const isMe = !!(user && currentUserId && user.external_id === currentUserId);
|
|
139
139
|
const displayStatus = useDisplayStatus(user, isMe, showPresence);
|
|
@@ -164,9 +164,9 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
164
164
|
if (isMe) openSettings();
|
|
165
165
|
else openDirectChat?.(user.external_id);
|
|
166
166
|
};
|
|
167
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
167
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltip, { children: [
|
|
168
168
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
-
|
|
169
|
+
chunk5ZHAHJ4H_cjs.EntityTooltipHeader,
|
|
170
170
|
{
|
|
171
171
|
lead: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
172
172
|
ui.Avatar,
|
|
@@ -197,13 +197,13 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
197
197
|
subtitle: user.email
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
+
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.EntityTooltipSection, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { className: "w-3.5 h-3.5 flex-shrink-0" }), children: [
|
|
201
201
|
"Agent of",
|
|
202
202
|
" ",
|
|
203
203
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: ui.getUserDisplayName(agentOwner) })
|
|
204
204
|
] }) }),
|
|
205
205
|
sharedWorkspaces.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
|
-
|
|
206
|
+
chunk5ZHAHJ4H_cjs.EntityTooltipSection,
|
|
207
207
|
{
|
|
208
208
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
209
209
|
heading: "Shared Workspaces",
|
|
@@ -234,7 +234,7 @@ var ConnectedUserEntity = React9.memo(function ConnectedUserEntity2({
|
|
|
234
234
|
] })
|
|
235
235
|
}
|
|
236
236
|
),
|
|
237
|
-
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(
|
|
237
|
+
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.EntityTooltipHint, { isRuled: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3 h-3" }), children: "Click to send message" })
|
|
238
238
|
] });
|
|
239
239
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
240
|
ui.UserEntity,
|
|
@@ -269,7 +269,7 @@ var renderConnectedUser = (user, { tooltip, variant = "icon" }) => /* @__PURE__
|
|
|
269
269
|
}
|
|
270
270
|
);
|
|
271
271
|
function ConnectionBoundWebSocket({ children }) {
|
|
272
|
-
const { status } =
|
|
272
|
+
const { status } = chunkP6HVJP6Z_cjs.useConnection();
|
|
273
273
|
return /* @__PURE__ */ jsxRuntime.jsx(react.ArbiWebSocketProvider, { enabled: status === "authenticated", children });
|
|
274
274
|
}
|
|
275
275
|
function defaultHost(config, { queryClient } = {}) {
|
|
@@ -290,7 +290,7 @@ function defaultHost(config, { queryClient } = {}) {
|
|
|
290
290
|
sessionStorage: config.apiUrl ? client.browserSessionStateStorage() : void 0
|
|
291
291
|
});
|
|
292
292
|
function DefaultHostConnection({ children }) {
|
|
293
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: client$1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
293
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: client$1, children: /* @__PURE__ */ jsxRuntime.jsx(chunkP6HVJP6Z_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) });
|
|
294
294
|
}
|
|
295
295
|
return {
|
|
296
296
|
arbi,
|
|
@@ -311,7 +311,7 @@ function useSessionSidebar() {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
function ConnectedTaskAccessRequest({ conversationId }) {
|
|
314
|
-
const { workspaceId } =
|
|
314
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnection();
|
|
315
315
|
const tasks = react.useConversations(workspaceId ?? void 0, { live: true });
|
|
316
316
|
const run = react.useRunConversation();
|
|
317
317
|
const task = tasks.data?.find((item) => item.external_id === conversationId);
|
|
@@ -360,7 +360,7 @@ function ConnectedWorkspaceActivity({
|
|
|
360
360
|
pageSize,
|
|
361
361
|
...listProps
|
|
362
362
|
}) {
|
|
363
|
-
const { workspaceId: selected, status, ensureWorkspaceOpen } =
|
|
363
|
+
const { workspaceId: selected, status, ensureWorkspaceOpen } = chunkP6HVJP6Z_cjs.useConnection();
|
|
364
364
|
const openTarget = useOpenWorkspaceActivityTarget();
|
|
365
365
|
const workspaceId = workspaceProp ?? selected ?? void 0;
|
|
366
366
|
const live = status === "authenticated" && !!workspaceId;
|
|
@@ -388,7 +388,7 @@ function ConnectedWorkspaceActivity({
|
|
|
388
388
|
[feed.data]
|
|
389
389
|
);
|
|
390
390
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
391
|
-
|
|
391
|
+
chunk5ZHAHJ4H_cjs.WorkspaceActivityList,
|
|
392
392
|
{
|
|
393
393
|
...listProps,
|
|
394
394
|
items,
|
|
@@ -666,7 +666,7 @@ function useOpenNotificationTarget() {
|
|
|
666
666
|
const arbi = react.useArbi();
|
|
667
667
|
const queryClient = reactQuery.useQueryClient();
|
|
668
668
|
const session = react.useArbiSessionStore();
|
|
669
|
-
const connection =
|
|
669
|
+
const connection = chunkP6HVJP6Z_cjs.useOptionalConnection();
|
|
670
670
|
const setWorkspace = connection?.setWorkspace;
|
|
671
671
|
return React9.useCallback(
|
|
672
672
|
(target) => createNotificationTargetOpener({
|
|
@@ -1221,7 +1221,7 @@ function WorkspaceBadge({ workspace }) {
|
|
|
1221
1221
|
ui.ShieldIcon,
|
|
1222
1222
|
{
|
|
1223
1223
|
char: workspace.name.charAt(0),
|
|
1224
|
-
workspaceColor:
|
|
1224
|
+
workspaceColor: chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
1225
1225
|
size: 16
|
|
1226
1226
|
}
|
|
1227
1227
|
),
|
|
@@ -1372,7 +1372,7 @@ function useNotificationBellEntry({ onOpen } = {}) {
|
|
|
1372
1372
|
);
|
|
1373
1373
|
}
|
|
1374
1374
|
function useConnectedNotificationBell(options2 = {}) {
|
|
1375
|
-
const { userId } =
|
|
1375
|
+
const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
1376
1376
|
const { data: notifications = [] } = react.useNotifications({ enabled: !!userId });
|
|
1377
1377
|
const { mutate: markRead } = react.useMarkNotificationsRead();
|
|
1378
1378
|
const toEntry = useNotificationBellEntry(options2);
|
|
@@ -1542,7 +1542,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
1542
1542
|
...menuProps
|
|
1543
1543
|
}) {
|
|
1544
1544
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
1545
|
-
const { workspaceId: selected, live } =
|
|
1545
|
+
const { workspaceId: selected, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
1546
1546
|
const workspaceId = workspaceProp ?? selected;
|
|
1547
1547
|
const { level, setLevel, isLoading, isSaving, error } = react.useWorkspaceNotificationLevel(
|
|
1548
1548
|
workspaceId,
|
|
@@ -1553,7 +1553,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
1553
1553
|
}, [error, notify18]);
|
|
1554
1554
|
if (!workspaceId) return null;
|
|
1555
1555
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1556
|
-
|
|
1556
|
+
chunk5ZHAHJ4H_cjs.WorkspaceNotificationMenu,
|
|
1557
1557
|
{
|
|
1558
1558
|
...menuProps,
|
|
1559
1559
|
level,
|
|
@@ -1567,12 +1567,12 @@ function ConnectedThreadFollow({
|
|
|
1567
1567
|
as = "button",
|
|
1568
1568
|
...props
|
|
1569
1569
|
}) {
|
|
1570
|
-
const { live } =
|
|
1570
|
+
const { live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
1571
1571
|
const { following, setFollowing, isLoading, isSaving } = react.useFollowThread(conversationId, {
|
|
1572
1572
|
enabled: live
|
|
1573
1573
|
});
|
|
1574
1574
|
if (!conversationId) return null;
|
|
1575
|
-
const Control = as === "menu-item" ?
|
|
1575
|
+
const Control = as === "menu-item" ? chunk5ZHAHJ4H_cjs.ThreadFollowMenuItem : chunk5ZHAHJ4H_cjs.ThreadFollowButton;
|
|
1576
1576
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1577
1577
|
Control,
|
|
1578
1578
|
{
|
|
@@ -1645,7 +1645,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
1645
1645
|
onChange: (e) => {
|
|
1646
1646
|
const file = e.target.files?.[0];
|
|
1647
1647
|
e.target.value = "";
|
|
1648
|
-
if (file) void add(() =>
|
|
1648
|
+
if (file) void add(() => chunkO3MRE2HL_cjs.importSkillFile(file));
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
),
|
|
@@ -1670,7 +1670,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
1670
1670
|
className: "space-y-2",
|
|
1671
1671
|
onSubmit: (e) => {
|
|
1672
1672
|
e.preventDefault();
|
|
1673
|
-
if (url.trim()) void add(() =>
|
|
1673
|
+
if (url.trim()) void add(() => chunkO3MRE2HL_cjs.importSkillFromUrl(url));
|
|
1674
1674
|
},
|
|
1675
1675
|
children: [
|
|
1676
1676
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
|
|
@@ -1733,9 +1733,9 @@ function ConnectedSkillsLibrary({
|
|
|
1733
1733
|
const [type, setType] = React9.useState("all");
|
|
1734
1734
|
const [view, setView] = React9.useState("gallery");
|
|
1735
1735
|
const [isBusy, setIsBusy] = React9.useState(false);
|
|
1736
|
-
const all = React9.useMemo(() =>
|
|
1736
|
+
const all = React9.useMemo(() => chunkO3MRE2HL_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
|
|
1737
1737
|
const shown = React9.useMemo(
|
|
1738
|
-
() =>
|
|
1738
|
+
() => chunkO3MRE2HL_cjs.filterLibrarySkills(all, { query, source, type }),
|
|
1739
1739
|
[all, query, source, type]
|
|
1740
1740
|
);
|
|
1741
1741
|
const current = all.find((s) => s.slug === selected) ?? null;
|
|
@@ -1746,21 +1746,21 @@ function ConnectedSkillsLibrary({
|
|
|
1746
1746
|
const count2 = (s) => all.filter((x) => x.source === s).length;
|
|
1747
1747
|
const sourceOptions = [
|
|
1748
1748
|
{ id: "all", label: "All", count: all.length },
|
|
1749
|
-
{ id: "builtin", label:
|
|
1750
|
-
{ id: "mine", label:
|
|
1751
|
-
{ id: "shared", label:
|
|
1749
|
+
{ id: "builtin", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.builtin, count: count2("builtin") },
|
|
1750
|
+
{ id: "mine", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.mine, count: count2("mine") },
|
|
1751
|
+
{ id: "shared", label: chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.shared, count: count2("shared") }
|
|
1752
1752
|
];
|
|
1753
1753
|
const types = [...new Set(all.map((s) => s.type))];
|
|
1754
1754
|
const typeOptions = [
|
|
1755
1755
|
{ id: "all", label: "Any kind" },
|
|
1756
|
-
...types.map((t) => ({ id: t, label:
|
|
1756
|
+
...types.map((t) => ({ id: t, label: chunkO3MRE2HL_cjs.SKILL_TYPE_LABELS[t] ?? t }))
|
|
1757
1757
|
];
|
|
1758
1758
|
const pick = (slug) => {
|
|
1759
1759
|
setSelected(slug);
|
|
1760
1760
|
setMode("detail");
|
|
1761
1761
|
};
|
|
1762
1762
|
const markdownOf = async (skill) => {
|
|
1763
|
-
if (!skill.docExtId) return
|
|
1763
|
+
if (!skill.docExtId) return chunkO3MRE2HL_cjs.workflowToSkillMarkdown(skill.workflow);
|
|
1764
1764
|
const response = await arbi.documents.download(skill.docExtId);
|
|
1765
1765
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
1766
1766
|
return response.text();
|
|
@@ -1824,7 +1824,7 @@ function ConnectedSkillsLibrary({
|
|
|
1824
1824
|
try {
|
|
1825
1825
|
documentTools.downloadBlob(
|
|
1826
1826
|
new Blob([await markdownOf(skill)], { type: "text/markdown" }),
|
|
1827
|
-
|
|
1827
|
+
chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME
|
|
1828
1828
|
);
|
|
1829
1829
|
} catch (error) {
|
|
1830
1830
|
notify18(errorText(error, "Could not export the skill"), "error");
|
|
@@ -1865,10 +1865,10 @@ function ConnectedSkillsLibrary({
|
|
|
1865
1865
|
}
|
|
1866
1866
|
)
|
|
1867
1867
|
] }),
|
|
1868
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1868
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.SkillViewToggle, { value: view, onChange: setView })
|
|
1869
1869
|
] }),
|
|
1870
1870
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1871
|
-
|
|
1871
|
+
chunkO3MRE2HL_cjs.SkillFilterChips,
|
|
1872
1872
|
{
|
|
1873
1873
|
label: "Show",
|
|
1874
1874
|
value: source,
|
|
@@ -1877,7 +1877,7 @@ function ConnectedSkillsLibrary({
|
|
|
1877
1877
|
}
|
|
1878
1878
|
),
|
|
1879
1879
|
types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1880
|
-
|
|
1880
|
+
chunkO3MRE2HL_cjs.SkillFilterChips,
|
|
1881
1881
|
{
|
|
1882
1882
|
label: "Kind",
|
|
1883
1883
|
value: type,
|
|
@@ -1924,12 +1924,12 @@ function ConnectedSkillsLibrary({
|
|
|
1924
1924
|
view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
|
|
1925
1925
|
),
|
|
1926
1926
|
children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1927
|
-
|
|
1927
|
+
chunkO3MRE2HL_cjs.SkillTile,
|
|
1928
1928
|
{
|
|
1929
1929
|
name: skill.title,
|
|
1930
1930
|
testId: `skill-tile-${skill.slug}`,
|
|
1931
1931
|
description: skill.description,
|
|
1932
|
-
sourceLabel: skill.isShared ? `${
|
|
1932
|
+
sourceLabel: skill.isShared ? `${chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkO3MRE2HL_cjs.SKILL_SOURCE_LABELS[skill.source],
|
|
1933
1933
|
type: skill.type,
|
|
1934
1934
|
icon,
|
|
1935
1935
|
layout: view,
|
|
@@ -1964,7 +1964,7 @@ function ConnectedSkillsLibrary({
|
|
|
1964
1964
|
}
|
|
1965
1965
|
),
|
|
1966
1966
|
mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1967
|
-
|
|
1967
|
+
chunkO3MRE2HL_cjs.SkillGenerateForm,
|
|
1968
1968
|
{
|
|
1969
1969
|
icon,
|
|
1970
1970
|
onGenerate: (desc) => {
|
|
@@ -1991,11 +1991,11 @@ function ConnectedSkillsLibrary({
|
|
|
1991
1991
|
),
|
|
1992
1992
|
mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
|
|
1993
1993
|
mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1994
|
-
|
|
1994
|
+
chunkO3MRE2HL_cjs.SkillLibraryDetail,
|
|
1995
1995
|
{
|
|
1996
1996
|
skill: current,
|
|
1997
1997
|
icon,
|
|
1998
|
-
instructions: current.docExtId ? currentText ?
|
|
1998
|
+
instructions: current.docExtId ? currentText ? chunkO3MRE2HL_cjs.parseSkillFrontmatter(currentText, chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
|
|
1999
1999
|
isLoading: !!current.docExtId && textLoading,
|
|
2000
2000
|
actions: {
|
|
2001
2001
|
onRun: () => onRun(current.slug),
|
|
@@ -2030,7 +2030,7 @@ function SkillEditor({
|
|
|
2030
2030
|
const [seeded, setSeeded] = React9.useState(!isEditing);
|
|
2031
2031
|
const [nameError, setNameError] = React9.useState(null);
|
|
2032
2032
|
if (isEditing && !seeded && text2 !== void 0) {
|
|
2033
|
-
const parsed =
|
|
2033
|
+
const parsed = chunkO3MRE2HL_cjs.parseSkillFrontmatter(text2, chunkO3MRE2HL_cjs.SKILL_MAIN_FILENAME);
|
|
2034
2034
|
setDescription(parsed.description ?? "");
|
|
2035
2035
|
setBody(parsed.content ?? "");
|
|
2036
2036
|
setSeeded(true);
|
|
@@ -2044,15 +2044,15 @@ function SkillEditor({
|
|
|
2044
2044
|
notify18("Add a short description.", "error");
|
|
2045
2045
|
return;
|
|
2046
2046
|
}
|
|
2047
|
-
const slug =
|
|
2047
|
+
const slug = chunkO3MRE2HL_cjs.skillSlug(name);
|
|
2048
2048
|
try {
|
|
2049
|
-
await onSave(slug,
|
|
2049
|
+
await onSave(slug, chunkO3MRE2HL_cjs.serializeSkill({ name: slug, description, body }), isEditing);
|
|
2050
2050
|
} catch (err) {
|
|
2051
2051
|
notify18(errorText(err, "Could not save the skill"), "error");
|
|
2052
2052
|
}
|
|
2053
2053
|
};
|
|
2054
2054
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2055
|
-
|
|
2055
|
+
chunkO3MRE2HL_cjs.SkillEditForm,
|
|
2056
2056
|
{
|
|
2057
2057
|
name,
|
|
2058
2058
|
onNameChange: setName,
|
|
@@ -2088,9 +2088,9 @@ function ConnectedAgentCreator({
|
|
|
2088
2088
|
agent,
|
|
2089
2089
|
initialName,
|
|
2090
2090
|
onSaved,
|
|
2091
|
-
capabilities =
|
|
2092
|
-
templates =
|
|
2093
|
-
types =
|
|
2091
|
+
capabilities = chunkO3MRE2HL_cjs.DEFAULT_AGENT_CAPABILITIES,
|
|
2092
|
+
templates = chunkO3MRE2HL_cjs.DEFAULT_AGENT_TEMPLATES,
|
|
2093
|
+
types = chunkO3MRE2HL_cjs.DEFAULT_AGENT_TYPES,
|
|
2094
2094
|
canRevokeWorkspaces = false,
|
|
2095
2095
|
labels
|
|
2096
2096
|
}) {
|
|
@@ -2132,7 +2132,7 @@ function ConnectedAgentCreator({
|
|
|
2132
2132
|
const initialValues = React9.useMemo(
|
|
2133
2133
|
() => ({
|
|
2134
2134
|
name: agent?.given_name ?? initialName ?? "",
|
|
2135
|
-
persona: isEdit ?
|
|
2135
|
+
persona: isEdit ? chunkO3MRE2HL_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
|
|
2136
2136
|
modelName: String(agents.AGENT_MODEL_NAME ?? ""),
|
|
2137
2137
|
capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
|
|
2138
2138
|
type: "builtin",
|
|
@@ -2151,7 +2151,7 @@ function ConnectedAgentCreator({
|
|
|
2151
2151
|
try {
|
|
2152
2152
|
let agentExtId = agent?.external_id ?? early?.id ?? "";
|
|
2153
2153
|
if (!agentExtId) {
|
|
2154
|
-
if (!
|
|
2154
|
+
if (!chunkO3MRE2HL_cjs.isValidAgentName(values.name)) {
|
|
2155
2155
|
notify18("Give the agent a name first.", "error");
|
|
2156
2156
|
return;
|
|
2157
2157
|
}
|
|
@@ -2187,7 +2187,7 @@ function ConnectedAgentCreator({
|
|
|
2187
2187
|
title: `agent-${name}`,
|
|
2188
2188
|
sections: {
|
|
2189
2189
|
Agents: {
|
|
2190
|
-
PERSONA:
|
|
2190
|
+
PERSONA: chunkO3MRE2HL_cjs.composePersona(name, values.persona),
|
|
2191
2191
|
...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
|
|
2192
2192
|
...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
|
|
2193
2193
|
ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
|
|
@@ -2210,7 +2210,7 @@ function ConnectedAgentCreator({
|
|
|
2210
2210
|
};
|
|
2211
2211
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2212
2212
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
-
|
|
2213
|
+
chunkO3MRE2HL_cjs.AgentCreator,
|
|
2214
2214
|
{
|
|
2215
2215
|
open: ready,
|
|
2216
2216
|
onOpenChange,
|
|
@@ -2226,11 +2226,11 @@ function ConnectedAgentCreator({
|
|
|
2226
2226
|
) : void 0,
|
|
2227
2227
|
revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
|
|
2228
2228
|
avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2229
|
-
|
|
2229
|
+
chunkO3MRE2HL_cjs.AgentAvatarField,
|
|
2230
2230
|
{
|
|
2231
2231
|
picture,
|
|
2232
2232
|
isBusy: avatarBusy,
|
|
2233
|
-
canGenerate: isEdit ||
|
|
2233
|
+
canGenerate: isEdit || chunkO3MRE2HL_cjs.isValidAgentName(values.name),
|
|
2234
2234
|
onGenerate: () => handleGenerateAvatar(values)
|
|
2235
2235
|
}
|
|
2236
2236
|
),
|
|
@@ -2282,7 +2282,7 @@ function ConnectedAgentCreator({
|
|
|
2282
2282
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
|
|
2283
2283
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
|
|
2284
2284
|
] }),
|
|
2285
|
-
connect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
+
connect && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
|
|
2286
2286
|
]
|
|
2287
2287
|
}
|
|
2288
2288
|
) })
|
|
@@ -2319,7 +2319,7 @@ function ConnectedWorkflowHistory({
|
|
|
2319
2319
|
const { openConversation } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
2320
2320
|
const { data: runs = [], isLoading } = react.useWorkflowRuns(workflow?.external_id);
|
|
2321
2321
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2322
|
-
|
|
2322
|
+
chunkO3MRE2HL_cjs.TaskRunsDialog,
|
|
2323
2323
|
{
|
|
2324
2324
|
inline,
|
|
2325
2325
|
hideHeader,
|
|
@@ -2354,8 +2354,8 @@ function ConnectedTaskActivityDialog({
|
|
|
2354
2354
|
}) {
|
|
2355
2355
|
const activity = react.useConversationActivity(conversationId, { live });
|
|
2356
2356
|
const { data: agents = [] } = react.useAgents();
|
|
2357
|
-
const { userId } =
|
|
2358
|
-
const { members } =
|
|
2357
|
+
const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
2358
|
+
const { members } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
|
|
2359
2359
|
const renderPerson = React9.useCallback(
|
|
2360
2360
|
(id) => {
|
|
2361
2361
|
const isMe = !!id && id === userId;
|
|
@@ -2371,7 +2371,7 @@ function ConnectedTaskActivityDialog({
|
|
|
2371
2371
|
[agents]
|
|
2372
2372
|
);
|
|
2373
2373
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2374
|
-
|
|
2374
|
+
chunkO3MRE2HL_cjs.TaskActivityDialog,
|
|
2375
2375
|
{
|
|
2376
2376
|
open: true,
|
|
2377
2377
|
onOpenChange: (open) => !open && onClose(),
|
|
@@ -2493,7 +2493,7 @@ function useAnswerRetry(missing, refetch) {
|
|
|
2493
2493
|
}
|
|
2494
2494
|
function useWorkflowThread(workflow, options2 = {}) {
|
|
2495
2495
|
const arbi = react.useArbi();
|
|
2496
|
-
const { ensureWorkspaceOpen, live, workspaceId } =
|
|
2496
|
+
const { ensureWorkspaceOpen, live, workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
2497
2497
|
const wsId = workspaceId ?? void 0;
|
|
2498
2498
|
const [threadId, setThreadId] = React9.useState(options2.conversationId);
|
|
2499
2499
|
const [localInputs, setLocalInputs] = React9.useState(
|
|
@@ -2517,7 +2517,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2517
2517
|
);
|
|
2518
2518
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
2519
2519
|
const steps = React9.useMemo(
|
|
2520
|
-
() => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) :
|
|
2520
|
+
() => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) : chunkO3MRE2HL_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
2521
2521
|
[workflow, conversation?.plan?.steps]
|
|
2522
2522
|
);
|
|
2523
2523
|
const activity = react.useConversationActivity(threadId, { live: !!threadId });
|
|
@@ -2577,7 +2577,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2577
2577
|
criteria: [],
|
|
2578
2578
|
max_passes: 3,
|
|
2579
2579
|
documents: [],
|
|
2580
|
-
steps:
|
|
2580
|
+
steps: chunkO3MRE2HL_cjs.toPlanSteps(workflow, {
|
|
2581
2581
|
inputs: values,
|
|
2582
2582
|
resolveWorkflow: options2.resolveWorkflow,
|
|
2583
2583
|
compose: options2.compose
|
|
@@ -2664,7 +2664,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2664
2664
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
2665
2665
|
const needsStart = !threadId || idle && !anyRunning;
|
|
2666
2666
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
2667
|
-
const view =
|
|
2667
|
+
const view = chunkO3MRE2HL_cjs.useWorkflowView({
|
|
2668
2668
|
steps,
|
|
2669
2669
|
states,
|
|
2670
2670
|
inputs,
|
|
@@ -2741,7 +2741,7 @@ function WorkflowSignDialog({
|
|
|
2741
2741
|
labels
|
|
2742
2742
|
}) {
|
|
2743
2743
|
const arbi = react.useArbi();
|
|
2744
|
-
const { user, ensureWorkspaceOpen } =
|
|
2744
|
+
const { user, ensureWorkspaceOpen } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
2745
2745
|
const tools = documentTools.useOptionalDocumentTools();
|
|
2746
2746
|
const { id, version: stepVersion } = chunkEZLZ3MDU_cjs.splitDocRef(docRef);
|
|
2747
2747
|
const [version, setVersion] = React9.useState(stepVersion);
|
|
@@ -2830,7 +2830,7 @@ function WorkflowWordDialog({
|
|
|
2830
2830
|
title: title ?? labels.wordTitle,
|
|
2831
2831
|
size: "xl",
|
|
2832
2832
|
testId: "workflow-word-dialog",
|
|
2833
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2833
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkUZVXVTTB_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
|
|
2834
2834
|
}
|
|
2835
2835
|
);
|
|
2836
2836
|
}
|
|
@@ -2841,7 +2841,7 @@ function WorkflowReviewGridDialog({
|
|
|
2841
2841
|
onOpenDocument,
|
|
2842
2842
|
labels
|
|
2843
2843
|
}) {
|
|
2844
|
-
const { workspaceId } =
|
|
2844
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
2845
2845
|
const allTags = react.useTags(workspaceId ?? void 0);
|
|
2846
2846
|
const all = react.useDocuments(workspaceId ?? void 0);
|
|
2847
2847
|
const isLoading = allTags.isLoading || all.isLoading || all.isFetching && !all.isFetchedAfterMount;
|
|
@@ -2978,13 +2978,13 @@ function ConnectedWorkflowRunner({
|
|
|
2978
2978
|
[openMail]
|
|
2979
2979
|
);
|
|
2980
2980
|
const onOpenDraft = hostOpenDraft ?? draftInMail;
|
|
2981
|
-
const citationInEnvironment =
|
|
2981
|
+
const citationInEnvironment = chunkDWWRLKEZ_cjs.useOpenCitation();
|
|
2982
2982
|
const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
|
|
2983
2983
|
const arbi = react.useArbi();
|
|
2984
|
-
const { ensureWorkspaceOpen, userId, workspaceId } =
|
|
2984
|
+
const { ensureWorkspaceOpen, userId, workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
2985
2985
|
const wsId = workspaceId ?? void 0;
|
|
2986
2986
|
const { data: docs = [], refetch } = react.useDocuments(wsId);
|
|
2987
|
-
const documentFilter =
|
|
2987
|
+
const documentFilter = chunkHDEOORSV_cjs.useDocumentFilter();
|
|
2988
2988
|
const [sending, setSending] = React9.useState([]);
|
|
2989
2989
|
const [added, setAdded] = React9.useState({});
|
|
2990
2990
|
const [addedNames, setAddedNames] = React9.useState({});
|
|
@@ -3152,7 +3152,7 @@ function ConnectedWorkflowRunner({
|
|
|
3152
3152
|
);
|
|
3153
3153
|
};
|
|
3154
3154
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3155
|
-
|
|
3155
|
+
chunkO3MRE2HL_cjs.WorkflowRunner,
|
|
3156
3156
|
{
|
|
3157
3157
|
people,
|
|
3158
3158
|
...runnerProps,
|
|
@@ -3198,7 +3198,7 @@ function ConnectedWorkflowRunner({
|
|
|
3198
3198
|
) }),
|
|
3199
3199
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3200
3200
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3201
|
-
|
|
3201
|
+
chunkO3MRE2HL_cjs.WorkflowStepBar,
|
|
3202
3202
|
{
|
|
3203
3203
|
run: view,
|
|
3204
3204
|
levels: chunkEZLZ3MDU_cjs.stepLevels(view.steps),
|
|
@@ -3294,7 +3294,7 @@ function ReviewNotify({
|
|
|
3294
3294
|
testId
|
|
3295
3295
|
}) {
|
|
3296
3296
|
const arbi = react.useArbi();
|
|
3297
|
-
const { live, userId, ensureWorkspaceOpen } =
|
|
3297
|
+
const { live, userId, ensureWorkspaceOpen } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
3298
3298
|
const { data: members = [] } = react.useWorkspaceUsers(workspaceId, {
|
|
3299
3299
|
enabled: live && !!workspaceId,
|
|
3300
3300
|
beforeFetch: ensureWorkspaceOpen
|
|
@@ -3489,7 +3489,7 @@ function ConnectedTagTable({
|
|
|
3489
3489
|
const fail2 = (fallback) => (e) => notify18(browser.refusalReason(e, fallback), "error");
|
|
3490
3490
|
const snapshot2 = (data) => {
|
|
3491
3491
|
const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
|
|
3492
|
-
const bytes =
|
|
3492
|
+
const bytes = chunk5ZHAHJ4H_cjs.tagTableDocx(data, {
|
|
3493
3493
|
title,
|
|
3494
3494
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
3495
3495
|
});
|
|
@@ -3498,7 +3498,7 @@ function ConnectedTagTable({
|
|
|
3498
3498
|
return { blob: new Blob([bytes], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }), name };
|
|
3499
3499
|
};
|
|
3500
3500
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3501
|
-
|
|
3501
|
+
chunk5ZHAHJ4H_cjs.TagTable,
|
|
3502
3502
|
{
|
|
3503
3503
|
...props,
|
|
3504
3504
|
table,
|
|
@@ -3636,9 +3636,9 @@ function GlossaryExport({ labelId, nameOf }) {
|
|
|
3636
3636
|
const narrowed = agreements.find((a) => a.id === narrowTo);
|
|
3637
3637
|
const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
|
|
3638
3638
|
const download = (format) => {
|
|
3639
|
-
const entries =
|
|
3640
|
-
const blob = format === "docx" ? new Blob([
|
|
3641
|
-
documentTools.downloadBlob(blob,
|
|
3639
|
+
const entries = chunk5ZHAHJ4H_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
|
|
3640
|
+
const blob = format === "docx" ? new Blob([chunk5ZHAHJ4H_cjs.glossaryDocx(entries, { title })], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }) : new Blob([chunk5ZHAHJ4H_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
|
|
3641
|
+
documentTools.downloadBlob(blob, chunk5ZHAHJ4H_cjs.glossaryFileName(title, format));
|
|
3642
3642
|
};
|
|
3643
3643
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
|
|
3644
3644
|
agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4424,7 +4424,7 @@ var DocumentSharedCell = React9.memo(function DocumentSharedCell2({
|
|
|
4424
4424
|
[document2.external_id, onToggle]
|
|
4425
4425
|
);
|
|
4426
4426
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4427
|
-
|
|
4427
|
+
chunk5ZHAHJ4H_cjs.SharedCell,
|
|
4428
4428
|
{
|
|
4429
4429
|
item: document2,
|
|
4430
4430
|
onToggle: handleToggle,
|
|
@@ -5135,7 +5135,7 @@ function KindSection({
|
|
|
5135
5135
|
{
|
|
5136
5136
|
testId: `tags-kind-${kind}`,
|
|
5137
5137
|
title: ui.tagKindTitle(kind, { plural: true }),
|
|
5138
|
-
description:
|
|
5138
|
+
description: chunk5ZHAHJ4H_cjs.tagKindDescription(kind),
|
|
5139
5139
|
actions: picker,
|
|
5140
5140
|
children: [
|
|
5141
5141
|
browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5146,9 +5146,9 @@ function KindSection({
|
|
|
5146
5146
|
children: [
|
|
5147
5147
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
5148
5148
|
"Extracting ",
|
|
5149
|
-
|
|
5149
|
+
chunk5ZHAHJ4H_cjs.entitiesPhrase().toLowerCase(),
|
|
5150
5150
|
" from ",
|
|
5151
|
-
|
|
5151
|
+
chunk5ZHAHJ4H_cjs.documentCount(extractingCount),
|
|
5152
5152
|
"\u2026"
|
|
5153
5153
|
]
|
|
5154
5154
|
}
|
|
@@ -5166,7 +5166,7 @@ function KindSection({
|
|
|
5166
5166
|
onOpenDocument: (id) => openDocument(id),
|
|
5167
5167
|
onOpenFact: ctx.onOpenFact,
|
|
5168
5168
|
onOpenThread: (id) => openConversation(id),
|
|
5169
|
-
labels:
|
|
5169
|
+
labels: chunk5ZHAHJ4H_cjs.tagTableLabels(kind),
|
|
5170
5170
|
testId: `tags-table-${kind}`
|
|
5171
5171
|
}
|
|
5172
5172
|
)
|
|
@@ -5268,12 +5268,12 @@ function TagSection({
|
|
|
5268
5268
|
onOpenDocument: (id) => openDocument(id),
|
|
5269
5269
|
onOpenFact: ctx.onOpenFact,
|
|
5270
5270
|
onOpenThread: (id) => openConversation(id),
|
|
5271
|
-
labels:
|
|
5271
|
+
labels: chunk5ZHAHJ4H_cjs.tagTableLabels(tag.kind),
|
|
5272
5272
|
testId: "tags-rows"
|
|
5273
5273
|
}
|
|
5274
5274
|
),
|
|
5275
5275
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5276
|
-
|
|
5276
|
+
chunk5ZHAHJ4H_cjs.TagDetail,
|
|
5277
5277
|
{
|
|
5278
5278
|
row: detailRow && narrowTagRow(detailRow, ctx.filter.matches),
|
|
5279
5279
|
fields: schema.data?.fields ?? [],
|
|
@@ -5285,10 +5285,10 @@ function TagSection({
|
|
|
5285
5285
|
onOpenDocument: (id) => openDocument(id),
|
|
5286
5286
|
onOpenFact: ctx.onOpenFact,
|
|
5287
5287
|
onOpenThread: (id) => openConversation(id),
|
|
5288
|
-
noteLabel:
|
|
5288
|
+
noteLabel: chunk5ZHAHJ4H_cjs.tagNoteLabel(tag.kind),
|
|
5289
5289
|
noteIsValue: tag.kind === "annotation",
|
|
5290
5290
|
renderPassages: (d, label) => renderPassages(d.doc_ext_id, label),
|
|
5291
|
-
labels:
|
|
5291
|
+
labels: chunk5ZHAHJ4H_cjs.tagDetailLabels(),
|
|
5292
5292
|
testId: "tags-detail"
|
|
5293
5293
|
}
|
|
5294
5294
|
)
|
|
@@ -5314,9 +5314,9 @@ function ConnectedTagsPage({
|
|
|
5314
5314
|
onReview
|
|
5315
5315
|
}) {
|
|
5316
5316
|
const { confirm, notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
5317
|
-
const { data: tags } =
|
|
5318
|
-
const { data: documents } =
|
|
5319
|
-
const { data: threads } =
|
|
5317
|
+
const { data: tags } = chunkHDEOORSV_cjs.useConnectedTags();
|
|
5318
|
+
const { data: documents } = chunkHDEOORSV_cjs.useConnectedDocuments();
|
|
5319
|
+
const { data: threads } = chunkHDEOORSV_cjs.useConnectedConversations();
|
|
5320
5320
|
const { data: facts = [] } = react.useFacts();
|
|
5321
5321
|
const createTag = react.useCreateTag();
|
|
5322
5322
|
const deleteTag = react.useDeleteTag();
|
|
@@ -5376,7 +5376,7 @@ function ConnectedTagsPage({
|
|
|
5376
5376
|
const onDelete = async (t) => {
|
|
5377
5377
|
const nested = browser.getChildTags([...tags], t.external_id);
|
|
5378
5378
|
const uses = browser.tagUseCount(t);
|
|
5379
|
-
const n2 =
|
|
5379
|
+
const n2 = chunk5ZHAHJ4H_cjs.tagsPageNouns();
|
|
5380
5380
|
const tagNoun = (count2) => (count2 === 1 ? n2.tag : n2.tags).toLowerCase();
|
|
5381
5381
|
const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
|
|
5382
5382
|
const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
|
|
@@ -5397,16 +5397,16 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5397
5397
|
try {
|
|
5398
5398
|
await extract.mutateAsync(docIds);
|
|
5399
5399
|
notify18(
|
|
5400
|
-
`Extracting ${
|
|
5400
|
+
`Extracting ${chunk5ZHAHJ4H_cjs.entitiesPhrase().toLowerCase()} from ${chunk5ZHAHJ4H_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
|
|
5401
5401
|
"info"
|
|
5402
5402
|
);
|
|
5403
5403
|
} catch (error) {
|
|
5404
|
-
notify18(browser.refusalReason(error, `Could not extract ${
|
|
5404
|
+
notify18(browser.refusalReason(error, `Could not extract ${chunk5ZHAHJ4H_cjs.entitiesPhrase().toLowerCase()}`), "error");
|
|
5405
5405
|
throw error;
|
|
5406
5406
|
}
|
|
5407
5407
|
};
|
|
5408
5408
|
const picker = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5409
|
-
|
|
5409
|
+
chunk5ZHAHJ4H_cjs.TagPicker,
|
|
5410
5410
|
{
|
|
5411
5411
|
tags: viewTags,
|
|
5412
5412
|
selectedId: tag?.external_id,
|
|
@@ -5420,10 +5420,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5420
5420
|
onOpenTag: openTag,
|
|
5421
5421
|
onOpenFact
|
|
5422
5422
|
};
|
|
5423
|
-
const n =
|
|
5423
|
+
const n = chunk5ZHAHJ4H_cjs.tagsPageNouns();
|
|
5424
5424
|
const action = view === "person" || view === "organisation" ? {
|
|
5425
5425
|
label: "Extract",
|
|
5426
|
-
title: `Extract ${
|
|
5426
|
+
title: `Extract ${chunk5ZHAHJ4H_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
|
|
5427
5427
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
|
|
5428
5428
|
run: () => setExtracting(true),
|
|
5429
5429
|
testId: "tags-extract-entities"
|
|
@@ -5573,7 +5573,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5573
5573
|
}
|
|
5574
5574
|
),
|
|
5575
5575
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5576
|
-
|
|
5576
|
+
chunk5ZHAHJ4H_cjs.ExtractEntitiesDialog,
|
|
5577
5577
|
{
|
|
5578
5578
|
open: extracting,
|
|
5579
5579
|
onOpenChange: setExtracting,
|
|
@@ -6241,7 +6241,7 @@ function useFactFilters(notes, view, chat) {
|
|
|
6241
6241
|
const createTag = react.useCreateTag();
|
|
6242
6242
|
const createTagAsync = createTag.mutateAsync;
|
|
6243
6243
|
const createTagStable = React9.useMemo(() => ({ mutateAsync: createTagAsync }), [createTagAsync]);
|
|
6244
|
-
const currentUserId =
|
|
6244
|
+
const currentUserId = chunkP6HVJP6Z_cjs.useConnectedWorkspace().userId;
|
|
6245
6245
|
const chatFactIdSet = React9.useMemo(() => new Set(chat?.factIds ?? NO_IDS), [chat?.factIds]);
|
|
6246
6246
|
const factFilterIds = React9.useMemo(
|
|
6247
6247
|
() => [
|
|
@@ -7031,7 +7031,7 @@ function ConnectedExportPanel({
|
|
|
7031
7031
|
initialMode
|
|
7032
7032
|
}) {
|
|
7033
7033
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
7034
|
-
const { workspaceId: currentWorkspaceId, userId, user, live } =
|
|
7034
|
+
const { workspaceId: currentWorkspaceId, userId, user, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
7035
7035
|
const { data: workspaces = [] } = react.useWorkspaces({ enabled: live });
|
|
7036
7036
|
const { data: workspaceTags = [] } = react.useTags(currentWorkspaceId ?? void 0);
|
|
7037
7037
|
const { data: workspaceDocuments = [] } = react.useDocuments(currentWorkspaceId ?? void 0);
|
|
@@ -7174,7 +7174,7 @@ function ConnectedExportPanel({
|
|
|
7174
7174
|
ui.ShieldIcon,
|
|
7175
7175
|
{
|
|
7176
7176
|
char: w.name.charAt(0),
|
|
7177
|
-
workspaceColor:
|
|
7177
|
+
workspaceColor: chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(w)),
|
|
7178
7178
|
size: 32,
|
|
7179
7179
|
isSelected: false
|
|
7180
7180
|
}
|
|
@@ -7339,7 +7339,7 @@ function OpenExportDialog({
|
|
|
7339
7339
|
initialMode,
|
|
7340
7340
|
testId = "export-entities-modal"
|
|
7341
7341
|
}) {
|
|
7342
|
-
const { workspaceId, live } =
|
|
7342
|
+
const { workspaceId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
7343
7343
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
7344
7344
|
const workspace = workspaces?.find((w) => w.external_id === workspaceId);
|
|
7345
7345
|
const wholeWorkspace = entityType === "WORKSPACE";
|
|
@@ -7361,7 +7361,7 @@ function OpenExportDialog({
|
|
|
7361
7361
|
ui.ShieldIcon,
|
|
7362
7362
|
{
|
|
7363
7363
|
char: workspace.name.charAt(0),
|
|
7364
|
-
workspaceColor:
|
|
7364
|
+
workspaceColor: chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
7365
7365
|
size: 20,
|
|
7366
7366
|
isSelected: false
|
|
7367
7367
|
}
|
|
@@ -7426,9 +7426,9 @@ function ConnectedFactsPage({
|
|
|
7426
7426
|
const FACT_LABELS = React9.useMemo(factNouns, []);
|
|
7427
7427
|
const ownView = useFactsPageView();
|
|
7428
7428
|
const pageView = hostView ?? ownView;
|
|
7429
|
-
const { workspaceId, userId } =
|
|
7429
|
+
const { workspaceId, userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
7430
7430
|
const { data: notes = [], isLoading, isError, refetch } = react.useFacts();
|
|
7431
|
-
const { data: documents } =
|
|
7431
|
+
const { data: documents } = chunkHDEOORSV_cjs.useConnectedDocuments();
|
|
7432
7432
|
const members = react.useWorkspaceUsers(workspaceId ?? void 0);
|
|
7433
7433
|
const gridApiRef = React9.useRef(null);
|
|
7434
7434
|
const [gridApi, setGridApi] = React9.useState(null);
|
|
@@ -7576,7 +7576,7 @@ function ConnectedFactsPage({
|
|
|
7576
7576
|
onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
|
|
7577
7577
|
navSlotRef: setNavSlot,
|
|
7578
7578
|
navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7579
|
-
|
|
7579
|
+
chunk5ZHAHJ4H_cjs.GridRowNavigator,
|
|
7580
7580
|
{
|
|
7581
7581
|
gridApi,
|
|
7582
7582
|
selectedId: editingId,
|
|
@@ -7812,7 +7812,7 @@ function ConnectedFactsPage({
|
|
|
7812
7812
|
] });
|
|
7813
7813
|
}
|
|
7814
7814
|
function useConnectedShellWorkspaces(options2 = {}) {
|
|
7815
|
-
const { workspaceId, setWorkspace } =
|
|
7815
|
+
const { workspaceId, setWorkspace } = chunkP6HVJP6Z_cjs.useConnection();
|
|
7816
7816
|
const query = react.useWorkspaces();
|
|
7817
7817
|
return react.useShellWorkspaces({
|
|
7818
7818
|
...options2,
|
|
@@ -7836,11 +7836,11 @@ var NO_SSO = {
|
|
|
7836
7836
|
getToken: async () => null
|
|
7837
7837
|
};
|
|
7838
7838
|
function useAuthPages() {
|
|
7839
|
-
const auth =
|
|
7839
|
+
const auth = chunkG2BKHCI2_cjs.useHost().auth;
|
|
7840
7840
|
return { ...auth, passwordRules: auth?.passwordRules ?? chunkBYJUI4AT_cjs.DEFAULT_PASSWORD_RULES };
|
|
7841
7841
|
}
|
|
7842
7842
|
function useSsoSignIn() {
|
|
7843
|
-
const sso =
|
|
7843
|
+
const sso = chunkG2BKHCI2_cjs.useHost().sso;
|
|
7844
7844
|
return sso ? sso.useSignIn() : NO_SSO;
|
|
7845
7845
|
}
|
|
7846
7846
|
function SessionStatusIcon({ status, className }) {
|
|
@@ -10049,7 +10049,7 @@ function ConnectionSettings({
|
|
|
10049
10049
|
rows,
|
|
10050
10050
|
icon: icon2
|
|
10051
10051
|
}) {
|
|
10052
|
-
const connection =
|
|
10052
|
+
const connection = chunkP6HVJP6Z_cjs.useOptionalConnection();
|
|
10053
10053
|
if (!connection) return null;
|
|
10054
10054
|
const { apiUrl, workspaceId, status, user, mode } = connection;
|
|
10055
10055
|
const connected = status === "authenticated" || status === "demo";
|
|
@@ -10355,7 +10355,7 @@ ${emails.join("\n")}`}
|
|
|
10355
10355
|
Invite them by email? Once they sign up, they'll usually get access to this ${workspaceWord()} automatically \u2014 if not, they can request it themselves.`;
|
|
10356
10356
|
function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
|
|
10357
10357
|
const { notify: notify18, confirm } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
10358
|
-
const { workspaceId: openWorkspaceId, userId } =
|
|
10358
|
+
const { workspaceId: openWorkspaceId, userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
10359
10359
|
const { data: workspaces } = react.useWorkspaces();
|
|
10360
10360
|
const workspace = workspaces?.find((w) => w.external_id === workspaceId);
|
|
10361
10361
|
const update = react.useUpdateWorkspace();
|
|
@@ -10740,7 +10740,7 @@ function ConnectedWorkspaceSettings({
|
|
|
10740
10740
|
}) {
|
|
10741
10741
|
const settings = useConnectedWorkspaceSettings(workspaceId, { onLeft });
|
|
10742
10742
|
const { workspace, members, isOwner, isMember } = settings;
|
|
10743
|
-
const { userId } =
|
|
10743
|
+
const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
10744
10744
|
const { data: userSettings } = react.useUserSettings();
|
|
10745
10745
|
const isDeveloper = userSettings?.developer === true;
|
|
10746
10746
|
const showAgents = userSettings?.show_agent_sessions ?? false;
|
|
@@ -10751,13 +10751,13 @@ function ConnectedWorkspaceSettings({
|
|
|
10751
10751
|
const [membersExpanded, setMembersExpanded] = React9.useState(false);
|
|
10752
10752
|
const [shareOpen, setShareOpen] = React9.useState(false);
|
|
10753
10753
|
if (!workspace) {
|
|
10754
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10754
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
10755
10755
|
}
|
|
10756
10756
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10757
10757
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspacePageFrame, { testId, children: [
|
|
10758
10758
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkKFQ6E6LE_cjs.WorkspaceIdentityPanel, { children: [
|
|
10759
10759
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10760
|
-
|
|
10760
|
+
chunk5ZHAHJ4H_cjs.EntityIdentityBar,
|
|
10761
10761
|
{
|
|
10762
10762
|
testId: "workspace-identity-bar",
|
|
10763
10763
|
canEdit: isOwner,
|
|
@@ -10774,12 +10774,12 @@ function ConnectedWorkspaceSettings({
|
|
|
10774
10774
|
label: "Name",
|
|
10775
10775
|
value: workspace.name,
|
|
10776
10776
|
placeholder: "Untitled",
|
|
10777
|
-
maxLength:
|
|
10777
|
+
maxLength: chunk5ZHAHJ4H_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
10778
10778
|
valueClassName: "truncate text-base font-semibold",
|
|
10779
10779
|
testId: "workspace-home-title",
|
|
10780
10780
|
hideLabel: true,
|
|
10781
10781
|
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10782
|
-
|
|
10782
|
+
chunkGX5MKJ3F_cjs.WorkspaceIdentity,
|
|
10783
10783
|
{
|
|
10784
10784
|
workspace: {
|
|
10785
10785
|
...react.toShellWorkspace(workspace),
|
|
@@ -10926,7 +10926,7 @@ function StripeCheckoutModal({
|
|
|
10926
10926
|
const [clientSecret, setClientSecret] = React9.useState(null);
|
|
10927
10927
|
const [isCreating, setIsCreating] = React9.useState(false);
|
|
10928
10928
|
const [stripe, setStripe] = React9.useState(null);
|
|
10929
|
-
const { stripeEnabled, checkout } =
|
|
10929
|
+
const { stripeEnabled, checkout } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
10930
10930
|
const createCheckout = react.useCreateProjectCheckout();
|
|
10931
10931
|
const refreshProject = react.useRefreshProject();
|
|
10932
10932
|
const invalidateProjects = react.useInvalidateProjects();
|
|
@@ -10953,7 +10953,7 @@ function StripeCheckoutModal({
|
|
|
10953
10953
|
projectExtId,
|
|
10954
10954
|
body: {
|
|
10955
10955
|
interval,
|
|
10956
|
-
packs:
|
|
10956
|
+
packs: chunkV7JDMKNQ_cjs.PRO_PACKS,
|
|
10957
10957
|
ai_blocks: aiBlocks,
|
|
10958
10958
|
storage_blocks: storageBlocks,
|
|
10959
10959
|
addon_budget_pence: addonBudgetPence,
|
|
@@ -10969,7 +10969,7 @@ function StripeCheckoutModal({
|
|
|
10969
10969
|
},
|
|
10970
10970
|
onError: (error) => {
|
|
10971
10971
|
console.error("Failed to create checkout session:", error);
|
|
10972
|
-
const reason =
|
|
10972
|
+
const reason = chunkV7JDMKNQ_cjs.apiErrorDetail(error)?.message;
|
|
10973
10973
|
shell.notify.error(
|
|
10974
10974
|
reason ? `Checkout didn't start: ${reason}` : "Checkout didn't start. Try again."
|
|
10975
10975
|
);
|
|
@@ -11002,7 +11002,7 @@ function StripeCheckoutModal({
|
|
|
11002
11002
|
}
|
|
11003
11003
|
}, [open]);
|
|
11004
11004
|
const isStripeConfigured = stripeEnabled;
|
|
11005
|
-
const vatNote = quote ? `${
|
|
11005
|
+
const vatNote = quote ? `${chunkV7JDMKNQ_cjs.checkoutItemsLabel(aiBlocks, storageBlocks)} \xB7 ${chunkV7JDMKNQ_cjs.quoteTotalLine(quote)}` : null;
|
|
11006
11006
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11007
11007
|
chunkFEVJA4BP_cjs.CheckoutDialogFrame,
|
|
11008
11008
|
{
|
|
@@ -11056,31 +11056,31 @@ function defaultBillingCountry(languages = typeof navigator === "undefined" ? []
|
|
|
11056
11056
|
}
|
|
11057
11057
|
var choiceForPacks = (packs) => packs > 0 ? "pro" : "free";
|
|
11058
11058
|
function proCard(selected, isAnnual, prices) {
|
|
11059
|
-
const packs =
|
|
11059
|
+
const packs = chunkV7JDMKNQ_cjs.PLAN_CHOICE_PACKS.pro;
|
|
11060
11060
|
const currency = prices.monthly?.currency ?? prices.annual?.currency ?? "gbp";
|
|
11061
|
-
const monthly =
|
|
11062
|
-
const annual =
|
|
11061
|
+
const monthly = chunkV7JDMKNQ_cjs.packPrice(prices.monthly, packs);
|
|
11062
|
+
const annual = chunkV7JDMKNQ_cjs.packPrice(prices.annual, packs);
|
|
11063
11063
|
const current = isAnnual ? annual : monthly;
|
|
11064
11064
|
const effectiveMonthly = current ? isAnnual ? current.amount_ex_vat / 12 : current.amount_ex_vat : null;
|
|
11065
11065
|
return {
|
|
11066
11066
|
id: packs,
|
|
11067
|
-
name:
|
|
11067
|
+
name: chunkV7JDMKNQ_cjs.planNameForPacks(packs),
|
|
11068
11068
|
isSelected: selected === "pro",
|
|
11069
11069
|
price: current && effectiveMonthly != null ? {
|
|
11070
11070
|
annual: isAnnual,
|
|
11071
|
-
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current.amount_ex_vat ?
|
|
11072
|
-
yearlyTotal: isAnnual ?
|
|
11071
|
+
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current.amount_ex_vat ? chunkV7JDMKNQ_cjs.formatMoney(monthly.amount_ex_vat * 12, currency) : void 0,
|
|
11072
|
+
yearlyTotal: isAnnual ? chunkV7JDMKNQ_cjs.formatMoney(current.amount_ex_vat, currency) : void 0,
|
|
11073
11073
|
intervalLabel: isAnnual ? "/yr + VAT" : "/mo",
|
|
11074
|
-
monthly:
|
|
11074
|
+
monthly: chunkV7JDMKNQ_cjs.formatMoney(Math.round(effectiveMonthly), currency),
|
|
11075
11075
|
taxLabel: "+ VAT",
|
|
11076
11076
|
// The inclusive figure for a UK customer, right under the headline.
|
|
11077
|
-
note: `${
|
|
11077
|
+
note: `${chunkV7JDMKNQ_cjs.formatMoney(current.amount, currency)}${isAnnual ? "/yr" : "/mo"} incl. UK VAT`
|
|
11078
11078
|
} : void 0,
|
|
11079
11079
|
features: [
|
|
11080
|
-
`${react.formatGbp(
|
|
11081
|
-
`${
|
|
11080
|
+
`${react.formatGbp(chunkV7JDMKNQ_cjs.PRO_AI_GBP)} of AI usage / month`,
|
|
11081
|
+
`${chunkV7JDMKNQ_cjs.PRO_STORAGE_GB} GB storage`,
|
|
11082
11082
|
"Unlimited collaborators",
|
|
11083
|
-
...isAnnual ? [
|
|
11083
|
+
...isAnnual ? [chunkV7JDMKNQ_cjs.ANNUAL_PREMIUM_AI_NOTE] : []
|
|
11084
11084
|
]
|
|
11085
11085
|
};
|
|
11086
11086
|
}
|
|
@@ -11092,9 +11092,9 @@ function buildPlanCards(selected, isAnnual, prices, isOnFree) {
|
|
|
11092
11092
|
isCurrent: isOnFree,
|
|
11093
11093
|
isSelected: selected === "free" && !isOnFree,
|
|
11094
11094
|
features: [
|
|
11095
|
-
`${react.formatGbp(
|
|
11096
|
-
`${
|
|
11097
|
-
|
|
11095
|
+
`${react.formatGbp(chunkV7JDMKNQ_cjs.FREE_AI_GBP)} of AI usage / month`,
|
|
11096
|
+
`${chunkV7JDMKNQ_cjs.FREE_STORAGE_MB.toLocaleString("en-US")} MB storage`,
|
|
11097
|
+
chunkV7JDMKNQ_cjs.FREE_COLLABORATORS === 0 ? "Just you" : `${chunkV7JDMKNQ_cjs.FREE_COLLABORATORS} collaborators`
|
|
11098
11098
|
]
|
|
11099
11099
|
};
|
|
11100
11100
|
return [free, proCard(selected, isAnnual, prices)];
|
|
@@ -11122,7 +11122,7 @@ function CheckoutAddonBudget({
|
|
|
11122
11122
|
value,
|
|
11123
11123
|
onChange
|
|
11124
11124
|
}) {
|
|
11125
|
-
const budget =
|
|
11125
|
+
const budget = chunkV7JDMKNQ_cjs.parseBudgetPounds(value);
|
|
11126
11126
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11127
11127
|
"div",
|
|
11128
11128
|
{
|
|
@@ -11145,7 +11145,7 @@ function CheckoutAddonBudget({
|
|
|
11145
11145
|
step: 25,
|
|
11146
11146
|
className: "h-8 w-24",
|
|
11147
11147
|
value,
|
|
11148
|
-
placeholder: String(
|
|
11148
|
+
placeholder: String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
11149
11149
|
onChange: (e) => onChange(e.target.value),
|
|
11150
11150
|
"aria-invalid": budget === void 0,
|
|
11151
11151
|
"data-testid": "checkout-addon-budget-input"
|
|
@@ -11163,7 +11163,7 @@ function BlockStepper({
|
|
|
11163
11163
|
onChange,
|
|
11164
11164
|
testId
|
|
11165
11165
|
}) {
|
|
11166
|
-
const set = (n) => onChange(Math.max(0, Math.min(
|
|
11166
|
+
const set = (n) => onChange(Math.max(0, Math.min(chunkV7JDMKNQ_cjs.MAX_CHECKOUT_BLOCKS, n)));
|
|
11167
11167
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11168
11168
|
"div",
|
|
11169
11169
|
{
|
|
@@ -11207,7 +11207,7 @@ function BlockStepper({
|
|
|
11207
11207
|
className: "size-8",
|
|
11208
11208
|
"aria-label": `More: ${label}`,
|
|
11209
11209
|
onClick: () => set(value + 1),
|
|
11210
|
-
disabled: value >=
|
|
11210
|
+
disabled: value >= chunkV7JDMKNQ_cjs.MAX_CHECKOUT_BLOCKS,
|
|
11211
11211
|
"data-testid": `${testId}-increment`,
|
|
11212
11212
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" })
|
|
11213
11213
|
}
|
|
@@ -11224,8 +11224,8 @@ function CheckoutAddonBlocks({
|
|
|
11224
11224
|
onStorageBlocksChange,
|
|
11225
11225
|
price
|
|
11226
11226
|
}) {
|
|
11227
|
-
const ai =
|
|
11228
|
-
const storage =
|
|
11227
|
+
const ai = chunkV7JDMKNQ_cjs.addonPrice(price, "ai_usage");
|
|
11228
|
+
const storage = chunkV7JDMKNQ_cjs.addonPrice(price, "storage");
|
|
11229
11229
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11230
11230
|
"div",
|
|
11231
11231
|
{
|
|
@@ -11235,8 +11235,8 @@ function CheckoutAddonBlocks({
|
|
|
11235
11235
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11236
11236
|
BlockStepper,
|
|
11237
11237
|
{
|
|
11238
|
-
label: `+${react.formatGbp(ai?.ai_gbp ||
|
|
11239
|
-
priceText:
|
|
11238
|
+
label: `+${react.formatGbp(ai?.ai_gbp || chunkV7JDMKNQ_cjs.ADDON_BLOCK_AI_GBP)} of AI usage`,
|
|
11239
|
+
priceText: chunkV7JDMKNQ_cjs.checkoutBlockPriceText(price, "ai_usage"),
|
|
11240
11240
|
value: aiBlocks,
|
|
11241
11241
|
onChange: onAiBlocksChange,
|
|
11242
11242
|
testId: "checkout-ai-blocks"
|
|
@@ -11245,8 +11245,8 @@ function CheckoutAddonBlocks({
|
|
|
11245
11245
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11246
11246
|
BlockStepper,
|
|
11247
11247
|
{
|
|
11248
|
-
label: `+${storage?.storage_gb ||
|
|
11249
|
-
priceText:
|
|
11248
|
+
label: `+${storage?.storage_gb || chunkV7JDMKNQ_cjs.STORAGE_BLOCK_GB} GB storage`,
|
|
11249
|
+
priceText: chunkV7JDMKNQ_cjs.checkoutBlockPriceText(price, "storage"),
|
|
11250
11250
|
value: storageBlocks,
|
|
11251
11251
|
onChange: onStorageBlocksChange,
|
|
11252
11252
|
testId: "checkout-storage-blocks"
|
|
@@ -11308,7 +11308,7 @@ function CheckoutTotal({
|
|
|
11308
11308
|
className: "text-sm font-medium text-foreground",
|
|
11309
11309
|
"data-testid": "checkout-total",
|
|
11310
11310
|
"aria-live": "polite",
|
|
11311
|
-
children: state.quote && !state.isLoading ?
|
|
11311
|
+
children: state.quote && !state.isLoading ? chunkV7JDMKNQ_cjs.quoteTotalLine(state.quote) : state.isLoading ? "Calculating total\u2026" : state.error
|
|
11312
11312
|
}
|
|
11313
11313
|
)
|
|
11314
11314
|
] });
|
|
@@ -11341,13 +11341,13 @@ function useCheckoutQuote({
|
|
|
11341
11341
|
...aiBlocks || storageBlocks ? { addons: { ai_usage: aiBlocks, storage: storageBlocks } } : {}
|
|
11342
11342
|
} : null
|
|
11343
11343
|
);
|
|
11344
|
-
const { code, message } = query.isError ?
|
|
11345
|
-
const locationInvalid = code ===
|
|
11344
|
+
const { code, message } = query.isError ? chunkV7JDMKNQ_cjs.quoteError(query.error) : {};
|
|
11345
|
+
const locationInvalid = code === chunkV7JDMKNQ_cjs.TAX_LOCATION_INVALID;
|
|
11346
11346
|
const isLoading = enabled && (query.isLoading || postal !== postalCode.trim());
|
|
11347
11347
|
return {
|
|
11348
11348
|
quote: query.data,
|
|
11349
11349
|
isLoading,
|
|
11350
|
-
showPostcode:
|
|
11350
|
+
showPostcode: chunkV7JDMKNQ_cjs.POSTCODE_COUNTRIES.includes(country) || locationInvalid || postalCode !== "",
|
|
11351
11351
|
error: query.isError ? locationInvalid ? message ?? "Enter your ZIP / postal code to see the total." : message ?? "Couldn't calculate tax. Stripe shows the total next." : null,
|
|
11352
11352
|
canContinue: !isLoading && (!!query.data || query.isError && !locationInvalid)
|
|
11353
11353
|
};
|
|
@@ -11380,12 +11380,12 @@ function ConnectedReferralRewardSummary({
|
|
|
11380
11380
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11381
11381
|
chunkFEVJA4BP_cjs.ReferralRewardSummary,
|
|
11382
11382
|
{
|
|
11383
|
-
amountLabel:
|
|
11383
|
+
amountLabel: chunkV7JDMKNQ_cjs.formatMoney(reward.amount, reward.currency),
|
|
11384
11384
|
breakdown: applied && totalCents != null && currency ? {
|
|
11385
|
-
subtotal:
|
|
11386
|
-
reward:
|
|
11387
|
-
youPay:
|
|
11388
|
-
rollover: applied.remaining > 0 ?
|
|
11385
|
+
subtotal: chunkV7JDMKNQ_cjs.formatMoney(totalCents, currency),
|
|
11386
|
+
reward: chunkV7JDMKNQ_cjs.formatMoney(applied.bonus, currency),
|
|
11387
|
+
youPay: chunkV7JDMKNQ_cjs.formatMoney(applied.youPay, currency),
|
|
11388
|
+
rollover: applied.remaining > 0 ? chunkV7JDMKNQ_cjs.formatMoney(applied.remaining, currency) : void 0
|
|
11389
11389
|
} : void 0
|
|
11390
11390
|
}
|
|
11391
11391
|
);
|
|
@@ -11393,10 +11393,10 @@ function ConnectedReferralRewardSummary({
|
|
|
11393
11393
|
function ConnectedReferralRewardNote() {
|
|
11394
11394
|
const reward = useReferralReward();
|
|
11395
11395
|
if (!reward) return null;
|
|
11396
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.ReferralRewardNote, { amountLabel:
|
|
11396
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.ReferralRewardNote, { amountLabel: chunkV7JDMKNQ_cjs.formatMoney(reward.amount, reward.currency) });
|
|
11397
11397
|
}
|
|
11398
11398
|
function createProjectErrorMessage(error, fallback = `Failed to create ${ui.entityNoun("PROJECT")}`) {
|
|
11399
|
-
const detail =
|
|
11399
|
+
const detail = chunkV7JDMKNQ_cjs.apiErrorDetail(error);
|
|
11400
11400
|
if (typeof detail === "string" && detail) return detail;
|
|
11401
11401
|
const message = detail?.message;
|
|
11402
11402
|
return typeof message === "string" && message ? message : fallback;
|
|
@@ -11406,7 +11406,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
11406
11406
|
const [plan, setPlan] = React9.useState("pro");
|
|
11407
11407
|
const [isAnnual, setIsAnnual] = React9.useState(false);
|
|
11408
11408
|
const [promoCode, setPromoCode] = React9.useState("");
|
|
11409
|
-
const [addonBudget, setAddonBudget] = React9.useState(String(
|
|
11409
|
+
const [addonBudget, setAddonBudget] = React9.useState(String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
11410
11410
|
const [checkoutBudget, setCheckoutBudget] = React9.useState(null);
|
|
11411
11411
|
const [aiBlocks, setAiBlocks] = React9.useState(0);
|
|
11412
11412
|
const [storageBlocks, setStorageBlocks] = React9.useState(0);
|
|
@@ -11420,7 +11420,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
11420
11420
|
const [checkoutProjectName, setCheckoutProjectName] = React9.useState("");
|
|
11421
11421
|
const [checkoutInterval, setCheckoutInterval] = React9.useState("month");
|
|
11422
11422
|
const paymentCompletedRef = React9.useRef(false);
|
|
11423
|
-
const { stripeEnabled } =
|
|
11423
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
11424
11424
|
const { data: products, isLoading: productsLoading } = react.useProducts({
|
|
11425
11425
|
enabled: stripeEnabled
|
|
11426
11426
|
});
|
|
@@ -11449,18 +11449,18 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
11449
11449
|
setPlan("pro");
|
|
11450
11450
|
setPromoCode("");
|
|
11451
11451
|
setPostalCode("");
|
|
11452
|
-
setAddonBudget(String(
|
|
11452
|
+
setAddonBudget(String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
11453
11453
|
setAiBlocks(0);
|
|
11454
11454
|
setStorageBlocks(0);
|
|
11455
11455
|
setIsCreating(false);
|
|
11456
11456
|
}
|
|
11457
11457
|
onOpenChange(newOpen);
|
|
11458
11458
|
};
|
|
11459
|
-
const prices =
|
|
11459
|
+
const prices = chunkV7JDMKNQ_cjs.findProPrices(products);
|
|
11460
11460
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
11461
|
-
const selectedPrice =
|
|
11461
|
+
const selectedPrice = chunkV7JDMKNQ_cjs.packPrice(intervalPrice);
|
|
11462
11462
|
const currency = intervalPrice?.currency ?? "gbp";
|
|
11463
|
-
const savingsPercent =
|
|
11463
|
+
const savingsPercent = chunkV7JDMKNQ_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
11464
11464
|
const isPro = stripeEnabled && plan !== "free";
|
|
11465
11465
|
const quote = useCheckoutQuote({
|
|
11466
11466
|
interval: isAnnual ? "year" : "month",
|
|
@@ -11470,14 +11470,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
11470
11470
|
storageBlocks,
|
|
11471
11471
|
enabled: open && isPro && !!selectedPrice
|
|
11472
11472
|
});
|
|
11473
|
-
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice &&
|
|
11473
|
+
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice && chunkV7JDMKNQ_cjs.parseBudgetPounds(addonBudget) !== void 0 && quote.canContinue);
|
|
11474
11474
|
const handleCreateFree = () => {
|
|
11475
11475
|
setIsCreating(true);
|
|
11476
11476
|
createProject.mutate(
|
|
11477
11477
|
{
|
|
11478
11478
|
name: projectName.trim(),
|
|
11479
11479
|
plan: "free",
|
|
11480
|
-
daily_cap_per_user:
|
|
11480
|
+
daily_cap_per_user: chunkV7JDMKNQ_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
11481
11481
|
},
|
|
11482
11482
|
{
|
|
11483
11483
|
onSuccess: () => {
|
|
@@ -11494,14 +11494,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
11494
11494
|
};
|
|
11495
11495
|
const handleSubscribe = () => {
|
|
11496
11496
|
const interval = isAnnual ? "year" : "month";
|
|
11497
|
-
const parsed =
|
|
11498
|
-
const budgetToSend = parsed == null || parsed ===
|
|
11497
|
+
const parsed = chunkV7JDMKNQ_cjs.parseBudgetPounds(addonBudget);
|
|
11498
|
+
const budgetToSend = parsed == null || parsed === chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed;
|
|
11499
11499
|
setIsCreating(true);
|
|
11500
11500
|
createProject.mutate(
|
|
11501
11501
|
{
|
|
11502
11502
|
name: projectName.trim(),
|
|
11503
11503
|
plan: "pro",
|
|
11504
|
-
daily_cap_per_user:
|
|
11504
|
+
daily_cap_per_user: chunkV7JDMKNQ_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
11505
11505
|
},
|
|
11506
11506
|
{
|
|
11507
11507
|
onSuccess: (newProject) => {
|
|
@@ -11666,7 +11666,7 @@ function ConnectedWorkspaceEntity({
|
|
|
11666
11666
|
...shieldProps
|
|
11667
11667
|
}) {
|
|
11668
11668
|
const name = workspace.name;
|
|
11669
|
-
const workspaceColor =
|
|
11669
|
+
const workspaceColor = chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(workspace));
|
|
11670
11670
|
const shield = /* @__PURE__ */ jsxRuntime.jsx(
|
|
11671
11671
|
ui.ShieldIcon,
|
|
11672
11672
|
{
|
|
@@ -11680,9 +11680,9 @@ function ConnectedWorkspaceEntity({
|
|
|
11680
11680
|
);
|
|
11681
11681
|
const documentCount2 = (workspace.shared_document_count ?? 0) + (workspace.private_document_count ?? 0);
|
|
11682
11682
|
const conversationCount = (workspace.shared_conversation_count ?? 0) + (workspace.private_conversation_count ?? 0);
|
|
11683
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11683
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltip, { children: [
|
|
11684
11684
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11685
|
-
|
|
11685
|
+
chunk5ZHAHJ4H_cjs.EntityTooltipHeader,
|
|
11686
11686
|
{
|
|
11687
11687
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11688
11688
|
ui.ShieldIcon,
|
|
@@ -11699,7 +11699,7 @@ function ConnectedWorkspaceEntity({
|
|
|
11699
11699
|
}
|
|
11700
11700
|
),
|
|
11701
11701
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11702
|
-
|
|
11702
|
+
chunk5ZHAHJ4H_cjs.EntityTooltipStats,
|
|
11703
11703
|
{
|
|
11704
11704
|
stats: [
|
|
11705
11705
|
{
|
|
@@ -11723,11 +11723,11 @@ function ConnectedWorkspaceEntity({
|
|
|
11723
11723
|
]
|
|
11724
11724
|
}
|
|
11725
11725
|
),
|
|
11726
|
-
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11726
|
+
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltipHint, { children: [
|
|
11727
11727
|
"Updated ",
|
|
11728
11728
|
ui.formatFriendlyDate(workspace.updated_at)
|
|
11729
11729
|
] }),
|
|
11730
|
-
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11730
|
+
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "WORKSPACE", className: "w-3 h-3" }), children: [
|
|
11731
11731
|
"Click to open ",
|
|
11732
11732
|
ui.getEntityLabel("WORKSPACE").toLowerCase(),
|
|
11733
11733
|
" settings"
|
|
@@ -11768,7 +11768,7 @@ function OpenableWorkspacePill({
|
|
|
11768
11768
|
className,
|
|
11769
11769
|
labelMaxWidth
|
|
11770
11770
|
}) {
|
|
11771
|
-
const { openWorkspace } =
|
|
11771
|
+
const { openWorkspace } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
11772
11772
|
const onClick = React9.useCallback(
|
|
11773
11773
|
(e) => {
|
|
11774
11774
|
e.stopPropagation();
|
|
@@ -11795,7 +11795,7 @@ function ConnectedProjectEntity({
|
|
|
11795
11795
|
subscription = "none",
|
|
11796
11796
|
...props
|
|
11797
11797
|
}) {
|
|
11798
|
-
const { stripeEnabled } =
|
|
11798
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
11799
11799
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11800
11800
|
ui.ProjectEntity,
|
|
11801
11801
|
{
|
|
@@ -11820,7 +11820,7 @@ function ConnectedProjectSelector({
|
|
|
11820
11820
|
readOnly,
|
|
11821
11821
|
className
|
|
11822
11822
|
}) {
|
|
11823
|
-
const { stripeEnabled } =
|
|
11823
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
11824
11824
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11825
11825
|
chunkKFQ6E6LE_cjs.ProjectPicker,
|
|
11826
11826
|
{
|
|
@@ -12010,7 +12010,7 @@ function ConnectedWorkspaceFormModal({
|
|
|
12010
12010
|
}) {
|
|
12011
12011
|
const [submitting, setSubmitting] = React9.useState(false);
|
|
12012
12012
|
const allowed = react.useCanCreateProjects();
|
|
12013
|
-
const { openWorkspace, live } =
|
|
12013
|
+
const { openWorkspace, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
12014
12014
|
const demoSeed = !live ? seed : void 0;
|
|
12015
12015
|
const canCreate = demoSeed ? true : allowed;
|
|
12016
12016
|
const workspaceLabel = ui.getEntityLabel("WORKSPACE");
|
|
@@ -12671,36 +12671,36 @@ function ConnectedSharePointAdminConsentPage({
|
|
|
12671
12671
|
const result = givenResult === void 0 ? queryResult : givenResult;
|
|
12672
12672
|
const { apiBaseUrl } = chunkB3NYBMDR_cjs.useBlocksEnvironment().runtimeConfig;
|
|
12673
12673
|
const consentUrl = `${apiBaseUrl}/v1/connectors/microsoft_sharepoint/admin-consent`;
|
|
12674
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12674
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { size: "md", children: [
|
|
12675
12675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12676
|
-
|
|
12676
|
+
chunkO3MRE2HL_cjs.ConsentHeader,
|
|
12677
12677
|
{
|
|
12678
12678
|
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkWALADS2S_cjs.VendorLogo, { vendorKey: "microsoft_sharepoint", product: "sharepoint" }),
|
|
12679
12679
|
title: "Approve ARBI for SharePoint access",
|
|
12680
12680
|
children: "A member of your organization uses ARBI and wants to sync documents from SharePoint. Your Microsoft 365 organization requires an administrator to approve this once for the whole organization."
|
|
12681
12681
|
}
|
|
12682
12682
|
),
|
|
12683
|
-
result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12684
|
-
result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12685
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12683
|
+
result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "success", title: "Access approved \u2014 you\u2019re all set.", className: "mt-4", children: "People in your organization can now connect SharePoint from their own ARBI account. Nothing is synced until each user connects and chooses what to import." }),
|
|
12684
|
+
result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "warning", title: "The approval didn\u2019t complete.", className: "mt-4", children: "The request was declined or canceled on the Microsoft screen. You can try again below \u2014 you must sign in with a Microsoft 365 administrator account of your organization." }),
|
|
12685
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentSection, { title: "What you are approving", children: [
|
|
12686
12686
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12687
|
-
|
|
12687
|
+
chunkO3MRE2HL_cjs.ConsentBulletList,
|
|
12688
12688
|
{
|
|
12689
12689
|
items: [
|
|
12690
12690
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12691
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12691
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: "Read SharePoint sites and files" }),
|
|
12692
12692
|
" \u2014 lets each user who connects their own account import documents from sites they already have access to. ARBI never gets more access than the user has."
|
|
12693
12693
|
] }),
|
|
12694
12694
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12695
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12695
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: "Sign users in and keep access" }),
|
|
12696
12696
|
" \u2014 standard sign-in (openid, profile, email) and offline access so syncs keep working between sessions."
|
|
12697
12697
|
] })
|
|
12698
12698
|
]
|
|
12699
12699
|
}
|
|
12700
12700
|
),
|
|
12701
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12701
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentText, { children: "Approving does not sync anything by itself and grants ARBI no standing access to your tenant. Each user still connects their own Microsoft account, and their tokens are end-to-end encrypted so ARBI\u2019s servers cannot read them at rest." }),
|
|
12702
12702
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { asChild: true, className: "w-full pointer-coarse:h-11", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: consentUrl, children: "Review and approve in Microsoft" }) }),
|
|
12703
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12703
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentText, { variant: "footnote", children: "You\u2019ll sign in at login.microsoftonline.com and see Microsoft\u2019s own summary of these permissions before anything is granted." })
|
|
12704
12704
|
] })
|
|
12705
12705
|
] }) });
|
|
12706
12706
|
}
|
|
@@ -12722,7 +12722,7 @@ function BillingProjectEntity({
|
|
|
12722
12722
|
subscription = "none",
|
|
12723
12723
|
...props
|
|
12724
12724
|
}) {
|
|
12725
|
-
const { stripeEnabled } =
|
|
12725
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
12726
12726
|
const isPaid2 = stripeEnabled && (subscription === "active" || subscription === "past_due" || subscription === "dev");
|
|
12727
12727
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.ProjectEntity, { ...props, subscription, isPaid: isPaid2 });
|
|
12728
12728
|
}
|
|
@@ -12749,8 +12749,8 @@ function InvoicesModal({
|
|
|
12749
12749
|
key: inv.number ?? String(i),
|
|
12750
12750
|
date: formatInvoiceDate(inv.date),
|
|
12751
12751
|
kind: KIND_LABELS2[inv.kind],
|
|
12752
|
-
amount:
|
|
12753
|
-
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${
|
|
12752
|
+
amount: chunkV7JDMKNQ_cjs.formatMoney(inv.amount, inv.currency),
|
|
12753
|
+
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${chunkV7JDMKNQ_cjs.formatMoney(inv.amount_ex_vat, inv.currency)} ex VAT` : void 0,
|
|
12754
12754
|
status: inv.status,
|
|
12755
12755
|
isPaid: isPaid2,
|
|
12756
12756
|
href: inv.hosted_invoice_url ?? inv.url ?? inv.pdf_url ?? void 0,
|
|
@@ -12772,7 +12772,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
12772
12772
|
const { data: products, isLoading, error } = react.useProducts();
|
|
12773
12773
|
const [isAnnual, setIsAnnual] = React9.useState(false);
|
|
12774
12774
|
const [promoCode, setPromoCode] = React9.useState("");
|
|
12775
|
-
const [addonBudget, setAddonBudget] = React9.useState(String(
|
|
12775
|
+
const [addonBudget, setAddonBudget] = React9.useState(String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
12776
12776
|
const [checkoutBudget, setCheckoutBudget] = React9.useState(null);
|
|
12777
12777
|
const [aiBlocks, setAiBlocks] = React9.useState(0);
|
|
12778
12778
|
const [storageBlocks, setStorageBlocks] = React9.useState(0);
|
|
@@ -12793,16 +12793,16 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
12793
12793
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanNotice, { children: "Loading plans\u2026" });
|
|
12794
12794
|
if (error) return /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanNotice, { tone: "error", children: "Plans didn't load. Try again." });
|
|
12795
12795
|
if (!products || products.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanNotice, { children: "No plans available." });
|
|
12796
|
-
const prices =
|
|
12796
|
+
const prices = chunkV7JDMKNQ_cjs.findProPrices(products);
|
|
12797
12797
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
12798
|
-
const selectedPrice =
|
|
12798
|
+
const selectedPrice = chunkV7JDMKNQ_cjs.packPrice(intervalPrice);
|
|
12799
12799
|
if (!intervalPrice) return null;
|
|
12800
12800
|
const interval = isAnnual ? "year" : "month";
|
|
12801
|
-
const savingsPercent =
|
|
12801
|
+
const savingsPercent = chunkV7JDMKNQ_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
12802
12802
|
const handleSubscribe = () => {
|
|
12803
12803
|
setCheckoutInterval(interval);
|
|
12804
|
-
const parsed =
|
|
12805
|
-
setCheckoutBudget(parsed == null || parsed ===
|
|
12804
|
+
const parsed = chunkV7JDMKNQ_cjs.parseBudgetPounds(addonBudget);
|
|
12805
|
+
setCheckoutBudget(parsed == null || parsed === chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed);
|
|
12806
12806
|
setCheckoutQuote(quote.quote);
|
|
12807
12807
|
setIsCheckoutModalOpen(true);
|
|
12808
12808
|
};
|
|
@@ -12880,7 +12880,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
12880
12880
|
{
|
|
12881
12881
|
fill: true,
|
|
12882
12882
|
onClick: handleSubscribe,
|
|
12883
|
-
disabled: !selectedPrice ||
|
|
12883
|
+
disabled: !selectedPrice || chunkV7JDMKNQ_cjs.parseBudgetPounds(addonBudget) === void 0 || !quote.canContinue,
|
|
12884
12884
|
size: "sm",
|
|
12885
12885
|
"data-testid": "subscribe-button",
|
|
12886
12886
|
children: "Continue to payment"
|
|
@@ -12914,7 +12914,7 @@ var FALLBACK_MESSAGES = {
|
|
|
12914
12914
|
BILLING_ADDRESS_REQUIRED: "Add a billing address first."
|
|
12915
12915
|
};
|
|
12916
12916
|
function addonErrorMessage(error) {
|
|
12917
|
-
const detail =
|
|
12917
|
+
const detail = chunkV7JDMKNQ_cjs.apiErrorDetail(error);
|
|
12918
12918
|
if (detail && typeof detail === "object") {
|
|
12919
12919
|
const { code, message } = detail;
|
|
12920
12920
|
if (message) return message;
|
|
@@ -12940,18 +12940,18 @@ function chargeRefusalMessage(error) {
|
|
|
12940
12940
|
return code ? REFUSALS[code] : null;
|
|
12941
12941
|
}
|
|
12942
12942
|
function addonErrorCode(error) {
|
|
12943
|
-
const detail =
|
|
12943
|
+
const detail = chunkV7JDMKNQ_cjs.apiErrorDetail(error);
|
|
12944
12944
|
if (detail && typeof detail === "object") {
|
|
12945
12945
|
const code = detail.code;
|
|
12946
12946
|
if (code && code in FALLBACK_MESSAGES) return code;
|
|
12947
12947
|
}
|
|
12948
12948
|
return null;
|
|
12949
12949
|
}
|
|
12950
|
-
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ??
|
|
12950
|
+
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ?? chunkV7JDMKNQ_cjs.ADDON_BLOCK_AI_GBP)} of AI usage added` : `${blockStorageGb ?? chunkV7JDMKNQ_cjs.STORAGE_BLOCK_GB} GB added`;
|
|
12951
12951
|
function useAddonPurchase() {
|
|
12952
12952
|
const addBlock = react.useAddProjectAddonBlock();
|
|
12953
12953
|
const { mutate } = addBlock;
|
|
12954
|
-
const { onAddonBlocksBought } =
|
|
12954
|
+
const { onAddonBlocksBought } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
12955
12955
|
const buy = React9.useCallback(
|
|
12956
12956
|
(kind, projectExtId, options2) => {
|
|
12957
12957
|
mutate(
|
|
@@ -12995,7 +12995,7 @@ function PlanChangeLines({
|
|
|
12995
12995
|
isError,
|
|
12996
12996
|
className
|
|
12997
12997
|
}) {
|
|
12998
|
-
const lines = preview ?
|
|
12998
|
+
const lines = preview ? chunkV7JDMKNQ_cjs.planPreviewLines(preview) : [{ id: "pay-today", text: isError ? chunkV7JDMKNQ_cjs.PAY_TODAY_UNPRICED : "Checking price\u2026" }];
|
|
12999
12999
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-testid": "plan-change-lines", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": `plan-change-${line.id}`, children: line.text }, line.id)) });
|
|
13000
13000
|
}
|
|
13001
13001
|
var BANK_CONFIRM_PLAN_CHANGE = "Confirm with your bank. Nothing is charged until you do.";
|
|
@@ -13003,13 +13003,13 @@ function notifyPlanChange(data, fallback, planName2) {
|
|
|
13003
13003
|
const outcome = data?.plan_change;
|
|
13004
13004
|
switch (outcome?.result) {
|
|
13005
13005
|
case "upgraded": {
|
|
13006
|
-
const plan =
|
|
13007
|
-
const charged = outcome.charged_pence > 0 ? ` \xB7 ${
|
|
13006
|
+
const plan = chunkV7JDMKNQ_cjs.planNameForPacks(data?.addons?.packs ?? data?.packs);
|
|
13007
|
+
const charged = outcome.charged_pence > 0 ? ` \xB7 ${chunkV7JDMKNQ_cjs.formatMoney(outcome.charged_pence, "gbp")} charged` : "";
|
|
13008
13008
|
shell.notify.success(`Upgraded to ${plan}${charged}`);
|
|
13009
13009
|
break;
|
|
13010
13010
|
}
|
|
13011
13011
|
case "scheduled": {
|
|
13012
|
-
const when2 =
|
|
13012
|
+
const when2 = chunkV7JDMKNQ_cjs.formatPeriodEnd(data?.addons?.period_end ?? data?.current_period_end);
|
|
13013
13013
|
shell.notify.success(when2 ? `Scheduled for ${when2}` : fallback);
|
|
13014
13014
|
break;
|
|
13015
13015
|
}
|
|
@@ -13042,23 +13042,23 @@ function ChangeProPlan({
|
|
|
13042
13042
|
const { data: products } = react.useProducts();
|
|
13043
13043
|
const changePlan = react.useChangeProjectPlan();
|
|
13044
13044
|
const cancel = react.useCancelProjectSubscription();
|
|
13045
|
-
const prices =
|
|
13045
|
+
const prices = chunkV7JDMKNQ_cjs.findProPrices(products);
|
|
13046
13046
|
const addons = project.addons;
|
|
13047
13047
|
const isCanceling = project.cancel_at_period_end === true || project.subscription === "canceled";
|
|
13048
|
-
const currentPacks = Math.max(addons?.packs ?? project.packs ??
|
|
13049
|
-
const isLegacyMultiPack = currentPacks >
|
|
13048
|
+
const currentPacks = Math.max(addons?.packs ?? project.packs ?? chunkV7JDMKNQ_cjs.PRO_PACKS, chunkV7JDMKNQ_cjs.PRO_PACKS);
|
|
13049
|
+
const isLegacyMultiPack = currentPacks > chunkV7JDMKNQ_cjs.PRO_PACKS;
|
|
13050
13050
|
const currentInterval = project.plan_interval === "year" ? "year" : "month";
|
|
13051
13051
|
const scheduledPacks = isCanceling ? 0 : addons?.packs_next ?? currentPacks;
|
|
13052
13052
|
const scheduledInterval = addons?.pending_interval ?? currentInterval;
|
|
13053
13053
|
const [targetPacks, setTargetPacks] = React9.useState(scheduledPacks);
|
|
13054
13054
|
const [chosenInterval, setChosenInterval] = React9.useState(scheduledInterval);
|
|
13055
|
-
const targetInterval = targetPacks >
|
|
13055
|
+
const targetInterval = targetPacks > chunkV7JDMKNQ_cjs.PRO_PACKS ? currentInterval : chosenInterval;
|
|
13056
13056
|
const periodEnd = formatDate(addons?.period_end ?? project.current_period_end);
|
|
13057
13057
|
const when2 = periodEnd ?? "the end of the period";
|
|
13058
13058
|
const shortWhen = periodEnd ? periodEnd.replace(/ \d{4}$/, "") : "period end";
|
|
13059
13059
|
const isPending = changePlan.isPending || cancel.isPending;
|
|
13060
13060
|
const sameAsScheduled = targetPacks === scheduledPacks && (targetPacks === 0 || targetInterval === scheduledInterval);
|
|
13061
|
-
const packOptions = isLegacyMultiPack ? [currentPacks,
|
|
13061
|
+
const packOptions = isLegacyMultiPack ? [currentPacks, chunkV7JDMKNQ_cjs.PRO_PACKS, 0] : [chunkV7JDMKNQ_cjs.PRO_PACKS, 0];
|
|
13062
13062
|
const intervalPrice = targetInterval === "year" ? prices.annual : prices.monthly;
|
|
13063
13063
|
const currency = intervalPrice?.currency ?? project.currency ?? "gbp";
|
|
13064
13064
|
const preview = react.usePreviewProjectPlanChange(
|
|
@@ -13066,7 +13066,7 @@ function ChangeProPlan({
|
|
|
13066
13066
|
sameAsScheduled || targetPacks === 0 ? null : { packs: targetPacks, interval: targetInterval }
|
|
13067
13067
|
);
|
|
13068
13068
|
const noChange = sameAsScheduled || preview.data?.unchanged === true;
|
|
13069
|
-
const nameFor = (packs) => packs === currentPacks && packs > 0 ?
|
|
13069
|
+
const nameFor = (packs) => packs === currentPacks && packs > 0 ? chunkV7JDMKNQ_cjs.proTierName(project) : chunkV7JDMKNQ_cjs.planNameForPacks(packs);
|
|
13070
13070
|
const effects = [];
|
|
13071
13071
|
const target = nameFor(targetPacks);
|
|
13072
13072
|
if (targetPacks === 0) {
|
|
@@ -13076,7 +13076,7 @@ function ChangeProPlan({
|
|
|
13076
13076
|
if (targetPacks < currentPacks) {
|
|
13077
13077
|
effects.push(`Changes to one Pro licence on ${when2}. No refund.`);
|
|
13078
13078
|
} else if (!isCanceling && addons?.packs_next != null) {
|
|
13079
|
-
effects.push(`Cancels the change to ${
|
|
13079
|
+
effects.push(`Cancels the change to ${chunkV7JDMKNQ_cjs.planNameForPacks(addons.packs_next)}.`);
|
|
13080
13080
|
}
|
|
13081
13081
|
if (targetInterval !== currentInterval) {
|
|
13082
13082
|
effects.push(`${targetInterval === "year" ? "Annual" : "Monthly"} billing from ${when2}.`);
|
|
@@ -13115,26 +13115,26 @@ function ChangeProPlan({
|
|
|
13115
13115
|
if (packs === 0) {
|
|
13116
13116
|
return {
|
|
13117
13117
|
total: "\xA30",
|
|
13118
|
-
summary: `${react.formatGbp(
|
|
13118
|
+
summary: `${react.formatGbp(chunkV7JDMKNQ_cjs.FREE_AI_GBP)} of AI usage \xB7 ${chunkV7JDMKNQ_cjs.FREE_STORAGE_MB} MB \xB7 just you`
|
|
13119
13119
|
};
|
|
13120
13120
|
}
|
|
13121
|
-
const allowance = `${react.formatGbp(
|
|
13122
|
-
const legacy = packs >
|
|
13123
|
-
const exVat = legacy ? project.amount_ex_vat :
|
|
13121
|
+
const allowance = `${react.formatGbp(chunkV7JDMKNQ_cjs.PRO_AI_GBP * packs)} of AI usage \xB7 ${chunkV7JDMKNQ_cjs.PRO_STORAGE_GB * packs} GB`;
|
|
13122
|
+
const legacy = packs > chunkV7JDMKNQ_cjs.PRO_PACKS;
|
|
13123
|
+
const exVat = legacy ? project.amount_ex_vat : chunkV7JDMKNQ_cjs.packPrice(intervalPrice)?.amount_ex_vat;
|
|
13124
13124
|
return {
|
|
13125
|
-
total: exVat != null ?
|
|
13125
|
+
total: exVat != null ? chunkV7JDMKNQ_cjs.plusVat(exVat, currency) : void 0,
|
|
13126
13126
|
summary: allowance
|
|
13127
13127
|
};
|
|
13128
13128
|
};
|
|
13129
13129
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkFEVJA4BP_cjs.PlanStack, { gap: 4, testId: "change-pro-plan", children: [
|
|
13130
13130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
13131
13131
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: "Billing" }),
|
|
13132
|
-
targetPacks >
|
|
13132
|
+
targetPacks > chunkV7JDMKNQ_cjs.PRO_PACKS ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", "data-testid": "change-plan-interval-fixed", children: currentInterval === "year" ? "Annual" : "Monthly" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
13133
13133
|
chunkFEVJA4BP_cjs.PricingToggle,
|
|
13134
13134
|
{
|
|
13135
13135
|
isAnnual: targetInterval === "year",
|
|
13136
13136
|
onToggle: () => setChosenInterval(targetInterval === "year" ? "month" : "year"),
|
|
13137
|
-
savingsPercent:
|
|
13137
|
+
savingsPercent: chunkV7JDMKNQ_cjs.calcSavingsPercent(prices.monthly, prices.annual)
|
|
13138
13138
|
}
|
|
13139
13139
|
)
|
|
13140
13140
|
] }),
|
|
@@ -13159,12 +13159,12 @@ function ChangeProPlan({
|
|
|
13159
13159
|
}) }),
|
|
13160
13160
|
isLegacyMultiPack && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
13161
13161
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkFEVJA4BP_cjs.PlanNotice, { className: "text-xs", testId: "change-plan-legacy-note", children: [
|
|
13162
|
-
|
|
13162
|
+
chunkV7JDMKNQ_cjs.proTierName(project),
|
|
13163
13163
|
" is no longer sold"
|
|
13164
13164
|
] }),
|
|
13165
13165
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkFEVJA4BP_cjs.MoreInfo, { title: "Legacy plan", testId: "change-plan-legacy-more-info", children: [
|
|
13166
13166
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
13167
|
-
|
|
13167
|
+
chunkV7JDMKNQ_cjs.proTierName(project),
|
|
13168
13168
|
" keeps renewing at its own price, with its allowance and add-ons, until you change it."
|
|
13169
13169
|
] }),
|
|
13170
13170
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
@@ -13196,7 +13196,7 @@ function ChangeProPlan({
|
|
|
13196
13196
|
] });
|
|
13197
13197
|
}
|
|
13198
13198
|
function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
13199
|
-
const isPro = !!project &&
|
|
13199
|
+
const isPro = !!project && chunkV7JDMKNQ_cjs.isProProject(project);
|
|
13200
13200
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13201
13201
|
chunkFEVJA4BP_cjs.PlanDialogFrame,
|
|
13202
13202
|
{
|
|
@@ -13218,14 +13218,14 @@ function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
|
13218
13218
|
}
|
|
13219
13219
|
function ProjectsTable() {
|
|
13220
13220
|
const { data: projects, isLoading } = react.useProjects();
|
|
13221
|
-
const currentUserExtId =
|
|
13221
|
+
const currentUserExtId = chunkV7JDMKNQ_cjs.useSelfExtId();
|
|
13222
13222
|
const { openProject } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
13223
13223
|
const updateProject = react.useUpdateProjectFields();
|
|
13224
13224
|
const [renameTarget, setRenameTarget] = React9.useState(null);
|
|
13225
13225
|
const [renameValue, setRenameValue] = React9.useState("");
|
|
13226
13226
|
const [invoicesTarget, setInvoicesTarget] = React9.useState(null);
|
|
13227
13227
|
const [upgradeTarget, setUpgradeTarget] = React9.useState(null);
|
|
13228
|
-
const { stripeEnabled } =
|
|
13228
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
13229
13229
|
const ownedProjects = React9.useMemo(
|
|
13230
13230
|
() => (projects ?? []).filter((p) => p.created_by === currentUserExtId),
|
|
13231
13231
|
[projects, currentUserExtId]
|
|
@@ -13269,8 +13269,8 @@ function ProjectsTable() {
|
|
|
13269
13269
|
testId: `project-row-${p.external_id}`,
|
|
13270
13270
|
onOpen: () => openProject(p.external_id),
|
|
13271
13271
|
identity: /* @__PURE__ */ jsxRuntime.jsx(BillingProjectEntity, { name: p.name, relation: "mine", subscription: p.subscription, size: "sm" }),
|
|
13272
|
-
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...
|
|
13273
|
-
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.QuotaMeter, { items:
|
|
13272
|
+
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...chunkV7JDMKNQ_cjs.planBadgeView(p) }) }) : void 0,
|
|
13273
|
+
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.QuotaMeter, { items: chunkV7JDMKNQ_cjs.getQuotaItems(p.quotas), size: "lg" }) : void 0,
|
|
13274
13274
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13275
13275
|
canUpgrade && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13276
13276
|
ui.Button,
|
|
@@ -13337,7 +13337,7 @@ function ProjectsTable() {
|
|
|
13337
13337
|
}
|
|
13338
13338
|
function SharedProjects() {
|
|
13339
13339
|
const { data: projects } = react.useProjects();
|
|
13340
|
-
const currentUserExtId =
|
|
13340
|
+
const currentUserExtId = chunkV7JDMKNQ_cjs.useSelfExtId();
|
|
13341
13341
|
const { data: usageToday } = react.useUserUsageToday();
|
|
13342
13342
|
const shared = React9.useMemo(
|
|
13343
13343
|
() => (projects ?? []).filter((p) => p.created_by !== currentUserExtId),
|
|
@@ -13413,9 +13413,9 @@ function SubscriptionStatus({ project }) {
|
|
|
13413
13413
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13414
13414
|
chunkFEVJA4BP_cjs.SubscriptionStatusView,
|
|
13415
13415
|
{
|
|
13416
|
-
resetDate:
|
|
13416
|
+
resetDate: chunkV7JDMKNQ_cjs.formatResetDate(addons?.ai_usage_reset_at ?? current_period_end),
|
|
13417
13417
|
isCanceling: subscription === "canceled" || cancel_at_period_end === true,
|
|
13418
|
-
meters:
|
|
13418
|
+
meters: chunkV7JDMKNQ_cjs.getQuotaItems(quotas).map((q) => ({
|
|
13419
13419
|
key: q.key,
|
|
13420
13420
|
icon: q.icon,
|
|
13421
13421
|
label: q.label,
|
|
@@ -13479,7 +13479,7 @@ function PendingChange({
|
|
|
13479
13479
|
}
|
|
13480
13480
|
);
|
|
13481
13481
|
}
|
|
13482
|
-
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ??
|
|
13482
|
+
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ?? chunkV7JDMKNQ_cjs.ADDON_BLOCK_AI_GBP)} of AI usage` : `Add ${blockStorageGb ?? chunkV7JDMKNQ_cjs.STORAGE_BLOCK_GB} GB storage`;
|
|
13483
13483
|
var blocksOf = (kind, project) => (kind === "ai_usage" ? project.addons?.ai_blocks : project.addons?.storage_blocks) ?? 0;
|
|
13484
13484
|
function Row({ label, children }) {
|
|
13485
13485
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
@@ -13500,11 +13500,11 @@ function AddAddonDialog({
|
|
|
13500
13500
|
const addons = project.addons;
|
|
13501
13501
|
if (!addons) return null;
|
|
13502
13502
|
const isAnnual = project.plan_interval === "year";
|
|
13503
|
-
const price =
|
|
13504
|
-
const nextCharge =
|
|
13505
|
-
const now = quote.data ?
|
|
13506
|
-
const renewal = quote.data ?
|
|
13507
|
-
const today = now ? { total:
|
|
13503
|
+
const price = chunkV7JDMKNQ_cjs.addonCharge(kind, addons, isAnnual, addons.period_end ?? project.current_period_end);
|
|
13504
|
+
const nextCharge = chunkV7JDMKNQ_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
13505
|
+
const now = quote.data ? chunkV7JDMKNQ_cjs.quoteParts(quote.data.now) : null;
|
|
13506
|
+
const renewal = quote.data ? chunkV7JDMKNQ_cjs.quoteParts(quote.data.renewal) : null;
|
|
13507
|
+
const today = now ? { total: chunkV7JDMKNQ_cjs.money2(now.total), detail: chunkV7JDMKNQ_cjs.taxDetail(now) } : { total: price.now, detail: `incl. VAT (${price.nowExVat} + ${price.nowVat} VAT)` };
|
|
13508
13508
|
const pricing = quote.isLoading;
|
|
13509
13509
|
const confirm = () => {
|
|
13510
13510
|
const before = blocksOf(kind, project);
|
|
@@ -13559,7 +13559,7 @@ function AddAddonDialog({
|
|
|
13559
13559
|
term: "Usage cap",
|
|
13560
13560
|
text: "Adding by hand is never blocked by the usage cap; the cap limits automatic top-ups only."
|
|
13561
13561
|
},
|
|
13562
|
-
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${
|
|
13562
|
+
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${chunkV7JDMKNQ_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : []
|
|
13563
13563
|
]
|
|
13564
13564
|
}
|
|
13565
13565
|
) })
|
|
@@ -13582,7 +13582,7 @@ function AddAddonDialog({
|
|
|
13582
13582
|
)
|
|
13583
13583
|
] }) }),
|
|
13584
13584
|
!pricing && /* @__PURE__ */ jsxRuntime.jsxs(Row, { label: "Next charge", children: [
|
|
13585
|
-
renewal ?
|
|
13585
|
+
renewal ? chunkV7JDMKNQ_cjs.totalWithTaxWord(renewal) : price.then.replace(/\/(month|year)/, ""),
|
|
13586
13586
|
nextCharge ? ` on ${nextCharge}` : " at renewal"
|
|
13587
13587
|
] })
|
|
13588
13588
|
] }) }),
|
|
@@ -13613,11 +13613,11 @@ function ReduceAddonDialog({
|
|
|
13613
13613
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
13614
13614
|
const addons = project.addons;
|
|
13615
13615
|
if (!addons) return null;
|
|
13616
|
-
const { min, next } =
|
|
13616
|
+
const { min, next } = chunkV7JDMKNQ_cjs.reduceBounds(kind, addons);
|
|
13617
13617
|
const keep2 = Math.max(min, next - 1);
|
|
13618
|
-
const size =
|
|
13619
|
-
const what =
|
|
13620
|
-
const from =
|
|
13618
|
+
const size = chunkV7JDMKNQ_cjs.nextRemovedBlockSize(kind, addons);
|
|
13619
|
+
const what = chunkV7JDMKNQ_cjs.stepLabel(kind, size);
|
|
13620
|
+
const from = chunkV7JDMKNQ_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end) ?? "your next renewal";
|
|
13621
13621
|
const fromShort = from.replace(/ \d{4}$/, "");
|
|
13622
13622
|
const allowanceNext = kind === "ai_usage" ? addons.ai_allowance_next_gbp - size : addons.storage_allowance_next_gb - size;
|
|
13623
13623
|
const allowanceNow = kind === "ai_usage" ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -13625,7 +13625,7 @@ function ReduceAddonDialog({
|
|
|
13625
13625
|
const save = () => update.mutate(
|
|
13626
13626
|
{
|
|
13627
13627
|
projectExtId: project.external_id,
|
|
13628
|
-
body:
|
|
13628
|
+
body: chunkV7JDMKNQ_cjs.nextPeriodBody(kind, keep2)
|
|
13629
13629
|
},
|
|
13630
13630
|
{
|
|
13631
13631
|
onSuccess: () => {
|
|
@@ -13692,7 +13692,7 @@ function ReduceAddonDialog({
|
|
|
13692
13692
|
}
|
|
13693
13693
|
) });
|
|
13694
13694
|
}
|
|
13695
|
-
var gbp = (pence) =>
|
|
13695
|
+
var gbp = (pence) => chunkV7JDMKNQ_cjs.formatMoney(pence, "gbp");
|
|
13696
13696
|
var gb2 = (n) => `${Math.round(n * 10) / 10} GB`;
|
|
13697
13697
|
var pct = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
13698
13698
|
function formatShortDate(unix) {
|
|
@@ -13704,20 +13704,20 @@ function AutoTopupThreshold({
|
|
|
13704
13704
|
addons
|
|
13705
13705
|
}) {
|
|
13706
13706
|
const updateSettings = react.useUpdateProjectAddonSettings();
|
|
13707
|
-
const min = addons.min_auto_topup_threshold_gbp ||
|
|
13707
|
+
const min = addons.min_auto_topup_threshold_gbp || chunkV7JDMKNQ_cjs.MIN_AUTO_TOPUP_THRESHOLD_GBP;
|
|
13708
13708
|
const saved = addons.auto_topup_threshold_gbp;
|
|
13709
13709
|
const [value, setValue] = React9.useState(String(saved));
|
|
13710
13710
|
React9.useEffect(() => setValue(String(saved)), [saved]);
|
|
13711
13711
|
const parsed = Number(value);
|
|
13712
13712
|
const valid = Number.isFinite(parsed) && parsed >= min;
|
|
13713
13713
|
const dirty = valid && parsed !== saved;
|
|
13714
|
-
const off =
|
|
13714
|
+
const off = chunkV7JDMKNQ_cjs.isAddonBudgetZero(addons);
|
|
13715
13715
|
const save = () => {
|
|
13716
13716
|
if (!dirty) return;
|
|
13717
13717
|
updateSettings.mutate(
|
|
13718
13718
|
{
|
|
13719
13719
|
projectExtId: project.external_id,
|
|
13720
|
-
body:
|
|
13720
|
+
body: chunkV7JDMKNQ_cjs.addonSettingsBody(addons, { auto_topup_threshold_gbp: parsed })
|
|
13721
13721
|
},
|
|
13722
13722
|
{
|
|
13723
13723
|
onSuccess: () => shell.notify.success(`Auto-add below ${react.formatGbp(parsed)} of AI usage left`),
|
|
@@ -13814,10 +13814,10 @@ function ResourceMeter({
|
|
|
13814
13814
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
13815
13815
|
const isAi = kind === "ai_usage";
|
|
13816
13816
|
const slug = isAi ? "ai-usage" : "storage";
|
|
13817
|
-
const periodEnd =
|
|
13817
|
+
const periodEnd = chunkV7JDMKNQ_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
13818
13818
|
const from = periodEnd ?? "your next renewal";
|
|
13819
13819
|
const fromShort = formatShortDate(addons.period_end ?? project.current_period_end) ?? "renewal";
|
|
13820
|
-
const { min, current, next } =
|
|
13820
|
+
const { min, current, next } = chunkV7JDMKNQ_cjs.reduceBounds(kind, addons);
|
|
13821
13821
|
const fmt = (n) => isAi ? react.formatGbp(n) : gb2(n);
|
|
13822
13822
|
const used = isAi ? addons.ai_used_gbp : addons.storage_used_gb;
|
|
13823
13823
|
const allowance = isAi ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -13825,15 +13825,15 @@ function ResourceMeter({
|
|
|
13825
13825
|
const plan = isAi ? addons.plan_ai_gbp : addons.plan_storage_gb;
|
|
13826
13826
|
const topUps = Math.max(0, allowance - plan);
|
|
13827
13827
|
const blocks = isAi ? addons.ai_blocks : addons.storage_blocks;
|
|
13828
|
-
const hasLegacy =
|
|
13829
|
-
const room =
|
|
13830
|
-
const capZero =
|
|
13831
|
-
const resets = isAi ? formatShortDate(
|
|
13832
|
-
const removeSize =
|
|
13828
|
+
const hasLegacy = chunkV7JDMKNQ_cjs.splitBlocks(kind, blocks, addons).legacy > 0;
|
|
13829
|
+
const room = chunkV7JDMKNQ_cjs.autoRoom(kind, addons);
|
|
13830
|
+
const capZero = chunkV7JDMKNQ_cjs.isAddonBudgetZero(addons);
|
|
13831
|
+
const resets = isAi ? formatShortDate(chunkV7JDMKNQ_cjs.aiUsageResetTimestamp(project)) : null;
|
|
13832
|
+
const removeSize = chunkV7JDMKNQ_cjs.nextRemovedBlockSize(kind, addons);
|
|
13833
13833
|
const undo = () => update.mutate(
|
|
13834
13834
|
{
|
|
13835
13835
|
projectExtId: project.external_id,
|
|
13836
|
-
body:
|
|
13836
|
+
body: chunkV7JDMKNQ_cjs.nextPeriodBody(kind, current)
|
|
13837
13837
|
},
|
|
13838
13838
|
{
|
|
13839
13839
|
onSuccess: () => shell.notify.success("Kept"),
|
|
@@ -13850,7 +13850,7 @@ function ResourceMeter({
|
|
|
13850
13850
|
allowance: { used, plan, topUps, autoRoom: capZero ? 0 : room },
|
|
13851
13851
|
legend: {
|
|
13852
13852
|
plan: `Plan ${fmt(plan)}`,
|
|
13853
|
-
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${
|
|
13853
|
+
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${chunkV7JDMKNQ_cjs.blocksLabel(kind, blocks, addons)})` : ""}` : void 0,
|
|
13854
13854
|
autoRoom: room != null && room > 0 && !capZero ? `Automatic up to ${fmt(room)}` : void 0
|
|
13855
13855
|
},
|
|
13856
13856
|
testId: `usage-meter-${slug}`,
|
|
@@ -13879,9 +13879,9 @@ function ResourceMeter({
|
|
|
13879
13879
|
{
|
|
13880
13880
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-3.5" }),
|
|
13881
13881
|
label: isAi ? react.formatGbp(addons.block_ai_gbp) : `${addons.block_storage_gb} GB`,
|
|
13882
|
-
caption:
|
|
13882
|
+
caption: chunkV7JDMKNQ_cjs.addStepCaption(kind, addons),
|
|
13883
13883
|
onClick: onAdd,
|
|
13884
|
-
ariaLabel: `Add ${
|
|
13884
|
+
ariaLabel: `Add ${chunkV7JDMKNQ_cjs.stepLabel(kind, isAi ? addons.block_ai_gbp : addons.block_storage_gb)}`,
|
|
13885
13885
|
testId: isAi ? "add-ai-block-button" : "add-storage-block-button"
|
|
13886
13886
|
}
|
|
13887
13887
|
),
|
|
@@ -13892,7 +13892,7 @@ function ResourceMeter({
|
|
|
13892
13892
|
label: isAi ? react.formatGbp(removeSize) : `${removeSize} GB`,
|
|
13893
13893
|
caption: `from ${fromShort}`,
|
|
13894
13894
|
onClick: onReduce,
|
|
13895
|
-
ariaLabel: `Remove ${
|
|
13895
|
+
ariaLabel: `Remove ${chunkV7JDMKNQ_cjs.stepLabel(kind, removeSize)} from ${from}`,
|
|
13896
13896
|
testId: `reduce-${slug}-button`
|
|
13897
13897
|
}
|
|
13898
13898
|
)
|
|
@@ -13931,10 +13931,10 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13931
13931
|
updateSettings.mutate(
|
|
13932
13932
|
{
|
|
13933
13933
|
projectExtId: project.external_id,
|
|
13934
|
-
body:
|
|
13934
|
+
body: chunkV7JDMKNQ_cjs.addonSettingsBody(addons, { spend_cap_pence: nextCap })
|
|
13935
13935
|
},
|
|
13936
13936
|
{
|
|
13937
|
-
onSuccess: () => shell.notify.success(
|
|
13937
|
+
onSuccess: () => shell.notify.success(chunkV7JDMKNQ_cjs.budgetSavedMessage(nextCap)),
|
|
13938
13938
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
13939
13939
|
}
|
|
13940
13940
|
);
|
|
@@ -13945,14 +13945,14 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13945
13945
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13946
13946
|
chunkQZTNTP75_cjs.UsageMeter,
|
|
13947
13947
|
{
|
|
13948
|
-
label:
|
|
13948
|
+
label: chunkV7JDMKNQ_cjs.USAGE_CAP_LABEL,
|
|
13949
13949
|
hint: spendResets && savedCap !== 0 ? `resets ${spendResets}` : void 0,
|
|
13950
13950
|
value: readout,
|
|
13951
13951
|
pct: savedCap != null && savedCap > 0 ? pct(spent, savedCap) : 0,
|
|
13952
13952
|
testId: "addon-spend"
|
|
13953
13953
|
}
|
|
13954
13954
|
),
|
|
13955
|
-
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children:
|
|
13955
|
+
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children: chunkV7JDMKNQ_cjs.CAP_REACHED_MESSAGE }),
|
|
13956
13956
|
addons.manual_spent_pence > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-manual-spend", children: [
|
|
13957
13957
|
"Added by hand this month: ",
|
|
13958
13958
|
gbp(addons.manual_spent_pence),
|
|
@@ -13973,7 +13973,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13973
13973
|
step: 25,
|
|
13974
13974
|
className: "h-9 w-28",
|
|
13975
13975
|
value: noCap ? "" : value,
|
|
13976
|
-
placeholder: noCap ? "No limit" : String(
|
|
13976
|
+
placeholder: noCap ? "No limit" : String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
13977
13977
|
disabled: noCap,
|
|
13978
13978
|
onChange: (e) => setValue(e.target.value),
|
|
13979
13979
|
onKeyDown: (e) => e.key === "Enter" && save(),
|
|
@@ -13999,7 +13999,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13999
13999
|
checked: noCap,
|
|
14000
14000
|
onCheckedChange: (checked) => {
|
|
14001
14001
|
setNoCap(checked);
|
|
14002
|
-
if (!checked && value === "") setValue(String(
|
|
14002
|
+
if (!checked && value === "") setValue(String(chunkV7JDMKNQ_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
14003
14003
|
},
|
|
14004
14004
|
"data-testid": "no-cap-switch"
|
|
14005
14005
|
}
|
|
@@ -14028,7 +14028,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
14028
14028
|
term: "Automatic top-ups",
|
|
14029
14029
|
text: "One step is added when AI usage drops below your auto top-up level, or when an upload needs more storage."
|
|
14030
14030
|
},
|
|
14031
|
-
{ term: "Usage cap", text:
|
|
14031
|
+
{ term: "Usage cap", text: chunkV7JDMKNQ_cjs.USAGE_CAP_HELP },
|
|
14032
14032
|
{
|
|
14033
14033
|
term: "Reducing",
|
|
14034
14034
|
text: "\u2212 removes one step from your next renewal. You keep this period's allowance. No refunds."
|
|
@@ -14039,7 +14039,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
14039
14039
|
text: "Top-ups bought on an earlier price keep their size and price until removed; they are removed last."
|
|
14040
14040
|
}
|
|
14041
14041
|
] : [],
|
|
14042
|
-
...isAnnual ? [{ term: "Annual", text: `${
|
|
14042
|
+
...isAnnual ? [{ term: "Annual", text: `${chunkV7JDMKNQ_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : [],
|
|
14043
14043
|
{
|
|
14044
14044
|
term: "Prices",
|
|
14045
14045
|
text: "Shown ex VAT. The confirm step shows the total with VAT before you pay."
|
|
@@ -14131,7 +14131,7 @@ function formatShortDate2(unix) {
|
|
|
14131
14131
|
if (!unix) return null;
|
|
14132
14132
|
return new Date(unix * 1e3).toLocaleDateString("en-GB", { day: "numeric", month: "short" });
|
|
14133
14133
|
}
|
|
14134
|
-
var gbp2 = (pence) =>
|
|
14134
|
+
var gbp2 = (pence) => chunkV7JDMKNQ_cjs.formatMoney(pence, "gbp");
|
|
14135
14135
|
var gbNum = (n) => `${Math.round(n * 10) / 10}`;
|
|
14136
14136
|
var pct2 = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
14137
14137
|
function Meter({
|
|
@@ -14149,15 +14149,15 @@ function Meter({
|
|
|
14149
14149
|
] });
|
|
14150
14150
|
}
|
|
14151
14151
|
function usePlanPrice(project) {
|
|
14152
|
-
const { data: products } = react.useProducts({ enabled:
|
|
14153
|
-
if (!
|
|
14152
|
+
const { data: products } = react.useProducts({ enabled: chunkV7JDMKNQ_cjs.isProProject(project) });
|
|
14153
|
+
if (!chunkV7JDMKNQ_cjs.isProProject(project)) return null;
|
|
14154
14154
|
const isAnnual = project.plan_interval === "year";
|
|
14155
14155
|
if (project.amount != null) {
|
|
14156
14156
|
return { incl: project.amount, ex: project.amount_ex_vat ?? null, isAnnual };
|
|
14157
14157
|
}
|
|
14158
|
-
if ((project.packs ??
|
|
14159
|
-
const prices =
|
|
14160
|
-
const pp =
|
|
14158
|
+
if ((project.packs ?? chunkV7JDMKNQ_cjs.PRO_PACKS) > chunkV7JDMKNQ_cjs.PRO_PACKS) return null;
|
|
14159
|
+
const prices = chunkV7JDMKNQ_cjs.findProPrices(products);
|
|
14160
|
+
const pp = chunkV7JDMKNQ_cjs.packPrice(isAnnual ? prices.annual : prices.monthly);
|
|
14161
14161
|
return pp ? { incl: pp.amount, ex: pp.amount_ex_vat, isAnnual } : null;
|
|
14162
14162
|
}
|
|
14163
14163
|
function paidLine(payment, addons) {
|
|
@@ -14170,11 +14170,11 @@ function ProjectPlanCard({
|
|
|
14170
14170
|
onChangePlan
|
|
14171
14171
|
}) {
|
|
14172
14172
|
const { quotas, addons } = project;
|
|
14173
|
-
const isPro =
|
|
14173
|
+
const isPro = chunkV7JDMKNQ_cjs.isProProject(project);
|
|
14174
14174
|
const used = quotas?.ai_usage?.used ?? 0;
|
|
14175
14175
|
const limit = quotas?.ai_usage?.limit ?? 0;
|
|
14176
|
-
const resetDate = formatShortDate2(
|
|
14177
|
-
const periodEnd =
|
|
14176
|
+
const resetDate = formatShortDate2(chunkV7JDMKNQ_cjs.aiUsageResetTimestamp(project));
|
|
14177
|
+
const periodEnd = chunkV7JDMKNQ_cjs.formatPeriodEnd(addons?.period_end ?? project.current_period_end);
|
|
14178
14178
|
const when2 = periodEnd ?? "the end of the period";
|
|
14179
14179
|
const storageUsed = quotas?.storage_gb?.used ?? 0;
|
|
14180
14180
|
const storageLimit = quotas?.storage_gb?.limit ?? 0;
|
|
@@ -14190,7 +14190,7 @@ function ProjectPlanCard({
|
|
|
14190
14190
|
project.external_id,
|
|
14191
14191
|
hasScheduledChange && addons ? { packs: packsNext ?? addons.packs, interval: pending ?? currentInterval } : null
|
|
14192
14192
|
).data;
|
|
14193
|
-
const tier = isPro ?
|
|
14193
|
+
const tier = isPro ? chunkV7JDMKNQ_cjs.proTierName(project) : project.subscription === "dev" ? "Dev" : "Free";
|
|
14194
14194
|
const pendingPayment = addons?.payment?.status === "pending" ? addons.payment : null;
|
|
14195
14195
|
const confirmUrl = pendingPayment?.confirm_url ?? addons?.confirm_url;
|
|
14196
14196
|
const paidPayment = addons?.payment?.status === "paid" ? addons.payment : null;
|
|
@@ -14224,7 +14224,7 @@ function ProjectPlanCard({
|
|
|
14224
14224
|
isPro && " ",
|
|
14225
14225
|
isPro && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: currentInterval === "year" ? "Annual" : "Monthly" })
|
|
14226
14226
|
] }),
|
|
14227
|
-
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${
|
|
14227
|
+
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${chunkV7JDMKNQ_cjs.totalWithTaxWord({
|
|
14228
14228
|
subtotal: nextBill.next_renewal_ex_vat_pence,
|
|
14229
14229
|
tax: nextBill.next_renewal_tax_pence,
|
|
14230
14230
|
total: nextBill.next_renewal_pence,
|
|
@@ -14233,7 +14233,7 @@ function ProjectPlanCard({
|
|
|
14233
14233
|
] }),
|
|
14234
14234
|
price && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto text-right", "data-testid": "project-plan-price", children: [
|
|
14235
14235
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-lg font-semibold tabular-nums text-foreground", children: [
|
|
14236
|
-
price.ex != null ?
|
|
14236
|
+
price.ex != null ? chunkV7JDMKNQ_cjs.plusVat(price.ex) : gbp2(price.incl),
|
|
14237
14237
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: price.isAnnual ? "/year" : "/month" })
|
|
14238
14238
|
] }),
|
|
14239
14239
|
price.ex != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -14271,7 +14271,7 @@ function ProjectPlanCard({
|
|
|
14271
14271
|
undoTestId: "undo-plan-change-button",
|
|
14272
14272
|
children: [
|
|
14273
14273
|
"Changes to ",
|
|
14274
|
-
|
|
14274
|
+
chunkV7JDMKNQ_cjs.planNameForPacks(packsNext),
|
|
14275
14275
|
" on ",
|
|
14276
14276
|
when2,
|
|
14277
14277
|
"."
|
|
@@ -14362,7 +14362,7 @@ function ProjectBilling({
|
|
|
14362
14362
|
const { addons } = project;
|
|
14363
14363
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": "project-billing", children: [
|
|
14364
14364
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectPlanCard, { project, onChangePlan }),
|
|
14365
|
-
addons &&
|
|
14365
|
+
addons && chunkV7JDMKNQ_cjs.isProProject(project) && /* @__PURE__ */ jsxRuntime.jsx(ProjectUsageCard, { project, addons })
|
|
14366
14366
|
] });
|
|
14367
14367
|
}
|
|
14368
14368
|
var BREAKDOWN_LABELS = {
|
|
@@ -14627,13 +14627,13 @@ function ProjectUsageContent({
|
|
|
14627
14627
|
);
|
|
14628
14628
|
}
|
|
14629
14629
|
function ProjectDetail({ projectExtId, storage }) {
|
|
14630
|
-
const { stripeEnabled } =
|
|
14630
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
14631
14631
|
const [planOpen, setPlanOpen] = React9.useState(false);
|
|
14632
14632
|
const [renameOpen, setRenameOpen] = React9.useState(false);
|
|
14633
14633
|
const [renameValue, setRenameValue] = React9.useState("");
|
|
14634
14634
|
const updateProject = react.useUpdateProjectFields();
|
|
14635
14635
|
const { data: projects, isLoading } = react.useProjects();
|
|
14636
|
-
const currentUserExtId =
|
|
14636
|
+
const currentUserExtId = chunkV7JDMKNQ_cjs.useSelfExtId();
|
|
14637
14637
|
const project = projects?.find((p) => p.external_id === projectExtId);
|
|
14638
14638
|
const handleSaveRename = React9.useCallback(() => {
|
|
14639
14639
|
const trimmed = renameValue.trim();
|
|
@@ -14679,7 +14679,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
14679
14679
|
setRenameValue(project.name);
|
|
14680
14680
|
setRenameOpen(true);
|
|
14681
14681
|
},
|
|
14682
|
-
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...
|
|
14682
|
+
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...chunkV7JDMKNQ_cjs.planBadgeView(project), size: "md" }) : void 0
|
|
14683
14683
|
}
|
|
14684
14684
|
),
|
|
14685
14685
|
hasBilling && /* @__PURE__ */ jsxRuntime.jsx(ProjectBilling, { project, onChangePlan: () => setPlanOpen(true) }),
|
|
@@ -14726,7 +14726,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
14726
14726
|
function useAutoRefreshPendingProjects() {
|
|
14727
14727
|
const { data: projects } = react.useProjects();
|
|
14728
14728
|
const refreshProject = react.useRefreshProject();
|
|
14729
|
-
const currentUserExtId =
|
|
14729
|
+
const currentUserExtId = chunkV7JDMKNQ_cjs.useSelfExtId();
|
|
14730
14730
|
const refreshedRef = React9.useRef(/* @__PURE__ */ new Set());
|
|
14731
14731
|
React9.useEffect(() => {
|
|
14732
14732
|
if (!projects || !currentUserExtId) return;
|
|
@@ -14757,7 +14757,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14757
14757
|
if (quotaProjectId) void refetchProjects();
|
|
14758
14758
|
}, [quotaProjectId, refetchProjects]);
|
|
14759
14759
|
const project = info?.projectExtId ? projects?.find((p) => p.external_id === info.projectExtId) : void 0;
|
|
14760
|
-
const addons = project &&
|
|
14760
|
+
const addons = project && chunkV7JDMKNQ_cjs.isProProject(project) ? project.addons : null;
|
|
14761
14761
|
const handleUpgrade = () => {
|
|
14762
14762
|
if (info?.projectExtId) {
|
|
14763
14763
|
requestProjectBillingFocus({ projectExtId: info.projectExtId, openUpgrade: true });
|
|
@@ -14793,8 +14793,8 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14793
14793
|
/* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
14794
14794
|
);
|
|
14795
14795
|
} else if (addons) {
|
|
14796
|
-
const price = `${
|
|
14797
|
-
const capZero =
|
|
14796
|
+
const price = `${chunkV7JDMKNQ_cjs.formatMoney(addons.ai_block_price_ex_vat_pence, "gbp")} + VAT`;
|
|
14797
|
+
const capZero = chunkV7JDMKNQ_cjs.isAddonBudgetZero(addons);
|
|
14798
14798
|
const addAiUsage = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: handleAddAiUsage, "data-testid": "quota-add-ai-usage-button", children: [
|
|
14799
14799
|
"Add ",
|
|
14800
14800
|
react.formatGbp(addons.block_ai_gbp),
|
|
@@ -14802,7 +14802,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14802
14802
|
price
|
|
14803
14803
|
] });
|
|
14804
14804
|
if (capZero || addons.cap_reached) {
|
|
14805
|
-
message = capZero ?
|
|
14805
|
+
message = capZero ? chunkV7JDMKNQ_cjs.ZERO_BUDGET_MESSAGE : chunkV7JDMKNQ_cjs.CAP_REACHED_MESSAGE;
|
|
14806
14806
|
actions = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14807
14807
|
addAiUsage,
|
|
14808
14808
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: handleRaiseCap, "data-testid": "quota-raise-cap-button", children: capZero ? "Set cap" : "Raise cap" })
|
|
@@ -14912,7 +14912,7 @@ function ConnectedWelcomeDialog({
|
|
|
14912
14912
|
}) {
|
|
14913
14913
|
const currentUser = react.useArbiSession().user;
|
|
14914
14914
|
const { data: projects } = react.useProjects();
|
|
14915
|
-
const balance =
|
|
14915
|
+
const balance = chunkV7JDMKNQ_cjs.useRewardBalance();
|
|
14916
14916
|
const [showPlans, setShowPlans] = React9.useState(false);
|
|
14917
14917
|
const [showInvite, setShowInvite] = React9.useState(false);
|
|
14918
14918
|
const [selectedProjectId, setSelectedProjectId] = React9.useState(null);
|
|
@@ -14937,15 +14937,15 @@ function ConnectedWelcomeDialog({
|
|
|
14937
14937
|
ConnectedAddContacts,
|
|
14938
14938
|
{
|
|
14939
14939
|
onClose: () => handleOpenChange(false),
|
|
14940
|
-
rewardAmount:
|
|
14940
|
+
rewardAmount: chunkV7JDMKNQ_cjs.formatMoney(REFERRAL_OFFER.amount, REFERRAL_OFFER.currency)
|
|
14941
14941
|
}
|
|
14942
14942
|
) });
|
|
14943
14943
|
}
|
|
14944
14944
|
const firstName2 = currentUser?.given_name;
|
|
14945
14945
|
const hasBalance = balance !== null;
|
|
14946
|
-
const quotaItems =
|
|
14947
|
-
const resetTs =
|
|
14948
|
-
const aiUsageHint = resetTs ? `resets ${
|
|
14946
|
+
const quotaItems = chunkV7JDMKNQ_cjs.getQuotaItems(selectedProject.quotas);
|
|
14947
|
+
const resetTs = chunkV7JDMKNQ_cjs.aiUsageResetTimestamp(selectedProject);
|
|
14948
|
+
const aiUsageHint = resetTs ? `resets ${chunkV7JDMKNQ_cjs.formatResetDate(resetTs)}` : void 0;
|
|
14949
14949
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14950
14950
|
chunkFEVJA4BP_cjs.WelcomeDialog,
|
|
14951
14951
|
{
|
|
@@ -14962,7 +14962,7 @@ function ConnectedWelcomeDialog({
|
|
|
14962
14962
|
onChange: setSelectedProjectId
|
|
14963
14963
|
}
|
|
14964
14964
|
),
|
|
14965
|
-
planBadge: /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...
|
|
14965
|
+
planBadge: /* @__PURE__ */ jsxRuntime.jsx(chunkFEVJA4BP_cjs.PlanBadge, { ...chunkV7JDMKNQ_cjs.planBadgeView(selectedProject), size: "md" }),
|
|
14966
14966
|
quotas: quotaItems.map((q) => ({
|
|
14967
14967
|
key: q.key,
|
|
14968
14968
|
icon: q.icon,
|
|
@@ -14972,9 +14972,9 @@ function ConnectedWelcomeDialog({
|
|
|
14972
14972
|
hint: q.key === "ai-usage" ? aiUsageHint : void 0
|
|
14973
14973
|
})),
|
|
14974
14974
|
onSeePlans: () => setShowPlans(true),
|
|
14975
|
-
referralOfferLabel: `${
|
|
14975
|
+
referralOfferLabel: `${chunkV7JDMKNQ_cjs.formatMoney(REFERRAL_OFFER.amount, REFERRAL_OFFER.currency)} off your plan`,
|
|
14976
14976
|
onInvite: () => setShowInvite(true),
|
|
14977
|
-
rewardBalanceLabel: hasBalance ?
|
|
14977
|
+
rewardBalanceLabel: hasBalance ? chunkV7JDMKNQ_cjs.formatMoney(balance.amount, balance.currency) : void 0
|
|
14978
14978
|
}
|
|
14979
14979
|
);
|
|
14980
14980
|
}
|
|
@@ -15011,7 +15011,7 @@ function WorkspaceCardsView({
|
|
|
15011
15011
|
createDisabledReason,
|
|
15012
15012
|
workspaceState
|
|
15013
15013
|
}) {
|
|
15014
|
-
const { stripeEnabled } =
|
|
15014
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
15015
15015
|
const { hrefFor } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
15016
15016
|
const workspaceLabel = ui.getEntityLabel("WORKSPACE");
|
|
15017
15017
|
const projectLabel = ui.getEntityLabel("PROJECT").toLowerCase();
|
|
@@ -15031,7 +15031,7 @@ function WorkspaceCardsView({
|
|
|
15031
15031
|
}
|
|
15032
15032
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkKFQ6E6LE_cjs.WorkspaceList, { testId: "workspace-cards-list", children: groups.map((group) => {
|
|
15033
15033
|
const project = projects.find((p) => p.external_id === group.projectExtId);
|
|
15034
|
-
const { breakdown, readout } =
|
|
15034
|
+
const { breakdown, readout } = chunkV7JDMKNQ_cjs.projectGroupBilling(project, {
|
|
15035
15035
|
isOwned: group.isOwned,
|
|
15036
15036
|
stripeEnabled
|
|
15037
15037
|
});
|
|
@@ -15091,7 +15091,7 @@ function WorkspaceCardsView({
|
|
|
15091
15091
|
ui.ShieldIcon,
|
|
15092
15092
|
{
|
|
15093
15093
|
char: workspace.name.charAt(0),
|
|
15094
|
-
workspaceColor:
|
|
15094
|
+
workspaceColor: chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
15095
15095
|
size: 28,
|
|
15096
15096
|
isSelected: true
|
|
15097
15097
|
}
|
|
@@ -15156,7 +15156,7 @@ function useConnectedWorkspaceList({
|
|
|
15156
15156
|
} = {}) {
|
|
15157
15157
|
const recentlyDeletedHint = labels?.recentlyDeletedHint ?? DEFAULT_WORKSPACE_LIST_LABELS.recentlyDeletedHint;
|
|
15158
15158
|
const { confirm, notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
15159
|
-
const { userId: selfId, live } =
|
|
15159
|
+
const { userId: selfId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
15160
15160
|
const demoSeed = !live ? seed : void 0;
|
|
15161
15161
|
const workspacesQuery = react.useWorkspaces({ enabled: !demoSeed });
|
|
15162
15162
|
const { data: liveProjects } = react.useProjects({ enabled: !demoSeed });
|
|
@@ -15260,7 +15260,7 @@ function useConnectedWorkspaceList({
|
|
|
15260
15260
|
};
|
|
15261
15261
|
}
|
|
15262
15262
|
var WorkspaceTableView = React9.lazy(
|
|
15263
|
-
() => import('../WorkspaceTableView-
|
|
15263
|
+
() => import('../WorkspaceTableView-2CGEO5KK.cjs').then((m) => ({ default: m.WorkspaceTableView }))
|
|
15264
15264
|
);
|
|
15265
15265
|
var WORKSPACES_TAB_ID = "workspaces";
|
|
15266
15266
|
var defaultRenderMember2 = (user, size) => {
|
|
@@ -15297,7 +15297,7 @@ function ConnectedWorkspaceList({
|
|
|
15297
15297
|
}) {
|
|
15298
15298
|
const list = useConnectedWorkspaceList({ seed, filters, onFiltersChange, labels });
|
|
15299
15299
|
const { openProject } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
15300
|
-
const { workspaceId: currentWorkspaceId, openWorkspace } =
|
|
15300
|
+
const { workspaceId: currentWorkspaceId, openWorkspace } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
15301
15301
|
const [localView, setLocalView] = React9.useState("cards");
|
|
15302
15302
|
const view = controlledView ?? localView;
|
|
15303
15303
|
const isPhone = chunkFX3K6LNZ_cjs.useIsPhone();
|
|
@@ -15313,7 +15313,7 @@ function ConnectedWorkspaceList({
|
|
|
15313
15313
|
else void openWorkspace(workspace.external_id, { name: workspace.name });
|
|
15314
15314
|
};
|
|
15315
15315
|
const createDisabledReason = list.canCreateProjects === false ? react.PROJECT_CREATION_DENIED_REASON : void 0;
|
|
15316
|
-
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15316
|
+
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.LoadingIndicator, { message: "Loading workspaces..." });
|
|
15317
15317
|
if (list.error) {
|
|
15318
15318
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15319
15319
|
chunkH6K7EWL2_cjs.HomeLoadError,
|
|
@@ -15386,7 +15386,7 @@ function ConnectedWorkspaceList({
|
|
|
15386
15386
|
workspaceState
|
|
15387
15387
|
}
|
|
15388
15388
|
) })
|
|
15389
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15389
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkH6K7EWL2_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15390
15390
|
WorkspaceTableView,
|
|
15391
15391
|
{
|
|
15392
15392
|
list,
|
|
@@ -15628,7 +15628,7 @@ function ProjectsListPage({
|
|
|
15628
15628
|
}
|
|
15629
15629
|
),
|
|
15630
15630
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15631
|
-
|
|
15631
|
+
chunk5ZHAHJ4H_cjs.Toolbar,
|
|
15632
15632
|
{
|
|
15633
15633
|
search,
|
|
15634
15634
|
onSearch: setSearch,
|
|
@@ -15689,8 +15689,8 @@ function ProjectsPanel({
|
|
|
15689
15689
|
);
|
|
15690
15690
|
const { data: projects } = react.useProjects();
|
|
15691
15691
|
const canCreateProjects = react.useCanCreateProjects();
|
|
15692
|
-
const { userId } =
|
|
15693
|
-
const { stripeEnabled } =
|
|
15692
|
+
const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
15693
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
15694
15694
|
const billingPortal = useOpenBillingPortal();
|
|
15695
15695
|
const [newProjectOpen, setNewProjectOpen] = React9.useState(false);
|
|
15696
15696
|
useAutoRefreshPendingProjects();
|
|
@@ -15774,7 +15774,7 @@ function ProjectsPanel({
|
|
|
15774
15774
|
}
|
|
15775
15775
|
)
|
|
15776
15776
|
] });
|
|
15777
|
-
return hostTabs ? panel : /* @__PURE__ */ jsxRuntime.jsx(
|
|
15777
|
+
return hostTabs ? panel : /* @__PURE__ */ jsxRuntime.jsx(chunkG2BKHCI2_cjs.ArbiHost, { config: localHost, children: panel });
|
|
15778
15778
|
}
|
|
15779
15779
|
var DEFAULT_PROJECT_DETAILS_LABELS = {
|
|
15780
15780
|
get title() {
|
|
@@ -16047,8 +16047,8 @@ var TILE_DEFAULT = 200;
|
|
|
16047
16047
|
var COMPACT_BELOW = 132;
|
|
16048
16048
|
var NO_DOCUMENTS = [];
|
|
16049
16049
|
function useFilesWorkspace() {
|
|
16050
|
-
const { workspaceId, userId, live } =
|
|
16051
|
-
const { members, role } =
|
|
16050
|
+
const { workspaceId, userId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
16051
|
+
const { members, role } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
|
|
16052
16052
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
16053
16053
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
|
|
16054
16054
|
return {
|
|
@@ -16882,7 +16882,7 @@ function ProjectDocuments({
|
|
|
16882
16882
|
testId
|
|
16883
16883
|
}) {
|
|
16884
16884
|
const { data: docs = [], isLoading } = react.useDocuments(workspaceId);
|
|
16885
|
-
const documentFilter =
|
|
16885
|
+
const documentFilter = chunkHDEOORSV_cjs.useDocumentFilter();
|
|
16886
16886
|
const shown = React9.useMemo(() => docs.filter(documentFilter), [docs, documentFilter]);
|
|
16887
16887
|
const { openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
16888
16888
|
const [selectedIds, setSelectedIds] = React9.useState([]);
|
|
@@ -16963,7 +16963,7 @@ var DEFAULT_PROJECT_PAGE_LABELS = {
|
|
|
16963
16963
|
activity: "Activity"
|
|
16964
16964
|
};
|
|
16965
16965
|
function useSelectWorkspace() {
|
|
16966
|
-
const connection =
|
|
16966
|
+
const connection = chunkP6HVJP6Z_cjs.useOptionalConnection();
|
|
16967
16967
|
const { switchWorkspace } = react.useSwitchWorkspace();
|
|
16968
16968
|
return async (id) => {
|
|
16969
16969
|
if (connection) return connection.setWorkspace(id);
|
|
@@ -16991,7 +16991,7 @@ function ConnectedProjectPage({
|
|
|
16991
16991
|
threads: { ...DEFAULT_PROJECT_PAGE_LABELS.threads, ...given?.threads }
|
|
16992
16992
|
};
|
|
16993
16993
|
const { project, usage, isLoading } = useProjectSummary(projectId);
|
|
16994
|
-
const { workspaceId } =
|
|
16994
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
16995
16995
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
16996
16996
|
const selectWorkspace = useSelectWorkspace();
|
|
16997
16997
|
const workspace = project ? primaryProjectWorkspace(project) : void 0;
|
|
@@ -17832,7 +17832,7 @@ function recentConversations(conversations) {
|
|
|
17832
17832
|
return [...conversations].sort((a, b) => time(b.updated_at) - time(a.updated_at)).slice(0, RECENT_ROWS).map((c) => ({
|
|
17833
17833
|
id: c.external_id,
|
|
17834
17834
|
title: c.title?.trim() || "Untitled thread",
|
|
17835
|
-
subtitle: c.status ? [
|
|
17835
|
+
subtitle: c.status ? [chunkO3MRE2HL_cjs.STATUS_LABELS[chunkO3MRE2HL_cjs.asTaskStatus(c.status)], c.due_at ? `due ${shortDate(c.due_at)}` : null].filter(Boolean).join(" \xB7 ") : `${c.message_count} ${c.message_count === 1 ? "message" : "messages"}`,
|
|
17836
17836
|
time: timeAndDate(c.updated_at)
|
|
17837
17837
|
}));
|
|
17838
17838
|
}
|
|
@@ -17869,9 +17869,9 @@ function ConnectedWorkspaceDashboard({
|
|
|
17869
17869
|
testId = "workspace-dashboard"
|
|
17870
17870
|
}) {
|
|
17871
17871
|
const { openDocument, openConversation, hrefFor } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
17872
|
-
const { workspaceId } =
|
|
17873
|
-
const { data: documents } =
|
|
17874
|
-
const { data: conversations } =
|
|
17872
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
17873
|
+
const { data: documents } = chunkHDEOORSV_cjs.useListedDocuments();
|
|
17874
|
+
const { data: conversations } = chunkHDEOORSV_cjs.useConnectedConversations();
|
|
17875
17875
|
const { data: facts = [] } = react.useFacts(workspaceId);
|
|
17876
17876
|
const conversationIcon = /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "CONVERSATION", className: "mt-0.5 size-5 shrink-0" });
|
|
17877
17877
|
const chatRows = React9.useMemo(
|
|
@@ -18146,8 +18146,8 @@ function ConnectedSearchPage({
|
|
|
18146
18146
|
}) {
|
|
18147
18147
|
const l = React9.useMemo(() => ({ ...DEFAULT_CONNECTED_SEARCH_PAGE_LABELS, ...labels }), [labels]);
|
|
18148
18148
|
const { notify: notify18, openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
18149
|
-
const { workspaceId, live } =
|
|
18150
|
-
const { data: documents } =
|
|
18149
|
+
const { workspaceId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
18150
|
+
const { data: documents } = chunkHDEOORSV_cjs.useConnectedDocuments();
|
|
18151
18151
|
const { data: settings } = react.useUserSettings({ enabled: live });
|
|
18152
18152
|
const isOnline = documentTools.useIsOnline();
|
|
18153
18153
|
const scopeDocIds = scope?.docIds ?? null;
|
|
@@ -21583,14 +21583,14 @@ function EventEditorDialog({
|
|
|
21583
21583
|
}) {
|
|
21584
21584
|
const [attendeeQuery, setAttendeeQuery] = React9.useState("");
|
|
21585
21585
|
const people = react.useSearchContacts(editor ? attendeeQuery : "");
|
|
21586
|
-
const { workspaceId, live } =
|
|
21587
|
-
const { data: documents } =
|
|
21586
|
+
const { workspaceId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
21587
|
+
const { data: documents } = chunkHDEOORSV_cjs.useConnectedDocuments();
|
|
21588
21588
|
const { data: workspaces = [] } = react.useWorkspaces({ enabled: live });
|
|
21589
21589
|
const uploadFiles = react.useUploadFiles();
|
|
21590
21590
|
const { notify: notify18, runtimeConfig } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
21591
21591
|
const attachmentDocuments = documents.map((document2) => ({
|
|
21592
21592
|
doc_id: document2.external_id,
|
|
21593
|
-
title:
|
|
21593
|
+
title: chunkUZVXVTTB_cjs.toWorkflowFieldDocument(document2).title,
|
|
21594
21594
|
url: chunk725OETK3_cjs.buildDeepLinkUrl(
|
|
21595
21595
|
{ workspaceId: workspaceId ?? void 0, documentId: document2.external_id },
|
|
21596
21596
|
runtimeConfig.deploymentDomain
|
|
@@ -22210,7 +22210,7 @@ function useConnectedCalendarCalls() {
|
|
|
22210
22210
|
const canSchedule = react.useCanHostCalls();
|
|
22211
22211
|
const openCallMeetingChat = react.useOpenCallMeetingChat();
|
|
22212
22212
|
const { users: knownUsers } = react.usePeople();
|
|
22213
|
-
const { userId } =
|
|
22213
|
+
const { userId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
22214
22214
|
const me = userId ?? null;
|
|
22215
22215
|
const known = React9.useMemo(
|
|
22216
22216
|
() => knownUsers.map((u) => ({
|
|
@@ -23750,7 +23750,7 @@ function useAddFromUrls({
|
|
|
23750
23750
|
onZipFiles
|
|
23751
23751
|
} = {}) {
|
|
23752
23752
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
23753
|
-
const { workspaceId } =
|
|
23753
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
23754
23754
|
const uploadFromUrls = react.useUploadFromUrls();
|
|
23755
23755
|
return React9.useCallback(
|
|
23756
23756
|
async (urls) => {
|
|
@@ -23839,7 +23839,7 @@ function ConnectedUpload({
|
|
|
23839
23839
|
}) {
|
|
23840
23840
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
23841
23841
|
const { openUpgrade } = react.useDocumentHostActions();
|
|
23842
|
-
const { workspaceId, live } =
|
|
23842
|
+
const { workspaceId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
23843
23843
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
23844
23844
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name ?? "this workspace";
|
|
23845
23845
|
const uploadFiles = react.useUploadFiles();
|
|
@@ -24109,9 +24109,9 @@ function ConnectedTagEntity({
|
|
|
24109
24109
|
onEditClick();
|
|
24110
24110
|
}
|
|
24111
24111
|
};
|
|
24112
|
-
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24112
|
+
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunk5ZHAHJ4H_cjs.EntityTooltip, { children: [
|
|
24113
24113
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24114
|
-
|
|
24114
|
+
chunk5ZHAHJ4H_cjs.EntityTooltipHeader,
|
|
24115
24115
|
{
|
|
24116
24116
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24117
24117
|
"span",
|
|
@@ -25603,7 +25603,7 @@ function useDocumentGridSync({
|
|
|
25603
25603
|
const [gridReadyTick, setGridReadyTick] = React9.useState(0);
|
|
25604
25604
|
const [gridApi, setGridApi] = React9.useState(null);
|
|
25605
25605
|
const syncingGridRef = React9.useRef(false);
|
|
25606
|
-
const { userId, workspaceId } =
|
|
25606
|
+
const { userId, workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
25607
25607
|
const hostActions = react.useDocumentHostActions();
|
|
25608
25608
|
const viewingDocumentId = react.useOpenViewerDocumentId();
|
|
25609
25609
|
const familyMeta = React9.useMemo(
|
|
@@ -25832,7 +25832,7 @@ function useDocumentFilters({
|
|
|
25832
25832
|
}) {
|
|
25833
25833
|
const inConversationDocsRef = React9.useRef(inConversationDocuments);
|
|
25834
25834
|
inConversationDocsRef.current = inConversationDocuments;
|
|
25835
|
-
const { userId: currentUserId, workspaceId: selectedWorkspaceId } =
|
|
25835
|
+
const { userId: currentUserId, workspaceId: selectedWorkspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
25836
25836
|
const { data: members = [] } = react.useWorkspaceUsers();
|
|
25837
25837
|
const user = members.find((m) => m.user.external_id === currentUserId)?.user;
|
|
25838
25838
|
const offlineIds = react.useOfflineDocumentIds();
|
|
@@ -26590,7 +26590,7 @@ function useBatchCompleteToasts() {
|
|
|
26590
26590
|
}
|
|
26591
26591
|
}, AI_FIELDS_NOTICE_WINDOW_MS);
|
|
26592
26592
|
} else if (message.batch_type === "entity_extract") {
|
|
26593
|
-
say(`${
|
|
26593
|
+
say(`${chunk5ZHAHJ4H_cjs.entitiesPhrase()} extracted from ${chunk5ZHAHJ4H_cjs.documentCount(docIds.length)}`, "success", {
|
|
26594
26594
|
...openTags && { action: { label: "View", onClick: openTags } }
|
|
26595
26595
|
});
|
|
26596
26596
|
} else if (message.batch_type === "upload") {
|
|
@@ -27889,7 +27889,7 @@ function withMissingTableViews(all, views, workspaceId, table) {
|
|
|
27889
27889
|
function useTableViews(table) {
|
|
27890
27890
|
const { data: userSettings, isSuccess: settingsLoaded } = react.useUserSettings();
|
|
27891
27891
|
const updateUserSettings = react.useUpdateUserSettings();
|
|
27892
|
-
const { workspaceId } =
|
|
27892
|
+
const { workspaceId } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
27893
27893
|
const all = userSettings?.tableviews;
|
|
27894
27894
|
const savedViews = React9.useMemo(() => viewsOfTable(all, workspaceId, table), [all, workspaceId, table]);
|
|
27895
27895
|
const writeViews = React9.useCallback(
|
|
@@ -28327,16 +28327,16 @@ function ConnectedFilesPage({
|
|
|
28327
28327
|
}) {
|
|
28328
28328
|
const { openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
28329
28329
|
const { data: rawDocuments, isLoading } = react.useDocuments();
|
|
28330
|
-
const documentFilter =
|
|
28330
|
+
const documentFilter = chunkHDEOORSV_cjs.useDocumentFilter();
|
|
28331
28331
|
const documents = React9.useMemo(
|
|
28332
|
-
() =>
|
|
28332
|
+
() => chunkHDEOORSV_cjs.listedDocuments(rawDocuments ?? NO_DOCUMENTS3, documentFilter),
|
|
28333
28333
|
[rawDocuments, documentFilter]
|
|
28334
28334
|
);
|
|
28335
28335
|
const isProgressiveLoading = react.useDocumentsLoading();
|
|
28336
28336
|
const deleteDocuments = react.useDeleteDocuments();
|
|
28337
28337
|
const isDocumentsPending = isLoading && documents.length === 0;
|
|
28338
|
-
const { workspaceId, userId, live } =
|
|
28339
|
-
const { role, members } =
|
|
28338
|
+
const { workspaceId, userId, live } = chunkP6HVJP6Z_cjs.useConnectedWorkspace();
|
|
28339
|
+
const { role, members } = chunkUZVXVTTB_cjs.useConnectedWorkspaceRole();
|
|
28340
28340
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
28341
28341
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
|
|
28342
28342
|
const isMember = role != null;
|
|
@@ -28751,7 +28751,7 @@ function ConnectedFilesPage({
|
|
|
28751
28751
|
viewMode === "grid" ? (
|
|
28752
28752
|
// ‹ n / N › over the table's displayed rows; a step opens the document.
|
|
28753
28753
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28754
|
-
|
|
28754
|
+
chunk5ZHAHJ4H_cjs.GridRowNavigator,
|
|
28755
28755
|
{
|
|
28756
28756
|
gridApi,
|
|
28757
28757
|
selectedId: viewingDocumentId ?? selectedDocumentIds[0] ?? null,
|
|
@@ -30639,13 +30639,13 @@ function ConnectedModelSelector({
|
|
|
30639
30639
|
}
|
|
30640
30640
|
}
|
|
30641
30641
|
}
|
|
30642
|
-
return tier ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30642
|
+
return tier ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTierIcon, { tier }) : /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {});
|
|
30643
30643
|
};
|
|
30644
30644
|
const isSelectedStandard = !!selectedModelInfo?.tags?.includes(STANDARD_TIER_TAG);
|
|
30645
30645
|
const isSelectedPremium = !!selectedModelInfo?.tags?.includes(PREMIUM_TIER_TAG);
|
|
30646
30646
|
const triggerLabel = isAuto ? "Autoselect" : isSelectedPremium ? "Premium" : selectedModelInfo?.display_name || selectedModelInfo?.model_name || selectedModel;
|
|
30647
30647
|
const firstTag = selectedModelInfo?.tags?.[0];
|
|
30648
|
-
const triggerIcon = isAuto ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30648
|
+
const triggerIcon = isAuto ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelAutoIcon, {}) : isSelectedPremium ? premiumDisabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTierIcon, { tier: "premium", isGreyed: true }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
30649
30649
|
ui.ProviderIcon,
|
|
30650
30650
|
{
|
|
30651
30651
|
modelName: selectedModelInfo?.model_name,
|
|
@@ -30653,9 +30653,9 @@ function ConnectedModelSelector({
|
|
|
30653
30653
|
size: 14,
|
|
30654
30654
|
className: "shrink-0"
|
|
30655
30655
|
}
|
|
30656
|
-
) : isSelectedStandard && selectedModelInfo ? standardIcon(selectedModelInfo) : firstTag && TAG_TIER[firstTag] ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30656
|
+
) : isSelectedStandard && selectedModelInfo ? standardIcon(selectedModelInfo) : firstTag && TAG_TIER[firstTag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTierIcon, { tier: TAG_TIER[firstTag] }) : selectedModelInfo ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelDot, {}) : null;
|
|
30657
30657
|
const tooltip = isAuto ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: "Automatically selects the best model" }) : pricing ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30658
|
-
|
|
30658
|
+
chunkDWWRLKEZ_cjs.ModelPricingTip,
|
|
30659
30659
|
{
|
|
30660
30660
|
modelName: pricing.modelName,
|
|
30661
30661
|
inputPrice: pricing.inputPrice,
|
|
@@ -30672,27 +30672,27 @@ function ConnectedModelSelector({
|
|
|
30672
30672
|
(m) => m.model_name === premiumTier.resolvedModelName
|
|
30673
30673
|
);
|
|
30674
30674
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30675
|
-
|
|
30675
|
+
chunkDWWRLKEZ_cjs.ModelPickerPopover,
|
|
30676
30676
|
{
|
|
30677
30677
|
open: isOpen,
|
|
30678
30678
|
onOpenChange: setIsOpen,
|
|
30679
30679
|
tooltip,
|
|
30680
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30680
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelPickerTrigger, { icon: triggerIcon, label: triggerLabel, className }),
|
|
30681
30681
|
children: [
|
|
30682
30682
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30683
|
-
|
|
30683
|
+
chunkDWWRLKEZ_cjs.ModelOption,
|
|
30684
30684
|
{
|
|
30685
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30685
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelAutoIcon, {}),
|
|
30686
30686
|
label: "Autoselect",
|
|
30687
30687
|
isSelected: isAuto,
|
|
30688
30688
|
onSelect: () => choose(react.AUTO_CHAT_MODEL),
|
|
30689
30689
|
testId: "model-option-auto"
|
|
30690
30690
|
}
|
|
30691
30691
|
),
|
|
30692
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30692
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelMenuDivider, {}),
|
|
30693
30693
|
hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30694
30694
|
standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30695
|
-
|
|
30695
|
+
chunkDWWRLKEZ_cjs.ModelOption,
|
|
30696
30696
|
{
|
|
30697
30697
|
icon: standardIcon(m),
|
|
30698
30698
|
label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
|
|
@@ -30704,9 +30704,9 @@ function ConnectedModelSelector({
|
|
|
30704
30704
|
`standard-${m.model_name}`
|
|
30705
30705
|
)),
|
|
30706
30706
|
premiumTier && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30707
|
-
|
|
30707
|
+
chunkDWWRLKEZ_cjs.ModelTierOption,
|
|
30708
30708
|
{
|
|
30709
|
-
icon: premiumDisabled || !premiumMember ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30709
|
+
icon: premiumDisabled || !premiumMember ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTierIcon, { tier: "premium", isGreyed: premiumDisabled }) : (
|
|
30710
30710
|
// The resolved Premium model's provider is the row's brand icon, so the pick
|
|
30711
30711
|
// is recognisable without a model_name suffix.
|
|
30712
30712
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30725,7 +30725,7 @@ function ConnectedModelSelector({
|
|
|
30725
30725
|
onSelect: () => choose(premiumTier.resolvedModelName),
|
|
30726
30726
|
testId: "model-option-tier-Premium",
|
|
30727
30727
|
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30728
|
-
|
|
30728
|
+
chunkDWWRLKEZ_cjs.ModelConfigureButton,
|
|
30729
30729
|
{
|
|
30730
30730
|
label: "Configure Premium tier",
|
|
30731
30731
|
tooltip: "Configure Premium",
|
|
@@ -30740,13 +30740,13 @@ function ConnectedModelSelector({
|
|
|
30740
30740
|
"tier-Premium"
|
|
30741
30741
|
),
|
|
30742
30742
|
developerModels.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30743
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30743
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelMenuDivider, {}),
|
|
30744
30744
|
developerModels.map((m) => {
|
|
30745
30745
|
const tag = m.tags?.[0];
|
|
30746
30746
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30747
|
-
|
|
30747
|
+
chunkDWWRLKEZ_cjs.ModelOption,
|
|
30748
30748
|
{
|
|
30749
|
-
icon: tag && TAG_TIER[tag] ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30749
|
+
icon: tag && TAG_TIER[tag] ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTierIcon, { tier: TAG_TIER[tag] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelDot, {}),
|
|
30750
30750
|
label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name,
|
|
30751
30751
|
isSelected: selectedModel === m.model_name,
|
|
30752
30752
|
onSelect: () => choose(m.model_name),
|
|
@@ -30756,7 +30756,7 @@ function ConnectedModelSelector({
|
|
|
30756
30756
|
);
|
|
30757
30757
|
})
|
|
30758
30758
|
] })
|
|
30759
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
30759
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelMenuMessage, { children: "Loading models..." })
|
|
30760
30760
|
]
|
|
30761
30761
|
}
|
|
30762
30762
|
);
|
|
@@ -30768,11 +30768,11 @@ function ConnectedModelSelector({
|
|
|
30768
30768
|
{
|
|
30769
30769
|
className: ui.cn("h-8 w-[200px] text-sm", className),
|
|
30770
30770
|
"data-testid": "model-selector",
|
|
30771
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30771
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelTriggerContent, { icon: triggerIcon, label: triggerLabel })
|
|
30772
30772
|
}
|
|
30773
30773
|
),
|
|
30774
30774
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.SelectContent, { className: "z-50", children: [
|
|
30775
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: react.AUTO_CHAT_MODEL, "data-testid": "model-option-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30775
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: react.AUTO_CHAT_MODEL, "data-testid": "model-option-auto", children: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelAutoIcon, {}), label: "Autoselect" }) }),
|
|
30776
30776
|
hasTiers ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30777
30777
|
standardTier?.members.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30778
30778
|
ui.SelectItem,
|
|
@@ -30780,7 +30780,7 @@ function ConnectedModelSelector({
|
|
|
30780
30780
|
value: m.model_name,
|
|
30781
30781
|
"data-testid": `model-option-${m.model_name}`,
|
|
30782
30782
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30783
|
-
|
|
30783
|
+
chunkDWWRLKEZ_cjs.ModelOptionLabel,
|
|
30784
30784
|
{
|
|
30785
30785
|
icon: standardIcon(m),
|
|
30786
30786
|
label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
|
|
@@ -30794,7 +30794,7 @@ function ConnectedModelSelector({
|
|
|
30794
30794
|
{
|
|
30795
30795
|
value: premiumTier.resolvedModelName,
|
|
30796
30796
|
"data-testid": "model-option-tier-Premium",
|
|
30797
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30797
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelOptionLabel, { icon: /* @__PURE__ */ jsxRuntime.jsx(ArbiLogo, {}), label: "Premium" })
|
|
30798
30798
|
},
|
|
30799
30799
|
"tier-Premium"
|
|
30800
30800
|
),
|
|
@@ -30804,9 +30804,9 @@ function ConnectedModelSelector({
|
|
|
30804
30804
|
value: m.model_name,
|
|
30805
30805
|
"data-testid": `model-option-${m.model_name}`,
|
|
30806
30806
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30807
|
-
|
|
30807
|
+
chunkDWWRLKEZ_cjs.ModelOptionLabel,
|
|
30808
30808
|
{
|
|
30809
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30809
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ModelDot, {}),
|
|
30810
30810
|
label: m.display_name ? `${m.display_name} \xB7 ${m.connection_scope === "box" ? "Box" : "Personal"}` : m.model_name
|
|
30811
30811
|
}
|
|
30812
30812
|
)
|
|
@@ -30825,7 +30825,7 @@ function ConnectedConfigForm({ availableModels, ...rest }) {
|
|
|
30825
30825
|
({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedModelSelector, { value, onValueChange: onChange, className: "w-full" }),
|
|
30826
30826
|
[]
|
|
30827
30827
|
);
|
|
30828
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30828
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConfigForm, { ...rest, renderModelSelect: hasModels ? renderModelSelect : void 0 });
|
|
30829
30829
|
}
|
|
30830
30830
|
function ConnectedAgentConfigForm({ agentExtId, agentName, onSaved }) {
|
|
30831
30831
|
const { notify: notify18 } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
@@ -30942,7 +30942,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
30942
30942
|
}, [name, selectedWorkspaces, role, createAgent, addWorkspaceUsers, arbi, notify18]);
|
|
30943
30943
|
if (editAgent) {
|
|
30944
30944
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30945
|
-
|
|
30945
|
+
chunkO3MRE2HL_cjs.AgentEditView,
|
|
30946
30946
|
{
|
|
30947
30947
|
agentName: editAgent.name,
|
|
30948
30948
|
config: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30958,7 +30958,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
30958
30958
|
}
|
|
30959
30959
|
if (view === "main") {
|
|
30960
30960
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30961
|
-
|
|
30961
|
+
chunkO3MRE2HL_cjs.AgentMainView,
|
|
30962
30962
|
{
|
|
30963
30963
|
onConnectExternal: () => setView("connect"),
|
|
30964
30964
|
config: mainAgent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30974,11 +30974,11 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
30974
30974
|
}
|
|
30975
30975
|
if (result) {
|
|
30976
30976
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30977
|
-
|
|
30977
|
+
chunkO3MRE2HL_cjs.AgentCreatedView,
|
|
30978
30978
|
{
|
|
30979
30979
|
email: result.email,
|
|
30980
30980
|
signingKey: result.signingKey,
|
|
30981
|
-
instructions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30981
|
+
instructions: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentConnectInstructions, { email: result.email, signingKey: result.signingKey }),
|
|
30982
30982
|
config: /* @__PURE__ */ jsxRuntime.jsx(ConnectedAgentConfigForm, { agentExtId: result.extId, agentName: result.name }),
|
|
30983
30983
|
isConfigOpen: configOpen,
|
|
30984
30984
|
onToggleConfig: () => setConfigOpen((v) => !v),
|
|
@@ -30987,7 +30987,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
30987
30987
|
);
|
|
30988
30988
|
}
|
|
30989
30989
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30990
|
-
|
|
30990
|
+
chunkO3MRE2HL_cjs.AgentCreateView,
|
|
30991
30991
|
{
|
|
30992
30992
|
name,
|
|
30993
30993
|
onNameChange: setName,
|
|
@@ -31820,7 +31820,7 @@ function ConnectedAccountCluster({
|
|
|
31820
31820
|
if (!open) return null;
|
|
31821
31821
|
const current = activePage === page;
|
|
31822
31822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31823
|
-
|
|
31823
|
+
chunkGX5MKJ3F_cjs.SidebarBadgeRow,
|
|
31824
31824
|
{
|
|
31825
31825
|
icon: icon2,
|
|
31826
31826
|
label,
|
|
@@ -31837,7 +31837,7 @@ function ConnectedAccountCluster({
|
|
|
31837
31837
|
);
|
|
31838
31838
|
};
|
|
31839
31839
|
const bell = layout === "drawer" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31840
|
-
|
|
31840
|
+
chunkGX5MKJ3F_cjs.SidebarBadgeRow,
|
|
31841
31841
|
{
|
|
31842
31842
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-5" }),
|
|
31843
31843
|
label: "Notifications",
|
|
@@ -31871,7 +31871,7 @@ function ConnectedAccountCluster({
|
|
|
31871
31871
|
side,
|
|
31872
31872
|
align,
|
|
31873
31873
|
renderTrigger: layout === "bar" ? void 0 : ({ unread, ariaLabel, testId }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
31874
|
-
|
|
31874
|
+
chunkGX5MKJ3F_cjs.SidebarBadgeRow,
|
|
31875
31875
|
{
|
|
31876
31876
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-5" }),
|
|
31877
31877
|
label: "Notifications",
|
|
@@ -31884,7 +31884,7 @@ function ConnectedAccountCluster({
|
|
|
31884
31884
|
}
|
|
31885
31885
|
);
|
|
31886
31886
|
const contacts = showContacts && openContacts ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31887
|
-
|
|
31887
|
+
chunkGX5MKJ3F_cjs.SidebarBadgeRow,
|
|
31888
31888
|
{
|
|
31889
31889
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ContactIcon, { className: "size-5" }),
|
|
31890
31890
|
label: "Contacts",
|
|
@@ -31921,7 +31921,7 @@ function ConnectedAccountCluster({
|
|
|
31921
31921
|
layout
|
|
31922
31922
|
);
|
|
31923
31923
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31924
|
-
|
|
31924
|
+
chunkGX5MKJ3F_cjs.ActionCluster,
|
|
31925
31925
|
{
|
|
31926
31926
|
layout,
|
|
31927
31927
|
status: layout === "bar" ? status : null,
|
|
@@ -32086,7 +32086,7 @@ var PaymentReturn = () => (usePaymentReturn(), null);
|
|
|
32086
32086
|
var UserNameFromWorkspaces = () => (useUserNameFromWorkspaces(), null);
|
|
32087
32087
|
function ConnectedAppRuntime({ effects = {} }) {
|
|
32088
32088
|
const on = (effect) => effects[effect] !== false;
|
|
32089
|
-
const { stripeEnabled } =
|
|
32089
|
+
const { stripeEnabled } = chunkV7JDMKNQ_cjs.useBillingSupport();
|
|
32090
32090
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32091
32091
|
on("releaseStaleModals") && /* @__PURE__ */ jsxRuntime.jsx(ReleaseStaleModals, {}),
|
|
32092
32092
|
on("retiredModelNotice") && /* @__PURE__ */ jsxRuntime.jsx(RetiredModelNotice, {}),
|
|
@@ -32649,7 +32649,7 @@ function ConnectedReportProblem({
|
|
|
32649
32649
|
const bar = layout === "bar";
|
|
32650
32650
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32651
32651
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32652
|
-
|
|
32652
|
+
chunkGX5MKJ3F_cjs.SidebarBadgeRow,
|
|
32653
32653
|
{
|
|
32654
32654
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bug, { className: "size-5" }),
|
|
32655
32655
|
label: "Report a problem",
|
|
@@ -32671,14 +32671,14 @@ var referencesOf = (inputs) => {
|
|
|
32671
32671
|
return value?.documents ?? [];
|
|
32672
32672
|
};
|
|
32673
32673
|
var PROMPT_BINDINGS = {
|
|
32674
|
-
[
|
|
32674
|
+
[chunkO3MRE2HL_cjs.GENERATE_IMAGE_ID]: {
|
|
32675
32675
|
attachScope: false,
|
|
32676
32676
|
tools: (inputs) => {
|
|
32677
32677
|
const aspectRatio = typeof inputs.aspect_ratio === "string" ? inputs.aspect_ratio : "";
|
|
32678
32678
|
return {
|
|
32679
32679
|
retrieval_chunk: browser.buildRetrievalChunkTool([]),
|
|
32680
32680
|
retrieval_full_context: browser.buildRetrievalFullContextTool(referencesOf(inputs)),
|
|
32681
|
-
...aspectRatio && aspectRatio !==
|
|
32681
|
+
...aspectRatio && aspectRatio !== chunkO3MRE2HL_cjs.IMAGE_ASPECT_AUTO ? {
|
|
32682
32682
|
image_generation: {
|
|
32683
32683
|
name: "image_generation",
|
|
32684
32684
|
description: "image generation",
|
|
@@ -32714,7 +32714,7 @@ function useWorkflowTasks() {
|
|
|
32714
32714
|
);
|
|
32715
32715
|
const create4 = React9.useCallback(
|
|
32716
32716
|
async (ctx, forceWorkflow = false) => {
|
|
32717
|
-
const request =
|
|
32717
|
+
const request = chunkO3MRE2HL_cjs.taskComposerToCreateRequest(
|
|
32718
32718
|
{ ...ctx, documentTitles, plan: ctx.plan ?? null },
|
|
32719
32719
|
activeWorkspaceId ?? void 0,
|
|
32720
32720
|
forceWorkflow
|
|
@@ -32756,7 +32756,7 @@ function useWorkflowTasks() {
|
|
|
32756
32756
|
);
|
|
32757
32757
|
const update = React9.useCallback(
|
|
32758
32758
|
async (task, ctx) => {
|
|
32759
|
-
const patch =
|
|
32759
|
+
const patch = chunkO3MRE2HL_cjs.taskComposerToUpdateRequest({ ...ctx, plan: ctx.plan ?? null });
|
|
32760
32760
|
if (task.is_owner === false) delete patch.shared;
|
|
32761
32761
|
await updateConversation.mutateAsync({ conversationId: task.external_id, patch });
|
|
32762
32762
|
},
|
|
@@ -32764,7 +32764,7 @@ function useWorkflowTasks() {
|
|
|
32764
32764
|
);
|
|
32765
32765
|
const updateWorkflow = React9.useCallback(
|
|
32766
32766
|
async (workflow, ctx) => {
|
|
32767
|
-
const patch =
|
|
32767
|
+
const patch = chunkO3MRE2HL_cjs.composerToWorkflowUpdate({ ...ctx, documentTitles, plan: ctx.plan ?? null });
|
|
32768
32768
|
if (workflow.is_owner === false) delete patch.shared;
|
|
32769
32769
|
const workspaceId = workflow.workspace_ext_id ?? activeWorkspaceId;
|
|
32770
32770
|
const updated = await updateWorkflowMutation.mutateAsync({
|
|
@@ -32805,7 +32805,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32805
32805
|
const annotate = React9.useCallback(
|
|
32806
32806
|
async ({ inputs, scope }) => {
|
|
32807
32807
|
const description = text(inputs, "description");
|
|
32808
|
-
const name = text(inputs, "name") ||
|
|
32808
|
+
const name = text(inputs, "name") || chunkO3MRE2HL_cjs.deriveAnnotationName(description);
|
|
32809
32809
|
const matching = chunk2QDNQM63_cjs.matchWorkflowScope(documents, scope);
|
|
32810
32810
|
if (!name || !description || matching.length === 0) return;
|
|
32811
32811
|
try {
|
|
@@ -32849,9 +32849,9 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32849
32849
|
async (launch) => {
|
|
32850
32850
|
const { workflow, inputs, scope, agentId } = launch;
|
|
32851
32851
|
if (workflow.run.kind === "operation") {
|
|
32852
|
-
if (workflow.id ===
|
|
32852
|
+
if (workflow.id === chunkO3MRE2HL_cjs.ANNOTATE_ID) {
|
|
32853
32853
|
await annotate(launch);
|
|
32854
|
-
|
|
32854
|
+
chunkO3MRE2HL_cjs.recordWorkflowUse(workflow.id);
|
|
32855
32855
|
return;
|
|
32856
32856
|
}
|
|
32857
32857
|
throw new Error(`No host handler for workflow "${workflow.id}"`);
|
|
@@ -32861,7 +32861,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32861
32861
|
);
|
|
32862
32862
|
const prompt = chunk76L6LOP3_cjs.composeWorkflowPrompt(workflow, inputs, { documentTitles });
|
|
32863
32863
|
if (!prompt) return;
|
|
32864
|
-
|
|
32864
|
+
chunkO3MRE2HL_cjs.recordWorkflowUse(workflow.id);
|
|
32865
32865
|
if (agentId) {
|
|
32866
32866
|
try {
|
|
32867
32867
|
const created = await createTask({
|
|
@@ -32944,27 +32944,27 @@ function ConnectedWorkflowStart({
|
|
|
32944
32944
|
const tags = React9.useMemo(() => chunk2QDNQM63_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
|
|
32945
32945
|
const fieldPlaceholder = React9.useCallback(
|
|
32946
32946
|
(field, inputs, workflow) => {
|
|
32947
|
-
if (workflow.id !==
|
|
32948
|
-
const derived =
|
|
32947
|
+
if (workflow.id !== chunkO3MRE2HL_cjs.ANNOTATE_ID || field.name !== "name") return void 0;
|
|
32948
|
+
const derived = chunkO3MRE2HL_cjs.deriveAnnotationName(String(inputs.description ?? ""));
|
|
32949
32949
|
return derived ? `Otherwise \u201C${derived}\u201D` : "Taken from the description";
|
|
32950
32950
|
},
|
|
32951
32951
|
[]
|
|
32952
32952
|
);
|
|
32953
32953
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32954
|
-
|
|
32954
|
+
chunkUZVXVTTB_cjs.ConnectedWorkflowLauncher,
|
|
32955
32955
|
{
|
|
32956
32956
|
...rest,
|
|
32957
32957
|
workflows,
|
|
32958
32958
|
onLaunch,
|
|
32959
|
-
renderIcon:
|
|
32959
|
+
renderIcon: chunkO3MRE2HL_cjs.renderWorkflowIcon,
|
|
32960
32960
|
onAddFiles: openUpload,
|
|
32961
32961
|
agentLabels: AGENT_LABELS,
|
|
32962
32962
|
addFilesAction,
|
|
32963
32963
|
fieldPlaceholder,
|
|
32964
|
-
submitLabel: ({ workflow, matchedCount }) => workflow.id ===
|
|
32964
|
+
submitLabel: ({ workflow, matchedCount }) => workflow.id === chunkO3MRE2HL_cjs.ANNOTATE_ID && matchedCount !== null ? `Annotate ${matchedCount} document${matchedCount !== 1 ? "s" : ""}` : void 0,
|
|
32965
32965
|
renderNotice: ({ workflow, inputs }) => {
|
|
32966
|
-
if (workflow.id !==
|
|
32967
|
-
const name = String(inputs.name ?? "").trim() ||
|
|
32966
|
+
if (workflow.id !== chunkO3MRE2HL_cjs.ANNOTATE_ID) return null;
|
|
32967
|
+
const name = String(inputs.name ?? "").trim() || chunkO3MRE2HL_cjs.deriveAnnotationName(String(inputs.description ?? ""));
|
|
32968
32968
|
const existing = name ? tags.find((t) => t.name.toLowerCase() === name.toLowerCase()) : void 0;
|
|
32969
32969
|
if (!existing) return null;
|
|
32970
32970
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -32995,25 +32995,25 @@ function useSkillsEnabled() {
|
|
|
32995
32995
|
// src/connection/workflows/useWorkflowDefinitions.ts
|
|
32996
32996
|
function useWorkflowDefinitions() {
|
|
32997
32997
|
const { data: listings } = react.useSkills();
|
|
32998
|
-
const usage =
|
|
32998
|
+
const usage = chunkO3MRE2HL_cjs.useWorkflowUsage();
|
|
32999
32999
|
const skillsEnabled = useSkillsEnabled();
|
|
33000
33000
|
return React9.useMemo(() => {
|
|
33001
33001
|
const { host: builtins, skills: fromServer } = chunk76L6LOP3_cjs.mergeSkillWorkflows(
|
|
33002
|
-
|
|
33002
|
+
chunkO3MRE2HL_cjs.WEB_WORKFLOWS,
|
|
33003
33003
|
listings ?? []
|
|
33004
33004
|
);
|
|
33005
33005
|
const all = [...builtins, ...fromServer];
|
|
33006
33006
|
const byId = new Map(all.map((w) => [w.id, w]));
|
|
33007
|
-
const pinned =
|
|
33007
|
+
const pinned = chunkO3MRE2HL_cjs.DASHBOARD_PINNED.flatMap((id) => {
|
|
33008
33008
|
const w = byId.get(id);
|
|
33009
33009
|
return w ? [w] : [];
|
|
33010
33010
|
});
|
|
33011
33011
|
return {
|
|
33012
33012
|
skills: all,
|
|
33013
33013
|
skillsEnabled,
|
|
33014
|
-
start: skillsEnabled ? [...builtins, ...
|
|
33015
|
-
dashboard: [...pinned, ...
|
|
33016
|
-
forTasks: [
|
|
33014
|
+
start: skillsEnabled ? [...builtins, ...chunkO3MRE2HL_cjs.sortByRecentUse(fromServer, usage)] : [],
|
|
33015
|
+
dashboard: [...pinned, ...chunkO3MRE2HL_cjs.DASHBOARD_OPERATIONS],
|
|
33016
|
+
forTasks: [chunkO3MRE2HL_cjs.CUSTOM_TASK, ...all.filter((w) => w.schedulable), chunkO3MRE2HL_cjs.REMIND_TASK]
|
|
33017
33017
|
};
|
|
33018
33018
|
}, [listings, usage, skillsEnabled]);
|
|
33019
33019
|
}
|
|
@@ -33035,7 +33035,7 @@ function resolveLaunchInputs(workflow, request) {
|
|
|
33035
33035
|
function useWorkflowLaunch() {
|
|
33036
33036
|
const { skills } = useWorkflowDefinitions();
|
|
33037
33037
|
const launch = React9.useCallback(
|
|
33038
|
-
(workflowId, options2 = {}) =>
|
|
33038
|
+
(workflowId, options2 = {}) => chunkO3MRE2HL_cjs.openWorkflowLaunch({ workflowId, ...options2 }),
|
|
33039
33039
|
[]
|
|
33040
33040
|
);
|
|
33041
33041
|
const itemsFor = React9.useCallback(
|
|
@@ -33064,8 +33064,8 @@ function useWorkflowLaunch() {
|
|
|
33064
33064
|
return { launch, itemsFor, scopeItemsFor };
|
|
33065
33065
|
}
|
|
33066
33066
|
function Inner() {
|
|
33067
|
-
const request =
|
|
33068
|
-
const close =
|
|
33067
|
+
const request = chunkO3MRE2HL_cjs.useWorkflowLaunchRequest();
|
|
33068
|
+
const close = chunkO3MRE2HL_cjs.closeWorkflowLaunch;
|
|
33069
33069
|
const { skills } = useWorkflowDefinitions();
|
|
33070
33070
|
const run = useLaunchWorkflow({ landing: request?.landing });
|
|
33071
33071
|
const workflow = skills.find((w) => w.id === request?.workflowId);
|
|
@@ -33103,7 +33103,7 @@ function Inner() {
|
|
|
33103
33103
|
);
|
|
33104
33104
|
}
|
|
33105
33105
|
function WorkflowLaunchHost() {
|
|
33106
|
-
return
|
|
33106
|
+
return chunkO3MRE2HL_cjs.useWorkflowLaunchRequest() ? /* @__PURE__ */ jsxRuntime.jsx(Inner, {}) : null;
|
|
33107
33107
|
}
|
|
33108
33108
|
var BUILTIN_GLOBAL_DIALOGS = {
|
|
33109
33109
|
createWorkspace: ({ props, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -33171,7 +33171,7 @@ var ConversationEntity = React9.memo(function ConversationEntity2({
|
|
|
33171
33171
|
);
|
|
33172
33172
|
const icon2 = /* @__PURE__ */ jsxRuntime.jsx(ui.ThreadVisibilityIcon, { shared: isShared, className: `${iconSizeClass} shrink-0` });
|
|
33173
33173
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33174
|
-
|
|
33174
|
+
chunkO3MRE2HL_cjs.EntityChip,
|
|
33175
33175
|
{
|
|
33176
33176
|
variant,
|
|
33177
33177
|
icon: icon2,
|
|
@@ -33193,7 +33193,7 @@ function WorkflowRunStatusCell({ conversation }) {
|
|
|
33193
33193
|
});
|
|
33194
33194
|
const { data: members = [] } = react.useWorkspaceUsers();
|
|
33195
33195
|
const me = react.useArbiSession().user?.external_id;
|
|
33196
|
-
const steps =
|
|
33196
|
+
const steps = chunkO3MRE2HL_cjs.fromPlanSteps(conversation.plan?.steps ?? []);
|
|
33197
33197
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
33198
33198
|
const nameOf = (id) => {
|
|
33199
33199
|
if (id === me) return "you";
|
|
@@ -33201,7 +33201,7 @@ function WorkflowRunStatusCell({ conversation }) {
|
|
|
33201
33201
|
return person ? ui.getUserDisplayName(person) : void 0;
|
|
33202
33202
|
};
|
|
33203
33203
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33204
|
-
|
|
33204
|
+
chunkO3MRE2HL_cjs.WorkflowRunStatus,
|
|
33205
33205
|
{
|
|
33206
33206
|
steps,
|
|
33207
33207
|
states,
|
|
@@ -33235,7 +33235,7 @@ function ConversationStatusCell({ conversation }) {
|
|
|
33235
33235
|
if (conversation.plan?.steps?.length && !isLiveGenerating)
|
|
33236
33236
|
return /* @__PURE__ */ jsxRuntime.jsx(WorkflowRunStatusCell, { conversation });
|
|
33237
33237
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33238
|
-
|
|
33238
|
+
chunkO3MRE2HL_cjs.ThreadStatusLine,
|
|
33239
33239
|
{
|
|
33240
33240
|
state: threadStateOf(conversation, isLiveGenerating),
|
|
33241
33241
|
className: "h-full",
|
|
@@ -33567,16 +33567,16 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33567
33567
|
const openWorkflow = chunkB3NYBMDR_cjs.useOpenWorkflow();
|
|
33568
33568
|
const workspaceExtId = react.useArbiSessionState((s) => s.workspaceId);
|
|
33569
33569
|
const task = conversations.find((c) => c.external_id === conversationId);
|
|
33570
|
-
const latestMessageAt =
|
|
33570
|
+
const latestMessageAt = chunkO3MRE2HL_cjs.latestMessageTime(messageHistory);
|
|
33571
33571
|
const events = (activity.data ?? []).filter(
|
|
33572
|
-
(event) => !
|
|
33572
|
+
(event) => !chunkO3MRE2HL_cjs.isSupersededStop(event, latestMessageAt)
|
|
33573
33573
|
);
|
|
33574
33574
|
const personName = (extId) => {
|
|
33575
33575
|
const person = members.find((m) => m.user.external_id === extId)?.user;
|
|
33576
33576
|
return person ? ui.getUserDisplayName(person) : "someone";
|
|
33577
33577
|
};
|
|
33578
|
-
const planSteps =
|
|
33579
|
-
const entries =
|
|
33578
|
+
const planSteps = chunkO3MRE2HL_cjs.fromPlanSteps(task?.plan?.steps ?? []);
|
|
33579
|
+
const entries = chunkO3MRE2HL_cjs.compactThreadActivity(events, (id) => planSteps.find((s) => s.id === id)?.title);
|
|
33580
33580
|
const items = entries.map(({ event, label, recipients }) => {
|
|
33581
33581
|
const messageActivity = [
|
|
33582
33582
|
"created",
|
|
@@ -33602,7 +33602,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33602
33602
|
const messageId = sourceMessage ?? [...messageHistory].reverse().find((message) => Date.parse(message.created_at ?? "") <= Date.parse(event.created_at))?.external_id ?? messageHistory[0]?.external_id;
|
|
33603
33603
|
const doc = docId ? docs.find((d) => d.external_id === docId) : void 0;
|
|
33604
33604
|
const mailDraftId = event.kind === "notified" && event.detail?.event === "mail_draft_ready" && typeof event.detail?.mail_id === "string" ? event.detail.mail_id : void 0;
|
|
33605
|
-
const missed = event.kind === "notified" && recipients.length ?
|
|
33605
|
+
const missed = event.kind === "notified" && recipients.length ? chunkO3MRE2HL_cjs.unnotifiedMentions(
|
|
33606
33606
|
messageHistory.find((message) => message.external_id === sourceMessage)?.mentions,
|
|
33607
33607
|
recipients,
|
|
33608
33608
|
event.actor_ext_id
|
|
@@ -33617,7 +33617,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33617
33617
|
step: typeof event.detail?.step === "string" ? event.detail.step : void 0,
|
|
33618
33618
|
createdAt: event.created_at,
|
|
33619
33619
|
card: callDetail ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33620
|
-
|
|
33620
|
+
chunk6AJJJ5HR_cjs.ThreadCallLogCard,
|
|
33621
33621
|
{
|
|
33622
33622
|
detail: callDetail,
|
|
33623
33623
|
name: personName,
|
|
@@ -33625,7 +33625,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33625
33625
|
time: ui.formatRelativeTime(event.created_at, { style: "short" })
|
|
33626
33626
|
}
|
|
33627
33627
|
) : recordingCall ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33628
|
-
|
|
33628
|
+
chunk6AJJJ5HR_cjs.RecordingCard,
|
|
33629
33629
|
{
|
|
33630
33630
|
callExtId: recordingCall,
|
|
33631
33631
|
recordingExtId: recordingId,
|
|
@@ -33635,7 +33635,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33635
33635
|
) : void 0,
|
|
33636
33636
|
docId,
|
|
33637
33637
|
docTitle: doc ? ui.getDocumentTitle(doc) : void 0,
|
|
33638
|
-
label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ?
|
|
33638
|
+
label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ? chunkO3MRE2HL_cjs.notifiedLabel(recipients.map(personName), missed.map(personName)) : label,
|
|
33639
33639
|
description: [
|
|
33640
33640
|
name,
|
|
33641
33641
|
label,
|
|
@@ -33649,7 +33649,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33649
33649
|
stepChip: eventStep ? stepChipOf(eventStep, event.kind, stepDocument) : void 0,
|
|
33650
33650
|
// No avatar tooltip: the entry is already a button (or titled row) that carries the same
|
|
33651
33651
|
// details, and a tooltip trigger inside it would be a nested <button>.
|
|
33652
|
-
avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33652
|
+
avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AssistantEntity, { variant: "icon", size: 20, showTooltip: false }) : member ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user: member, tooltip: false }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-4 text-muted-foreground" }),
|
|
33653
33653
|
time: ui.formatRelativeTime(event.created_at, { style: "short" }),
|
|
33654
33654
|
exactTime: ui.formatFriendlyDate(event.created_at),
|
|
33655
33655
|
onOpenDocument: docId && doc ? () => openDocument(docId) : void 0,
|
|
@@ -33698,7 +33698,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33698
33698
|
onSelect: () => navigateToConversation(source)
|
|
33699
33699
|
});
|
|
33700
33700
|
}
|
|
33701
|
-
const links =
|
|
33701
|
+
const links = chunkO3MRE2HL_cjs.linkedRunsFromActivity(activity.data);
|
|
33702
33702
|
const threadName = (id, workflowId) => conversations.find((c) => c.external_id === id)?.title || workflows.find((w) => w.external_id === workflowId)?.name || "Linked thread";
|
|
33703
33703
|
const signals = links.raised.map((raised) => ({
|
|
33704
33704
|
step: raised.step,
|
|
@@ -33713,7 +33713,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
33713
33713
|
if (links.startedBy) {
|
|
33714
33714
|
const { conversationId: parentId, step, signal } = links.startedBy;
|
|
33715
33715
|
const parent = conversations.find((c) => c.external_id === parentId);
|
|
33716
|
-
const parentSteps =
|
|
33716
|
+
const parentSteps = chunkO3MRE2HL_cjs.fromPlanSteps(parent?.plan?.steps ?? []);
|
|
33717
33717
|
startedBy = {
|
|
33718
33718
|
stepTitle: parentSteps.find((s) => s.id === step)?.title ?? step ?? "a step",
|
|
33719
33719
|
threadTitle: parent?.title || "another thread",
|
|
@@ -33746,7 +33746,7 @@ function ConnectedThreadTaskBar({
|
|
|
33746
33746
|
const person = members.find((m) => m.user.external_id === id)?.user;
|
|
33747
33747
|
return person ? ui.getUserDisplayName(person) : void 0;
|
|
33748
33748
|
};
|
|
33749
|
-
const steps =
|
|
33749
|
+
const steps = chunkO3MRE2HL_cjs.fromPlanSteps(task?.plan?.steps ?? []);
|
|
33750
33750
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
33751
33751
|
const runInputs = task?.skill_inputs ?? {};
|
|
33752
33752
|
const stepCall = (body) => actOnStep.mutateAsync({ conversationId, body });
|
|
@@ -33772,7 +33772,7 @@ function ConnectedThreadTaskBar({
|
|
|
33772
33772
|
task?.plan?.steps?.length ? (
|
|
33773
33773
|
// A workflow run: its named steps, with what happened in the thread under each.
|
|
33774
33774
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33775
|
-
|
|
33775
|
+
chunkO3MRE2HL_cjs.WorkflowThreadStrip,
|
|
33776
33776
|
{
|
|
33777
33777
|
steps,
|
|
33778
33778
|
states,
|
|
@@ -33799,7 +33799,7 @@ function ConnectedThreadTaskBar({
|
|
|
33799
33799
|
renderStepAction: (step, phase) => (
|
|
33800
33800
|
// A signer or a draft's person acts on their step even on a thread they cannot edit.
|
|
33801
33801
|
canEdit || phase === "waiting" || phase === "done" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33802
|
-
|
|
33802
|
+
chunkO3MRE2HL_cjs.WorkflowStepAction,
|
|
33803
33803
|
{
|
|
33804
33804
|
step,
|
|
33805
33805
|
phase,
|
|
@@ -33820,8 +33820,8 @@ function ConnectedThreadTaskBar({
|
|
|
33820
33820
|
}
|
|
33821
33821
|
)
|
|
33822
33822
|
) : items.length || startedBy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33823
|
-
startedBy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33824
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33823
|
+
startedBy && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.WorkflowThreadStartedBy, { origin: startedBy }),
|
|
33824
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.TaskFlow, { items: items.filter((item) => !item.step) })
|
|
33825
33825
|
] }) : (
|
|
33826
33826
|
// Ordinary chats record no activity events, so an empty ribbon says nothing rather than
|
|
33827
33827
|
// "No recorded activity yet" while the answer and its steps are right there in the thread.
|
|
@@ -33855,7 +33855,7 @@ function ConnectedThreadTaskBar({
|
|
|
33855
33855
|
) }),
|
|
33856
33856
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
|
|
33857
33857
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33858
|
-
|
|
33858
|
+
chunk5ZHAHJ4H_cjs.ThreadFollowMenuItem,
|
|
33859
33859
|
{
|
|
33860
33860
|
following: follow.following,
|
|
33861
33861
|
onFollowingChange: (on) => (
|
|
@@ -34020,7 +34020,7 @@ function ConnectedTaskComposer({
|
|
|
34020
34020
|
const { tasks: allTasks } = react.useWorkItems();
|
|
34021
34021
|
const { data: documents = [] } = react.useDocuments();
|
|
34022
34022
|
const { create: create4, update, updateWorkflow, isPending } = useWorkflowTasks();
|
|
34023
|
-
const scopeSource =
|
|
34023
|
+
const scopeSource = chunkUZVXVTTB_cjs.useConnectedWorkflowScopeSource();
|
|
34024
34024
|
const activeWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
34025
34025
|
const activeWorkspace = React9.useMemo(
|
|
34026
34026
|
() => workspaces.find((w) => w.external_id === activeWorkspaceId) ?? null,
|
|
@@ -34037,7 +34037,7 @@ function ConnectedTaskComposer({
|
|
|
34037
34037
|
const label = (t) => t.title?.trim() || "Untitled task";
|
|
34038
34038
|
if (isWorkflow) return allTasks.map((t) => ({ id: t.external_id, name: label(t) }));
|
|
34039
34039
|
const subject = task ?? { external_id: "__new__" };
|
|
34040
|
-
return
|
|
34040
|
+
return chunkO3MRE2HL_cjs.moveTargets(
|
|
34041
34041
|
[...allTasks.filter((t) => t.external_id !== subject.external_id), subject],
|
|
34042
34042
|
subject
|
|
34043
34043
|
).map((t) => ({ id: t.external_id, name: label(t) }));
|
|
@@ -34052,33 +34052,33 @@ function ConnectedTaskComposer({
|
|
|
34052
34052
|
);
|
|
34053
34053
|
const initialValues = React9.useMemo(() => {
|
|
34054
34054
|
const ids = {
|
|
34055
|
-
customWorkflowId:
|
|
34056
|
-
reminderWorkflowId:
|
|
34055
|
+
customWorkflowId: chunkO3MRE2HL_cjs.CUSTOM_TASK_ID,
|
|
34056
|
+
reminderWorkflowId: chunkO3MRE2HL_cjs.REMIND_TASK_ID,
|
|
34057
34057
|
definitions: forTasks
|
|
34058
34058
|
};
|
|
34059
34059
|
const base = launchWorkflow ? {
|
|
34060
|
-
...
|
|
34060
|
+
...chunkO3MRE2HL_cjs.workflowToComposerValues(launchWorkflow, ids),
|
|
34061
34061
|
when: "once",
|
|
34062
34062
|
runAt: "",
|
|
34063
34063
|
rrule: "",
|
|
34064
34064
|
eventKind: "",
|
|
34065
34065
|
afterTaskId: "",
|
|
34066
34066
|
name: ""
|
|
34067
|
-
} : editingWorkflow ?
|
|
34067
|
+
} : editingWorkflow ? chunkO3MRE2HL_cjs.workflowToComposerValues(editingWorkflow, ids) : task ? chunkO3MRE2HL_cjs.taskToComposerValues(task, ids) : isWorkflow ? {
|
|
34068
34068
|
// Run now is the default start; scheduling is the fallback in the same field.
|
|
34069
34069
|
assignee: "agent",
|
|
34070
|
-
workflowId: initialWorkflowId ??
|
|
34070
|
+
workflowId: initialWorkflowId ?? chunkO3MRE2HL_cjs.CUSTOM_TASK_ID,
|
|
34071
34071
|
when: startLater ? "once" : "now",
|
|
34072
34072
|
...initialPrompt ? {
|
|
34073
34073
|
inputs: {
|
|
34074
|
-
[initialWorkflowId ===
|
|
34074
|
+
[initialWorkflowId === chunkO3MRE2HL_cjs.REMIND_TASK_ID ? "message" : "instruction"]: initialPrompt
|
|
34075
34075
|
}
|
|
34076
34076
|
} : {},
|
|
34077
34077
|
// A scheduled run needs an agent: the owner's Assistant unless another is picked.
|
|
34078
34078
|
...startLater && defaultAgentId ? { agentId: defaultAgentId } : {}
|
|
34079
34079
|
} : initialAgentExtId ? (
|
|
34080
34080
|
// Assigning an agent means agentic work: the free instruction, and tell me when done.
|
|
34081
|
-
{ agentId: initialAgentExtId, workflowId:
|
|
34081
|
+
{ agentId: initialAgentExtId, workflowId: chunkO3MRE2HL_cjs.CUSTOM_TASK_ID, notifyOnComplete: true }
|
|
34082
34082
|
) : {};
|
|
34083
34083
|
return {
|
|
34084
34084
|
timezone: chunkQUMUAJ2P_cjs.detectTimeZone(),
|
|
@@ -34139,7 +34139,7 @@ function ConnectedTaskComposer({
|
|
|
34139
34139
|
const ctx = {
|
|
34140
34140
|
workflow: chosen,
|
|
34141
34141
|
values: submitted,
|
|
34142
|
-
plan: chosen.id ===
|
|
34142
|
+
plan: chosen.id === chunkO3MRE2HL_cjs.CUSTOM_TASK_ID ? plan : null
|
|
34143
34143
|
};
|
|
34144
34144
|
try {
|
|
34145
34145
|
if (isWorkflow && editingWorkflow && !options2?.runOnce) {
|
|
@@ -34175,7 +34175,7 @@ function ConnectedTaskComposer({
|
|
|
34175
34175
|
}
|
|
34176
34176
|
};
|
|
34177
34177
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34178
|
-
|
|
34178
|
+
chunkO3MRE2HL_cjs.TaskComposer,
|
|
34179
34179
|
{
|
|
34180
34180
|
open,
|
|
34181
34181
|
onOpenChange,
|
|
@@ -34189,15 +34189,15 @@ function ConnectedTaskComposer({
|
|
|
34189
34189
|
tasks: taskOptions,
|
|
34190
34190
|
initialValues,
|
|
34191
34191
|
timezones,
|
|
34192
|
-
eventOptions:
|
|
34192
|
+
eventOptions: chunkO3MRE2HL_cjs.AUTOMATION_EVENTS,
|
|
34193
34193
|
eventWorkflowOptions: workspaceAutomations.filter((item) => item.external_id !== editingWorkflow?.external_id).map((item) => ({ id: item.external_id, label: item.name })),
|
|
34194
34194
|
isPending,
|
|
34195
34195
|
planDrafting: planWork.isPending,
|
|
34196
34196
|
hasPlan: plan !== null,
|
|
34197
|
-
renderIcon:
|
|
34197
|
+
renderIcon: chunkO3MRE2HL_cjs.renderWorkflowIcon,
|
|
34198
34198
|
scopeSource,
|
|
34199
34199
|
renderDocuments: (field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
34200
|
-
|
|
34200
|
+
chunkUZVXVTTB_cjs.ConnectedWorkflowDocumentsField,
|
|
34201
34201
|
{
|
|
34202
34202
|
field,
|
|
34203
34203
|
value,
|
|
@@ -34228,8 +34228,8 @@ function ConnectedTaskComposer({
|
|
|
34228
34228
|
...plan ? { addAndStart: "Approve plan and start", addAndSchedule: "Approve plan and schedule" } : {}
|
|
34229
34229
|
},
|
|
34230
34230
|
onSubmit: submit,
|
|
34231
|
-
goal: (values) => values.workflowId ===
|
|
34232
|
-
|
|
34231
|
+
goal: (values) => values.workflowId === chunkO3MRE2HL_cjs.CUSTOM_TASK_ID ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
34232
|
+
chunkO3MRE2HL_cjs.TaskPlan,
|
|
34233
34233
|
{
|
|
34234
34234
|
plan,
|
|
34235
34235
|
onChange: setPlan,
|
|
@@ -34429,7 +34429,7 @@ function ConnectedTaskStartDialog({
|
|
|
34429
34429
|
};
|
|
34430
34430
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
34431
34431
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34432
|
-
|
|
34432
|
+
chunkO3MRE2HL_cjs.TaskStartDialog,
|
|
34433
34433
|
{
|
|
34434
34434
|
open: open && !later,
|
|
34435
34435
|
onOpenChange: (next) => {
|
|
@@ -34461,7 +34461,7 @@ function ConnectedTaskStartDialog({
|
|
|
34461
34461
|
kind: "workflow",
|
|
34462
34462
|
startLater: true,
|
|
34463
34463
|
initialPrompt: later.prompt,
|
|
34464
|
-
initialWorkflowId: later.todo ?
|
|
34464
|
+
initialWorkflowId: later.todo ? chunkO3MRE2HL_cjs.REMIND_TASK_ID : void 0,
|
|
34465
34465
|
initialShared: later.shared,
|
|
34466
34466
|
launchWorkflow: later.workflow
|
|
34467
34467
|
}
|
|
@@ -34475,7 +34475,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
34475
34475
|
const [later, setLater] = React9.useState(null);
|
|
34476
34476
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
34477
34477
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34478
|
-
|
|
34478
|
+
chunkO3MRE2HL_cjs.ThreadLauncher,
|
|
34479
34479
|
{
|
|
34480
34480
|
workflows: task.workflows,
|
|
34481
34481
|
people: task.people,
|
|
@@ -34512,7 +34512,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
34512
34512
|
kind: "workflow",
|
|
34513
34513
|
startLater: true,
|
|
34514
34514
|
initialPrompt: later.prompt,
|
|
34515
|
-
initialWorkflowId: later.todo ?
|
|
34515
|
+
initialWorkflowId: later.todo ? chunkO3MRE2HL_cjs.REMIND_TASK_ID : void 0,
|
|
34516
34516
|
initialShared: later.shared,
|
|
34517
34517
|
launchWorkflow: later.workflow
|
|
34518
34518
|
}
|
|
@@ -34541,13 +34541,13 @@ function ConnectedNewThreadDialog({
|
|
|
34541
34541
|
});
|
|
34542
34542
|
const parentOptions = React9.useMemo(() => {
|
|
34543
34543
|
const leaf = { external_id: "__new__" };
|
|
34544
|
-
return
|
|
34544
|
+
return chunkO3MRE2HL_cjs.moveTargets([...tasks, leaf], leaf).map((t) => ({
|
|
34545
34545
|
id: t.external_id,
|
|
34546
34546
|
name: t.title?.trim() || "Untitled task"
|
|
34547
34547
|
}));
|
|
34548
34548
|
}, [tasks]);
|
|
34549
34549
|
const submit = async (values) => {
|
|
34550
|
-
const request =
|
|
34550
|
+
const request = chunkO3MRE2HL_cjs.newThreadToRequest(values);
|
|
34551
34551
|
try {
|
|
34552
34552
|
if (!workspaceId) throw new Error("Open a workspace to add a task.");
|
|
34553
34553
|
if (!request.startAssistant && request.todo) {
|
|
@@ -34588,7 +34588,7 @@ function ConnectedNewThreadDialog({
|
|
|
34588
34588
|
}
|
|
34589
34589
|
};
|
|
34590
34590
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34591
|
-
|
|
34591
|
+
chunkO3MRE2HL_cjs.NewThreadDialog,
|
|
34592
34592
|
{
|
|
34593
34593
|
open,
|
|
34594
34594
|
onOpenChange,
|
|
@@ -34646,7 +34646,7 @@ function ConnectedConversationStart() {
|
|
|
34646
34646
|
const browse = openSkillsBrowser ? [
|
|
34647
34647
|
{
|
|
34648
34648
|
id: "browse-all",
|
|
34649
|
-
iconNode:
|
|
34649
|
+
iconNode: chunkO3MRE2HL_cjs.renderWorkflowIcon("library"),
|
|
34650
34650
|
title: "Browse all",
|
|
34651
34651
|
description: "See every skill, make a copy, add your own",
|
|
34652
34652
|
onSelect: () => openSkillsBrowser(),
|
|
@@ -34728,6 +34728,55 @@ function useSlashSkillWorkflows({ landing }) {
|
|
|
34728
34728
|
);
|
|
34729
34729
|
return { openFor, openForDraft, launcher };
|
|
34730
34730
|
}
|
|
34731
|
+
function useWorkflowsPageState({
|
|
34732
|
+
initialBuilder,
|
|
34733
|
+
historyWorkflowId,
|
|
34734
|
+
onHistoryWorkflowConsumed
|
|
34735
|
+
} = {}) {
|
|
34736
|
+
const { data: workflows = [] } = react.useWorkflows({ live: true });
|
|
34737
|
+
const [builder, setBuilder] = React9.useState(initialBuilder ?? null);
|
|
34738
|
+
const [builderKey, setBuilderKey] = React9.useState(0);
|
|
34739
|
+
const [historyIds, setHistoryIds] = React9.useState([]);
|
|
34740
|
+
const [activeHistoryId, setActiveHistoryId] = React9.useState(null);
|
|
34741
|
+
const historyFor = workflows.find((workflow) => workflow.external_id === activeHistoryId) ?? null;
|
|
34742
|
+
const historyTabs = historyIds.flatMap((id) => {
|
|
34743
|
+
const workflow = workflows.find((item) => item.external_id === id);
|
|
34744
|
+
return workflow ? [workflow] : [];
|
|
34745
|
+
});
|
|
34746
|
+
const openHistory = React9.useCallback((workflow) => {
|
|
34747
|
+
const id = workflow?.external_id ?? null;
|
|
34748
|
+
if (id) setHistoryIds((ids) => ids.includes(id) ? ids : [...ids, id]);
|
|
34749
|
+
setActiveHistoryId(id);
|
|
34750
|
+
}, []);
|
|
34751
|
+
const closeHistoryTab = React9.useCallback((id) => {
|
|
34752
|
+
setHistoryIds((ids) => ids.filter((item) => item !== id));
|
|
34753
|
+
setActiveHistoryId((active) => active === id ? null : active);
|
|
34754
|
+
}, []);
|
|
34755
|
+
const openBuilder = React9.useCallback((selection) => {
|
|
34756
|
+
setBuilder(selection);
|
|
34757
|
+
setBuilderKey((key) => key + 1);
|
|
34758
|
+
}, []);
|
|
34759
|
+
React9.useEffect(() => {
|
|
34760
|
+
const workflow = workflows.find((item) => item.external_id === historyWorkflowId);
|
|
34761
|
+
if (!workflow) return;
|
|
34762
|
+
openHistory(workflow);
|
|
34763
|
+
onHistoryWorkflowConsumed?.();
|
|
34764
|
+
}, [historyWorkflowId, onHistoryWorkflowConsumed, openHistory, workflows]);
|
|
34765
|
+
return {
|
|
34766
|
+
workflows,
|
|
34767
|
+
builder,
|
|
34768
|
+
builderKey,
|
|
34769
|
+
openBuilder,
|
|
34770
|
+
closeBuilder: () => setBuilder(null),
|
|
34771
|
+
builderSaved: (id) => setBuilder({ kind: "saved", id }),
|
|
34772
|
+
historyFor,
|
|
34773
|
+
historyTabs,
|
|
34774
|
+
activeHistoryId,
|
|
34775
|
+
openHistory,
|
|
34776
|
+
closeHistoryTab,
|
|
34777
|
+
selectHistoryTab: setActiveHistoryId
|
|
34778
|
+
};
|
|
34779
|
+
}
|
|
34731
34780
|
function MessageLiveSecondsComponent({
|
|
34732
34781
|
conversationId,
|
|
34733
34782
|
messageId,
|
|
@@ -34759,7 +34808,7 @@ function getToolParams(detail) {
|
|
|
34759
34808
|
return params;
|
|
34760
34809
|
}
|
|
34761
34810
|
function StepModelIcon({ modelName, tag }) {
|
|
34762
|
-
const cfg = tag === "Premium" ? null :
|
|
34811
|
+
const cfg = tag === "Premium" ? null : chunkO3MRE2HL_cjs.getModelIcon(modelName, tag);
|
|
34763
34812
|
if (tag !== "Premium" && !cfg) return null;
|
|
34764
34813
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
34765
34814
|
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: tag === "Premium" ? /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: modelName ?? void 0, size: 11 }) : cfg && /* @__PURE__ */ jsxRuntime.jsx(cfg.icon, { className: cfg.className, style: { width: 11, height: 11 } }) }) }),
|
|
@@ -34874,15 +34923,15 @@ var AgentStepsComponent = ({
|
|
|
34874
34923
|
const lastStepIndex = mergedSteps[mergedSteps.length - 1].index;
|
|
34875
34924
|
const renderRow = (step, depth, isLastInList) => {
|
|
34876
34925
|
const i = posByIndex.get(step.index);
|
|
34877
|
-
const presentation =
|
|
34926
|
+
const presentation = chunkO3MRE2HL_cjs.getAgentStepPresentation(step, docInfo);
|
|
34878
34927
|
const { tool, Icon } = presentation;
|
|
34879
34928
|
const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
|
|
34880
|
-
const accent =
|
|
34929
|
+
const accent = chunkO3MRE2HL_cjs.stepAccent(step, tool);
|
|
34881
34930
|
const duration = stepDurations[i];
|
|
34882
34931
|
const isLastStep = step.index === lastStepIndex;
|
|
34883
34932
|
const isActive = step.index === currentStepIndex;
|
|
34884
34933
|
const tier = step.step === "goal" ? step.model_recommendation : null;
|
|
34885
|
-
const TierIcon = tier ?
|
|
34934
|
+
const TierIcon = tier ? chunkO3MRE2HL_cjs.MODEL_TIER_ICON_MAP[tier] : null;
|
|
34886
34935
|
const useLiveDuration = isLastStep && liveTimer != null && step.t != null;
|
|
34887
34936
|
const durationNode = useLiveDuration ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
34888
34937
|
MessageLiveSeconds,
|
|
@@ -34906,7 +34955,7 @@ var AgentStepsComponent = ({
|
|
|
34906
34955
|
})) : null;
|
|
34907
34956
|
const folded = childrenByParent.get(step.index);
|
|
34908
34957
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34909
|
-
|
|
34958
|
+
chunkO3MRE2HL_cjs.StepRow,
|
|
34910
34959
|
{
|
|
34911
34960
|
index: step.index,
|
|
34912
34961
|
number: displayNumber.get(step.index) ?? String(i + 1),
|
|
@@ -34920,7 +34969,7 @@ var AgentStepsComponent = ({
|
|
|
34920
34969
|
titleTestId: isActive ? "agent-expanded-current-step-description" : void 0,
|
|
34921
34970
|
badge: TierIcon ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
34922
34971
|
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center self-center", children: /* @__PURE__ */ jsxRuntime.jsx(TierIcon, { size: 12, className: accent.fg, "aria-hidden": true }) }) }),
|
|
34923
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children:
|
|
34972
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkO3MRE2HL_cjs.MODEL_TIER_LABELS[tier] ?? tier })
|
|
34924
34973
|
] }) : void 0,
|
|
34925
34974
|
meta: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
34926
34975
|
isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(StepModelIcon, { modelName: step.usage?.model, tag: getModelTag(step.usage?.model) }),
|
|
@@ -34935,14 +34984,14 @@ var AgentStepsComponent = ({
|
|
|
34935
34984
|
summary && !isActive && (step.narration ? (
|
|
34936
34985
|
/* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
|
|
34937
34986
|
Tool summaries stay plain text: one-line headlines where a clamp matters. */
|
|
34938
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34939
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
34940
|
-
details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
34941
|
-
showOutcome && /* @__PURE__ */ jsxRuntime.jsx(
|
|
34942
|
-
toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
34943
|
-
criteriaView && /* @__PURE__ */ jsxRuntime.jsx(
|
|
34987
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
|
|
34988
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
|
|
34989
|
+
details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepDetail, { index: step.index, children: d }, di)),
|
|
34990
|
+
showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
|
|
34991
|
+
toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
|
|
34992
|
+
criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.GoalCriteria, { criteria: criteriaView }),
|
|
34944
34993
|
folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
34945
|
-
|
|
34994
|
+
chunkO3MRE2HL_cjs.SubStepGroup,
|
|
34946
34995
|
{
|
|
34947
34996
|
parentIndex: step.index,
|
|
34948
34997
|
summary: summariseSubSteps(folded),
|
|
@@ -34968,7 +35017,7 @@ var AgentStepsComponent = ({
|
|
|
34968
35017
|
leftParts.push(`${browser.formatTokens(totalInputTokens)} in`);
|
|
34969
35018
|
if (totalOutputTokens > 0) leftParts.push(`${browser.formatTokens(totalOutputTokens)} out`);
|
|
34970
35019
|
summaryNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
34971
|
-
|
|
35020
|
+
chunkO3MRE2HL_cjs.StepTraceSummary,
|
|
34972
35021
|
{
|
|
34973
35022
|
left: leftParts.join(" \xB7 "),
|
|
34974
35023
|
isNearBudget: browser.isNearAiUsageBudget(contextUsage),
|
|
@@ -34976,7 +35025,7 @@ var AgentStepsComponent = ({
|
|
|
34976
35025
|
}
|
|
34977
35026
|
);
|
|
34978
35027
|
}
|
|
34979
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35028
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row2, i) => {
|
|
34980
35029
|
if (row2.lane) {
|
|
34981
35030
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34982
35031
|
LaneBinding,
|
|
@@ -35013,7 +35062,7 @@ function LaneBinding({
|
|
|
35013
35062
|
const running = !closed && isStreaming;
|
|
35014
35063
|
const latest = inner[inner.length - 1];
|
|
35015
35064
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35016
|
-
|
|
35065
|
+
chunkO3MRE2HL_cjs.SubAgentLane,
|
|
35017
35066
|
{
|
|
35018
35067
|
handle,
|
|
35019
35068
|
number,
|
|
@@ -35136,7 +35185,7 @@ function AgentBarShell({
|
|
|
35136
35185
|
}, [isStepsExpanded, steps]);
|
|
35137
35186
|
const visibleStepCount = React9.useMemo(() => browser.topLevelAgentSteps(steps ?? []).length, [steps]);
|
|
35138
35187
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35139
|
-
|
|
35188
|
+
chunkO3MRE2HL_cjs.AgentBar,
|
|
35140
35189
|
{
|
|
35141
35190
|
className,
|
|
35142
35191
|
testId,
|
|
@@ -35192,7 +35241,7 @@ function AgentControlBar({
|
|
|
35192
35241
|
const isPaused = controlState === "paused" || controlState === "resuming";
|
|
35193
35242
|
const steps = agentSteps ?? [];
|
|
35194
35243
|
const currentStep = browser.getCurrentStep(steps);
|
|
35195
|
-
const currentPresentation =
|
|
35244
|
+
const currentPresentation = chunkO3MRE2HL_cjs.getCurrentAgentStepPresentation(steps);
|
|
35196
35245
|
const CurrentStepIcon = currentPresentation?.Icon;
|
|
35197
35246
|
const stepLabel2 = currentPresentation?.description ?? "Agent working\u2026";
|
|
35198
35247
|
const runningLanes = browser.extractSubagentLanes(steps).filter((l) => l.status === "running");
|
|
@@ -35209,7 +35258,7 @@ function AgentControlBar({
|
|
|
35209
35258
|
}
|
|
35210
35259
|
);
|
|
35211
35260
|
const status = /* @__PURE__ */ jsxRuntime.jsx(
|
|
35212
|
-
|
|
35261
|
+
chunkO3MRE2HL_cjs.AgentBarStatus,
|
|
35213
35262
|
{
|
|
35214
35263
|
state: showState ? controlState : void 0,
|
|
35215
35264
|
stateLabel: STATE_LABEL[controlState],
|
|
@@ -35251,7 +35300,7 @@ function AgentControlBar({
|
|
|
35251
35300
|
];
|
|
35252
35301
|
const controls = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
35253
35302
|
onStop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35254
|
-
|
|
35303
|
+
chunkO3MRE2HL_cjs.AgentBarIconButton,
|
|
35255
35304
|
{
|
|
35256
35305
|
onClick: onStop,
|
|
35257
35306
|
title: "Stop",
|
|
@@ -35260,22 +35309,22 @@ function AgentControlBar({
|
|
|
35260
35309
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "h-3 w-3", fill: "currentColor" })
|
|
35261
35310
|
}
|
|
35262
35311
|
),
|
|
35263
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35312
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentBarMenu, { items: menuItems })
|
|
35264
35313
|
] });
|
|
35265
35314
|
const displayedQueuedMessages = (transientQueuedMessages ?? []).filter(
|
|
35266
35315
|
(message) => !message.serverId || !queuedMessages.some((queued) => queued.external_id === message.serverId)
|
|
35267
35316
|
);
|
|
35268
35317
|
const queuedNotes = displayedQueuedMessages.filter((message) => message.content);
|
|
35269
|
-
const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35318
|
+
const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.AgentBarNotes, { children: [
|
|
35270
35319
|
queuedNotes.map((message, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
35271
|
-
|
|
35320
|
+
chunkO3MRE2HL_cjs.AgentBarQueuedNote,
|
|
35272
35321
|
{
|
|
35273
35322
|
text: message.content ?? "",
|
|
35274
35323
|
isAcknowledged: message.acknowledged
|
|
35275
35324
|
},
|
|
35276
35325
|
index
|
|
35277
35326
|
)),
|
|
35278
|
-
probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35327
|
+
probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AgentBarProbeAnswer, { answer: probeAnswer.answer })
|
|
35279
35328
|
] }) : null;
|
|
35280
35329
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35281
35330
|
AgentBarShell,
|
|
@@ -35332,7 +35381,7 @@ function RunningSubagentsRoster({
|
|
|
35332
35381
|
if (leafId) selectThread(leafId);
|
|
35333
35382
|
};
|
|
35334
35383
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35335
|
-
|
|
35384
|
+
chunkO3MRE2HL_cjs.SubagentRoster,
|
|
35336
35385
|
{
|
|
35337
35386
|
lanes: rosterLanes,
|
|
35338
35387
|
className,
|
|
@@ -35380,7 +35429,7 @@ function AnswerTable({
|
|
|
35380
35429
|
const table = wrapperRef.current?.querySelector("table");
|
|
35381
35430
|
if (!table || !wrapperRef.current) return;
|
|
35382
35431
|
try {
|
|
35383
|
-
const filename = await
|
|
35432
|
+
const filename = await chunkDWWRLKEZ_cjs.downloadTableAsCsv(table, wrapperRef.current);
|
|
35384
35433
|
shell.notify.success(`Saved ${filename}`);
|
|
35385
35434
|
} catch (error) {
|
|
35386
35435
|
console.error("Failed to download table as CSV", error);
|
|
@@ -35495,13 +35544,13 @@ function withAnswerTable(components) {
|
|
|
35495
35544
|
}
|
|
35496
35545
|
return merged;
|
|
35497
35546
|
}
|
|
35498
|
-
var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
35547
|
+
var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
|
|
35499
35548
|
function LinkInAnswer({ href, children, ...props }) {
|
|
35500
35549
|
const docId = chunkZ2XZ2D4N_cjs.workspaceDocIdFromHref(href, chunkB3NYBMDR_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
|
|
35501
35550
|
if (docId) {
|
|
35502
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35551
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.InternalDocLink, { docId, href, ...props, children });
|
|
35503
35552
|
}
|
|
35504
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ExternalLink, { href, ...props, children });
|
|
35505
35554
|
}
|
|
35506
35555
|
var ConnectedCitationRendererComponent = ({
|
|
35507
35556
|
alwaysInteractive,
|
|
@@ -35678,9 +35727,9 @@ function useSlashItems(text2, builtinSkills = []) {
|
|
|
35678
35727
|
const { data: listings } = react.useSkills();
|
|
35679
35728
|
const skillsEnabled = react.useUserSettings().data?.show_skills ?? false;
|
|
35680
35729
|
const { commands } = react.useBuiltinCommands();
|
|
35681
|
-
const slashToken =
|
|
35730
|
+
const slashToken = chunkDWWRLKEZ_cjs.parseSlashTokenInProgress(text2);
|
|
35682
35731
|
const slashItems = React9.useMemo(
|
|
35683
|
-
() =>
|
|
35732
|
+
() => chunkDWWRLKEZ_cjs.buildSlashItems(
|
|
35684
35733
|
commands.map((c) => ({
|
|
35685
35734
|
name: c.name,
|
|
35686
35735
|
description: c.description,
|
|
@@ -35692,7 +35741,7 @@ function useSlashItems(text2, builtinSkills = []) {
|
|
|
35692
35741
|
[commands, listings, skillsEnabled, builtinSkills]
|
|
35693
35742
|
);
|
|
35694
35743
|
const filteredItems = React9.useMemo(
|
|
35695
|
-
() => slashToken !== null ?
|
|
35744
|
+
() => slashToken !== null ? chunkDWWRLKEZ_cjs.filterSlashItems(slashItems, slashToken) : [],
|
|
35696
35745
|
[slashItems, slashToken]
|
|
35697
35746
|
);
|
|
35698
35747
|
return {
|
|
@@ -35752,7 +35801,7 @@ var ConversationComposerComponent = function ConversationComposer({
|
|
|
35752
35801
|
const suggestedQuery = react.useArbiSessionState((s) => s.suggestedQuery);
|
|
35753
35802
|
const currentConversationId = react.useArbiSessionState((s) => s.conversationId);
|
|
35754
35803
|
const workspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
35755
|
-
const longPaste =
|
|
35804
|
+
const longPaste = chunkDWWRLKEZ_cjs.useLongPaste(newMessage);
|
|
35756
35805
|
const textareaRef = React9.useRef(null);
|
|
35757
35806
|
const formRef = React9.useRef(null);
|
|
35758
35807
|
React9.useLayoutEffect(() => {
|
|
@@ -35809,7 +35858,7 @@ var ConversationComposerComponent = function ConversationComposer({
|
|
|
35809
35858
|
const { data: conversations } = react.useConversations(workspaceId ?? void 0);
|
|
35810
35859
|
const isThread = conversations?.find((conversation) => conversation.external_id === currentConversationId)?.is_shared ?? false;
|
|
35811
35860
|
const prefillsAssistant = isThread && !isBranching;
|
|
35812
|
-
const recipient =
|
|
35861
|
+
const recipient = chunkDWWRLKEZ_cjs.useRecipientDraft({
|
|
35813
35862
|
value: newMessage,
|
|
35814
35863
|
onValueChange: setNewMessage,
|
|
35815
35864
|
contextKey: currentConversationId,
|
|
@@ -35855,7 +35904,7 @@ var ConversationComposerComponent = function ConversationComposer({
|
|
|
35855
35904
|
notice: isBranching ? /* @__PURE__ */ jsxRuntime.jsx(chunkLNYEYR7W_cjs.Composer.Notice, { onCancel: onCancelBranching }) : void 0,
|
|
35856
35905
|
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkLNYEYR7W_cjs.Composer.Frame, { children: [
|
|
35857
35906
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35858
|
-
|
|
35907
|
+
chunkDWWRLKEZ_cjs.SlashMenu,
|
|
35859
35908
|
{
|
|
35860
35909
|
open: isSlashMenuOpen,
|
|
35861
35910
|
items: filteredItems,
|
|
@@ -35964,7 +36013,7 @@ var ConversationComposerComponent = function ConversationComposer({
|
|
|
35964
36013
|
] })
|
|
35965
36014
|
}
|
|
35966
36015
|
),
|
|
35967
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36016
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ContextUsageBar, { contextUsage, draftLength: newMessage.length })
|
|
35968
36017
|
] })
|
|
35969
36018
|
}
|
|
35970
36019
|
) });
|
|
@@ -36058,7 +36107,7 @@ function useOpenWorkspaceIcon() {
|
|
|
36058
36107
|
ui.ShieldIcon,
|
|
36059
36108
|
{
|
|
36060
36109
|
char: workspace.name.charAt(0),
|
|
36061
|
-
workspaceColor:
|
|
36110
|
+
workspaceColor: chunkGX5MKJ3F_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
36062
36111
|
size
|
|
36063
36112
|
}
|
|
36064
36113
|
) : void 0;
|
|
@@ -36074,7 +36123,7 @@ function WorkflowStepMessage({
|
|
|
36074
36123
|
const { conversations } = react.useConversationItems();
|
|
36075
36124
|
const activity = react.useConversationActivity(conversationId ?? void 0, { live: true });
|
|
36076
36125
|
const plan = conversations.find((c) => c.external_id === conversationId)?.plan;
|
|
36077
|
-
const steps =
|
|
36126
|
+
const steps = chunkO3MRE2HL_cjs.fromPlanSteps(plan?.steps ?? []);
|
|
36078
36127
|
const found = steps.find((s) => s.id === step);
|
|
36079
36128
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
36080
36129
|
const { data: documents = [] } = react.useDocuments();
|
|
@@ -36145,7 +36194,7 @@ var MessageComponent = ({
|
|
|
36145
36194
|
const linkedArtifact = React9.useMemo(() => {
|
|
36146
36195
|
if (!message.external_id) return void 0;
|
|
36147
36196
|
if (streaming) return streaming;
|
|
36148
|
-
const doc =
|
|
36197
|
+
const doc = chunkDWWRLKEZ_cjs.findMessageDocument(workspaceDocs, message.external_id);
|
|
36149
36198
|
if (!doc) return void 0;
|
|
36150
36199
|
const kind = artifacts.artifactKindFromFileName(doc.file_name);
|
|
36151
36200
|
return {
|
|
@@ -36246,7 +36295,7 @@ var MessageComponent = ({
|
|
|
36246
36295
|
const isQueuedAnswer = !isUser && message.status === "queued" && !isGenerating;
|
|
36247
36296
|
const isAwaitingAnswer = (isGenerating || isRunningOnServer) && !isStopped && !!message.pendingUserInput;
|
|
36248
36297
|
const showWorkingIndicator = (isGenerating || isRunningOnServer) && !isQueuedAnswer && !responseContent.trim() && !linkedArtifact && !isAwaitingAnswer;
|
|
36249
|
-
const workingStepLabel = showWorkingIndicator ?
|
|
36298
|
+
const workingStepLabel = showWorkingIndicator ? chunkO3MRE2HL_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
|
|
36250
36299
|
const workingStepStart = showWorkingIndicator ? browser.getCurrentStep(message.agentSteps ?? [])?.t ?? 0 : 0;
|
|
36251
36300
|
const showEmptyAnswer = !isUser && !isGenerating && !isRunningOnServer && !isFailed && !isStopped && !responseContent.trim() && !linkedArtifact;
|
|
36252
36301
|
const isEmptyStopped = isStopped && !responseContent.trim();
|
|
@@ -36334,7 +36383,7 @@ var MessageComponent = ({
|
|
|
36334
36383
|
precedingUserMessage = parentMessage.content;
|
|
36335
36384
|
}
|
|
36336
36385
|
}
|
|
36337
|
-
await
|
|
36386
|
+
await chunkDWWRLKEZ_cjs.copyMessageToClipboard({
|
|
36338
36387
|
messageRef,
|
|
36339
36388
|
responseContent,
|
|
36340
36389
|
messageContent: message.content,
|
|
@@ -36411,7 +36460,7 @@ var MessageComponent = ({
|
|
|
36411
36460
|
const statusLabel = isFailed ? "Response failed" : isStopped ? "Stopped" : finalElapsedSeconds >= 0.05 ? `Answered in ${finalElapsedSeconds.toFixed(1)}s` : "Complete";
|
|
36412
36461
|
const timeLabel = ui.formatFriendlyDate(message.created_at || "");
|
|
36413
36462
|
const messageId = message.external_id;
|
|
36414
|
-
const transcriptRuns =
|
|
36463
|
+
const transcriptRuns = chunk6AJJJ5HR_cjs.useTranscriptRuns();
|
|
36415
36464
|
const messageRole = isUser ? "user" : "assistant";
|
|
36416
36465
|
const menuItems = [
|
|
36417
36466
|
...isUser ? [
|
|
@@ -36550,7 +36599,7 @@ var MessageComponent = ({
|
|
|
36550
36599
|
},
|
|
36551
36600
|
"data-testid": `message-model-${messageId}`,
|
|
36552
36601
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36553
|
-
|
|
36602
|
+
chunkO3MRE2HL_cjs.AssistantEntity,
|
|
36554
36603
|
{
|
|
36555
36604
|
name: modelDisplayName,
|
|
36556
36605
|
modelName,
|
|
@@ -36619,7 +36668,7 @@ var MessageComponent = ({
|
|
|
36619
36668
|
const speakerName = speaker ? ui.getUserDisplayName(speaker) : null;
|
|
36620
36669
|
const isMe = transcriptSegment.speaker_ext_id === currentUser?.external_id;
|
|
36621
36670
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
36622
|
-
|
|
36671
|
+
chunk6AJJJ5HR_cjs.TranscriptEntry,
|
|
36623
36672
|
{
|
|
36624
36673
|
speakerId: transcriptSegment.speaker_ext_id,
|
|
36625
36674
|
speakerName: isMe ? "Me" : speakerName || "Former member",
|
|
@@ -36663,7 +36712,7 @@ var MessageComponent = ({
|
|
|
36663
36712
|
// Stays the ARBI identity while streaming: the model name arrives
|
|
36664
36713
|
// with the first step that reports one and would swap the author
|
|
36665
36714
|
// mid-answer. The model is shown in the footer once settled.
|
|
36666
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36715
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.AssistantEntity, { size: 16, pillSize: "sm" })
|
|
36667
36716
|
),
|
|
36668
36717
|
timeLabel,
|
|
36669
36718
|
isSettled: settledForHeader,
|
|
@@ -36673,7 +36722,7 @@ var MessageComponent = ({
|
|
|
36673
36722
|
),
|
|
36674
36723
|
subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkLNYEYR7W_cjs.MessageSubagentBadge, { messageId }),
|
|
36675
36724
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkLNYEYR7W_cjs.MessageBody, { messageId, children: [
|
|
36676
|
-
settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkLNYEYR7W_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36725
|
+
settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkLNYEYR7W_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
|
|
36677
36726
|
liveContent ? role === "assistant" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
36678
36727
|
ConnectedCitationRenderer,
|
|
36679
36728
|
{
|
|
@@ -36683,7 +36732,7 @@ var MessageComponent = ({
|
|
|
36683
36732
|
messageId: message.external_id || "unknown",
|
|
36684
36733
|
isStreaming: isGenerating
|
|
36685
36734
|
}
|
|
36686
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
36735
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: shell.linkMentions(
|
|
36687
36736
|
isUser && liveContent.startsWith("/pa ") ? liveContent.slice(4) : liveContent,
|
|
36688
36737
|
message.mentions
|
|
36689
36738
|
) }) : null,
|
|
@@ -36847,7 +36896,7 @@ var ConnectedBranchControls = ({
|
|
|
36847
36896
|
onPreview
|
|
36848
36897
|
}) => {
|
|
36849
36898
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkTM2D4XT4_cjs.ErrorBoundary, { testId: "branch-controls-error-boundary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36850
|
-
|
|
36899
|
+
chunkDWWRLKEZ_cjs.BranchControls,
|
|
36851
36900
|
{
|
|
36852
36901
|
index: branchPoint.currentBranchIndex,
|
|
36853
36902
|
count: branchPoint.branches.length,
|
|
@@ -36908,7 +36957,7 @@ function ThreadsPreviewDialog({
|
|
|
36908
36957
|
}
|
|
36909
36958
|
),
|
|
36910
36959
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", style: { height: "70vh" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
36911
|
-
|
|
36960
|
+
chunkDWWRLKEZ_cjs.ThreadVisualizer,
|
|
36912
36961
|
{
|
|
36913
36962
|
threads: threads || [],
|
|
36914
36963
|
switchToThread: (threadId) => {
|
|
@@ -36994,7 +37043,7 @@ function ConnectedMessageList({ messages }) {
|
|
|
36994
37043
|
const session = react.useArbiSessionStore();
|
|
36995
37044
|
const [previewOpen, setPreviewOpen] = React9.useState(false);
|
|
36996
37045
|
const participantTints = React9.useMemo(
|
|
36997
|
-
() =>
|
|
37046
|
+
() => chunkDWWRLKEZ_cjs.getParticipantTints(
|
|
36998
37047
|
messages.map(
|
|
36999
37048
|
(message) => message.role === "assistant" ? "" : message.created_by_ext_id ?? ""
|
|
37000
37049
|
)
|
|
@@ -37103,7 +37152,7 @@ function ConnectedMessageList({ messages }) {
|
|
|
37103
37152
|
const target = document.querySelector(`[data-message-id="${deepLinkMessageId}"]`);
|
|
37104
37153
|
if (!target) return;
|
|
37105
37154
|
target.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
37106
|
-
|
|
37155
|
+
chunkDWWRLKEZ_cjs.flashMessage(target);
|
|
37107
37156
|
session.setDeepLinkMessageId(null);
|
|
37108
37157
|
}, [deepLinkMessageId, virtualItems, session]);
|
|
37109
37158
|
const status = /* @__PURE__ */ jsxRuntime.jsx(chunkLNYEYR7W_cjs.MessageList.Status, { message: statusMessage });
|
|
@@ -37128,7 +37177,7 @@ function ConnectedMessageList({ messages }) {
|
|
|
37128
37177
|
start: virtualItem.start,
|
|
37129
37178
|
messageId: entry.id,
|
|
37130
37179
|
setSize: transcript.length,
|
|
37131
|
-
children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
37180
|
+
children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
|
|
37132
37181
|
"button",
|
|
37133
37182
|
{
|
|
37134
37183
|
className: "mt-1 hover:underline text-primary",
|
|
@@ -37647,7 +37696,7 @@ function useThreadScroll({
|
|
|
37647
37696
|
followerRef.current?.stop();
|
|
37648
37697
|
userHasScrolledRef.current = true;
|
|
37649
37698
|
messageEl.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
37650
|
-
|
|
37699
|
+
chunkDWWRLKEZ_cjs.flashMessage(messageEl);
|
|
37651
37700
|
deepLinkPlacedRef.current = openKeyRef.current;
|
|
37652
37701
|
holdDeepLinkTarget(deepLinkMessageId);
|
|
37653
37702
|
}
|
|
@@ -37870,7 +37919,7 @@ function ConnectedConversation({
|
|
|
37870
37919
|
const isGuest = react.useWorkspaceRole() === "guest";
|
|
37871
37920
|
const meetingReadOnly = isGuest && !!currentTask?.meeting_call_ext_id;
|
|
37872
37921
|
const meetingCallExtId = currentTask?.meeting_call_ext_id ?? null;
|
|
37873
|
-
const threadMessages =
|
|
37922
|
+
const threadMessages = chunk6AJJJ5HR_cjs.useMeetingThreadMessages(meetingCallExtId, messageHistory);
|
|
37874
37923
|
const [firstTurnPrompt, setFirstTurnPrompt] = React9.useState(null);
|
|
37875
37924
|
const currentUserExtId = react.useArbiSession().user?.external_id ?? "";
|
|
37876
37925
|
const pendingFirstTurn = React9.useMemo(
|
|
@@ -37918,7 +37967,7 @@ function ConnectedConversation({
|
|
|
37918
37967
|
return shownThreadMessages.slice(0, editIndex);
|
|
37919
37968
|
}, [shownThreadMessages, editingMessageId]);
|
|
37920
37969
|
const transcriptRunInfo = React9.useMemo(
|
|
37921
|
-
() =>
|
|
37970
|
+
() => chunk6AJJJ5HR_cjs.threadTranscriptRuns(meetingCallExtId ? visibleMessages : []),
|
|
37922
37971
|
[meetingCallExtId, visibleMessages]
|
|
37923
37972
|
);
|
|
37924
37973
|
const threadLines = React9.useMemo(
|
|
@@ -37933,7 +37982,7 @@ function ConnectedConversation({
|
|
|
37933
37982
|
}),
|
|
37934
37983
|
[threadMessages]
|
|
37935
37984
|
);
|
|
37936
|
-
const provisionalSpeakers =
|
|
37985
|
+
const provisionalSpeakers = chunk6AJJJ5HR_cjs.useProvisionalSpeakers(meetingCallExtId, threadLines);
|
|
37937
37986
|
const showProvisional = !!meetingCallExtId && meetingView !== "chat";
|
|
37938
37987
|
const latestContextUsage = React9.useMemo(() => {
|
|
37939
37988
|
const messages = messageHistory;
|
|
@@ -38023,7 +38072,7 @@ function ConnectedConversation({
|
|
|
38023
38072
|
}, [isGenerating]);
|
|
38024
38073
|
const slashWorkflows = useSlashSkillWorkflows({ landing: "current-chat" });
|
|
38025
38074
|
const composerSkills = React9.useMemo(
|
|
38026
|
-
() => ({ builtin:
|
|
38075
|
+
() => ({ builtin: chunkO3MRE2HL_cjs.BUILTIN_SKILLS, openFor: slashWorkflows.openFor }),
|
|
38027
38076
|
[slashWorkflows.openFor]
|
|
38028
38077
|
);
|
|
38029
38078
|
const browseSkills = React9.useMemo(
|
|
@@ -38071,8 +38120,8 @@ function ConnectedConversation({
|
|
|
38071
38120
|
react.useAutoSendDraft(handleComposerSend, !isLoadingWorkspaceDocuments);
|
|
38072
38121
|
useStartRequestedDraft();
|
|
38073
38122
|
const orphanedMessage = react.getOrphanedLastMessage(messageHistory, isGenerating, assistantMode);
|
|
38074
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
38075
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
38123
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ConversationBody, { children: [
|
|
38124
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationMain, { "data-testid": `conversation-${currentConversationId}`, children: threadsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.ConversationLoading, {}) : messageHistory.length > 0 || isBranching ? /* @__PURE__ */ jsxRuntime.jsx(AskAgainContext.Provider, { value: handleAskAgain, children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6AJJJ5HR_cjs.TranscriptRunsContext.Provider, { value: transcriptRunInfo, children: [
|
|
38076
38125
|
meetingCallExtId && transcriptLineCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
38077
38126
|
chunkNXHETIOB_cjs.ConversationFilter,
|
|
38078
38127
|
{
|
|
@@ -38091,14 +38140,14 @@ function ConnectedConversation({
|
|
|
38091
38140
|
}
|
|
38092
38141
|
) }),
|
|
38093
38142
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: visibleMessages }),
|
|
38094
|
-
showProvisional && /* @__PURE__ */ jsxRuntime.jsx(
|
|
38143
|
+
showProvisional && /* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
|
|
38095
38144
|
] }) }) : meetingCallExtId ? (
|
|
38096
38145
|
// A meeting thread with nothing yet: call-aware, not the upload prompt.
|
|
38097
38146
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
38098
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
38099
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
38147
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.CallConversationEmpty, { callExtId: meetingCallExtId }),
|
|
38148
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk6AJJJ5HR_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
|
|
38100
38149
|
] })
|
|
38101
|
-
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38150
|
+
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: pendingFirstTurn }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
38102
38151
|
ConnectedConversationEmpty,
|
|
38103
38152
|
{
|
|
38104
38153
|
hasDocuments: allWorkspaceDocuments.length > 0,
|
|
@@ -38141,7 +38190,7 @@ function ConnectedConversation({
|
|
|
38141
38190
|
}
|
|
38142
38191
|
) : null,
|
|
38143
38192
|
pendingAnswer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
38144
|
-
|
|
38193
|
+
chunkDWWRLKEZ_cjs.PendingAnswerBar,
|
|
38145
38194
|
{
|
|
38146
38195
|
question: pendingAnswer.request.question,
|
|
38147
38196
|
options: pendingAnswer.request.options,
|
|
@@ -38183,23 +38232,23 @@ function ConnectedConversation({
|
|
|
38183
38232
|
onBrowseSkills: browseSkills,
|
|
38184
38233
|
contextUsage: latestContextUsage,
|
|
38185
38234
|
isConversationEmpty: messageHistory.length === 0 && !isBranching,
|
|
38186
|
-
leftButton: paMode ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38235
|
+
leftButton: paMode ? /* @__PURE__ */ jsxRuntime.jsx(chunkDWWRLKEZ_cjs.PaModeBadge, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { size: 16, className: "shrink-0" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ComposerAccessories, { children: [
|
|
38187
38236
|
composerAccessory,
|
|
38188
38237
|
threadDocument.unavailable ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38189
|
-
|
|
38238
|
+
chunkDWWRLKEZ_cjs.DraftingDocChip,
|
|
38190
38239
|
{
|
|
38191
38240
|
state: "unavailable",
|
|
38192
38241
|
title: "",
|
|
38193
38242
|
onDetach: () => threadDocument.bind(null)
|
|
38194
38243
|
}
|
|
38195
38244
|
) : draftingDocument ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38196
|
-
|
|
38245
|
+
chunkDWWRLKEZ_cjs.DraftingDocChip,
|
|
38197
38246
|
{
|
|
38198
38247
|
title: ui.getDocumentTitle(draftingDocument),
|
|
38199
38248
|
onDetach: threadDocument.documentId ? () => threadDocument.bind(null) : void 0
|
|
38200
38249
|
}
|
|
38201
38250
|
) : attachableDocument && /* @__PURE__ */ jsxRuntime.jsx(
|
|
38202
|
-
|
|
38251
|
+
chunkDWWRLKEZ_cjs.DraftingDocChip,
|
|
38203
38252
|
{
|
|
38204
38253
|
state: "attach",
|
|
38205
38254
|
title: ui.getDocumentTitle(attachableDocument),
|
|
@@ -38207,7 +38256,7 @@ function ConnectedConversation({
|
|
|
38207
38256
|
}
|
|
38208
38257
|
)
|
|
38209
38258
|
] }),
|
|
38210
|
-
rightButton: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
38259
|
+
rightButton: /* @__PURE__ */ jsxRuntime.jsxs(chunkDWWRLKEZ_cjs.ComposerTools, { children: [
|
|
38211
38260
|
composerTools,
|
|
38212
38261
|
/* @__PURE__ */ jsxRuntime.jsx(MicButton, { inputRef }),
|
|
38213
38262
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -38411,7 +38460,7 @@ function AgentChat({ agentId, workspaceId, onOpenFull }) {
|
|
|
38411
38460
|
placeholder: "Ask your agent\u2026",
|
|
38412
38461
|
conversations: "Agent chats"
|
|
38413
38462
|
},
|
|
38414
|
-
renderContent: (message) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
38463
|
+
renderContent: (message) => /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.DocumentWorkspaceContext.Provider, { value: workspaceId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkGT5FCYV5_cjs.ConnectedMarkdown, { isStreaming: message.status === "streaming", children: message.content }) })
|
|
38415
38464
|
}
|
|
38416
38465
|
)
|
|
38417
38466
|
] });
|
|
@@ -38734,7 +38783,7 @@ function useLoginActions({
|
|
|
38734
38783
|
onError
|
|
38735
38784
|
}) {
|
|
38736
38785
|
const arbi = react.useArbi();
|
|
38737
|
-
const signInLayer =
|
|
38786
|
+
const signInLayer = chunkP6HVJP6Z_cjs.useOptionalConnection();
|
|
38738
38787
|
const sso = useSsoSignIn();
|
|
38739
38788
|
const environment = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
38740
38789
|
const environmentNotify = environment.notify;
|
|
@@ -39354,7 +39403,7 @@ var sodiumWarmed = false;
|
|
|
39354
39403
|
function warmSodium() {
|
|
39355
39404
|
if (sodiumWarmed) return;
|
|
39356
39405
|
sodiumWarmed = true;
|
|
39357
|
-
const run = () => void
|
|
39406
|
+
const run = () => void chunkGX5MKJ3F_cjs.prefetchChunk(client.initSodium);
|
|
39358
39407
|
if (typeof window.requestIdleCallback === "function") window.requestIdleCallback(run);
|
|
39359
39408
|
else window.setTimeout(run, 200);
|
|
39360
39409
|
}
|
|
@@ -39958,7 +40007,7 @@ function SsoResendVerificationButton({
|
|
|
39958
40007
|
onClick: async () => handleResendEmailVerification(),
|
|
39959
40008
|
disabled: loading || disabled,
|
|
39960
40009
|
"aria-label": "Resend verification email",
|
|
39961
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
40010
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ZHAHJ4H_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
39962
40011
|
"Didn't get a verification email? ",
|
|
39963
40012
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Resend" })
|
|
39964
40013
|
] })
|
|
@@ -40852,27 +40901,27 @@ function ConnectedOAuthConsentPage({
|
|
|
40852
40901
|
oauthErrorRedirect(params.redirectUri, params.state, "access_denied");
|
|
40853
40902
|
}
|
|
40854
40903
|
if (error && !params) {
|
|
40855
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40904
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentMessage, { tone: "error", title: "Invalid Request", children: error }) });
|
|
40856
40905
|
}
|
|
40857
40906
|
if (!params) {
|
|
40858
40907
|
return null;
|
|
40859
40908
|
}
|
|
40860
40909
|
if (clientInfo?.isLocalAgentFlow) {
|
|
40861
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40910
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentMessage, { tone: "warning", title: "Close this tab", children: "This tab opened alongside the correct authorization page. Please close this tab and complete the connection in the other tab that opened at the same time." }) });
|
|
40862
40911
|
}
|
|
40863
40912
|
if (!isAuthenticated2) {
|
|
40864
40913
|
return null;
|
|
40865
40914
|
}
|
|
40866
40915
|
if (callbackUrl) {
|
|
40867
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40868
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40916
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { size: "md", children: [
|
|
40917
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClipboardList, {}), title: "Almost there", children: [
|
|
40869
40918
|
"A new tab has opened to complete the connection. If it succeeded, you can close this page. If you see a connection error there, paste the URL below into Claude Cowork \u2014",
|
|
40870
40919
|
" ",
|
|
40871
40920
|
copied ? "it's already copied to your clipboard." : "copy it first."
|
|
40872
40921
|
] }),
|
|
40873
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40874
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40875
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40922
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentSection, { title: "Callback URL", children: [
|
|
40923
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.CopyableUrl, { url: callbackUrl, copied, onCopy: handleCopy }),
|
|
40924
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentText, { variant: "hint", children: [
|
|
40876
40925
|
"In Claude Code, paste the URL at the prompt that says",
|
|
40877
40926
|
" ",
|
|
40878
40927
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-foreground", children: '"paste the full redirect URL here"' }),
|
|
@@ -40881,17 +40930,17 @@ function ConnectedOAuthConsentPage({
|
|
|
40881
40930
|
] })
|
|
40882
40931
|
] }) });
|
|
40883
40932
|
}
|
|
40884
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40885
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40886
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40933
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentCard, { children: [
|
|
40934
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkO3MRE2HL_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, {}), title: `Connect to ${appName}`, children: [
|
|
40935
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentStrong, { children: clientInfo?.name ?? params.clientId }),
|
|
40887
40936
|
" is requesting access to your ",
|
|
40888
40937
|
appName,
|
|
40889
40938
|
" workspace."
|
|
40890
40939
|
] }),
|
|
40891
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40892
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
40893
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40894
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40940
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentSection, { title: "This will allow", children: /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentPermissionList, { items: permissions }) }),
|
|
40941
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentNotice, { tone: "error", children: error }),
|
|
40942
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentActions, { isLoading: loading, onDeny: handleDeny, onAllow: handleAllow }),
|
|
40943
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkO3MRE2HL_cjs.ConsentFootnote, { children: footnote })
|
|
40895
40944
|
] }) });
|
|
40896
40945
|
}
|
|
40897
40946
|
function ConnectedSharedFilesPage({
|
|
@@ -40988,234 +41037,827 @@ function ConnectedAccountAccessBadge() {
|
|
|
40988
41037
|
/* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-w-xs text-sm", align: "end", children: explanation })
|
|
40989
41038
|
] });
|
|
40990
41039
|
}
|
|
41040
|
+
function ThreadSearch({ children, ResultsBoundary = chunkTM2D4XT4_cjs.ErrorBoundary }) {
|
|
41041
|
+
const [query, setQuery] = React9.useState("");
|
|
41042
|
+
const [submitted, setSubmitted] = React9.useState("");
|
|
41043
|
+
const selectedWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
41044
|
+
const { notify: notify18, openConversation } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
41045
|
+
const search = react.useConversationSearch();
|
|
41046
|
+
const isSearching = search.isPending;
|
|
41047
|
+
const groups = React9.useMemo(
|
|
41048
|
+
() => search.isError ? [] : (search.data?.results ?? []).map((g) => ({
|
|
41049
|
+
id: g.conversation_ext_id,
|
|
41050
|
+
title: g.title,
|
|
41051
|
+
matches: g.messages.map((m) => ({
|
|
41052
|
+
id: m.message_ext_id,
|
|
41053
|
+
role: m.role,
|
|
41054
|
+
score: m.score,
|
|
41055
|
+
snippet: m.snippet
|
|
41056
|
+
}))
|
|
41057
|
+
})),
|
|
41058
|
+
[search.data, search.isError]
|
|
41059
|
+
);
|
|
41060
|
+
const handleSearch = React9.useCallback(() => {
|
|
41061
|
+
const q = query.trim();
|
|
41062
|
+
if (!q || !selectedWorkspaceId || isSearching) return;
|
|
41063
|
+
setSubmitted(q);
|
|
41064
|
+
search.mutate(
|
|
41065
|
+
{ query: q, search_mode: "hybrid", limit: 20 },
|
|
41066
|
+
{
|
|
41067
|
+
onError: (err) => {
|
|
41068
|
+
console.error("Conversation search failed", err);
|
|
41069
|
+
notify18("Conversation search failed", "error");
|
|
41070
|
+
}
|
|
41071
|
+
}
|
|
41072
|
+
);
|
|
41073
|
+
}, [query, selectedWorkspaceId, isSearching, search, notify18]);
|
|
41074
|
+
const clearSearch = React9.useCallback(() => {
|
|
41075
|
+
setQuery("");
|
|
41076
|
+
setSubmitted("");
|
|
41077
|
+
}, []);
|
|
41078
|
+
const openHit = React9.useCallback(
|
|
41079
|
+
(conversationId, messageId) => {
|
|
41080
|
+
openConversation(conversationId, messageId ? { messageId } : void 0);
|
|
41081
|
+
},
|
|
41082
|
+
[openConversation]
|
|
41083
|
+
);
|
|
41084
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41085
|
+
chunkDWWRLKEZ_cjs.ConversationSearchView,
|
|
41086
|
+
{
|
|
41087
|
+
query,
|
|
41088
|
+
onQueryChange: setQuery,
|
|
41089
|
+
onSubmit: handleSearch,
|
|
41090
|
+
canSubmit: !!query.trim() && !!selectedWorkspaceId && !isSearching,
|
|
41091
|
+
isSearching,
|
|
41092
|
+
submittedQuery: submitted,
|
|
41093
|
+
groups,
|
|
41094
|
+
onOpenConversation: openHit,
|
|
41095
|
+
onClear: clearSearch,
|
|
41096
|
+
ResultsBoundary,
|
|
41097
|
+
children
|
|
41098
|
+
}
|
|
41099
|
+
);
|
|
41100
|
+
}
|
|
41101
|
+
var DEFAULT_THREAD_VISIBILITY = { me: null, workspace: null };
|
|
41102
|
+
var relativeTime2 = (iso) => ui.formatRelativeTime(iso, { style: "short" });
|
|
41103
|
+
var LIST_LABELS = {
|
|
41104
|
+
emptyTitle: "Nothing here yet",
|
|
41105
|
+
emptyMessage: "Use New: just type what you need, or fill in an owner and a due date. You always decide when a thread is done.",
|
|
41106
|
+
untitled: `Untitled ${ui.getEntityLabel("CONVERSATION").toLowerCase()}`,
|
|
41107
|
+
noMatches: `No ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} match.`,
|
|
41108
|
+
selectAll: "Select all"
|
|
41109
|
+
};
|
|
41110
|
+
var RENAME_DIALOG = { testId: "rename-conversation-modal" };
|
|
41111
|
+
function useStableRecencyOrder(rows) {
|
|
41112
|
+
const orderRef = React9.useRef([]);
|
|
41113
|
+
return React9.useMemo(() => {
|
|
41114
|
+
const byRecency = [...rows].sort(
|
|
41115
|
+
(a, b) => new Date(b.updated_at || b.created_at || 0).getTime() - new Date(a.updated_at || a.created_at || 0).getTime()
|
|
41116
|
+
);
|
|
41117
|
+
const present = new Set(byRecency.map((r) => r.external_id));
|
|
41118
|
+
const known = new Set(orderRef.current);
|
|
41119
|
+
const added = byRecency.map((r) => r.external_id).filter((id) => !known.has(id));
|
|
41120
|
+
orderRef.current = [...added, ...orderRef.current.filter((id) => present.has(id))];
|
|
41121
|
+
const byId = new Map(byRecency.map((r) => [r.external_id, r]));
|
|
41122
|
+
return orderRef.current.flatMap((id) => byId.get(id) ?? []);
|
|
41123
|
+
}, [rows]);
|
|
41124
|
+
}
|
|
41125
|
+
function ConnectedThreadsPage({
|
|
41126
|
+
showHeader = true,
|
|
41127
|
+
search = false,
|
|
41128
|
+
ResultsBoundary,
|
|
41129
|
+
focusLauncher,
|
|
41130
|
+
layout = "list",
|
|
41131
|
+
workflowActions
|
|
41132
|
+
}) {
|
|
41133
|
+
const mode = layout === "inbox" ? "tasks" : "threads";
|
|
41134
|
+
const { confirm, notify: notify18, openConversation, openDocument } = chunkB3NYBMDR_cjs.useBlocksEnvironment();
|
|
41135
|
+
const { conversations: all, isLoading } = react.useConversationItems();
|
|
41136
|
+
const [doneFilter] = react.useTransientView("threads.done", "exclude");
|
|
41137
|
+
const [visibilityFilters] = react.useTransientView("threads.visibility", DEFAULT_THREAD_VISIBILITY);
|
|
41138
|
+
const [meetingFilter] = react.useTransientView("threads.meetings", null);
|
|
41139
|
+
const [topbarFilterQuery, setTopbarFilterQuery] = react.useTransientView("topbar.filter", "");
|
|
41140
|
+
const currentUserExtId = react.useArbiSession().user?.external_id;
|
|
41141
|
+
const listed = React9.useMemo(
|
|
41142
|
+
() => all.filter((c) => mode === "threads" || c.status != null),
|
|
41143
|
+
[all, mode]
|
|
41144
|
+
);
|
|
41145
|
+
const tasks = useStableRecencyOrder(listed);
|
|
41146
|
+
const updateConversation = react.useUpdateConversation();
|
|
41147
|
+
const deleteConversation = react.useDeleteConversation();
|
|
41148
|
+
const people = useTaskPeople();
|
|
41149
|
+
const renderPerson = useRenderTaskPerson();
|
|
41150
|
+
const canEditShared = react.useCanEditShared();
|
|
41151
|
+
const isWorkspaceOwner = react.useIsWorkspaceOwner();
|
|
41152
|
+
const { data: agents = [] } = react.useAgents();
|
|
41153
|
+
const { data: workflows = [] } = react.useWorkflows();
|
|
41154
|
+
const agentNames = React9.useMemo(
|
|
41155
|
+
() => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),
|
|
41156
|
+
[agents]
|
|
41157
|
+
);
|
|
41158
|
+
const workflowNames = React9.useMemo(
|
|
41159
|
+
() => Object.fromEntries(workflows.map((w) => [w.external_id, w.name])),
|
|
41160
|
+
[workflows]
|
|
41161
|
+
);
|
|
41162
|
+
const runConversation = react.useRunConversation();
|
|
41163
|
+
const [busyId, setBusyId] = React9.useState(null);
|
|
41164
|
+
const [editorOpen, setEditorOpen] = React9.useState(false);
|
|
41165
|
+
const [editing, setEditing] = React9.useState(null);
|
|
41166
|
+
const [startOpen, setStartOpen] = React9.useState(false);
|
|
41167
|
+
const [parentForNew, setParentForNew] = React9.useState(void 0);
|
|
41168
|
+
const nameOf = (task) => task.title?.trim() || task.workflow_ext_id && workflowNames[task.workflow_ext_id] || "Untitled task";
|
|
41169
|
+
const openCreate = () => {
|
|
41170
|
+
setParentForNew(void 0);
|
|
41171
|
+
setStartOpen(true);
|
|
41172
|
+
};
|
|
41173
|
+
const openAddSubtask = (parent) => {
|
|
41174
|
+
setParentForNew(parent.external_id);
|
|
41175
|
+
setStartOpen(true);
|
|
41176
|
+
};
|
|
41177
|
+
const [renaming, setRenaming] = React9.useState(null);
|
|
41178
|
+
const [newTitle, setNewTitle] = React9.useState("");
|
|
41179
|
+
const [isExportOpen, setIsExportOpen] = React9.useState(false);
|
|
41180
|
+
const [exportRows, setExportRows] = React9.useState([]);
|
|
41181
|
+
const openEdit = (task) => {
|
|
41182
|
+
if (mode === "threads" || !task.status) {
|
|
41183
|
+
setRenaming(task);
|
|
41184
|
+
setNewTitle(task.title ?? "");
|
|
41185
|
+
return;
|
|
41186
|
+
}
|
|
41187
|
+
setEditing(task);
|
|
41188
|
+
setEditorOpen(true);
|
|
41189
|
+
};
|
|
41190
|
+
const act = async (task, action, success, failure) => {
|
|
41191
|
+
setBusyId(task.external_id);
|
|
41192
|
+
try {
|
|
41193
|
+
await action();
|
|
41194
|
+
if (success) notify18(success, "success");
|
|
41195
|
+
} catch (error) {
|
|
41196
|
+
notify18(
|
|
41197
|
+
error instanceof browser.ArbiApiError && error.detail ? `${failure}: ${error.detail}` : failure,
|
|
41198
|
+
"error"
|
|
41199
|
+
);
|
|
41200
|
+
} finally {
|
|
41201
|
+
setBusyId(null);
|
|
41202
|
+
}
|
|
41203
|
+
};
|
|
41204
|
+
const patch = (task, body) => updateConversation.mutateAsync({ conversationId: task.external_id, patch: body });
|
|
41205
|
+
const setStatus = (task, status, success) => act(task, () => patch(task, { status }), success, "Failed to update task");
|
|
41206
|
+
const handleToggleShared = (task, shouldShare) => act(
|
|
41207
|
+
task,
|
|
41208
|
+
() => patch(task, { shared: shouldShare }),
|
|
41209
|
+
shouldShare ? `Shared \u201C${nameOf(task)}\u201D with the workspace` : `Made \u201C${nameOf(task)}\u201D private`,
|
|
41210
|
+
"Failed to change who can see the task"
|
|
41211
|
+
);
|
|
41212
|
+
const handleMove = (task, parentId) => act(
|
|
41213
|
+
task,
|
|
41214
|
+
() => patch(task, { parent_conversation_ext_id: parentId }),
|
|
41215
|
+
parentId ? `Moved \u201C${nameOf(task)}\u201D` : `Moved \u201C${nameOf(task)}\u201D to the top level`,
|
|
41216
|
+
"Failed to move task"
|
|
41217
|
+
);
|
|
41218
|
+
const handleDelete = async (task) => {
|
|
41219
|
+
const subtasks = tasks.filter((t) => t.parent_conversation_ext_id === task.external_id).length;
|
|
41220
|
+
const confirmed = await confirm({
|
|
41221
|
+
message: `Delete \u201C${nameOf(task)}\u201D? This can't be undone from here.${subtasks ? ` Its ${subtasks === 1 ? "sub-task stays" : `${subtasks} sub-tasks stay`} and ${subtasks === 1 ? "moves" : "move"} to the top level.` : ""}`,
|
|
41222
|
+
title: "Delete task"
|
|
41223
|
+
});
|
|
41224
|
+
if (!confirmed) return;
|
|
41225
|
+
await act(
|
|
41226
|
+
task,
|
|
41227
|
+
() => deleteConversation.mutateAsync(task.external_id),
|
|
41228
|
+
`Deleted \u201C${nameOf(task)}\u201D`,
|
|
41229
|
+
"Failed to delete task"
|
|
41230
|
+
);
|
|
41231
|
+
};
|
|
41232
|
+
const forEach = async (rows, one, done) => {
|
|
41233
|
+
let failed = 0;
|
|
41234
|
+
for (const task of rows) {
|
|
41235
|
+
try {
|
|
41236
|
+
await one(task);
|
|
41237
|
+
} catch {
|
|
41238
|
+
failed += 1;
|
|
41239
|
+
}
|
|
41240
|
+
}
|
|
41241
|
+
notify18(
|
|
41242
|
+
failed ? `${failed} of ${rows.length} could not be changed: you may not be allowed to change them` : done,
|
|
41243
|
+
failed ? "error" : "success"
|
|
41244
|
+
);
|
|
41245
|
+
};
|
|
41246
|
+
const handleMarkDoneMany = (rows) => forEach(rows, (task) => patch(task, { status: "done" }), `Marked ${rows.length} done`);
|
|
41247
|
+
const handleDeleteMany = async (rows) => {
|
|
41248
|
+
const named = rows.slice(0, 3).map((task) => `"${nameOf(task)}"`).join(", ");
|
|
41249
|
+
const more = rows.length - 3;
|
|
41250
|
+
const confirmed = await confirm({
|
|
41251
|
+
message: `Delete ${more > 0 ? `${named} and ${more} more` : named}? This cannot be undone.`,
|
|
41252
|
+
title: `Delete ${rows.length} item${rows.length === 1 ? "" : "s"}`
|
|
41253
|
+
});
|
|
41254
|
+
if (!confirmed) return;
|
|
41255
|
+
await forEach(
|
|
41256
|
+
rows,
|
|
41257
|
+
(task) => deleteConversation.mutateAsync(task.external_id),
|
|
41258
|
+
`Deleted ${rows.length}`
|
|
41259
|
+
);
|
|
41260
|
+
};
|
|
41261
|
+
const handleSaveRename = React9.useCallback(() => {
|
|
41262
|
+
if (!renaming || !newTitle.trim()) return;
|
|
41263
|
+
updateConversation.mutate(
|
|
41264
|
+
{ conversationId: renaming.external_id, patch: { title: newTitle.trim() } },
|
|
41265
|
+
{
|
|
41266
|
+
onSuccess: () => {
|
|
41267
|
+
notify18("Conversation renamed successfully", "success");
|
|
41268
|
+
setRenaming(null);
|
|
41269
|
+
setNewTitle("");
|
|
41270
|
+
},
|
|
41271
|
+
onError: (error) => {
|
|
41272
|
+
console.error("Failed to rename conversation:", error);
|
|
41273
|
+
notify18("Failed to rename conversation", "error");
|
|
41274
|
+
}
|
|
41275
|
+
}
|
|
41276
|
+
);
|
|
41277
|
+
}, [renaming, newTitle, updateConversation, notify18]);
|
|
41278
|
+
const handleBulkShare = async (rows) => {
|
|
41279
|
+
const unshared = rows.filter((c) => !c.is_shared);
|
|
41280
|
+
if (unshared.length === 0) {
|
|
41281
|
+
await confirm({
|
|
41282
|
+
message: "All selected conversations are already shared",
|
|
41283
|
+
title: "Info",
|
|
41284
|
+
kind: "alert"
|
|
41285
|
+
});
|
|
41286
|
+
return;
|
|
41287
|
+
}
|
|
41288
|
+
const noun = ui.getEntityLabel("CONVERSATION", unshared.length > 1 ? "PLURAL" : "SINGULAR");
|
|
41289
|
+
const confirmed = await confirm({
|
|
41290
|
+
message: `Are you sure you want to share ${unshared.length} ${noun.toLowerCase()} with everyone in the current ${ui.getEntityLabel("WORKSPACE").toLowerCase()}? You can make them private again later.`,
|
|
41291
|
+
title: `Share ${ui.getEntityLabel("CONVERSATION", "PLURAL")}`
|
|
41292
|
+
});
|
|
41293
|
+
if (!confirmed) return;
|
|
41294
|
+
try {
|
|
41295
|
+
await Promise.all(
|
|
41296
|
+
unshared.map(
|
|
41297
|
+
(c) => updateConversation.mutateAsync({ conversationId: c.external_id, patch: { shared: true } })
|
|
41298
|
+
)
|
|
41299
|
+
);
|
|
41300
|
+
notify18(`${unshared.length} ${noun.toLowerCase()} shared successfully`, "success");
|
|
41301
|
+
} catch (error) {
|
|
41302
|
+
console.error("Failed to share conversations:", error);
|
|
41303
|
+
notify18("Failed to share some conversations", "error");
|
|
41304
|
+
}
|
|
41305
|
+
};
|
|
41306
|
+
const { data: workspaceDocs } = react.useDocuments();
|
|
41307
|
+
const outputsByTask = React9.useMemo(() => {
|
|
41308
|
+
const out = {};
|
|
41309
|
+
for (const [conversationId, docs] of Object.entries(
|
|
41310
|
+
chunkDWWRLKEZ_cjs.groupOutputsByConversation(workspaceDocs ?? [])
|
|
41311
|
+
)) {
|
|
41312
|
+
out[conversationId] = docs.map((d) => ({
|
|
41313
|
+
id: d.external_id,
|
|
41314
|
+
name: ui.getDocumentTitle(d, d.external_id)
|
|
41315
|
+
}));
|
|
41316
|
+
}
|
|
41317
|
+
return out;
|
|
41318
|
+
}, [workspaceDocs]);
|
|
41319
|
+
const handleOpenOutput = (documentId) => openDocument(documentId);
|
|
41320
|
+
const handleGrantAccess = (task) => act(
|
|
41321
|
+
task,
|
|
41322
|
+
() => runConversation.mutateAsync(task.external_id),
|
|
41323
|
+
`Running \u201C${nameOf(task)}\u201D`,
|
|
41324
|
+
"Failed to run task"
|
|
41325
|
+
);
|
|
41326
|
+
const threadLabels = useThreadLabels(canEditShared);
|
|
41327
|
+
const selectionActions = (selected, isCompact) => {
|
|
41328
|
+
const mine = selected.every((c) => c.created_by_ext_id === currentUserExtId);
|
|
41329
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
41330
|
+
mode === "threads" && selected.every((row2) => row2.is_owner || row2.is_shared && canEditShared) && selected.some((row2) => row2.status !== "done") && !selected.some((row2) => row2.in_progress || row2.status === "generating") && /* @__PURE__ */ jsxRuntime.jsx(
|
|
41331
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
41332
|
+
{
|
|
41333
|
+
icon: lucideReact.CheckCheck,
|
|
41334
|
+
label: "Mark Done",
|
|
41335
|
+
onClick: () => void handleMarkDoneMany(selected),
|
|
41336
|
+
isCompact,
|
|
41337
|
+
testId: "threads-bulk-done"
|
|
41338
|
+
}
|
|
41339
|
+
),
|
|
41340
|
+
threadLabels.renderBulkLabels(selected, isCompact),
|
|
41341
|
+
mine && selected.some((c) => !c.is_shared) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
41342
|
+
ui.VisibilityToggle,
|
|
41343
|
+
{
|
|
41344
|
+
items: selected,
|
|
41345
|
+
onToggle: () => void handleBulkShare(selected),
|
|
41346
|
+
disablePrivate: true,
|
|
41347
|
+
showLabel: false,
|
|
41348
|
+
tooltipInactive: "Share all with workspace members",
|
|
41349
|
+
tooltipMixed: "Share all with workspace members (some already shared)",
|
|
41350
|
+
"data-testid": "bulk-shared-toggle"
|
|
41351
|
+
}
|
|
41352
|
+
),
|
|
41353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41354
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
41355
|
+
{
|
|
41356
|
+
icon: lucideReact.FolderUp,
|
|
41357
|
+
label: "Export",
|
|
41358
|
+
onClick: () => {
|
|
41359
|
+
setExportRows(selected);
|
|
41360
|
+
setIsExportOpen(true);
|
|
41361
|
+
},
|
|
41362
|
+
isCompact,
|
|
41363
|
+
tooltip: `Export the selected ${ui.getEntityLabel("CONVERSATION", "PLURAL").toLowerCase()} to another ${ui.getEntityLabel("WORKSPACE").toLowerCase()}`,
|
|
41364
|
+
testId: "export-chats-button"
|
|
41365
|
+
}
|
|
41366
|
+
),
|
|
41367
|
+
mode === "threads" && selected.every((row2) => row2.is_owner || isWorkspaceOwner) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
41368
|
+
chunkV4ISCZJ7_cjs.SelectionBarAction,
|
|
41369
|
+
{
|
|
41370
|
+
icon: lucideReact.Trash2,
|
|
41371
|
+
label: "Delete",
|
|
41372
|
+
className: "text-red-text hover:bg-red-bg hover:text-red-text",
|
|
41373
|
+
onClick: () => void handleDeleteMany(selected),
|
|
41374
|
+
isCompact,
|
|
41375
|
+
testId: "threads-bulk-delete"
|
|
41376
|
+
}
|
|
41377
|
+
)
|
|
41378
|
+
] });
|
|
41379
|
+
};
|
|
41380
|
+
const page = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
41381
|
+
"div",
|
|
41382
|
+
{
|
|
41383
|
+
className: "flex h-full min-h-0 flex-col",
|
|
41384
|
+
"data-testid": mode === "tasks" ? "tasks-page" : "threads-page",
|
|
41385
|
+
children: [
|
|
41386
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex min-h-0 flex-1 flex-col bg-background", children: mode === "threads" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
41387
|
+
chunkO3MRE2HL_cjs.ConversationListView,
|
|
41388
|
+
{
|
|
41389
|
+
showHeader,
|
|
41390
|
+
conversations: tasks,
|
|
41391
|
+
doneFilter,
|
|
41392
|
+
visibilityFilters,
|
|
41393
|
+
meetingFilter,
|
|
41394
|
+
renderThread: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
41395
|
+
ConversationEntity,
|
|
41396
|
+
{
|
|
41397
|
+
conversation: row2,
|
|
41398
|
+
showRePrefix: false,
|
|
41399
|
+
labelMaxWidth: "max-w-full",
|
|
41400
|
+
className: "w-full max-w-full [&_.truncate]:line-clamp-2 [&_.truncate]:whitespace-normal [&_.truncate]:break-words [&_.truncate]:text-left",
|
|
41401
|
+
"data-testid": `thread-open-${row2.external_id}`
|
|
41402
|
+
}
|
|
41403
|
+
),
|
|
41404
|
+
renderLabels: threadLabels.renderLabels,
|
|
41405
|
+
labelText: threadLabels.labelText,
|
|
41406
|
+
renderBy: (row2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
41407
|
+
chunkO3MRE2HL_cjs.ConversationTurnSpeaker,
|
|
41408
|
+
{
|
|
41409
|
+
variant: "icon",
|
|
41410
|
+
role: row2.last_message_role,
|
|
41411
|
+
actor: row2.last_message_actor,
|
|
41412
|
+
currentUserId: currentUserExtId,
|
|
41413
|
+
colorClass: row2.last_message_actor ? ui.getUserAvatarColor(row2.last_message_actor.external_id) : void 0
|
|
41414
|
+
}
|
|
41415
|
+
),
|
|
41416
|
+
renderStatus: (row2) => /* @__PURE__ */ jsxRuntime.jsx(ConversationStatusCell, { conversation: row2 }),
|
|
41417
|
+
isLoading,
|
|
41418
|
+
filterText: topbarFilterQuery ?? "",
|
|
41419
|
+
formatDate: relativeTime2,
|
|
41420
|
+
onOpen: (c) => openConversation(c.external_id),
|
|
41421
|
+
onRename: openEdit,
|
|
41422
|
+
onDelete: handleDelete,
|
|
41423
|
+
canEditShared,
|
|
41424
|
+
isWorkspaceOwner,
|
|
41425
|
+
selectionActions,
|
|
41426
|
+
footer: /* @__PURE__ */ jsxRuntime.jsx(ConnectedThreadLauncher, { autoFocus: focusLauncher })
|
|
41427
|
+
}
|
|
41428
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
41429
|
+
chunkO3MRE2HL_cjs.TaskInbox,
|
|
41430
|
+
{
|
|
41431
|
+
tasks,
|
|
41432
|
+
isLoading,
|
|
41433
|
+
...workflowActions,
|
|
41434
|
+
onCreate: openCreate,
|
|
41435
|
+
filterText: topbarFilterQuery ?? "",
|
|
41436
|
+
labels: LIST_LABELS,
|
|
41437
|
+
gridId: "conversation-list-grid-v4",
|
|
41438
|
+
onFilterTextChange: (text2) => setTopbarFilterQuery(text2),
|
|
41439
|
+
outputsByTask,
|
|
41440
|
+
onOpenActivity: (task) => openConversation(task.external_id),
|
|
41441
|
+
formatRelative: relativeTime2,
|
|
41442
|
+
onOpenOutput: handleOpenOutput,
|
|
41443
|
+
busyId,
|
|
41444
|
+
formatDate: ui.formatFriendlyDate,
|
|
41445
|
+
onOpenThread: (conversationId) => openConversation(conversationId),
|
|
41446
|
+
onMarkDone: (task) => setStatus(task, "done", `Marked \u201C${nameOf(task)}\u201D done`),
|
|
41447
|
+
onReopen: (task) => setStatus(task, "todo", `Reopened \u201C${nameOf(task)}\u201D`),
|
|
41448
|
+
people,
|
|
41449
|
+
agentNames,
|
|
41450
|
+
workflowNames,
|
|
41451
|
+
canEditShared,
|
|
41452
|
+
isWorkspaceOwner,
|
|
41453
|
+
renderPerson,
|
|
41454
|
+
onToggleShared: handleToggleShared,
|
|
41455
|
+
onEdit: openEdit,
|
|
41456
|
+
onDelete: handleDelete,
|
|
41457
|
+
onAddSubtask: openAddSubtask,
|
|
41458
|
+
onMove: handleMove,
|
|
41459
|
+
onMarkDoneMany: handleMarkDoneMany,
|
|
41460
|
+
onDeleteMany: handleDeleteMany,
|
|
41461
|
+
onGrantAccess: handleGrantAccess,
|
|
41462
|
+
selectionActions
|
|
41463
|
+
}
|
|
41464
|
+
) }),
|
|
41465
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41466
|
+
ConnectedTaskStartDialog,
|
|
41467
|
+
{
|
|
41468
|
+
open: startOpen,
|
|
41469
|
+
onOpenChange: setStartOpen,
|
|
41470
|
+
initialParentId: parentForNew
|
|
41471
|
+
}
|
|
41472
|
+
),
|
|
41473
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedTaskComposer, { open: editorOpen, onOpenChange: setEditorOpen, task: editing }),
|
|
41474
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41475
|
+
ConnectedExportDialog,
|
|
41476
|
+
{
|
|
41477
|
+
open: isExportOpen,
|
|
41478
|
+
onOpenChange: setIsExportOpen,
|
|
41479
|
+
items: exportRows.map((c) => ({ extId: c.external_id, label: nameOf(c) })),
|
|
41480
|
+
entityType: "CONVERSATION",
|
|
41481
|
+
testId: "export-chats-modal"
|
|
41482
|
+
}
|
|
41483
|
+
),
|
|
41484
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41485
|
+
chunkFEVJA4BP_cjs.RenameDialog,
|
|
41486
|
+
{
|
|
41487
|
+
open: !!renaming,
|
|
41488
|
+
onClose: () => {
|
|
41489
|
+
setRenaming(null);
|
|
41490
|
+
setNewTitle("");
|
|
41491
|
+
},
|
|
41492
|
+
title: `Rename ${ui.getEntityLabel("CONVERSATION")}`,
|
|
41493
|
+
labels: { description: "Rename the conversation title" },
|
|
41494
|
+
fieldLabel: `${ui.getEntityLabel("CONVERSATION")} Title`,
|
|
41495
|
+
placeholder: "Enter title",
|
|
41496
|
+
value: newTitle,
|
|
41497
|
+
onChange: setNewTitle,
|
|
41498
|
+
onSave: handleSaveRename,
|
|
41499
|
+
canSave: !!newTitle.trim(),
|
|
41500
|
+
dialogTestId: RENAME_DIALOG.testId
|
|
41501
|
+
}
|
|
41502
|
+
)
|
|
41503
|
+
]
|
|
41504
|
+
}
|
|
41505
|
+
);
|
|
41506
|
+
return search ? /* @__PURE__ */ jsxRuntime.jsx(ThreadSearch, { ResultsBoundary, children: page }) : page;
|
|
41507
|
+
}
|
|
41508
|
+
function useSessionPanelMode(panelId, defaultMode = "docked", isOpen = true) {
|
|
41509
|
+
const panelModes = react.useArbiSessionState((s) => s.shell.panels.modes);
|
|
41510
|
+
const setPanelModeStore = react.useArbiSessionStore().setPanelMode;
|
|
41511
|
+
const isSmallScreen = chunkFX3K6LNZ_cjs.useIsPhone();
|
|
41512
|
+
const prevOpenRef = React9.useRef(false);
|
|
41513
|
+
const mode = isSmallScreen ? "overlay" : panelModes[panelId] || defaultMode;
|
|
41514
|
+
React9.useEffect(() => {
|
|
41515
|
+
if (isOpen && !prevOpenRef.current) {
|
|
41516
|
+
setPanelModeStore(panelId, isSmallScreen ? "overlay" : defaultMode);
|
|
41517
|
+
}
|
|
41518
|
+
prevOpenRef.current = isOpen;
|
|
41519
|
+
}, [isOpen, panelId, defaultMode, isSmallScreen, setPanelModeStore]);
|
|
41520
|
+
React9.useEffect(() => {
|
|
41521
|
+
if (isSmallScreen && isOpen && panelModes[panelId] && panelModes[panelId] !== "overlay") {
|
|
41522
|
+
setPanelModeStore(panelId, "overlay");
|
|
41523
|
+
}
|
|
41524
|
+
}, [isSmallScreen, isOpen, panelId, panelModes, setPanelModeStore]);
|
|
41525
|
+
const setPanelMode = React9.useCallback(
|
|
41526
|
+
(newMode) => {
|
|
41527
|
+
if (isSmallScreen) return;
|
|
41528
|
+
setPanelModeStore(panelId, newMode);
|
|
41529
|
+
},
|
|
41530
|
+
[panelId, isSmallScreen, setPanelModeStore]
|
|
41531
|
+
);
|
|
41532
|
+
return { mode, setPanelMode };
|
|
41533
|
+
}
|
|
41534
|
+
function ConnectedPanelHost({
|
|
41535
|
+
panelId,
|
|
41536
|
+
isOpen,
|
|
41537
|
+
onClose,
|
|
41538
|
+
headerIcon,
|
|
41539
|
+
title,
|
|
41540
|
+
subtitle,
|
|
41541
|
+
headerActions,
|
|
41542
|
+
children,
|
|
41543
|
+
footer,
|
|
41544
|
+
defaultMode = "docked",
|
|
41545
|
+
tabLabel,
|
|
41546
|
+
disablePopout,
|
|
41547
|
+
closeTestId,
|
|
41548
|
+
defaultWidth
|
|
41549
|
+
}) {
|
|
41550
|
+
const { mode, setPanelMode } = useSessionPanelMode(panelId, defaultMode, isOpen);
|
|
41551
|
+
React9.useEffect(() => {
|
|
41552
|
+
if (disablePopout && mode === "popout") {
|
|
41553
|
+
setPanelMode(defaultMode);
|
|
41554
|
+
}
|
|
41555
|
+
}, [disablePopout, mode, defaultMode, setPanelMode]);
|
|
41556
|
+
const handlePopupClosed = React9.useCallback(() => {
|
|
41557
|
+
onClose();
|
|
41558
|
+
}, [onClose]);
|
|
41559
|
+
const setFocusedArea = react.useArbiSessionStore().setFocusedArea;
|
|
41560
|
+
const { popoutTitle } = chunkGX5MKJ3F_cjs.usePanelHostSupport();
|
|
41561
|
+
const focusedArea = react.useArbiSessionState((s) => s.shell.focusedArea);
|
|
41562
|
+
const handlePanelFocus = React9.useCallback(() => {
|
|
41563
|
+
setFocusedArea(panelId);
|
|
41564
|
+
}, [panelId, setFocusedArea]);
|
|
41565
|
+
React9.useEffect(() => {
|
|
41566
|
+
if (!isOpen || mode === "popout" || focusedArea !== panelId) return;
|
|
41567
|
+
const onKeyDown = (e) => {
|
|
41568
|
+
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
41569
|
+
const active = document.activeElement;
|
|
41570
|
+
if (active?.matches('input, textarea, select, [contenteditable="true"]')) return;
|
|
41571
|
+
if (document.querySelector(
|
|
41572
|
+
'[role="dialog"][data-state="open"], [data-radix-popper-content-wrapper]'
|
|
41573
|
+
))
|
|
41574
|
+
return;
|
|
41575
|
+
onClose();
|
|
41576
|
+
};
|
|
41577
|
+
window.addEventListener("keydown", onKeyDown);
|
|
41578
|
+
return () => window.removeEventListener("keydown", onKeyDown);
|
|
41579
|
+
}, [isOpen, mode, focusedArea, panelId, onClose]);
|
|
41580
|
+
const [isExiting, setIsExiting] = React9.useState(false);
|
|
41581
|
+
const prevOpenRef = React9.useRef(isOpen);
|
|
41582
|
+
if (prevOpenRef.current !== isOpen) {
|
|
41583
|
+
prevOpenRef.current = isOpen;
|
|
41584
|
+
setIsExiting(!isOpen && mode === "overlay");
|
|
41585
|
+
}
|
|
41586
|
+
React9.useEffect(() => {
|
|
41587
|
+
if (!isExiting) return;
|
|
41588
|
+
const timeout = setTimeout(() => setIsExiting(false), 200);
|
|
41589
|
+
return () => clearTimeout(timeout);
|
|
41590
|
+
}, [isExiting]);
|
|
41591
|
+
if (!isOpen && !isExiting) return null;
|
|
41592
|
+
const modeSwitcher = /* @__PURE__ */ jsxRuntime.jsx(
|
|
41593
|
+
chunkGX5MKJ3F_cjs.PanelModeSwitcher,
|
|
41594
|
+
{
|
|
41595
|
+
mode,
|
|
41596
|
+
onModeChange: setPanelMode,
|
|
41597
|
+
onClose,
|
|
41598
|
+
disablePopout,
|
|
41599
|
+
closeTestId
|
|
41600
|
+
}
|
|
41601
|
+
);
|
|
41602
|
+
const panelElement = /* @__PURE__ */ jsxRuntime.jsx(
|
|
41603
|
+
chunkFEVJA4BP_cjs.FloatingPanel,
|
|
41604
|
+
{
|
|
41605
|
+
panelId,
|
|
41606
|
+
mode,
|
|
41607
|
+
title,
|
|
41608
|
+
subtitle,
|
|
41609
|
+
headerIcon,
|
|
41610
|
+
headerActions,
|
|
41611
|
+
tabLabel,
|
|
41612
|
+
modeSwitcher,
|
|
41613
|
+
footer,
|
|
41614
|
+
onPanelClick: mode === "popout" ? void 0 : handlePanelFocus,
|
|
41615
|
+
children
|
|
41616
|
+
}
|
|
41617
|
+
);
|
|
41618
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41619
|
+
chunkGX5MKJ3F_cjs.PanelPortal,
|
|
41620
|
+
{
|
|
41621
|
+
defaultWidth,
|
|
41622
|
+
panelId,
|
|
41623
|
+
mode,
|
|
41624
|
+
isOpen,
|
|
41625
|
+
isExiting,
|
|
41626
|
+
onClose,
|
|
41627
|
+
onPopupClosed: handlePopupClosed,
|
|
41628
|
+
popoutTitle: popoutTitle(title),
|
|
41629
|
+
children: panelElement
|
|
41630
|
+
}
|
|
41631
|
+
);
|
|
41632
|
+
}
|
|
40991
41633
|
|
|
40992
41634
|
Object.defineProperty(exports, "CAP_REACHED_MESSAGE", {
|
|
40993
41635
|
enumerable: true,
|
|
40994
|
-
get: function () { return
|
|
41636
|
+
get: function () { return chunkV7JDMKNQ_cjs.CAP_REACHED_MESSAGE; }
|
|
40995
41637
|
});
|
|
40996
41638
|
Object.defineProperty(exports, "ZERO_BUDGET_MESSAGE", {
|
|
40997
41639
|
enumerable: true,
|
|
40998
|
-
get: function () { return
|
|
41640
|
+
get: function () { return chunkV7JDMKNQ_cjs.ZERO_BUDGET_MESSAGE; }
|
|
40999
41641
|
});
|
|
41000
41642
|
Object.defineProperty(exports, "aiUsageResetTimestamp", {
|
|
41001
41643
|
enumerable: true,
|
|
41002
|
-
get: function () { return
|
|
41644
|
+
get: function () { return chunkV7JDMKNQ_cjs.aiUsageResetTimestamp; }
|
|
41003
41645
|
});
|
|
41004
41646
|
Object.defineProperty(exports, "formatMoney", {
|
|
41005
41647
|
enumerable: true,
|
|
41006
|
-
get: function () { return
|
|
41648
|
+
get: function () { return chunkV7JDMKNQ_cjs.formatMoney; }
|
|
41007
41649
|
});
|
|
41008
41650
|
Object.defineProperty(exports, "formatResetDate", {
|
|
41009
41651
|
enumerable: true,
|
|
41010
|
-
get: function () { return
|
|
41652
|
+
get: function () { return chunkV7JDMKNQ_cjs.formatResetDate; }
|
|
41011
41653
|
});
|
|
41012
41654
|
Object.defineProperty(exports, "getQuotaItems", {
|
|
41013
41655
|
enumerable: true,
|
|
41014
|
-
get: function () { return
|
|
41656
|
+
get: function () { return chunkV7JDMKNQ_cjs.getQuotaItems; }
|
|
41015
41657
|
});
|
|
41016
41658
|
Object.defineProperty(exports, "isAddonBudgetZero", {
|
|
41017
41659
|
enumerable: true,
|
|
41018
|
-
get: function () { return
|
|
41660
|
+
get: function () { return chunkV7JDMKNQ_cjs.isAddonBudgetZero; }
|
|
41019
41661
|
});
|
|
41020
41662
|
Object.defineProperty(exports, "isProProject", {
|
|
41021
41663
|
enumerable: true,
|
|
41022
|
-
get: function () { return
|
|
41664
|
+
get: function () { return chunkV7JDMKNQ_cjs.isProProject; }
|
|
41023
41665
|
});
|
|
41024
41666
|
Object.defineProperty(exports, "planBadgeView", {
|
|
41025
41667
|
enumerable: true,
|
|
41026
|
-
get: function () { return
|
|
41668
|
+
get: function () { return chunkV7JDMKNQ_cjs.planBadgeView; }
|
|
41027
41669
|
});
|
|
41028
41670
|
Object.defineProperty(exports, "planName", {
|
|
41029
41671
|
enumerable: true,
|
|
41030
|
-
get: function () { return
|
|
41672
|
+
get: function () { return chunkV7JDMKNQ_cjs.planName; }
|
|
41031
41673
|
});
|
|
41032
41674
|
Object.defineProperty(exports, "projectGroupBilling", {
|
|
41033
41675
|
enumerable: true,
|
|
41034
|
-
get: function () { return
|
|
41676
|
+
get: function () { return chunkV7JDMKNQ_cjs.projectGroupBilling; }
|
|
41035
41677
|
});
|
|
41036
41678
|
Object.defineProperty(exports, "useBillingSupport", {
|
|
41037
41679
|
enumerable: true,
|
|
41038
|
-
get: function () { return
|
|
41680
|
+
get: function () { return chunkV7JDMKNQ_cjs.useBillingSupport; }
|
|
41039
41681
|
});
|
|
41040
41682
|
Object.defineProperty(exports, "useRewardBalance", {
|
|
41041
41683
|
enumerable: true,
|
|
41042
|
-
get: function () { return
|
|
41684
|
+
get: function () { return chunkV7JDMKNQ_cjs.useRewardBalance; }
|
|
41043
41685
|
});
|
|
41044
41686
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
41045
41687
|
enumerable: true,
|
|
41046
|
-
get: function () { return
|
|
41688
|
+
get: function () { return chunkK7S5BMAB_cjs.ConnectedAssistantDock; }
|
|
41047
41689
|
});
|
|
41048
41690
|
Object.defineProperty(exports, "redlineStats", {
|
|
41049
41691
|
enumerable: true,
|
|
41050
|
-
get: function () { return
|
|
41692
|
+
get: function () { return chunkK7S5BMAB_cjs.redlineStats; }
|
|
41051
41693
|
});
|
|
41052
41694
|
Object.defineProperty(exports, "textToArtifact", {
|
|
41053
41695
|
enumerable: true,
|
|
41054
|
-
get: function () { return
|
|
41696
|
+
get: function () { return chunkK7S5BMAB_cjs.textToArtifact; }
|
|
41055
41697
|
});
|
|
41056
41698
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
41057
41699
|
enumerable: true,
|
|
41058
|
-
get: function () { return
|
|
41700
|
+
get: function () { return chunkK7S5BMAB_cjs.toRedlineMarkdown; }
|
|
41059
41701
|
});
|
|
41060
41702
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
41061
41703
|
enumerable: true,
|
|
41062
|
-
get: function () { return
|
|
41704
|
+
get: function () { return chunkK7S5BMAB_cjs.useConnectedAiTask; }
|
|
41063
41705
|
});
|
|
41064
41706
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
41065
41707
|
enumerable: true,
|
|
41066
|
-
get: function () { return
|
|
41708
|
+
get: function () { return chunkK7S5BMAB_cjs.useConnectedChat; }
|
|
41067
41709
|
});
|
|
41068
41710
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
41069
41711
|
enumerable: true,
|
|
41070
|
-
get: function () { return
|
|
41712
|
+
get: function () { return chunkK7S5BMAB_cjs.useSemanticSearch; }
|
|
41071
41713
|
});
|
|
41072
41714
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
41073
41715
|
enumerable: true,
|
|
41074
|
-
get: function () { return
|
|
41716
|
+
get: function () { return chunkK7S5BMAB_cjs.useWorkspaceDocs; }
|
|
41075
41717
|
});
|
|
41076
41718
|
Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
|
|
41077
41719
|
enumerable: true,
|
|
41078
|
-
get: function () { return
|
|
41720
|
+
get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowDocumentsField; }
|
|
41079
41721
|
});
|
|
41080
41722
|
Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
|
|
41081
41723
|
enumerable: true,
|
|
41082
|
-
get: function () { return
|
|
41724
|
+
get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowLauncher; }
|
|
41083
41725
|
});
|
|
41084
41726
|
Object.defineProperty(exports, "ConnectedWorkflowsTable", {
|
|
41085
41727
|
enumerable: true,
|
|
41086
|
-
get: function () { return
|
|
41728
|
+
get: function () { return chunkUZVXVTTB_cjs.ConnectedWorkflowsTable; }
|
|
41087
41729
|
});
|
|
41088
41730
|
Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
|
|
41089
41731
|
enumerable: true,
|
|
41090
|
-
get: function () { return
|
|
41732
|
+
get: function () { return chunkUZVXVTTB_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
|
|
41091
41733
|
});
|
|
41092
41734
|
Object.defineProperty(exports, "toWorkflowFieldDocument", {
|
|
41093
41735
|
enumerable: true,
|
|
41094
|
-
get: function () { return
|
|
41736
|
+
get: function () { return chunkUZVXVTTB_cjs.toWorkflowFieldDocument; }
|
|
41095
41737
|
});
|
|
41096
41738
|
Object.defineProperty(exports, "useConnectedAgentOptions", {
|
|
41097
41739
|
enumerable: true,
|
|
41098
|
-
get: function () { return
|
|
41740
|
+
get: function () { return chunkUZVXVTTB_cjs.useConnectedAgentOptions; }
|
|
41099
41741
|
});
|
|
41100
41742
|
Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
|
|
41101
41743
|
enumerable: true,
|
|
41102
|
-
get: function () { return
|
|
41744
|
+
get: function () { return chunkUZVXVTTB_cjs.useConnectedWorkflowScopeSource; }
|
|
41103
41745
|
});
|
|
41104
41746
|
Object.defineProperty(exports, "useConnectedWorkspaceRole", {
|
|
41105
41747
|
enumerable: true,
|
|
41106
|
-
get: function () { return
|
|
41748
|
+
get: function () { return chunkUZVXVTTB_cjs.useConnectedWorkspaceRole; }
|
|
41107
41749
|
});
|
|
41108
41750
|
Object.defineProperty(exports, "useDocxCommentTarget", {
|
|
41109
41751
|
enumerable: true,
|
|
41110
|
-
get: function () { return
|
|
41752
|
+
get: function () { return chunkUZVXVTTB_cjs.useDocxCommentTarget; }
|
|
41111
41753
|
});
|
|
41112
41754
|
Object.defineProperty(exports, "useNativeDocxSupport", {
|
|
41113
41755
|
enumerable: true,
|
|
41114
|
-
get: function () { return
|
|
41756
|
+
get: function () { return chunkUZVXVTTB_cjs.useNativeDocxSupport; }
|
|
41115
41757
|
});
|
|
41116
41758
|
Object.defineProperty(exports, "ConnectedDocumentToolsProvider", {
|
|
41117
41759
|
enumerable: true,
|
|
41118
|
-
get: function () { return
|
|
41760
|
+
get: function () { return chunkGT5FCYV5_cjs.ConnectedDocumentToolsProvider; }
|
|
41119
41761
|
});
|
|
41120
41762
|
Object.defineProperty(exports, "ConnectedMarkdown", {
|
|
41121
41763
|
enumerable: true,
|
|
41122
|
-
get: function () { return
|
|
41764
|
+
get: function () { return chunkGT5FCYV5_cjs.ConnectedMarkdown; }
|
|
41123
41765
|
});
|
|
41124
41766
|
Object.defineProperty(exports, "DocumentChip", {
|
|
41125
41767
|
enumerable: true,
|
|
41126
|
-
get: function () { return
|
|
41768
|
+
get: function () { return chunkGT5FCYV5_cjs.DocumentChip; }
|
|
41127
41769
|
});
|
|
41128
41770
|
Object.defineProperty(exports, "DocumentWorkspaceContext", {
|
|
41129
41771
|
enumerable: true,
|
|
41130
|
-
get: function () { return
|
|
41772
|
+
get: function () { return chunkGT5FCYV5_cjs.DocumentWorkspaceContext; }
|
|
41131
41773
|
});
|
|
41132
41774
|
Object.defineProperty(exports, "ExternalLink", {
|
|
41133
41775
|
enumerable: true,
|
|
41134
|
-
get: function () { return
|
|
41776
|
+
get: function () { return chunkGT5FCYV5_cjs.ExternalLink; }
|
|
41135
41777
|
});
|
|
41136
41778
|
Object.defineProperty(exports, "InternalDocLink", {
|
|
41137
41779
|
enumerable: true,
|
|
41138
|
-
get: function () { return
|
|
41780
|
+
get: function () { return chunkGT5FCYV5_cjs.InternalDocLink; }
|
|
41139
41781
|
});
|
|
41140
41782
|
Object.defineProperty(exports, "MailChip", {
|
|
41141
41783
|
enumerable: true,
|
|
41142
|
-
get: function () { return
|
|
41784
|
+
get: function () { return chunkGT5FCYV5_cjs.MailChip; }
|
|
41143
41785
|
});
|
|
41144
41786
|
Object.defineProperty(exports, "MermaidDiagram", {
|
|
41145
41787
|
enumerable: true,
|
|
41146
|
-
get: function () { return
|
|
41788
|
+
get: function () { return chunkGT5FCYV5_cjs.MermaidDiagram; }
|
|
41147
41789
|
});
|
|
41148
41790
|
Object.defineProperty(exports, "WorkspaceDocumentReference", {
|
|
41149
41791
|
enumerable: true,
|
|
41150
|
-
get: function () { return
|
|
41792
|
+
get: function () { return chunkGT5FCYV5_cjs.WorkspaceDocumentReference; }
|
|
41151
41793
|
});
|
|
41152
41794
|
Object.defineProperty(exports, "useDocumentViewerSupport", {
|
|
41153
41795
|
enumerable: true,
|
|
41154
|
-
get: function () { return
|
|
41796
|
+
get: function () { return chunkGT5FCYV5_cjs.useDocumentViewerSupport; }
|
|
41155
41797
|
});
|
|
41156
41798
|
Object.defineProperty(exports, "useDocumentWorkspace", {
|
|
41157
41799
|
enumerable: true,
|
|
41158
|
-
get: function () { return
|
|
41800
|
+
get: function () { return chunkGT5FCYV5_cjs.useDocumentWorkspace; }
|
|
41159
41801
|
});
|
|
41160
41802
|
Object.defineProperty(exports, "useViewerDraftDocument", {
|
|
41161
41803
|
enumerable: true,
|
|
41162
|
-
get: function () { return
|
|
41804
|
+
get: function () { return chunkGT5FCYV5_cjs.useViewerDraftDocument; }
|
|
41163
41805
|
});
|
|
41164
41806
|
Object.defineProperty(exports, "useViewerIsDetached", {
|
|
41165
41807
|
enumerable: true,
|
|
41166
|
-
get: function () { return
|
|
41808
|
+
get: function () { return chunkGT5FCYV5_cjs.useViewerIsDetached; }
|
|
41167
41809
|
});
|
|
41168
41810
|
Object.defineProperty(exports, "useViewerPassageCitation", {
|
|
41169
41811
|
enumerable: true,
|
|
41170
|
-
get: function () { return
|
|
41812
|
+
get: function () { return chunkGT5FCYV5_cjs.useViewerPassageCitation; }
|
|
41171
41813
|
});
|
|
41172
41814
|
Object.defineProperty(exports, "useViewerStreamingDocument", {
|
|
41173
41815
|
enumerable: true,
|
|
41174
|
-
get: function () { return
|
|
41816
|
+
get: function () { return chunkGT5FCYV5_cjs.useViewerStreamingDocument; }
|
|
41175
41817
|
});
|
|
41176
41818
|
Object.defineProperty(exports, "useMeetingThreadMessages", {
|
|
41177
41819
|
enumerable: true,
|
|
41178
|
-
get: function () { return
|
|
41820
|
+
get: function () { return chunk6AJJJ5HR_cjs.useMeetingThreadMessages; }
|
|
41179
41821
|
});
|
|
41180
41822
|
Object.defineProperty(exports, "isListedDocument", {
|
|
41181
41823
|
enumerable: true,
|
|
41182
|
-
get: function () { return
|
|
41824
|
+
get: function () { return chunkHDEOORSV_cjs.isListedDocument; }
|
|
41183
41825
|
});
|
|
41184
41826
|
Object.defineProperty(exports, "useConnectedConversations", {
|
|
41185
41827
|
enumerable: true,
|
|
41186
|
-
get: function () { return
|
|
41828
|
+
get: function () { return chunkHDEOORSV_cjs.useConnectedConversations; }
|
|
41187
41829
|
});
|
|
41188
41830
|
Object.defineProperty(exports, "useConnectedDocuments", {
|
|
41189
41831
|
enumerable: true,
|
|
41190
|
-
get: function () { return
|
|
41832
|
+
get: function () { return chunkHDEOORSV_cjs.useConnectedDocuments; }
|
|
41191
41833
|
});
|
|
41192
41834
|
Object.defineProperty(exports, "useConnectedTags", {
|
|
41193
41835
|
enumerable: true,
|
|
41194
|
-
get: function () { return
|
|
41836
|
+
get: function () { return chunkHDEOORSV_cjs.useConnectedTags; }
|
|
41195
41837
|
});
|
|
41196
41838
|
Object.defineProperty(exports, "useDocumentFilter", {
|
|
41197
41839
|
enumerable: true,
|
|
41198
|
-
get: function () { return
|
|
41840
|
+
get: function () { return chunkHDEOORSV_cjs.useDocumentFilter; }
|
|
41199
41841
|
});
|
|
41200
41842
|
Object.defineProperty(exports, "useListedDocuments", {
|
|
41201
41843
|
enumerable: true,
|
|
41202
|
-
get: function () { return
|
|
41844
|
+
get: function () { return chunkHDEOORSV_cjs.useListedDocuments; }
|
|
41203
41845
|
});
|
|
41204
41846
|
Object.defineProperty(exports, "SESSION_EXPIRED_MESSAGE", {
|
|
41205
41847
|
enumerable: true,
|
|
41206
|
-
get: function () { return
|
|
41848
|
+
get: function () { return chunkP6HVJP6Z_cjs.SESSION_EXPIRED_MESSAGE; }
|
|
41207
41849
|
});
|
|
41208
41850
|
Object.defineProperty(exports, "isAuthenticated", {
|
|
41209
41851
|
enumerable: true,
|
|
41210
|
-
get: function () { return
|
|
41852
|
+
get: function () { return chunkP6HVJP6Z_cjs.isAuthenticated; }
|
|
41211
41853
|
});
|
|
41212
41854
|
Object.defineProperty(exports, "useConnectedWorkspace", {
|
|
41213
41855
|
enumerable: true,
|
|
41214
|
-
get: function () { return
|
|
41856
|
+
get: function () { return chunkP6HVJP6Z_cjs.useConnectedWorkspace; }
|
|
41215
41857
|
});
|
|
41216
41858
|
Object.defineProperty(exports, "useConnection", {
|
|
41217
41859
|
enumerable: true,
|
|
41218
|
-
get: function () { return
|
|
41860
|
+
get: function () { return chunkP6HVJP6Z_cjs.useConnection; }
|
|
41219
41861
|
});
|
|
41220
41862
|
Object.defineProperty(exports, "requestCalendarComposer", {
|
|
41221
41863
|
enumerable: true,
|
|
@@ -41308,6 +41950,7 @@ exports.ConnectedNewThreadDialog = ConnectedNewThreadDialog;
|
|
|
41308
41950
|
exports.ConnectedNotificationCenter = ConnectedNotificationCenter;
|
|
41309
41951
|
exports.ConnectedNotificationPreferences = ConnectedNotificationPreferences;
|
|
41310
41952
|
exports.ConnectedOAuthConsentPage = ConnectedOAuthConsentPage;
|
|
41953
|
+
exports.ConnectedPanelHost = ConnectedPanelHost;
|
|
41311
41954
|
exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
|
|
41312
41955
|
exports.ConnectedPendingSyncDialog = ConnectedPendingSyncDialog;
|
|
41313
41956
|
exports.ConnectedPremiumModels = ConnectedPremiumModels;
|
|
@@ -41350,6 +41993,7 @@ exports.ConnectedThreadFollow = ConnectedThreadFollow;
|
|
|
41350
41993
|
exports.ConnectedThreadLauncher = ConnectedThreadLauncher;
|
|
41351
41994
|
exports.ConnectedThreadTabs = ConnectedThreadTabs;
|
|
41352
41995
|
exports.ConnectedThreadTaskBar = ConnectedThreadTaskBar;
|
|
41996
|
+
exports.ConnectedThreadsPage = ConnectedThreadsPage;
|
|
41353
41997
|
exports.ConnectedThreadsPreview = ConnectedThreadsPreview;
|
|
41354
41998
|
exports.ConnectedTransferWatcher = ConnectedTransferWatcher;
|
|
41355
41999
|
exports.ConnectedUpcomingEvents = ConnectedUpcomingEvents;
|
|
@@ -41558,6 +42202,7 @@ exports.useReferralReward = useReferralReward;
|
|
|
41558
42202
|
exports.useRenderTaskPerson = useRenderTaskPerson;
|
|
41559
42203
|
exports.useReportProblem = useReportProblem;
|
|
41560
42204
|
exports.useResolvedDocStatus = useResolvedDocStatus;
|
|
42205
|
+
exports.useSessionPanelMode = useSessionPanelMode;
|
|
41561
42206
|
exports.useSessionSidebar = useSessionSidebar;
|
|
41562
42207
|
exports.useSkillsEnabled = useSkillsEnabled;
|
|
41563
42208
|
exports.useSlashItems = useSlashItems;
|
|
@@ -41572,6 +42217,7 @@ exports.useThreadTabs = useThreadTabs;
|
|
|
41572
42217
|
exports.useWorkflowDefinitions = useWorkflowDefinitions;
|
|
41573
42218
|
exports.useWorkflowLaunch = useWorkflowLaunch;
|
|
41574
42219
|
exports.useWorkflowTasks = useWorkflowTasks;
|
|
42220
|
+
exports.useWorkflowsPageState = useWorkflowsPageState;
|
|
41575
42221
|
exports.useWorkspaceDocTitles = useWorkspaceDocTitles;
|
|
41576
42222
|
exports.viewsOfTable = viewsOfTable;
|
|
41577
42223
|
exports.webinarRolesByUser = webinarRolesByUser;
|