@arbidocs/blocks 0.4.80 → 0.4.81
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 +280 -280
- package/dist/agents/index.js +5 -5
- package/dist/agents/workflows/WorkflowRunner.d.ts +35 -3
- package/dist/agents/workflows/run.d.ts +10 -0
- package/dist/agents/workflows/types.d.ts +4 -2
- package/dist/chat/index.cjs +125 -125
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-MFDGNUKX.cjs → chunk-B3WCKBJ7.cjs} +3 -3
- package/dist/{chunk-MFDGNUKX.cjs.map → chunk-B3WCKBJ7.cjs.map} +1 -1
- package/dist/{chunk-2FEQGDW2.cjs → chunk-BX7JWZWE.cjs} +97 -5
- package/dist/chunk-BX7JWZWE.cjs.map +1 -0
- package/dist/{chunk-P5ST47VY.js → chunk-DDF5GPIJ.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-DDF5GPIJ.js.map} +1 -1
- package/dist/{chunk-PFA43QNX.js → chunk-EWSEQEPL.js} +3 -3
- package/dist/{chunk-PFA43QNX.js.map → chunk-EWSEQEPL.js.map} +1 -1
- package/dist/{chunk-LGDX34UR.cjs → chunk-F5WIETZY.cjs} +66 -51
- package/dist/chunk-F5WIETZY.cjs.map +1 -0
- package/dist/{chunk-E367ZUHE.js → chunk-GJV2G4FC.js} +3 -3
- package/dist/{chunk-E367ZUHE.js.map → chunk-GJV2G4FC.js.map} +1 -1
- package/dist/{chunk-A5WCK6ZG.js → chunk-I56ORHPY.js} +28 -13
- package/dist/chunk-I56ORHPY.js.map +1 -0
- package/dist/{chunk-LBE36YNZ.js → chunk-ICBAFX5B.js} +3 -3
- package/dist/{chunk-LBE36YNZ.js.map → chunk-ICBAFX5B.js.map} +1 -1
- package/dist/{chunk-C3DRLFU7.cjs → chunk-IF6VAYIA.cjs} +5 -5
- package/dist/{chunk-C3DRLFU7.cjs.map → chunk-IF6VAYIA.cjs.map} +1 -1
- package/dist/{chunk-O5NDG4EA.cjs → chunk-MP6FK43E.cjs} +3 -3
- package/dist/{chunk-O5NDG4EA.cjs.map → chunk-MP6FK43E.cjs.map} +1 -1
- package/dist/{chunk-QFA3NCWL.js → chunk-THCFZKTM.js} +95 -6
- package/dist/chunk-THCFZKTM.js.map +1 -0
- package/dist/{chunk-HUJLKDWX.cjs → chunk-XMBYDLZQ.cjs} +4 -4
- package/dist/{chunk-HUJLKDWX.cjs.map → chunk-XMBYDLZQ.cjs.map} +1 -1
- package/dist/{chunk-WDD255XQ.js → chunk-XQDM6T6C.js} +3 -3
- package/dist/{chunk-WDD255XQ.js.map → chunk-XQDM6T6C.js.map} +1 -1
- package/dist/{chunk-ZV3BKLFY.cjs → chunk-Z5VUZ6YD.cjs} +3 -3
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-Z5VUZ6YD.cjs.map} +1 -1
- package/dist/connect/index.cjs +154 -75
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +106 -27
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowRunner.d.ts +16 -5
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/files/index.cjs +2 -2
- package/dist/files/index.js +2 -2
- package/dist/home/index.cjs +18 -18
- package/dist/home/index.js +4 -4
- package/dist/index.cjs +503 -503
- package/dist/index.js +9 -9
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +35 -35
- package/dist/settings/index.js +2 -2
- 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 +4 -4
- package/dist/workflow-canvas/index.cjs +48 -48
- package/dist/workflow-canvas/index.js +5 -5
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-2FEQGDW2.cjs.map +0 -1
- package/dist/chunk-A5WCK6ZG.js.map +0 -1
- package/dist/chunk-LGDX34UR.cjs.map +0 -1
- package/dist/chunk-QFA3NCWL.js.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkB3WCKBJ7_cjs = require('../chunk-B3WCKBJ7.cjs');
|
|
5
|
+
var chunkXMBYDLZQ_cjs = require('../chunk-XMBYDLZQ.cjs');
|
|
6
6
|
var chunkTZR36PPP_cjs = require('../chunk-TZR36PPP.cjs');
|
|
7
7
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
8
8
|
var chunkZVBPRMHJ_cjs = require('../chunk-ZVBPRMHJ.cjs');
|
|
9
9
|
require('../chunk-7YUFMNFW.cjs');
|
|
10
10
|
var chunkUA2AMDR6_cjs = require('../chunk-UA2AMDR6.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
12
|
+
var chunkBX7JWZWE_cjs = require('../chunk-BX7JWZWE.cjs');
|
|
12
13
|
require('../chunk-DETZZBG2.cjs');
|
|
13
14
|
require('../chunk-7D737FLE.cjs');
|
|
14
|
-
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
15
15
|
require('../chunk-ADOKTJHV.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkMP6FK43E_cjs = require('../chunk-MP6FK43E.cjs');
|
|
17
17
|
require('../chunk-VGOFFCMT.cjs');
|
|
18
18
|
require('../chunk-B4SRYJLM.cjs');
|
|
19
19
|
require('../chunk-7UTB4PHM.cjs');
|
|
20
20
|
require('../chunk-PPCATBOY.cjs');
|
|
21
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
21
22
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
22
23
|
require('../chunk-MHVNT4J3.cjs');
|
|
23
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
24
24
|
require('../chunk-DES3K4SD.cjs');
|
|
25
25
|
var react = require('react');
|
|
26
26
|
var reactQuery = require('@tanstack/react-query');
|
|
@@ -190,7 +190,7 @@ function StreamedArtifact({
|
|
|
190
190
|
}
|
|
191
191
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
192
192
|
function formValues(step, inputs) {
|
|
193
|
-
const fields =
|
|
193
|
+
const fields = chunkBX7JWZWE_cjs.stepFields(step);
|
|
194
194
|
if (!fields.length) return void 0;
|
|
195
195
|
if (step.kind === "form")
|
|
196
196
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -225,10 +225,10 @@ function useAnswerRetry(missing, refetch) {
|
|
|
225
225
|
function useWorkflowThread(workflow, options = {}) {
|
|
226
226
|
const arbi = react$1.useArbi();
|
|
227
227
|
const { ensureWorkspaceOpen, status } = chunkMUMH3Z6K_cjs.useConnection();
|
|
228
|
-
const { wsId } =
|
|
228
|
+
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
229
229
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
230
230
|
const [localInputs, setLocalInputs] = react.useState(
|
|
231
|
-
() =>
|
|
231
|
+
() => chunkBX7JWZWE_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
232
232
|
);
|
|
233
233
|
const [edits, setEdits] = react.useState({});
|
|
234
234
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -248,12 +248,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
248
248
|
);
|
|
249
249
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
250
250
|
const steps = react.useMemo(
|
|
251
|
-
() =>
|
|
251
|
+
() => chunkBX7JWZWE_cjs.workflowSteps(workflow).length > 0 ? chunkBX7JWZWE_cjs.workflowSteps(workflow) : chunkBX7JWZWE_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
252
252
|
[workflow, conversation?.plan?.steps]
|
|
253
253
|
);
|
|
254
254
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
255
255
|
const serverStates = react.useMemo(
|
|
256
|
-
() =>
|
|
256
|
+
() => chunkBX7JWZWE_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
257
257
|
[activity.data]
|
|
258
258
|
);
|
|
259
259
|
const working = steps.some(
|
|
@@ -305,7 +305,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
305
305
|
if (!id) {
|
|
306
306
|
await ensureWorkspaceOpen();
|
|
307
307
|
const created = await createWork.mutateAsync({
|
|
308
|
-
title:
|
|
308
|
+
title: chunkBX7JWZWE_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
309
309
|
description: workflow.description || null,
|
|
310
310
|
prompt: null,
|
|
311
311
|
skill_ref: null,
|
|
@@ -317,7 +317,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
317
317
|
criteria: [],
|
|
318
318
|
max_passes: 3,
|
|
319
319
|
documents: [],
|
|
320
|
-
steps:
|
|
320
|
+
steps: chunkBX7JWZWE_cjs.toPlanSteps(workflow, {
|
|
321
321
|
inputs: values,
|
|
322
322
|
resolveWorkflow: options.resolveWorkflow,
|
|
323
323
|
compose: options.compose
|
|
@@ -372,7 +372,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
372
372
|
[threadId, act]
|
|
373
373
|
);
|
|
374
374
|
const loaded = !options.conversationId || activity.isSuccess || activity.isError;
|
|
375
|
-
const view =
|
|
375
|
+
const view = chunkBX7JWZWE_cjs.useWorkflowView({
|
|
376
376
|
steps,
|
|
377
377
|
states,
|
|
378
378
|
inputs,
|
|
@@ -412,7 +412,7 @@ function WorkflowRunThread({
|
|
|
412
412
|
if (listed && activeThreadId !== conversationId) selectThread(conversationId);
|
|
413
413
|
}, [listed, activeThreadId, conversationId, selectThread]);
|
|
414
414
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
415
|
-
|
|
415
|
+
chunkMP6FK43E_cjs.ChatPage,
|
|
416
416
|
{
|
|
417
417
|
chat: { ...chat, threads: chat.threads.filter((t) => t.id === conversationId) },
|
|
418
418
|
singleThread: true,
|
|
@@ -444,7 +444,7 @@ function WorkflowSignDialog({
|
|
|
444
444
|
const arbi = react$1.useArbi();
|
|
445
445
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
446
446
|
const tools = documentTools.useOptionalDocumentTools();
|
|
447
|
-
const { id, version } =
|
|
447
|
+
const { id, version } = chunkBX7JWZWE_cjs.splitDocRef(docRef);
|
|
448
448
|
const [pdf, setPdf] = react.useState(null);
|
|
449
449
|
const [failed, setFailed] = react.useState(false);
|
|
450
450
|
react.useEffect(() => {
|
|
@@ -496,7 +496,7 @@ function WorkflowWordDialog({
|
|
|
496
496
|
onClose,
|
|
497
497
|
labels
|
|
498
498
|
}) {
|
|
499
|
-
const { id } =
|
|
499
|
+
const { id } = chunkBX7JWZWE_cjs.splitDocRef(docRef);
|
|
500
500
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
501
501
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
502
502
|
{
|
|
@@ -593,6 +593,7 @@ function ConnectedWorkflowRunner({
|
|
|
593
593
|
emptyHint,
|
|
594
594
|
connectedLabels,
|
|
595
595
|
onOpenDocument,
|
|
596
|
+
onOpenCitation,
|
|
596
597
|
onOpenDraft,
|
|
597
598
|
onOpenMessage,
|
|
598
599
|
actions: hostActions,
|
|
@@ -606,10 +607,11 @@ function ConnectedWorkflowRunner({
|
|
|
606
607
|
const dl = { ...DEFAULT_WORKFLOW_RUNNER_DIALOG_LABELS, ...dialogLabels };
|
|
607
608
|
const arbi = react$1.useArbi();
|
|
608
609
|
const { ensureWorkspaceOpen, user } = chunkMUMH3Z6K_cjs.useConnection();
|
|
609
|
-
const { wsId } =
|
|
610
|
+
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
610
611
|
const { data: docs = [], refetch } = react$1.useDocuments(wsId);
|
|
611
|
-
const [
|
|
612
|
+
const [sending, setSending] = react.useState([]);
|
|
612
613
|
const [added, setAdded] = react.useState({});
|
|
614
|
+
const [addedNames, setAddedNames] = react.useState({});
|
|
613
615
|
const addedRef = react.useRef(added);
|
|
614
616
|
addedRef.current = added;
|
|
615
617
|
const { view, conversationId, people } = useWorkflowThread(workflow, {
|
|
@@ -628,7 +630,7 @@ function ConnectedWorkflowRunner({
|
|
|
628
630
|
() => ({
|
|
629
631
|
me: user?.externalId,
|
|
630
632
|
openDocument: onOpenDocument && ((ref) => {
|
|
631
|
-
const { id, version } =
|
|
633
|
+
const { id, version } = chunkBX7JWZWE_cjs.splitDocRef(ref);
|
|
632
634
|
onOpenDocument(id, version);
|
|
633
635
|
}),
|
|
634
636
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -638,29 +640,91 @@ function ConnectedWorkflowRunner({
|
|
|
638
640
|
const w = state.waiting;
|
|
639
641
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
640
642
|
}),
|
|
641
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
643
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkBX7JWZWE_cjs.splitDocRef(ref).id) ?? "" })),
|
|
642
644
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
643
645
|
}),
|
|
644
646
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
645
647
|
);
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
const openCitation = react.useMemo(
|
|
649
|
+
() => onOpenCitation ?? (onOpenDocument && ((t) => {
|
|
650
|
+
const docId = t.documentId ?? t.passage?.documentId;
|
|
651
|
+
if (docId) onOpenDocument(docId, void 0, t.page ?? t.passage?.page ?? void 0);
|
|
652
|
+
})),
|
|
653
|
+
[onOpenCitation, onOpenDocument]
|
|
654
|
+
);
|
|
655
|
+
const uploadSeq = react.useRef(0);
|
|
656
|
+
const sendingRef = react.useRef(sending);
|
|
657
|
+
sendingRef.current = sending;
|
|
658
|
+
const send = react.useCallback(
|
|
659
|
+
async (batch) => {
|
|
660
|
+
if (!batch.length) return;
|
|
661
|
+
const keys = new Set(batch.map((p) => p.key));
|
|
662
|
+
const mark = (key, patch) => setSending(
|
|
663
|
+
(all) => patch === null ? all.filter((p) => p.key !== key) : all.map((p) => p.key === key ? { ...p, ...patch } : p)
|
|
664
|
+
);
|
|
665
|
+
setSending((all) => [
|
|
666
|
+
...all.filter((p) => !keys.has(p.key)),
|
|
667
|
+
...batch.map((p) => ({ ...p, status: "uploading", error: void 0 }))
|
|
668
|
+
]);
|
|
650
669
|
try {
|
|
651
670
|
await ensureWorkspaceOpen();
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
671
|
+
} catch (e) {
|
|
672
|
+
for (const p of batch) mark(p.key, { status: "failed", error: uploadError(e) });
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
675
|
+
for (const p of batch) {
|
|
676
|
+
try {
|
|
677
|
+
const { doc_ext_ids = [] } = await arbi.documents.uploadFile(p.file, p.file.name) ?? {};
|
|
678
|
+
if (!doc_ext_ids.length) throw new Error("No document came back");
|
|
679
|
+
setAdded((a) => ({
|
|
680
|
+
...a,
|
|
681
|
+
...Object.fromEntries(doc_ext_ids.map((id) => [id, p.stepId]))
|
|
682
|
+
}));
|
|
683
|
+
setAddedNames((n) => ({
|
|
684
|
+
...n,
|
|
685
|
+
...Object.fromEntries(doc_ext_ids.map((id) => [id, p.file.name]))
|
|
686
|
+
}));
|
|
687
|
+
mark(p.key, null);
|
|
688
|
+
} catch (e) {
|
|
689
|
+
mark(p.key, { status: "failed", error: uploadError(e) });
|
|
655
690
|
}
|
|
656
|
-
await refetch();
|
|
657
|
-
} finally {
|
|
658
|
-
setUploading(false);
|
|
659
691
|
}
|
|
692
|
+
await refetch();
|
|
660
693
|
},
|
|
661
694
|
[arbi, ensureWorkspaceOpen, refetch]
|
|
662
695
|
);
|
|
663
|
-
const
|
|
696
|
+
const onUpload = react.useCallback(
|
|
697
|
+
(files2, step) => send(
|
|
698
|
+
files2.map((file) => ({
|
|
699
|
+
key: `upload-${++uploadSeq.current}`,
|
|
700
|
+
file,
|
|
701
|
+
stepId: step.id,
|
|
702
|
+
status: "uploading"
|
|
703
|
+
}))
|
|
704
|
+
),
|
|
705
|
+
[send]
|
|
706
|
+
);
|
|
707
|
+
const onRetryUpload = react.useCallback(
|
|
708
|
+
(file) => {
|
|
709
|
+
const p = sendingRef.current.find((x) => x.key === file.id);
|
|
710
|
+
if (p) void send([p]);
|
|
711
|
+
},
|
|
712
|
+
[send]
|
|
713
|
+
);
|
|
714
|
+
const onRemoveUpload = react.useCallback(
|
|
715
|
+
(file) => setSending((all) => all.filter((p) => p.key !== file.id)),
|
|
716
|
+
[]
|
|
717
|
+
);
|
|
718
|
+
const files = [
|
|
719
|
+
...sending.map((p) => ({
|
|
720
|
+
id: p.key,
|
|
721
|
+
name: p.file.name,
|
|
722
|
+
status: p.status === "failed" ? "upload-failed" : "uploading",
|
|
723
|
+
error: p.error,
|
|
724
|
+
addedFor: p.stepId
|
|
725
|
+
})),
|
|
726
|
+
...runnerFiles(docs, added, fileFilter, addedNames)
|
|
727
|
+
];
|
|
664
728
|
const reading = files.some((f) => f.addedFor && f.status === "processing");
|
|
665
729
|
react.useEffect(() => {
|
|
666
730
|
if (!reading) return;
|
|
@@ -712,7 +776,7 @@ function ConnectedWorkflowRunner({
|
|
|
712
776
|
);
|
|
713
777
|
};
|
|
714
778
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
715
|
-
|
|
779
|
+
chunkBX7JWZWE_cjs.WorkflowRunner,
|
|
716
780
|
{
|
|
717
781
|
people,
|
|
718
782
|
...runnerProps,
|
|
@@ -729,8 +793,10 @@ function ConnectedWorkflowRunner({
|
|
|
729
793
|
}
|
|
730
794
|
) : null,
|
|
731
795
|
onUpload,
|
|
732
|
-
uploading,
|
|
796
|
+
uploading: sending.some((p) => p.status === "uploading"),
|
|
733
797
|
files,
|
|
798
|
+
onRetryUpload,
|
|
799
|
+
onRemoveUpload,
|
|
734
800
|
actions,
|
|
735
801
|
nameOfDoc,
|
|
736
802
|
testIdPrefix,
|
|
@@ -756,10 +822,10 @@ function ConnectedWorkflowRunner({
|
|
|
756
822
|
) }),
|
|
757
823
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
758
824
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
-
|
|
825
|
+
chunkBX7JWZWE_cjs.WorkflowStepBar,
|
|
760
826
|
{
|
|
761
827
|
run: view,
|
|
762
|
-
levels:
|
|
828
|
+
levels: chunkBX7JWZWE_cjs.stepLevels(view.steps),
|
|
763
829
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
764
830
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
765
831
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -772,6 +838,7 @@ function ConnectedWorkflowRunner({
|
|
|
772
838
|
workspaceId: wsId,
|
|
773
839
|
stepTitle: (id) => view.steps.find((s) => s.id === id)?.title,
|
|
774
840
|
targetMessageId: target,
|
|
841
|
+
onOpenCitation: openCitation,
|
|
775
842
|
labels: { workflows: l.currentStep },
|
|
776
843
|
aside: runner(true)
|
|
777
844
|
}
|
|
@@ -800,13 +867,25 @@ function ConnectedWorkflowRunner({
|
|
|
800
867
|
] });
|
|
801
868
|
}
|
|
802
869
|
var READ_POLL_MS = 3e3;
|
|
803
|
-
function
|
|
804
|
-
return
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
870
|
+
function uploadError(e) {
|
|
871
|
+
return e instanceof Error && e.message ? e.message : String(e || "Upload failed");
|
|
872
|
+
}
|
|
873
|
+
function runnerFiles(docs, added, fileFilter, names = {}) {
|
|
874
|
+
const listed = new Set(docs.map((d) => d.external_id));
|
|
875
|
+
return [
|
|
876
|
+
...docs.filter((d) => !fileFilter || added[d.external_id] || fileFilter(d)).map((d) => ({
|
|
877
|
+
id: d.external_id,
|
|
878
|
+
name: d.file_name ?? d.external_id,
|
|
879
|
+
status: fileStatus(d.status),
|
|
880
|
+
addedFor: added[d.external_id]
|
|
881
|
+
})),
|
|
882
|
+
...Object.entries(added).filter(([id]) => !listed.has(id)).map(([id, stepId]) => ({
|
|
883
|
+
id,
|
|
884
|
+
name: names[id] ?? id,
|
|
885
|
+
status: "processing",
|
|
886
|
+
addedFor: stepId
|
|
887
|
+
}))
|
|
888
|
+
];
|
|
810
889
|
}
|
|
811
890
|
function fileStatus(status) {
|
|
812
891
|
const s = status?.toLowerCase();
|
|
@@ -1024,12 +1103,12 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
|
|
|
1024
1103
|
}
|
|
1025
1104
|
});
|
|
1026
1105
|
const display = profile?.fullName || user?.name || "Unnamed";
|
|
1027
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
-
|
|
1106
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1107
|
+
chunkB3WCKBJ7_cjs.ProfileCard,
|
|
1029
1108
|
{
|
|
1030
1109
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1031
1110
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1032
|
-
|
|
1111
|
+
chunkB3WCKBJ7_cjs.AvatarPicker,
|
|
1033
1112
|
{
|
|
1034
1113
|
pictureUrl: profile?.picture ?? user?.picture,
|
|
1035
1114
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -1071,9 +1150,9 @@ function ConnectedIdentityVerification({
|
|
|
1071
1150
|
onNameAccepted: () => notify3?.("Name updated to match your ID", "success")
|
|
1072
1151
|
});
|
|
1073
1152
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1153
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.IdentityVerificationCard, { flow, labels }),
|
|
1075
1154
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1076
|
-
|
|
1155
|
+
chunkB3WCKBJ7_cjs.IdentityVerificationDialog,
|
|
1077
1156
|
{
|
|
1078
1157
|
flow,
|
|
1079
1158
|
accountName: profile?.fullName ?? "",
|
|
@@ -1085,7 +1164,7 @@ function ConnectedIdentityVerification({
|
|
|
1085
1164
|
function ConnectedRequireVerified({ children, labels }) {
|
|
1086
1165
|
const { data: profile } = react$1.useProfile();
|
|
1087
1166
|
const flow = react$1.useIdentityVerification();
|
|
1088
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1167
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
1089
1168
|
}
|
|
1090
1169
|
function defaultUnmetPasswordRequirement(password) {
|
|
1091
1170
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -1114,10 +1193,10 @@ function ConnectedSecuritySection({
|
|
|
1114
1193
|
},
|
|
1115
1194
|
onClose: () => setOpen(false)
|
|
1116
1195
|
});
|
|
1117
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1118
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1196
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkB3WCKBJ7_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
1197
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkB3WCKBJ7_cjs.SettingsCard, { padding: "sm", children: [
|
|
1119
1198
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1120
|
-
|
|
1199
|
+
chunkB3WCKBJ7_cjs.SettingsActionRow,
|
|
1121
1200
|
{
|
|
1122
1201
|
title: "Change password",
|
|
1123
1202
|
description: "Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.",
|
|
@@ -1128,7 +1207,7 @@ function ConnectedSecuritySection({
|
|
|
1128
1207
|
children
|
|
1129
1208
|
] }),
|
|
1130
1209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1131
|
-
|
|
1210
|
+
chunkB3WCKBJ7_cjs.PasswordChangeDialog,
|
|
1132
1211
|
{
|
|
1133
1212
|
open,
|
|
1134
1213
|
onClose: form.onCancel,
|
|
@@ -1152,23 +1231,23 @@ function ConnectedSecuritySection({
|
|
|
1152
1231
|
] });
|
|
1153
1232
|
}
|
|
1154
1233
|
function ConnectedNotificationPreferences({
|
|
1155
|
-
categories =
|
|
1234
|
+
categories = chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
1156
1235
|
title = "Notifications"
|
|
1157
1236
|
}) {
|
|
1158
1237
|
const keys = react.useMemo(
|
|
1159
|
-
() => categories ===
|
|
1238
|
+
() => categories === chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkB3WCKBJ7_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
1160
1239
|
[categories]
|
|
1161
1240
|
);
|
|
1162
1241
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
1163
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1164
|
-
|
|
1242
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkB3WCKBJ7_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
chunkB3WCKBJ7_cjs.NotificationCategoryList,
|
|
1165
1244
|
{
|
|
1166
1245
|
masterId: "emailNotifications",
|
|
1167
1246
|
masterTitle: "Email Notifications",
|
|
1168
1247
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
1169
1248
|
masterChecked: prefs.masterChecked,
|
|
1170
1249
|
onMasterChange: prefs.setAll,
|
|
1171
|
-
categories:
|
|
1250
|
+
categories: chunkB3WCKBJ7_cjs.toNotificationCategories(prefs.checked, categories),
|
|
1172
1251
|
onCategoryChange: prefs.setCategory
|
|
1173
1252
|
}
|
|
1174
1253
|
) }) });
|
|
@@ -1182,14 +1261,14 @@ function ConnectedSessionsRow({
|
|
|
1182
1261
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1183
1262
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
1184
1263
|
const terminate = react$1.useTerminateSession();
|
|
1185
|
-
const views =
|
|
1264
|
+
const views = chunkB3WCKBJ7_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
1186
1265
|
currentSessionId,
|
|
1187
1266
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
1188
1267
|
renderIcon: renderSessionIcon
|
|
1189
1268
|
});
|
|
1190
1269
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1191
1270
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1192
|
-
|
|
1271
|
+
chunkB3WCKBJ7_cjs.SettingsRow,
|
|
1193
1272
|
{
|
|
1194
1273
|
label: "Active sessions",
|
|
1195
1274
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -1211,7 +1290,7 @@ function ConnectedSessionsRow({
|
|
|
1211
1290
|
}
|
|
1212
1291
|
),
|
|
1213
1292
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1214
|
-
|
|
1293
|
+
chunkB3WCKBJ7_cjs.ActiveSessionsDialog,
|
|
1215
1294
|
{
|
|
1216
1295
|
open,
|
|
1217
1296
|
onOpenChange: setOpen,
|
|
@@ -1246,7 +1325,7 @@ function ConnectedLogoutDialog({
|
|
|
1246
1325
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1247
1326
|
const logoutAll = react$1.useLogoutAllSessions();
|
|
1248
1327
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1249
|
-
|
|
1328
|
+
chunkB3WCKBJ7_cjs.LogoutDialog,
|
|
1250
1329
|
{
|
|
1251
1330
|
open,
|
|
1252
1331
|
onClose,
|
|
@@ -1260,7 +1339,7 @@ function ConnectedLogoutDialog({
|
|
|
1260
1339
|
},
|
|
1261
1340
|
canLogoutAll: true,
|
|
1262
1341
|
isOnline,
|
|
1263
|
-
sessions:
|
|
1342
|
+
sessions: chunkB3WCKBJ7_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
1264
1343
|
renderSessionIcon
|
|
1265
1344
|
}
|
|
1266
1345
|
);
|
|
@@ -1279,7 +1358,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1279
1358
|
});
|
|
1280
1359
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1281
1360
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1282
|
-
|
|
1361
|
+
chunkB3WCKBJ7_cjs.SettingsDangerZone,
|
|
1283
1362
|
{
|
|
1284
1363
|
isOpen: zoneOpen,
|
|
1285
1364
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -1299,12 +1378,12 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1299
1378
|
}
|
|
1300
1379
|
),
|
|
1301
1380
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1302
|
-
|
|
1381
|
+
chunkB3WCKBJ7_cjs.DeleteAccountDialog,
|
|
1303
1382
|
{
|
|
1304
1383
|
open: dialogOpen,
|
|
1305
1384
|
onClose: flow.onClose,
|
|
1306
1385
|
step: flow.step,
|
|
1307
|
-
blockers:
|
|
1386
|
+
blockers: chunkB3WCKBJ7_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
1308
1387
|
onContinue: flow.onContinue,
|
|
1309
1388
|
onBack: flow.onBack,
|
|
1310
1389
|
userEmail: user?.email ?? "",
|
|
@@ -1489,7 +1568,7 @@ function mapWorkNotification(note) {
|
|
|
1489
1568
|
function ActiveChat({ agentId, workspaceId }) {
|
|
1490
1569
|
const chat = react$1.useArbiChat({ agentId, workspaceId });
|
|
1491
1570
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1492
|
-
|
|
1571
|
+
chunkMP6FK43E_cjs.ChatPage,
|
|
1493
1572
|
{
|
|
1494
1573
|
chat: { ...chat, assistantMode: void 0, setAssistantMode: void 0 },
|
|
1495
1574
|
documentsRequired: false,
|
|
@@ -1551,35 +1630,35 @@ function ConnectedAgentChatPanel({
|
|
|
1551
1630
|
|
|
1552
1631
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
1553
1632
|
enumerable: true,
|
|
1554
|
-
get: function () { return
|
|
1633
|
+
get: function () { return chunkXMBYDLZQ_cjs.ConnectedAssistantDock; }
|
|
1555
1634
|
});
|
|
1556
1635
|
Object.defineProperty(exports, "redlineStats", {
|
|
1557
1636
|
enumerable: true,
|
|
1558
|
-
get: function () { return
|
|
1637
|
+
get: function () { return chunkXMBYDLZQ_cjs.redlineStats; }
|
|
1559
1638
|
});
|
|
1560
1639
|
Object.defineProperty(exports, "textToArtifact", {
|
|
1561
1640
|
enumerable: true,
|
|
1562
|
-
get: function () { return
|
|
1641
|
+
get: function () { return chunkXMBYDLZQ_cjs.textToArtifact; }
|
|
1563
1642
|
});
|
|
1564
1643
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
1565
1644
|
enumerable: true,
|
|
1566
|
-
get: function () { return
|
|
1645
|
+
get: function () { return chunkXMBYDLZQ_cjs.toRedlineMarkdown; }
|
|
1567
1646
|
});
|
|
1568
1647
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
1569
1648
|
enumerable: true,
|
|
1570
|
-
get: function () { return
|
|
1649
|
+
get: function () { return chunkXMBYDLZQ_cjs.useConnectedAiTask; }
|
|
1571
1650
|
});
|
|
1572
1651
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
1573
1652
|
enumerable: true,
|
|
1574
|
-
get: function () { return
|
|
1653
|
+
get: function () { return chunkXMBYDLZQ_cjs.useConnectedChat; }
|
|
1575
1654
|
});
|
|
1576
1655
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
1577
1656
|
enumerable: true,
|
|
1578
|
-
get: function () { return
|
|
1657
|
+
get: function () { return chunkXMBYDLZQ_cjs.useSemanticSearch; }
|
|
1579
1658
|
});
|
|
1580
1659
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
1581
1660
|
enumerable: true,
|
|
1582
|
-
get: function () { return
|
|
1661
|
+
get: function () { return chunkXMBYDLZQ_cjs.useWorkspaceDocs; }
|
|
1583
1662
|
});
|
|
1584
1663
|
Object.defineProperty(exports, "ConnectionProvider", {
|
|
1585
1664
|
enumerable: true,
|