@arbidocs/blocks 0.4.72 → 0.4.73
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/dist/agents/index.cjs +400 -261
- package/dist/agents/index.js +6 -3
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +58 -0
- package/dist/agents/tasks/index.d.ts +1 -0
- package/dist/agents/workflows/WorkflowRunner.d.ts +70 -0
- package/dist/agents/workflows/index.d.ts +7 -1
- package/dist/agents/workflows/planSteps.d.ts +28 -0
- package/dist/agents/workflows/run.d.ts +97 -0
- package/dist/agents/workflows/skillMarkdown.d.ts +15 -0
- package/dist/agents/workflows/types.d.ts +109 -0
- package/dist/agents/workflows/useWorkflowPreview.d.ts +14 -0
- package/dist/agents/workflows/useWorkflowView.d.ts +54 -0
- package/dist/agents/workflows/workflow.d.ts +3 -1
- package/dist/chunk-2P3T23C7.js +1250 -0
- package/dist/chunk-2P3T23C7.js.map +1 -0
- package/dist/chunk-7D737FLE.cjs +43 -0
- package/dist/chunk-7D737FLE.cjs.map +1 -0
- package/dist/{chunk-LFGJAZ5H.js → chunk-DDF5GPIJ.js} +6 -36
- package/dist/chunk-DDF5GPIJ.js.map +1 -0
- package/dist/chunk-DETZZBG2.cjs +91 -0
- package/dist/chunk-DETZZBG2.cjs.map +1 -0
- package/dist/chunk-EVUEIBNU.js +89 -0
- package/dist/chunk-EVUEIBNU.js.map +1 -0
- package/dist/chunk-GTNUQBXI.cjs +1296 -0
- package/dist/chunk-GTNUQBXI.cjs.map +1 -0
- package/dist/{chunk-DH7C2UJO.cjs → chunk-IUR565UW.cjs} +297 -524
- package/dist/chunk-IUR565UW.cjs.map +1 -0
- package/dist/{chunk-THO7DZNN.cjs → chunk-MUMH3Z6K.cjs} +20 -15
- package/dist/chunk-MUMH3Z6K.cjs.map +1 -0
- package/dist/{chunk-KOXUBCLL.js → chunk-ORA2XE7U.js} +3 -3
- package/dist/{chunk-KOXUBCLL.js.map → chunk-ORA2XE7U.js.map} +1 -1
- package/dist/{chunk-5HOAOKZL.js → chunk-OYMWV45N.js} +21 -16
- package/dist/chunk-OYMWV45N.js.map +1 -0
- package/dist/{chunk-IMC2Z32C.js → chunk-QDNXEB3T.js} +268 -484
- package/dist/chunk-QDNXEB3T.js.map +1 -0
- package/dist/{chunk-G5QTGKDJ.cjs → chunk-WOYUXVVQ.cjs} +6 -6
- package/dist/{chunk-G5QTGKDJ.cjs.map → chunk-WOYUXVVQ.cjs.map} +1 -1
- package/dist/chunk-XD2M6LIG.js +41 -0
- package/dist/chunk-XD2M6LIG.js.map +1 -0
- package/dist/{chunk-WBDK4PIA.cjs → chunk-Z5VUZ6YD.cjs} +6 -37
- package/dist/chunk-Z5VUZ6YD.cjs.map +1 -0
- package/dist/connect/docx.cjs +2 -2
- package/dist/connect/docx.js +1 -1
- package/dist/connect/index.cjs +316 -23
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -0
- package/dist/connect/index.js +300 -8
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +44 -0
- package/dist/connection/ConnectedWorkflowRunner.d.ts +27 -0
- package/dist/connection/useWorkflowThread.d.ts +34 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +9 -83
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +6 -83
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +22 -21
- package/dist/home/index.cjs.map +1 -1
- package/dist/home/index.js +4 -3
- package/dist/home/index.js.map +1 -1
- package/dist/index.cjs +450 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +5 -5
- package/dist/studio/index.js +3 -3
- package/dist/workflow-canvas/StepInspector.d.ts +46 -0
- package/dist/workflow-canvas/TriggerInspector.d.ts +46 -0
- package/dist/workflow-canvas/WorkflowBuilder.d.ts +55 -0
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +65 -0
- package/dist/workflow-canvas/edit.d.ts +54 -0
- package/dist/workflow-canvas/index.cjs +1609 -0
- package/dist/workflow-canvas/index.cjs.map +1 -0
- package/dist/workflow-canvas/index.d.ts +13 -0
- package/dist/workflow-canvas/index.js +1579 -0
- package/dist/workflow-canvas/index.js.map +1 -0
- package/dist/workflow-canvas/trigger.d.ts +51 -0
- package/package.json +25 -14
- package/src/workflow-canvas/canvas.css +113 -0
- package/dist/chunk-5HOAOKZL.js.map +0 -1
- package/dist/chunk-DH7C2UJO.cjs.map +0 -1
- package/dist/chunk-IMC2Z32C.js.map +0 -1
- package/dist/chunk-LFGJAZ5H.js.map +0 -1
- package/dist/chunk-THO7DZNN.cjs.map +0 -1
- package/dist/chunk-WBDK4PIA.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkB3WCKBJ7_cjs = require('../chunk-B3WCKBJ7.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkWOYUXVVQ_cjs = require('../chunk-WOYUXVVQ.cjs');
|
|
6
|
+
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
7
|
+
var chunkGTNUQBXI_cjs = require('../chunk-GTNUQBXI.cjs');
|
|
8
|
+
require('../chunk-DETZZBG2.cjs');
|
|
9
|
+
require('../chunk-7D737FLE.cjs');
|
|
7
10
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
8
11
|
require('../chunk-ADOKTJHV.cjs');
|
|
9
12
|
var chunkKJ3QEKOJ_cjs = require('../chunk-KJ3QEKOJ.cjs');
|
|
@@ -25,7 +28,7 @@ var lucideReact = require('lucide-react');
|
|
|
25
28
|
var shell = require('@arbidocs/react/shell');
|
|
26
29
|
|
|
27
30
|
function ConnectionBoundWebSocket({ children }) {
|
|
28
|
-
const { status } =
|
|
31
|
+
const { status } = chunkMUMH3Z6K_cjs.useConnection();
|
|
29
32
|
return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiWebSocketProvider, { enabled: status === "authenticated", children });
|
|
30
33
|
}
|
|
31
34
|
function ArbiAppProvider({
|
|
@@ -38,10 +41,10 @@ function ArbiAppProvider({
|
|
|
38
41
|
})
|
|
39
42
|
);
|
|
40
43
|
const providerUrl = config.apiUrl || config.demoApiUrl || "https://demo.arbi.local";
|
|
41
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, deploymentDomain: config.deploymentDomain, children: /* @__PURE__ */ jsxRuntime.jsx(chunkMUMH3Z6K_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
|
|
42
45
|
}
|
|
43
46
|
function ConnectedTaskAccessRequest({ conversationId }) {
|
|
44
|
-
const { workspaceId } =
|
|
47
|
+
const { workspaceId } = chunkMUMH3Z6K_cjs.useConnection();
|
|
45
48
|
const tasks = react$1.useConversations(workspaceId ?? void 0, { live: true });
|
|
46
49
|
const run = react$1.useRunConversation();
|
|
47
50
|
const task = tasks.data?.find((item) => item.external_id === conversationId);
|
|
@@ -180,8 +183,296 @@ function StreamedArtifact({
|
|
|
180
183
|
}
|
|
181
184
|
);
|
|
182
185
|
}
|
|
186
|
+
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
187
|
+
function formValues(step, inputs) {
|
|
188
|
+
if (step.kind !== "form") return void 0;
|
|
189
|
+
return Object.fromEntries(step.inputs.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
190
|
+
}
|
|
191
|
+
function useWorkflowThread(workflow, options = {}) {
|
|
192
|
+
const arbi = react$1.useArbi();
|
|
193
|
+
const { ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
194
|
+
const { wsId } = chunkWOYUXVVQ_cjs.useWorkspaceDocs();
|
|
195
|
+
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
196
|
+
const [localInputs, setLocalInputs] = react.useState(
|
|
197
|
+
() => chunkGTNUQBXI_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
198
|
+
);
|
|
199
|
+
const [edits, setEdits] = react.useState({});
|
|
200
|
+
const [localStates, setLocalStates] = react.useState({});
|
|
201
|
+
const createWork = react$1.useCreateWork();
|
|
202
|
+
const actOnStep = react$1.useActOnStep();
|
|
203
|
+
const conversations = react$1.useConversations(wsId, { enabled: !!threadId, live: true });
|
|
204
|
+
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
205
|
+
const steps = react.useMemo(
|
|
206
|
+
() => chunkGTNUQBXI_cjs.workflowSteps(workflow).length > 0 ? chunkGTNUQBXI_cjs.workflowSteps(workflow) : chunkGTNUQBXI_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
207
|
+
[workflow, conversation?.plan?.steps]
|
|
208
|
+
);
|
|
209
|
+
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
210
|
+
const serverStates = react.useMemo(
|
|
211
|
+
() => chunkGTNUQBXI_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
212
|
+
[activity.data]
|
|
213
|
+
);
|
|
214
|
+
const working = steps.some(
|
|
215
|
+
(s) => s.kind === "agent" && STARTING.has(serverStates[s.id]?.status ?? "pending")
|
|
216
|
+
);
|
|
217
|
+
const threads = react$1.useConversationThreads(wsId, threadId, { enabled: !!threadId, live: working });
|
|
218
|
+
const answers = react.useMemo(() => {
|
|
219
|
+
const byId = /* @__PURE__ */ new Map();
|
|
220
|
+
for (const t of threads.data?.threads ?? [])
|
|
221
|
+
for (const m of t.history) if (m.role === "assistant") byId.set(m.external_id, m.content);
|
|
222
|
+
return byId;
|
|
223
|
+
}, [threads.data]);
|
|
224
|
+
const answerMissing = Object.values(serverStates).some(
|
|
225
|
+
(st) => st.status === "done" && !!st.responseId && !answers.has(st.responseId)
|
|
226
|
+
);
|
|
227
|
+
const refetchThreads = threads.refetch;
|
|
228
|
+
react.useEffect(() => {
|
|
229
|
+
if (answerMissing) void refetchThreads();
|
|
230
|
+
}, [answerMissing, activity.data, refetchThreads]);
|
|
231
|
+
const states = react.useMemo(() => {
|
|
232
|
+
if (!threadId) return localStates;
|
|
233
|
+
const out = {};
|
|
234
|
+
for (const [id, s] of Object.entries(serverStates))
|
|
235
|
+
out[id] = { ...s, text: s.responseId ? answers.get(s.responseId) : void 0 };
|
|
236
|
+
return out;
|
|
237
|
+
}, [threadId, localStates, serverStates, answers]);
|
|
238
|
+
const inputs = react.useMemo(
|
|
239
|
+
() => threadId ? { ...localInputs, ...conversation?.skill_inputs ?? {}, ...edits } : { ...localInputs, ...edits },
|
|
240
|
+
[threadId, localInputs, conversation?.skill_inputs, edits]
|
|
241
|
+
);
|
|
242
|
+
const refresh = react.useCallback(async () => {
|
|
243
|
+
await Promise.all([activity.refetch(), conversations.refetch()]);
|
|
244
|
+
}, [activity, conversations]);
|
|
245
|
+
const act = react.useCallback(
|
|
246
|
+
async (id, body) => {
|
|
247
|
+
await actOnStep.mutateAsync({ conversationId: id, body });
|
|
248
|
+
await refresh();
|
|
249
|
+
},
|
|
250
|
+
[actOnStep, refresh]
|
|
251
|
+
);
|
|
252
|
+
const complete = react.useCallback(
|
|
253
|
+
async (step) => {
|
|
254
|
+
let values = inputs;
|
|
255
|
+
const commit = step.commit ? options.commit?.[step.id] : void 0;
|
|
256
|
+
if (commit && localStates[step.id]?.status !== "done") {
|
|
257
|
+
values = { ...values, ...await commit(values) ?? {} };
|
|
258
|
+
setLocalInputs(values);
|
|
259
|
+
setEdits({});
|
|
260
|
+
}
|
|
261
|
+
let id = threadId;
|
|
262
|
+
if (!id) {
|
|
263
|
+
await ensureWorkspaceOpen();
|
|
264
|
+
const created = await createWork.mutateAsync({
|
|
265
|
+
title: chunkGTNUQBXI_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
266
|
+
description: workflow.description || null,
|
|
267
|
+
prompt: null,
|
|
268
|
+
skill_ref: null,
|
|
269
|
+
skill_inputs: values,
|
|
270
|
+
agent_ext_id: options.agentId ?? null,
|
|
271
|
+
auth_mode: "run_now_temp",
|
|
272
|
+
plan: {
|
|
273
|
+
goal: "",
|
|
274
|
+
criteria: [],
|
|
275
|
+
max_passes: 3,
|
|
276
|
+
documents: [],
|
|
277
|
+
steps: chunkGTNUQBXI_cjs.toPlanSteps(workflow, {
|
|
278
|
+
inputs: values,
|
|
279
|
+
resolveWorkflow: options.resolveWorkflow,
|
|
280
|
+
compose: options.compose
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
id = created.external_id;
|
|
285
|
+
setThreadId(id);
|
|
286
|
+
setLocalStates((s) => ({ ...s, [step.id]: { status: "done" } }));
|
|
287
|
+
options.onStarted?.(id);
|
|
288
|
+
}
|
|
289
|
+
await act(id, { step: step.id, action: "complete", inputs: formValues(step, values) });
|
|
290
|
+
},
|
|
291
|
+
[inputs, options, localStates, threadId, ensureWorkspaceOpen, createWork, workflow, act]
|
|
292
|
+
);
|
|
293
|
+
const skip = react.useCallback(
|
|
294
|
+
async (stepId) => {
|
|
295
|
+
if (!threadId) {
|
|
296
|
+
setLocalStates((s) => ({ ...s, [stepId]: { status: "skipped" } }));
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
await act(threadId, { step: stepId, action: "skip" });
|
|
300
|
+
},
|
|
301
|
+
[threadId, act]
|
|
302
|
+
);
|
|
303
|
+
const retry = react.useCallback(
|
|
304
|
+
async (_stepId) => {
|
|
305
|
+
if (!threadId) return;
|
|
306
|
+
await arbi.conversations.runWithAuth(threadId);
|
|
307
|
+
await refresh();
|
|
308
|
+
},
|
|
309
|
+
[arbi, threadId, refresh]
|
|
310
|
+
);
|
|
311
|
+
const view = chunkGTNUQBXI_cjs.useWorkflowView({
|
|
312
|
+
steps,
|
|
313
|
+
states,
|
|
314
|
+
inputs,
|
|
315
|
+
setInput: (name, value) => setEdits((i) => ({ ...i, [name]: value })),
|
|
316
|
+
complete,
|
|
317
|
+
skip,
|
|
318
|
+
retry,
|
|
319
|
+
isLocked: (id) => states[id]?.status === "done"
|
|
320
|
+
});
|
|
321
|
+
return { view, conversationId: threadId, conversation };
|
|
322
|
+
}
|
|
323
|
+
var DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = {
|
|
324
|
+
notify: "Ask to approve",
|
|
325
|
+
notified: "Notified.",
|
|
326
|
+
openThread: "Open the thread"
|
|
327
|
+
};
|
|
328
|
+
function ConnectedWorkflowRunner({
|
|
329
|
+
workflow,
|
|
330
|
+
options,
|
|
331
|
+
onOpenConversation,
|
|
332
|
+
emptyHint,
|
|
333
|
+
connectedLabels,
|
|
334
|
+
testIdPrefix = "workflow-run",
|
|
335
|
+
...runnerProps
|
|
336
|
+
}) {
|
|
337
|
+
const l = { ...DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS, ...connectedLabels };
|
|
338
|
+
const arbi = react$1.useArbi();
|
|
339
|
+
const { ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
340
|
+
const { wsId } = chunkWOYUXVVQ_cjs.useWorkspaceDocs();
|
|
341
|
+
const { data: docs = [], refetch } = react$1.useDocuments(wsId);
|
|
342
|
+
const [uploading, setUploading] = react.useState(false);
|
|
343
|
+
const { view, conversationId } = useWorkflowThread(workflow, options);
|
|
344
|
+
const onUpload = react.useCallback(
|
|
345
|
+
async (files) => {
|
|
346
|
+
if (!files.length) return;
|
|
347
|
+
setUploading(true);
|
|
348
|
+
try {
|
|
349
|
+
await ensureWorkspaceOpen();
|
|
350
|
+
for (const f of files) await arbi.documents.uploadFile(f, f.name);
|
|
351
|
+
await refetch();
|
|
352
|
+
} finally {
|
|
353
|
+
setUploading(false);
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
[arbi, ensureWorkspaceOpen, refetch]
|
|
357
|
+
);
|
|
358
|
+
const renderAgentOutput = (step, state) => {
|
|
359
|
+
const status = state?.status;
|
|
360
|
+
if (!state?.text && status !== "done") return null;
|
|
361
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
362
|
+
react$1.AiAnswer,
|
|
363
|
+
{
|
|
364
|
+
status: status === "running" ? "running" : "done",
|
|
365
|
+
text: state?.text ?? "",
|
|
366
|
+
emptyHint: emptyHint?.(step),
|
|
367
|
+
testId: `${testIdPrefix}-${step.id}-answer`
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
};
|
|
371
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
372
|
+
conversationId && onOpenConversation && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
373
|
+
ui.Button,
|
|
374
|
+
{
|
|
375
|
+
variant: "ghost",
|
|
376
|
+
size: "sm",
|
|
377
|
+
onClick: () => onOpenConversation(conversationId),
|
|
378
|
+
"data-testid": `${testIdPrefix}-open-thread`,
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "size-4" }),
|
|
381
|
+
" ",
|
|
382
|
+
l.openThread
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
) }),
|
|
386
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
387
|
+
chunkGTNUQBXI_cjs.WorkflowRunner,
|
|
388
|
+
{
|
|
389
|
+
...runnerProps,
|
|
390
|
+
workflow,
|
|
391
|
+
run: view,
|
|
392
|
+
renderAgentOutput,
|
|
393
|
+
renderReview: (step) => conversationId ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
394
|
+
ReviewNotify,
|
|
395
|
+
{
|
|
396
|
+
conversationId,
|
|
397
|
+
workspaceId: wsId,
|
|
398
|
+
labels: l,
|
|
399
|
+
testId: `${testIdPrefix}-${step.id}`
|
|
400
|
+
}
|
|
401
|
+
) : null,
|
|
402
|
+
onUpload,
|
|
403
|
+
uploading,
|
|
404
|
+
files: docs.map((d) => ({ id: d.external_id, name: d.file_name ?? d.external_id })),
|
|
405
|
+
testIdPrefix
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
] });
|
|
409
|
+
}
|
|
410
|
+
function ReviewNotify({
|
|
411
|
+
conversationId,
|
|
412
|
+
workspaceId,
|
|
413
|
+
labels,
|
|
414
|
+
testId
|
|
415
|
+
}) {
|
|
416
|
+
const arbi = react$1.useArbi();
|
|
417
|
+
const { status, user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
418
|
+
const { data: members = [] } = react$1.useWorkspaceUsers(workspaceId, {
|
|
419
|
+
enabled: status === "authenticated" && !!workspaceId,
|
|
420
|
+
beforeFetch: ensureWorkspaceOpen
|
|
421
|
+
});
|
|
422
|
+
const people = members.filter(
|
|
423
|
+
(m) => !m.agent_ext_id && !m.user.external_id.startsWith("agt-") && m.user.external_id !== user?.externalId
|
|
424
|
+
);
|
|
425
|
+
const [picked, setPicked] = react.useState([]);
|
|
426
|
+
const [sent, setSent] = react.useState(false);
|
|
427
|
+
const [busy, setBusy] = react.useState(false);
|
|
428
|
+
if (people.length === 0) return null;
|
|
429
|
+
const toggle = (id) => setPicked((p) => p.includes(id) ? p.filter((x) => x !== id) : [...p, id]);
|
|
430
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", "data-testid": `${testId}-notify`, children: [
|
|
431
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: people.map((m) => {
|
|
432
|
+
const name = [m.user.given_name, m.user.family_name].filter(Boolean).join(" ") || m.user.email;
|
|
433
|
+
const on = picked.includes(m.user.external_id);
|
|
434
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
435
|
+
"button",
|
|
436
|
+
{
|
|
437
|
+
type: "button",
|
|
438
|
+
onClick: () => toggle(m.user.external_id),
|
|
439
|
+
"aria-pressed": on,
|
|
440
|
+
className: ui.cn(
|
|
441
|
+
"rounded-full border px-2.5 py-1 text-xs",
|
|
442
|
+
on ? "border-primary bg-primary/10 text-primary" : "border-border text-muted-foreground"
|
|
443
|
+
),
|
|
444
|
+
"data-testid": `${testId}-person-${m.user.external_id}`,
|
|
445
|
+
children: name
|
|
446
|
+
},
|
|
447
|
+
m.user.external_id
|
|
448
|
+
);
|
|
449
|
+
}) }),
|
|
450
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
451
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
452
|
+
ui.Button,
|
|
453
|
+
{
|
|
454
|
+
variant: "outline",
|
|
455
|
+
size: "sm",
|
|
456
|
+
disabled: !picked.length || busy,
|
|
457
|
+
onClick: async () => {
|
|
458
|
+
setBusy(true);
|
|
459
|
+
try {
|
|
460
|
+
await arbi.conversations.notify(conversationId, picked);
|
|
461
|
+
setSent(true);
|
|
462
|
+
} finally {
|
|
463
|
+
setBusy(false);
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"data-testid": `${testId}-notify-send`,
|
|
467
|
+
children: labels.notify
|
|
468
|
+
}
|
|
469
|
+
),
|
|
470
|
+
sent && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: labels.notified })
|
|
471
|
+
] })
|
|
472
|
+
] });
|
|
473
|
+
}
|
|
183
474
|
function useConnectedShellWorkspaces(options = {}) {
|
|
184
|
-
const { workspaceId, setWorkspace } =
|
|
475
|
+
const { workspaceId, setWorkspace } = chunkMUMH3Z6K_cjs.useConnection();
|
|
185
476
|
const query = react$1.useWorkspaces();
|
|
186
477
|
return react$1.useShellWorkspaces({
|
|
187
478
|
...options,
|
|
@@ -206,7 +497,7 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
|
|
|
206
497
|
const updateProfile = react$1.useUpdateProfile();
|
|
207
498
|
const requestEmailChange = react$1.useRequestEmailChange();
|
|
208
499
|
const confirmEmailChange = react$1.useConfirmEmailChange();
|
|
209
|
-
const { user } =
|
|
500
|
+
const { user } = chunkMUMH3Z6K_cjs.useConnection();
|
|
210
501
|
const name = react$1.useNameEditor({
|
|
211
502
|
givenName: profile?.givenName,
|
|
212
503
|
familyName: profile?.familyName,
|
|
@@ -471,7 +762,7 @@ function ConnectedLogoutDialog({
|
|
|
471
762
|
isOnline = true,
|
|
472
763
|
renderSessionIcon
|
|
473
764
|
}) {
|
|
474
|
-
const { logout } =
|
|
765
|
+
const { logout } = chunkMUMH3Z6K_cjs.useConnection();
|
|
475
766
|
const sessions = react$1.useSessions({ enabled: open });
|
|
476
767
|
const logoutAll = react$1.useLogoutAllSessions();
|
|
477
768
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -497,7 +788,7 @@ function ConnectedLogoutDialog({
|
|
|
497
788
|
function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
498
789
|
const [zoneOpen, setZoneOpen] = react.useState(false);
|
|
499
790
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
500
|
-
const { user, logout } =
|
|
791
|
+
const { user, logout } = chunkMUMH3Z6K_cjs.useConnection();
|
|
501
792
|
const remove = react$1.useDeleteAccount();
|
|
502
793
|
const flow = react$1.useDeleteAccountFlow({
|
|
503
794
|
userEmail: user?.email ?? "",
|
|
@@ -547,7 +838,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
547
838
|
}
|
|
548
839
|
function useConnectedDocxNotifications(onOpen) {
|
|
549
840
|
const arbi = react$1.useArbi();
|
|
550
|
-
const { status, user, apiUrl } =
|
|
841
|
+
const { status, user, apiUrl } = chunkMUMH3Z6K_cjs.useConnection();
|
|
551
842
|
const queries = reactQuery.useQueryClient();
|
|
552
843
|
const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
|
|
553
844
|
const queryKey = ["docx-mentions", apiUrl, user?.externalId];
|
|
@@ -611,7 +902,7 @@ function useConnectedDocxNotifications(onOpen) {
|
|
|
611
902
|
};
|
|
612
903
|
}
|
|
613
904
|
function useConnectedWorkNotifications(onOpen) {
|
|
614
|
-
const { status, user, apiUrl } =
|
|
905
|
+
const { status, user, apiUrl } = chunkMUMH3Z6K_cjs.useConnection();
|
|
615
906
|
const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
|
|
616
907
|
const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
|
|
617
908
|
apiUrl,
|
|
@@ -780,51 +1071,51 @@ function ConnectedAgentChatPanel({
|
|
|
780
1071
|
|
|
781
1072
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
782
1073
|
enumerable: true,
|
|
783
|
-
get: function () { return
|
|
1074
|
+
get: function () { return chunkWOYUXVVQ_cjs.ConnectedAssistantDock; }
|
|
784
1075
|
});
|
|
785
1076
|
Object.defineProperty(exports, "redlineStats", {
|
|
786
1077
|
enumerable: true,
|
|
787
|
-
get: function () { return
|
|
1078
|
+
get: function () { return chunkWOYUXVVQ_cjs.redlineStats; }
|
|
788
1079
|
});
|
|
789
1080
|
Object.defineProperty(exports, "textToArtifact", {
|
|
790
1081
|
enumerable: true,
|
|
791
|
-
get: function () { return
|
|
1082
|
+
get: function () { return chunkWOYUXVVQ_cjs.textToArtifact; }
|
|
792
1083
|
});
|
|
793
1084
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
794
1085
|
enumerable: true,
|
|
795
|
-
get: function () { return
|
|
1086
|
+
get: function () { return chunkWOYUXVVQ_cjs.toRedlineMarkdown; }
|
|
796
1087
|
});
|
|
797
1088
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
798
1089
|
enumerable: true,
|
|
799
|
-
get: function () { return
|
|
1090
|
+
get: function () { return chunkWOYUXVVQ_cjs.useConnectedAiTask; }
|
|
800
1091
|
});
|
|
801
1092
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
802
1093
|
enumerable: true,
|
|
803
|
-
get: function () { return
|
|
1094
|
+
get: function () { return chunkWOYUXVVQ_cjs.useConnectedChat; }
|
|
804
1095
|
});
|
|
805
1096
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
806
1097
|
enumerable: true,
|
|
807
|
-
get: function () { return
|
|
1098
|
+
get: function () { return chunkWOYUXVVQ_cjs.useSemanticSearch; }
|
|
808
1099
|
});
|
|
809
1100
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
810
1101
|
enumerable: true,
|
|
811
|
-
get: function () { return
|
|
1102
|
+
get: function () { return chunkWOYUXVVQ_cjs.useWorkspaceDocs; }
|
|
812
1103
|
});
|
|
813
1104
|
Object.defineProperty(exports, "ConnectionProvider", {
|
|
814
1105
|
enumerable: true,
|
|
815
|
-
get: function () { return
|
|
1106
|
+
get: function () { return chunkMUMH3Z6K_cjs.ConnectionProvider; }
|
|
816
1107
|
});
|
|
817
1108
|
Object.defineProperty(exports, "SESSION_EXPIRED_MESSAGE", {
|
|
818
1109
|
enumerable: true,
|
|
819
|
-
get: function () { return
|
|
1110
|
+
get: function () { return chunkMUMH3Z6K_cjs.SESSION_EXPIRED_MESSAGE; }
|
|
820
1111
|
});
|
|
821
1112
|
Object.defineProperty(exports, "isAuthenticated", {
|
|
822
1113
|
enumerable: true,
|
|
823
|
-
get: function () { return
|
|
1114
|
+
get: function () { return chunkMUMH3Z6K_cjs.isAuthenticated; }
|
|
824
1115
|
});
|
|
825
1116
|
Object.defineProperty(exports, "useConnection", {
|
|
826
1117
|
enumerable: true,
|
|
827
|
-
get: function () { return
|
|
1118
|
+
get: function () { return chunkMUMH3Z6K_cjs.useConnection; }
|
|
828
1119
|
});
|
|
829
1120
|
exports.ArbiAppProvider = ArbiAppProvider;
|
|
830
1121
|
exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
|
|
@@ -838,6 +1129,8 @@ exports.ConnectedSecuritySection = ConnectedSecuritySection;
|
|
|
838
1129
|
exports.ConnectedSessionsRow = ConnectedSessionsRow;
|
|
839
1130
|
exports.ConnectedSkillUpload = ConnectedSkillUpload;
|
|
840
1131
|
exports.ConnectedTaskAccessRequest = ConnectedTaskAccessRequest;
|
|
1132
|
+
exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
|
|
1133
|
+
exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
|
|
841
1134
|
exports.StreamedArtifact = StreamedArtifact;
|
|
842
1135
|
exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
|
|
843
1136
|
exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
|