@arbidocs/blocks 0.5.147 → 0.5.149
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/{ConnectedCallDock-6VGATAAQ.cjs → ConnectedCallDock-EASMNJXB.cjs} +20 -20
- package/dist/{ConnectedCallDock-6VGATAAQ.cjs.map → ConnectedCallDock-EASMNJXB.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-YBNERVTW.cjs → ConnectedCallRoom-BWZ2FHXN.cjs} +19 -19
- package/dist/{ConnectedCallRoom-YBNERVTW.cjs.map → ConnectedCallRoom-BWZ2FHXN.cjs.map} +1 -1
- package/dist/{ConnectedMailInviteCard-AJI7JZYJ.cjs → ConnectedMailInviteCard-ITMZRPIP.cjs} +5 -5
- package/dist/{ConnectedMailInviteCard-AJI7JZYJ.cjs.map → ConnectedMailInviteCard-ITMZRPIP.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-MG54YLSO.cjs → ConnectedNativeDocxComparison-4FAJDXPT.cjs} +22 -21
- package/dist/{ConnectedNativeDocxComparison-MG54YLSO.cjs.map → ConnectedNativeDocxComparison-4FAJDXPT.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-JZQFTC5H.cjs → ConnectedPresentation-EIWVV7ON.cjs} +22 -22
- package/dist/{ConnectedPresentation-JZQFTC5H.cjs.map → ConnectedPresentation-EIWVV7ON.cjs.map} +1 -1
- package/dist/{ConnectedProductionSetDialog-EOWZQ6J3.cjs → ConnectedProductionSetDialog-SDHD5KTG.cjs} +9 -9
- package/dist/{ConnectedProductionSetDialog-EOWZQ6J3.cjs.map → ConnectedProductionSetDialog-SDHD5KTG.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-BLR762KY.cjs → ConnectedSlidesTab-4FN5ZRRI.cjs} +21 -21
- package/dist/{ConnectedSlidesTab-BLR762KY.cjs.map → ConnectedSlidesTab-4FN5ZRRI.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-7KZGQECL.cjs → ConnectedStreamedWordArtifact-D7EZFIJ7.cjs} +22 -21
- package/dist/{ConnectedStreamedWordArtifact-7KZGQECL.cjs.map → ConnectedStreamedWordArtifact-D7EZFIJ7.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-UDC4PNIS.cjs → DocumentReviewCard-7MVNPVZC.cjs} +24 -24
- package/dist/{DocumentReviewCard-UDC4PNIS.cjs.map → DocumentReviewCard-7MVNPVZC.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-D5GHWK4Y.cjs → FilesViewerDialog-6363IOTL.cjs} +47 -47
- package/dist/{FilesViewerDialog-D5GHWK4Y.cjs.map → FilesViewerDialog-6363IOTL.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-2NRV4CWP.cjs → WorkspaceTableView-HHATEV2H.cjs} +10 -10
- package/dist/{WorkspaceTableView-2NRV4CWP.cjs.map → WorkspaceTableView-HHATEV2H.cjs.map} +1 -1
- package/dist/agents/index.cjs +398 -378
- package/dist/agents/tasks/WorkflowsTable.d.ts +5 -0
- package/dist/agents/tasks/WorkflowsTable.js +38 -7
- package/dist/agents/tasks/WorkflowsTable.js.map +2 -2
- package/dist/agents/tasks/workflowTableLabels.d.ts +2 -0
- package/dist/agents/tasks/workflowTableLabels.js +2 -1
- package/dist/agents/tasks/workflowTableLabels.js.map +2 -2
- package/dist/agents/workflows/StepParts.d.ts +4 -0
- package/dist/agents/workflows/StepParts.js +6 -1
- package/dist/agents/workflows/StepParts.js.map +2 -2
- package/dist/agents/workflows/index.d.ts +2 -2
- package/dist/agents/workflows/index.js +11 -1
- package/dist/agents/workflows/index.js.map +2 -2
- package/dist/agents/workflows/planSteps.d.ts +10 -1
- package/dist/agents/workflows/planSteps.js +34 -0
- package/dist/agents/workflows/planSteps.js.map +2 -2
- package/dist/agents/workflows/requiredLabels.d.ts +10 -0
- package/dist/agents/workflows/requiredLabels.js +14 -1
- package/dist/agents/workflows/requiredLabels.js.map +2 -2
- package/dist/agents/workflows/run.d.ts +1 -1
- package/dist/agents/workflows/run.js +2 -0
- package/dist/agents/workflows/run.js.map +2 -2
- package/dist/agents/workflows/stepKinds.d.ts +6 -2
- package/dist/agents/workflows/stepKinds.js +15 -3
- package/dist/agents/workflows/stepKinds.js.map +2 -2
- package/dist/agents/workflows/types.d.ts +26 -1
- package/dist/agents/workflows/types.js.map +1 -1
- package/dist/{ai-VLIPYNWP.cjs → ai-NC4ZE3UT.cjs} +30 -30
- package/dist/ai-NC4ZE3UT.cjs.map +1 -0
- package/dist/auth/index.cjs +1 -1
- package/dist/calls/index.cjs +50 -50
- package/dist/chat/index.cjs +80 -80
- package/dist/{chunk-AYWY4MX2.cjs → chunk-2E5AODIC.cjs} +28 -28
- package/dist/{chunk-AYWY4MX2.cjs.map → chunk-2E5AODIC.cjs.map} +1 -1
- package/dist/{chunk-XZMYSDU4.cjs → chunk-2XZJBPBV.cjs} +4 -4
- package/dist/{chunk-XZMYSDU4.cjs.map → chunk-2XZJBPBV.cjs.map} +1 -1
- package/dist/{chunk-ORGGDQKZ.cjs → chunk-2ZH4KVAZ.cjs} +40 -40
- package/dist/{chunk-ORGGDQKZ.cjs.map → chunk-2ZH4KVAZ.cjs.map} +1 -1
- package/dist/{chunk-EYXU32D7.cjs → chunk-3WXAGCUL.cjs} +6 -6
- package/dist/{chunk-EYXU32D7.cjs.map → chunk-3WXAGCUL.cjs.map} +1 -1
- package/dist/{chunk-57LUHZLV.cjs → chunk-43D2KKWT.cjs} +8 -8
- package/dist/{chunk-57LUHZLV.cjs.map → chunk-43D2KKWT.cjs.map} +1 -1
- package/dist/{chunk-L5Q5PDTA.cjs → chunk-43GIESOM.cjs} +4 -4
- package/dist/{chunk-L5Q5PDTA.cjs.map → chunk-43GIESOM.cjs.map} +1 -1
- package/dist/{chunk-ONRUHYW3.cjs → chunk-47NBCI3E.cjs} +4 -4
- package/dist/{chunk-ONRUHYW3.cjs.map → chunk-47NBCI3E.cjs.map} +1 -1
- package/dist/{chunk-MEWRE43W.cjs → chunk-54Y4LWTA.cjs} +107 -101
- package/dist/chunk-54Y4LWTA.cjs.map +1 -0
- package/dist/{chunk-LCIMYEGX.cjs → chunk-5QEPUONH.cjs} +9 -9
- package/dist/{chunk-LCIMYEGX.cjs.map → chunk-5QEPUONH.cjs.map} +1 -1
- package/dist/{chunk-K3ZZ6IH3.cjs → chunk-6IS6TZ7F.cjs} +4 -4
- package/dist/{chunk-K3ZZ6IH3.cjs.map → chunk-6IS6TZ7F.cjs.map} +1 -1
- package/dist/{chunk-C6RJQQLG.cjs → chunk-6KT6BEP4.cjs} +10 -10
- package/dist/{chunk-C6RJQQLG.cjs.map → chunk-6KT6BEP4.cjs.map} +1 -1
- package/dist/{chunk-OA3AN6WW.cjs → chunk-7KSOMWCS.cjs} +4 -4
- package/dist/{chunk-OA3AN6WW.cjs.map → chunk-7KSOMWCS.cjs.map} +1 -1
- package/dist/{chunk-KMOIE2XH.cjs → chunk-7XR6CPCU.cjs} +10 -8
- package/dist/chunk-7XR6CPCU.cjs.map +1 -0
- package/dist/{chunk-MC34TXSS.cjs → chunk-A5ZNAZ7Q.cjs} +17 -17
- package/dist/{chunk-MC34TXSS.cjs.map → chunk-A5ZNAZ7Q.cjs.map} +1 -1
- package/dist/{chunk-ZOU6K6DD.cjs → chunk-AN4YKCBD.cjs} +4 -4
- package/dist/{chunk-ZOU6K6DD.cjs.map → chunk-AN4YKCBD.cjs.map} +1 -1
- package/dist/{chunk-JZQ47OW5.cjs → chunk-C36NH6PR.cjs} +6 -6
- package/dist/{chunk-JZQ47OW5.cjs.map → chunk-C36NH6PR.cjs.map} +1 -1
- package/dist/{chunk-OXPIJYRU.cjs → chunk-C7EGCNLV.cjs} +86 -86
- package/dist/{chunk-OXPIJYRU.cjs.map → chunk-C7EGCNLV.cjs.map} +1 -1
- package/dist/{chunk-LZQ2XZOC.cjs → chunk-CFJAWCVX.cjs} +29 -29
- package/dist/{chunk-LZQ2XZOC.cjs.map → chunk-CFJAWCVX.cjs.map} +1 -1
- package/dist/{chunk-HWZT24TD.cjs → chunk-CRN64MYK.cjs} +165 -75
- package/dist/chunk-CRN64MYK.cjs.map +1 -0
- package/dist/{chunk-UNWDR6GG.cjs → chunk-DHQH4EYB.cjs} +4 -4
- package/dist/{chunk-UNWDR6GG.cjs.map → chunk-DHQH4EYB.cjs.map} +1 -1
- package/dist/{chunk-SD7GUB44.cjs → chunk-F4ULSAOA.cjs} +4 -4
- package/dist/{chunk-SD7GUB44.cjs.map → chunk-F4ULSAOA.cjs.map} +1 -1
- package/dist/{chunk-2VEQKLNN.cjs → chunk-FHNWK5RO.cjs} +8 -8
- package/dist/{chunk-2VEQKLNN.cjs.map → chunk-FHNWK5RO.cjs.map} +1 -1
- package/dist/{chunk-ZM6B5WJW.cjs → chunk-FPSHZW4W.cjs} +4 -4
- package/dist/{chunk-ZM6B5WJW.cjs.map → chunk-FPSHZW4W.cjs.map} +1 -1
- package/dist/{chunk-GAA222SK.cjs → chunk-FZASPI2Q.cjs} +5 -5
- package/dist/{chunk-GAA222SK.cjs.map → chunk-FZASPI2Q.cjs.map} +1 -1
- package/dist/{chunk-OUGRCQM7.cjs → chunk-GAVQFR6P.cjs} +4 -4
- package/dist/{chunk-OUGRCQM7.cjs.map → chunk-GAVQFR6P.cjs.map} +1 -1
- package/dist/{chunk-VCDD763Y.cjs → chunk-GPP7E3OQ.cjs} +4 -4
- package/dist/{chunk-VCDD763Y.cjs.map → chunk-GPP7E3OQ.cjs.map} +1 -1
- package/dist/{chunk-VLHBKF4P.cjs → chunk-H5ITWXUA.cjs} +5 -5
- package/dist/{chunk-VLHBKF4P.cjs.map → chunk-H5ITWXUA.cjs.map} +1 -1
- package/dist/{chunk-AGL7Z6Y2.cjs → chunk-H7SGZN33.cjs} +21 -21
- package/dist/{chunk-AGL7Z6Y2.cjs.map → chunk-H7SGZN33.cjs.map} +1 -1
- package/dist/{chunk-WNAZM2YS.cjs → chunk-HZF3YPEG.cjs} +4 -4
- package/dist/{chunk-WNAZM2YS.cjs.map → chunk-HZF3YPEG.cjs.map} +1 -1
- package/dist/{chunk-VF26CUE3.cjs → chunk-IIOFQKQV.cjs} +28 -28
- package/dist/{chunk-VF26CUE3.cjs.map → chunk-IIOFQKQV.cjs.map} +1 -1
- package/dist/{chunk-7AULM6LS.cjs → chunk-J5YEEWZT.cjs} +7 -7
- package/dist/{chunk-7AULM6LS.cjs.map → chunk-J5YEEWZT.cjs.map} +1 -1
- package/dist/{chunk-73ECBDG7.cjs → chunk-JARBYN6Z.cjs} +48 -14
- package/dist/chunk-JARBYN6Z.cjs.map +1 -0
- package/dist/{chunk-YZ25NAR3.cjs → chunk-JARRHAQW.cjs} +17 -17
- package/dist/{chunk-YZ25NAR3.cjs.map → chunk-JARRHAQW.cjs.map} +1 -1
- package/dist/{chunk-6THN5ZGA.cjs → chunk-JOYB727S.cjs} +4 -4
- package/dist/{chunk-6THN5ZGA.cjs.map → chunk-JOYB727S.cjs.map} +1 -1
- package/dist/{chunk-ECSOXKJQ.cjs → chunk-JZWLIOTP.cjs} +6 -6
- package/dist/{chunk-ECSOXKJQ.cjs.map → chunk-JZWLIOTP.cjs.map} +1 -1
- package/dist/{chunk-ZCVW63DF.cjs → chunk-LXQMTVAB.cjs} +15 -15
- package/dist/{chunk-ZCVW63DF.cjs.map → chunk-LXQMTVAB.cjs.map} +1 -1
- package/dist/{chunk-7D4WXUBS.cjs → chunk-M55XUF4L.cjs} +7 -7
- package/dist/{chunk-7D4WXUBS.cjs.map → chunk-M55XUF4L.cjs.map} +1 -1
- package/dist/{chunk-S5OGPQSB.cjs → chunk-MHGZZ6IJ.cjs} +6 -6
- package/dist/{chunk-S5OGPQSB.cjs.map → chunk-MHGZZ6IJ.cjs.map} +1 -1
- package/dist/{chunk-FK7MBD5H.cjs → chunk-MIYEIACV.cjs} +14 -14
- package/dist/{chunk-FK7MBD5H.cjs.map → chunk-MIYEIACV.cjs.map} +1 -1
- package/dist/{chunk-G5YLJ2YT.cjs → chunk-MKJBEL4W.cjs} +4 -4
- package/dist/{chunk-G5YLJ2YT.cjs.map → chunk-MKJBEL4W.cjs.map} +1 -1
- package/dist/{chunk-F6F375V7.cjs → chunk-NVECYF2N.cjs} +7 -7
- package/dist/{chunk-F6F375V7.cjs.map → chunk-NVECYF2N.cjs.map} +1 -1
- package/dist/{chunk-YKOPKLYP.cjs → chunk-P2K4XL4T.cjs} +4 -4
- package/dist/{chunk-YKOPKLYP.cjs.map → chunk-P2K4XL4T.cjs.map} +1 -1
- package/dist/{chunk-KWV4VC74.cjs → chunk-SDGE2F77.cjs} +6 -6
- package/dist/{chunk-KWV4VC74.cjs.map → chunk-SDGE2F77.cjs.map} +1 -1
- package/dist/{chunk-P5TQOSKA.cjs → chunk-SK6BONXE.cjs} +6 -6
- package/dist/{chunk-P5TQOSKA.cjs.map → chunk-SK6BONXE.cjs.map} +1 -1
- package/dist/{chunk-XPQR2PJX.cjs → chunk-SQCCQU3K.cjs} +2 -2
- package/dist/chunk-SQCCQU3K.cjs.map +1 -0
- package/dist/{chunk-AZQ4XIVY.cjs → chunk-SQHR7564.cjs} +134 -134
- package/dist/{chunk-AZQ4XIVY.cjs.map → chunk-SQHR7564.cjs.map} +1 -1
- package/dist/{chunk-JJDJLAC7.cjs → chunk-STFIBNND.cjs} +34 -34
- package/dist/{chunk-JJDJLAC7.cjs.map → chunk-STFIBNND.cjs.map} +1 -1
- package/dist/{chunk-DUNXLT63.cjs → chunk-TJDCTRB5.cjs} +3 -3
- package/dist/{chunk-DUNXLT63.cjs.map → chunk-TJDCTRB5.cjs.map} +1 -1
- package/dist/{chunk-CENMN32L.cjs → chunk-U2HDSS5R.cjs} +6 -6
- package/dist/{chunk-CENMN32L.cjs.map → chunk-U2HDSS5R.cjs.map} +1 -1
- package/dist/{chunk-EF2QQBDV.cjs → chunk-UGSN47YE.cjs} +5 -5
- package/dist/{chunk-EF2QQBDV.cjs.map → chunk-UGSN47YE.cjs.map} +1 -1
- package/dist/{chunk-6RC6GYIW.cjs → chunk-UHEOY35C.cjs} +4 -4
- package/dist/{chunk-6RC6GYIW.cjs.map → chunk-UHEOY35C.cjs.map} +1 -1
- package/dist/{chunk-2XZ3HBAA.cjs → chunk-UHT2Q6IF.cjs} +30 -30
- package/dist/{chunk-2XZ3HBAA.cjs.map → chunk-UHT2Q6IF.cjs.map} +1 -1
- package/dist/{chunk-5RMVFFVW.cjs → chunk-VHD5DZW4.cjs} +7 -7
- package/dist/{chunk-5RMVFFVW.cjs.map → chunk-VHD5DZW4.cjs.map} +1 -1
- package/dist/{chunk-LIKDQBNJ.cjs → chunk-VMXTOIXB.cjs} +8 -3
- package/dist/chunk-VMXTOIXB.cjs.map +1 -0
- package/dist/{chunk-SK6LFIU2.cjs → chunk-WREXDEOM.cjs} +11 -11
- package/dist/{chunk-SK6LFIU2.cjs.map → chunk-WREXDEOM.cjs.map} +1 -1
- package/dist/{chunk-FHKBR55Q.cjs → chunk-WSUHF676.cjs} +5 -5
- package/dist/{chunk-FHKBR55Q.cjs.map → chunk-WSUHF676.cjs.map} +1 -1
- package/dist/{chunk-JJZOL5MG.cjs → chunk-WXMD4AA4.cjs} +34 -10
- package/dist/chunk-WXMD4AA4.cjs.map +1 -0
- package/dist/{chunk-GF3I3SA4.cjs → chunk-X5H2STK4.cjs} +12 -12
- package/dist/{chunk-GF3I3SA4.cjs.map → chunk-X5H2STK4.cjs.map} +1 -1
- package/dist/{chunk-5TT6J67U.cjs → chunk-X6QGVLMV.cjs} +21 -21
- package/dist/{chunk-5TT6J67U.cjs.map → chunk-X6QGVLMV.cjs.map} +1 -1
- package/dist/{chunk-T6WA6S5T.cjs → chunk-XFZKPEUD.cjs} +4 -4
- package/dist/{chunk-T6WA6S5T.cjs.map → chunk-XFZKPEUD.cjs.map} +1 -1
- package/dist/{chunk-I2LJ7RZ2.cjs → chunk-Y3GJBLAI.cjs} +10 -8
- package/dist/chunk-Y3GJBLAI.cjs.map +1 -0
- package/dist/{chunk-IFJBE7M5.cjs → chunk-YV36BZE7.cjs} +10 -10
- package/dist/{chunk-IFJBE7M5.cjs.map → chunk-YV36BZE7.cjs.map} +1 -1
- package/dist/{chunk-3VPNL4EH.cjs → chunk-ZLJP6447.cjs} +135 -117
- package/dist/chunk-ZLJP6447.cjs.map +1 -0
- package/dist/{chunk-YST6GVN5.cjs → chunk-ZUYY3JRO.cjs} +18 -18
- package/dist/{chunk-YST6GVN5.cjs.map → chunk-ZUYY3JRO.cjs.map} +1 -1
- package/dist/citations/index.cjs +8 -8
- package/dist/collaboration/index.cjs +13 -13
- package/dist/connect/docx.cjs +25 -24
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/index.cjs +1453 -1453
- package/dist/connect/viewer.cjs +32 -32
- package/dist/connection/ConnectedWorkflowsTable.js +77 -52
- package/dist/connection/ConnectedWorkflowsTable.js.map +2 -2
- package/dist/connection/useWorkflowThread.d.ts +6 -0
- package/dist/connection/useWorkflowThread.js +10 -3
- package/dist/connection/useWorkflowThread.js.map +2 -2
- package/dist/connection/workflows/ConnectedSavedWorkflowRun.d.ts +29 -0
- package/dist/connection/workflows/ConnectedSavedWorkflowRun.js +48 -0
- package/dist/connection/workflows/ConnectedSavedWorkflowRun.js.map +7 -0
- package/dist/connection/workflows/ConnectedWorkflowsPage.js +29 -1
- package/dist/connection/workflows/ConnectedWorkflowsPage.js.map +2 -2
- package/dist/connection/workflows/StartWorkflowInDialog.d.ts +23 -0
- package/dist/connection/workflows/StartWorkflowInDialog.js +75 -0
- package/dist/connection/workflows/StartWorkflowInDialog.js.map +7 -0
- package/dist/connection/workflows/useWorkflowsPageState.d.ts +3 -0
- package/dist/dashboards/index.cjs +18 -18
- package/dist/embed/index.cjs +46 -46
- package/dist/facts/index.cjs +45 -45
- package/dist/files/index.cjs +229 -229
- package/dist/home/index.cjs +33 -33
- package/dist/index.cjs +707 -687
- package/dist/office/index.cjs +5 -5
- package/dist/pages/index.cjs +14 -14
- package/dist/provider/environment.d.ts +5 -0
- package/dist/provider/environment.js +6 -1
- package/dist/provider/environment.js.map +2 -2
- package/dist/provider/requests.d.ts +2 -0
- package/dist/provider/requests.js.map +2 -2
- package/dist/retrieval/index.cjs +4 -4
- package/dist/settings/index.cjs +148 -148
- package/dist/shell/index.cjs +56 -56
- package/dist/studio/index.cjs +39 -39
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/WorkflowBuilder.js +2 -1
- package/dist/workflow-canvas/WorkflowBuilder.js.map +2 -2
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +1 -0
- package/dist/workflow-canvas/WorkflowCanvas.js +3 -1
- package/dist/workflow-canvas/WorkflowCanvas.js.map +2 -2
- package/dist/workflow-canvas/edit.js +17 -1
- package/dist/workflow-canvas/edit.js.map +2 -2
- package/dist/workflow-canvas/index.cjs +196 -112
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/trigger.js +6 -2
- package/dist/workflow-canvas/trigger.js.map +2 -2
- package/dist/workspaces/index.cjs +18 -18
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/src/blocks.css +1 -0
- package/dist/ai-VLIPYNWP.cjs.map +0 -1
- package/dist/chunk-3VPNL4EH.cjs.map +0 -1
- package/dist/chunk-73ECBDG7.cjs.map +0 -1
- package/dist/chunk-HWZT24TD.cjs.map +0 -1
- package/dist/chunk-I2LJ7RZ2.cjs.map +0 -1
- package/dist/chunk-JJZOL5MG.cjs.map +0 -1
- package/dist/chunk-KMOIE2XH.cjs.map +0 -1
- package/dist/chunk-LIKDQBNJ.cjs.map +0 -1
- package/dist/chunk-MEWRE43W.cjs.map +0 -1
- package/dist/chunk-XPQR2PJX.cjs.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useSavedWorkflow } from "@arbidocs/react";
|
|
5
|
+
import { workflowRecordToBuilder } from "../../workflow-canvas/trigger.js";
|
|
6
|
+
import { ConnectedWorkflowRunPage } from "./ConnectedWorkflowRunPage.js";
|
|
7
|
+
const isSavedWorkflowId = (id) => /^wfl-[a-zA-Z0-9]{8}$/.test(id);
|
|
8
|
+
const DEFAULT_SAVED_WORKFLOW_RUN_LABELS = {
|
|
9
|
+
loading: "Opening the workflow\u2026",
|
|
10
|
+
failed: "The workflow could not be opened."
|
|
11
|
+
};
|
|
12
|
+
function ConnectedSavedWorkflowRun({
|
|
13
|
+
workflowId,
|
|
14
|
+
workspaceId,
|
|
15
|
+
resolveWorkflow,
|
|
16
|
+
renderIcon,
|
|
17
|
+
onOpenConversation,
|
|
18
|
+
leading,
|
|
19
|
+
labels
|
|
20
|
+
}) {
|
|
21
|
+
const l = { ...DEFAULT_SAVED_WORKFLOW_RUN_LABELS, ...labels };
|
|
22
|
+
const saved = useSavedWorkflow(workflowId);
|
|
23
|
+
const workflow = useMemo(
|
|
24
|
+
() => saved.data ? workflowRecordToBuilder(saved.data).workflow : void 0,
|
|
25
|
+
[saved.data]
|
|
26
|
+
);
|
|
27
|
+
if (!workflow) {
|
|
28
|
+
return /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", "data-testid": "saved-workflow-run-status", children: saved.isError ? l.failed : l.loading });
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
ConnectedWorkflowRunPage,
|
|
32
|
+
{
|
|
33
|
+
workflow,
|
|
34
|
+
workspaceId,
|
|
35
|
+
options: { workflowId, resolveWorkflow },
|
|
36
|
+
renderIcon,
|
|
37
|
+
onOpenConversation,
|
|
38
|
+
pageHeader: { leading },
|
|
39
|
+
testIdPrefix: "workflow-run"
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
ConnectedSavedWorkflowRun,
|
|
45
|
+
DEFAULT_SAVED_WORKFLOW_RUN_LABELS,
|
|
46
|
+
isSavedWorkflowId
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=ConnectedSavedWorkflowRun.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/workflows/ConnectedSavedWorkflowRun.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * A saved workflow's run page: the workflow read with its steps and declared inputs, run in the\n * open workspace or in `workspaceId` (a matter's, for a process of the skills workspace). The run\n * page opens that workspace, so every picker (documents, folders and tags, people) offers that\n * workspace's; the run is started by the workflow's id (`useWorkflowThread`'s `workflowId`), so the\n * server copies the steps and the run records where it came from.\n */\n\nimport { useMemo, type ReactNode } from 'react'\nimport { useSavedWorkflow } from '@arbidocs/react'\nimport type { WorkflowDefinition } from '../../agents/workflows/types'\nimport { workflowRecordToBuilder } from '../../workflow-canvas/trigger'\nimport { ConnectedWorkflowRunPage } from './ConnectedWorkflowRunPage'\n\n/** A saved workflow's id (`wfl-\u2026`), as opposed to a host catalogue entry's. */\nexport const isSavedWorkflowId = (id: string): boolean => /^wfl-[a-zA-Z0-9]{8}$/.test(id)\n\nexport interface ConnectedSavedWorkflowRunProps {\n workflowId: string\n /** The workspace to start it in. Absent: the open one. */\n workspaceId?: string\n /** A step's skill, by id (the host's `workflows.stepWorkflows`). */\n resolveWorkflow?: (id: string) => WorkflowDefinition | undefined\n renderIcon?: (key: string) => ReactNode\n onOpenConversation?: (conversationId: string) => void\n /** The header's leading control (a back button). */\n leading?: ReactNode\n labels?: Partial<ConnectedSavedWorkflowRunLabels>\n}\n\nexport interface ConnectedSavedWorkflowRunLabels {\n loading: string\n failed: string\n}\n\nexport const DEFAULT_SAVED_WORKFLOW_RUN_LABELS: ConnectedSavedWorkflowRunLabels = {\n loading: 'Opening the workflow\u2026',\n failed: 'The workflow could not be opened.',\n}\n\nexport function ConnectedSavedWorkflowRun({\n workflowId,\n workspaceId,\n resolveWorkflow,\n renderIcon,\n onOpenConversation,\n leading,\n labels,\n}: ConnectedSavedWorkflowRunProps) {\n const l = { ...DEFAULT_SAVED_WORKFLOW_RUN_LABELS, ...labels }\n const saved = useSavedWorkflow(workflowId)\n const workflow = useMemo(\n () => (saved.data ? workflowRecordToBuilder(saved.data).workflow : undefined),\n [saved.data]\n )\n if (!workflow) {\n return (\n <p className=\"text-sm text-muted-foreground\" data-testid=\"saved-workflow-run-status\">\n {saved.isError ? l.failed : l.loading}\n </p>\n )\n }\n return (\n <ConnectedWorkflowRunPage\n workflow={workflow}\n workspaceId={workspaceId}\n options={{ workflowId, resolveWorkflow }}\n renderIcon={renderIcon}\n onOpenConversation={onOpenConversation}\n pageHeader={{ leading }}\n testIdPrefix=\"workflow-run\"\n />\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAyDM;AAjDN,SAAS,eAA+B;AACxC,SAAS,wBAAwB;AAEjC,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AAGlC,MAAM,oBAAoB,CAAC,OAAwB,uBAAuB,KAAK,EAAE;AAoBjF,MAAM,oCAAqE;AAAA,EAChF,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmC;AACjC,QAAM,IAAI,EAAE,GAAG,mCAAmC,GAAG,OAAO;AAC5D,QAAM,QAAQ,iBAAiB,UAAU;AACzC,QAAM,WAAW;AAAA,IACf,MAAO,MAAM,OAAO,wBAAwB,MAAM,IAAI,EAAE,WAAW;AAAA,IACnE,CAAC,MAAM,IAAI;AAAA,EACb;AACA,MAAI,CAAC,UAAU;AACb,WACE,oBAAC,OAAE,WAAU,iCAAgC,eAAY,6BACtD,gBAAM,UAAU,EAAE,SAAS,EAAE,SAChC;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,SAAS,EAAE,YAAY,gBAAgB;AAAA,MACvC;AAAA,MACA;AAAA,MACA,YAAY,EAAE,QAAQ;AAAA,MACtB,cAAa;AAAA;AAAA,EACf;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
import { ConnectedWorkflowHistory } from "../ConnectedWorkflowHistory.js";
|
|
25
25
|
import { ConnectedWorkflowsTable } from "../ConnectedWorkflowsTable.js";
|
|
26
26
|
import { ConnectedWorkflowRunPage } from "./ConnectedWorkflowRunPage.js";
|
|
27
|
+
import { ConnectedSavedWorkflowRun, isSavedWorkflowId } from "./ConnectedSavedWorkflowRun.js";
|
|
27
28
|
import { ConnectedTaskComposer } from "../tasks/ConnectedTaskComposer.js";
|
|
28
29
|
import { useRenderTaskPerson } from "../tasks/useTaskPeople.js";
|
|
29
30
|
import { useAiReviewStore } from "../files/store.js";
|
|
@@ -65,6 +66,7 @@ function ConnectedWorkflowsPage({
|
|
|
65
66
|
if (initialTabId) setHostTabId(initialTabId);
|
|
66
67
|
}
|
|
67
68
|
const [runningId, setRunningId] = useState(null);
|
|
69
|
+
const [runningIn, setRunningIn] = useState(void 0);
|
|
68
70
|
const [requestedHistoryId, setRequestedHistoryId] = useState(null);
|
|
69
71
|
const consumeHistory = useCallback(() => {
|
|
70
72
|
if (requestedHistoryId) setRequestedHistoryId(null);
|
|
@@ -96,7 +98,7 @@ function ConnectedWorkflowsPage({
|
|
|
96
98
|
setHostTabId(null);
|
|
97
99
|
openHistory(workflow);
|
|
98
100
|
};
|
|
99
|
-
useIntentRequest(workflowOpenRequest, ({ workflowId, view, preset }) => {
|
|
101
|
+
useIntentRequest(workflowOpenRequest, ({ workflowId, view, preset, runIn }) => {
|
|
100
102
|
if (!workflowId && preset) {
|
|
101
103
|
setRunningId(null);
|
|
102
104
|
setHostTabId(null);
|
|
@@ -107,6 +109,7 @@ function ConnectedWorkflowsPage({
|
|
|
107
109
|
if (!workflowId) return;
|
|
108
110
|
closeBuilder();
|
|
109
111
|
setRunningId(workflowId);
|
|
112
|
+
setRunningIn(runIn);
|
|
110
113
|
return;
|
|
111
114
|
}
|
|
112
115
|
setRunningId(null);
|
|
@@ -181,6 +184,31 @@ function ConnectedWorkflowsPage({
|
|
|
181
184
|
) })
|
|
182
185
|
);
|
|
183
186
|
}
|
|
187
|
+
if (runningId && !running && isSavedWorkflowId(runningId)) {
|
|
188
|
+
return /* @__PURE__ */ jsx("div", { className: "h-full min-h-0 w-full overflow-auto p-4 sm:p-6", children: /* @__PURE__ */ jsx(
|
|
189
|
+
ConnectedSavedWorkflowRun,
|
|
190
|
+
{
|
|
191
|
+
workflowId: runningId,
|
|
192
|
+
workspaceId: runningIn,
|
|
193
|
+
resolveWorkflow: (id) => (config?.stepWorkflows ?? webWorkflows).find((w) => w.id === id),
|
|
194
|
+
renderIcon: config?.renderIcon,
|
|
195
|
+
onOpenConversation: (id) => openConversation(id),
|
|
196
|
+
leading: /* @__PURE__ */ jsx(
|
|
197
|
+
Button,
|
|
198
|
+
{
|
|
199
|
+
variant: "ghost",
|
|
200
|
+
size: "icon",
|
|
201
|
+
onClick: () => setRunningId(null),
|
|
202
|
+
"aria-label": l.back,
|
|
203
|
+
title: l.back,
|
|
204
|
+
"data-testid": "workflow-run-back",
|
|
205
|
+
children: /* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" })
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
},
|
|
209
|
+
runningId
|
|
210
|
+
) });
|
|
211
|
+
}
|
|
184
212
|
if (builder) {
|
|
185
213
|
const template = builder.kind === "template" ? config?.catalogue?.find((entry) => entry.workflow.id === builder.id) : void 0;
|
|
186
214
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/connection/workflows/ConnectedWorkflowsPage.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * The Workflows page, connected: one composition of the saved workflows' table\n * (`ConnectedWorkflowsTable`), the visual builder (`ConnectedWorkflowBuilder`) and a workflow's\n * history (`ConnectedWorkflowHistory`), on the shared selection lifecycle\n * (`useWorkflowsPageState`).\n *\n * - The table lists the saved workflows, with the host's catalogue (`workflows.catalogue` in the\n * host configuration), when it has one, above them in the host's categories.\n * - A workflow opens in the builder, which takes the page (Back returns to the list). A document\n * action (annotate or email documents), which runs without a thread, keeps its own editor.\n * - A workflow's history opens as a tab of the table, beside the host's own `tabs`.\n * - `openWorkflow(id, { view })` from anywhere opens the workflow's builder or history here; the\n * host only shows the page. `view: 'run'` on a catalogue entry opens its run page here\n * (`ConnectedWorkflowRunPage`, with the entry's project options).\n *\n * It navigates only through the environment: threads open with `openConversation`, an AI review's\n * result with `openFiles` (offered when the host has it), a catalogue entry runs with\n * `openWorkflow(id, { view: 'run' })`.\n */\n\nimport { useCallback, useMemo, useState, type ReactNode } from 'react'\nimport { ArrowLeft, Pencil, Play, Plus, Workflow as WorkflowIcon } from 'lucide-react'\nimport {\n useInvalidateTagData,\n useRefreshDocuments,\n useTags,\n useWorkflowRuns,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { Button, formatFriendlyDate } from '@arbidocs/react/ui'\nimport { PageHeader, type PageHeaderProps } from '../../components/PageHeader'\nimport { describeTrigger } from '../../agents/tasks/taskHelpers'\nimport type { TaskRunsDialogLabels } from '../../agents/tasks/TaskRunsDialog'\nimport type { WorkflowListLabels } from '../../agents/tasks/workflowTableLabels'\nimport { WEB_WORKFLOWS } from '../../agents/workflows/catalogue/registry'\nimport { useNamedWorkflows } from './useNamedWorkflows'\nimport { DEFAULT_WORKFLOW_TRIGGER } from '../../workflow-canvas/trigger'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useOpenWorkflow } from './useOpenWorkflow'\nimport { useHost } from '../../provider/host'\nimport { useIntentRequest, workflowOpenRequest } from '../../provider/requests'\nimport {\n ConnectedWorkflowBuilder,\n scheduledTaskBuilderValue,\n type ConnectedWorkflowBuilderProps,\n} from '../ConnectedWorkflowBuilder'\nimport { ConnectedWorkflowHistory } from '../ConnectedWorkflowHistory'\nimport { ConnectedWorkflowsTable } from '../ConnectedWorkflowsTable'\nimport { ConnectedWorkflowRunPage } from './ConnectedWorkflowRunPage'\nimport { ConnectedTaskComposer } from '../tasks/ConnectedTaskComposer'\nimport { useRenderTaskPerson } from '../tasks/useTaskPeople'\nimport { useAiReviewStore } from '../files/store'\nimport { useWorkflowsPageState } from './useWorkflowsPageState'\nimport {\n DEFAULT_CONNECTED_WORKFLOWS_PAGE_LABELS,\n DEFAULT_WORKFLOWS_PAGE_TABLE_LABELS,\n WORKFLOWS_PAGE_TRIGGER_CHIP_LABELS,\n type ConnectedWorkflowsPageLabels,\n} from './workflowsPageLabels'\n\ntype WorkflowRun = NonNullable<ReturnType<typeof useWorkflowRuns>['data']>[number]\n\n/** A tab of the host's beside the saved workflows (e.g. the agents that run them). */\nexport interface WorkflowsPageTab {\n id: string\n label: string\n icon?: ReactNode\n content: ReactNode\n}\n\n/** The table's own tab (the saved workflows). */\nconst LIST_TAB = 'automations'\n\nexport interface ConnectedWorkflowsPageProps {\n /** A host deep link to a workflow's history (e.g. a `?workflow=` URL), taken once it loads. */\n historyWorkflowId?: string | null\n onHistoryWorkflowConsumed?: () => void\n /** A title block over the table (eyebrow, title, description). Absent: none. */\n pageHeader?: Omit<PageHeaderProps, 'actions' | 'tabs'>\n /** The host's tabs beside the saved workflows, before any open history. */\n tabs?: WorkflowsPageTab[]\n /**\n * One of the host's `tabs` to show instead of the saved workflows (a host deep link such as\n * `?tab=agents`): on mount, and again whenever it changes to another tab. Unknown ids show the\n * saved workflows.\n */\n initialTabId?: string | null\n /** The builder's words and options. */\n builderProps?: Pick<\n ConnectedWorkflowBuilderProps,\n | 'labels'\n | 'canvasLabels'\n | 'inspectorLabels'\n | 'triggerLabels'\n | 'connectedLabels'\n | 'eventKinds'\n | 'compose'\n >\n labels?: Partial<ConnectedWorkflowsPageLabels>\n tableLabels?: Partial<WorkflowListLabels>\n historyLabels?: Partial<TaskRunsDialogLabels>\n testId?: string\n}\n\nexport function ConnectedWorkflowsPage({\n historyWorkflowId,\n onHistoryWorkflowConsumed,\n pageHeader,\n tabs,\n initialTabId,\n builderProps,\n labels,\n tableLabels,\n historyLabels,\n testId = 'workflows-page',\n}: ConnectedWorkflowsPageProps) {\n // The default step catalogue in the host's assistant name.\n const webWorkflows = useNamedWorkflows(WEB_WORKFLOWS)\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_PAGE_LABELS, ...labels }\n const host = useHost()\n const config = host.workflows\n const { openConversation, openFiles } = useBlocksEnvironment()\n const openWorkflow = useOpenWorkflow()\n const renderPerson = useRenderTaskPerson()\n const refreshDocuments = useRefreshDocuments()\n const invalidateTags = useInvalidateTagData()\n const { data: tags = [] } = useTags()\n const [editing, setEditing] = useState<WorkflowResponse | null>(null)\n const [editorOpen, setEditorOpen] = useState(false)\n const [hostTabId, setHostTabId] = useState<string | null>(initialTabId ?? null)\n // The host's link is applied again when it names another tab (the page stays mounted when the\n // host's address changes), never over the person's own choice of tab otherwise.\n const [appliedTabId, setAppliedTabId] = useState(initialTabId)\n if (initialTabId !== appliedTabId) {\n setAppliedTabId(initialTabId)\n if (initialTabId) setHostTabId(initialTabId)\n }\n // The catalogue entry being run (`openWorkflow(id, { view: 'run' })`).\n const [runningId, setRunningId] = useState<string | null>(null)\n // A workflow `openWorkflow(id, { view: 'runs' })` asked for, until it has loaded.\n const [requestedHistoryId, setRequestedHistoryId] = useState<string | null>(null)\n const consumeHistory = useCallback(() => {\n if (requestedHistoryId) setRequestedHistoryId(null)\n else onHistoryWorkflowConsumed?.()\n }, [requestedHistoryId, onHistoryWorkflowConsumed])\n const {\n workflows,\n builder,\n builderKey,\n openBuilder,\n closeBuilder,\n builderSaved,\n historyFor: runsFor,\n historyTabs,\n activeHistoryId,\n openHistory,\n closeHistoryTab,\n selectHistoryTab,\n } = useWorkflowsPageState({\n historyWorkflowId: requestedHistoryId ?? historyWorkflowId,\n onHistoryWorkflowConsumed: consumeHistory,\n })\n const listLabels = useMemo(\n () => ({ ...DEFAULT_WORKFLOWS_PAGE_TABLE_LABELS, ...tableLabels }),\n [tableLabels]\n )\n const hostTab = tabs?.find((tab) => tab.id === hostTabId)\n const showHistory = (workflow: WorkflowResponse | null) => {\n setHostTabId(null)\n openHistory(workflow)\n }\n\n useIntentRequest(workflowOpenRequest, ({ workflowId, view, preset }) => {\n if (!workflowId && preset) {\n setRunningId(null)\n setHostTabId(null)\n openBuilder({ kind: 'new', preset })\n return\n }\n if (view === 'run') {\n if (!workflowId) return\n closeBuilder()\n setRunningId(workflowId)\n return\n }\n setRunningId(null)\n if (workflowId && view !== 'runs') {\n openBuilder({ kind: 'saved', id: workflowId })\n return\n }\n closeBuilder()\n setHostTabId(null)\n if (workflowId) setRequestedHistoryId(workflowId)\n else selectHistoryTab(null)\n })\n\n const edit = (workflow: WorkflowResponse) => {\n showHistory(workflow)\n // Every workflow opens in the visual builder: stepped ones as their steps, a classic one (a\n // single prompt or skill) as one agent step, a reminder with no steps yet. Only document actions\n // (annotate / email documents), which run without a thread, keep their own editor.\n if (!workflow.action) {\n openBuilder({ kind: 'saved', id: workflow.external_id })\n return\n }\n setEditing(workflow)\n setEditorOpen(true)\n }\n\n // An AI review's result: its documents re-read, Files narrowed to its label, its fields shown.\n const openResult = async (execution: WorkflowRun) => {\n await refreshDocuments(execution.document_ext_ids)\n await invalidateTags()\n const fieldIds =\n (execution.result?.tag_ext_ids as string[] | undefined) ?? runsFor?.action?.tag_ext_ids ?? []\n useAiReviewStore.getState().setRun({\n docIds: execution.document_ext_ids,\n tags: fieldIds.map((fieldId) => ({\n id: fieldId,\n name: tags.find((tag) => tag.external_id === fieldId)?.name ?? 'Review',\n })),\n })\n useAiReviewStore.getState().setOpen(true)\n openFiles(\n execution.label_ext_id ? { filters: { [execution.label_ext_id]: 'include' } } : undefined\n )\n }\n const renderErrorReport = config?.renderErrorReport\n\n const running = runningId\n ? config?.catalogue?.find((entry) => entry.workflow.id === runningId)\n : undefined\n if (running && running.runnable !== false) {\n const stepWorkflows = config?.stepWorkflows ?? webWorkflows\n return (\n // The page in the Workflows page's frame: padded, scrolling.\n <div className=\"h-full min-h-0 w-full overflow-auto p-4 sm:p-6\">\n <ConnectedWorkflowRunPage\n key={running.workflow.id}\n workflow={running.workflow}\n projectFrom={running.projectFrom}\n inputsFromProject={running.inputsFromProject}\n onProjectCreated={running.onProjectCreated}\n options={{ resolveWorkflow: (id) => stepWorkflows.find((w) => w.id === id) }}\n renderIcon={config?.renderIcon}\n onOpenConversation={(id) => openConversation(id)}\n pageHeader={{\n eyebrow: running.category,\n leading: (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => setRunningId(null)}\n aria-label={l.back}\n title={l.back}\n data-testid=\"workflow-run-back\"\n >\n <ArrowLeft className=\"size-4\" />\n </Button>\n ),\n }}\n testIdPrefix=\"workflow-run\"\n />\n </div>\n )\n }\n\n if (builder) {\n const template =\n builder.kind === 'template'\n ? config?.catalogue?.find((entry) => entry.workflow.id === builder.id)\n : undefined\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-3 overflow-auto p-4\"\n data-testid=\"workflow-builder\"\n >\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={closeBuilder}\n data-testid=\"workflow-builder-back\"\n >\n <ArrowLeft className=\"size-4\" /> {l.back}\n </Button>\n {template && template.runnable !== false && openWorkflow && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => openWorkflow(template.workflow.id, { view: 'run' })}\n data-testid=\"workflow-builder-run\"\n >\n <Play className=\"size-4\" /> {l.runTemplate}\n </Button>\n )}\n </div>\n <ConnectedWorkflowBuilder\n key={builderKey}\n workflowId={builder.kind === 'saved' ? builder.id : undefined}\n initial={\n template\n ? { workflow: template.workflow, trigger: DEFAULT_WORKFLOW_TRIGGER }\n : builder.kind === 'new' && builder.preset === 'schedule'\n ? scheduledTaskBuilderValue()\n : undefined\n }\n workflows={config?.stepWorkflows ?? webWorkflows}\n renderIcon={config?.renderIcon}\n onSaved={(id) => builderSaved(id, builderKey)}\n testId=\"workflow-builder-canvas\"\n {...builderProps}\n />\n </div>\n )\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\" data-testid={testId}>\n {pageHeader && <PageHeader {...pageHeader} />}\n <ConnectedWorkflowsTable\n onOpenTemplate={(id) => openBuilder({ kind: 'template', id })}\n tabs={[\n ...(tabs ?? []).map(({ id, label, icon }) => ({ id, label, icon })),\n ...historyTabs.map((workflow) => ({\n id: workflow.external_id,\n label: workflow.name,\n icon: <WorkflowIcon className=\"size-3.5\" />,\n onClose: () => {\n closeHistoryTab(workflow.external_id)\n if (activeHistoryId === workflow.external_id) setEditorOpen(false)\n },\n })),\n ]}\n activeTabId={hostTab?.id ?? activeHistoryId ?? LIST_TAB}\n onTabChange={(id) => {\n if (tabs?.some((tab) => tab.id === id)) {\n setHostTabId(id)\n return\n }\n setHostTabId(null)\n selectHistoryTab(id === LIST_TAB ? null : id)\n if (editorOpen) {\n const workflow = workflows.find((item) => item.external_id === id)\n if (workflow) setEditing(workflow)\n else setEditorOpen(false)\n }\n }}\n content={\n hostTab ? (\n hostTab.content\n ) : runsFor ? (\n <ConnectedWorkflowHistory\n inline\n hideHeader\n workflow={runsFor}\n onOpenChange={(open) => !open && openHistory(null)}\n formatDate={formatFriendlyDate}\n labels={historyLabels}\n renderErrorReport={\n renderErrorReport &&\n ((run) =>\n renderErrorReport(\n JSON.stringify(\n {\n workflow_ext_id: runsFor.external_id,\n run_id: run.id,\n status: run.status,\n error: run.error,\n },\n null,\n 2\n )\n ))\n }\n // Offered where the host shows files (its `openFiles`).\n onOpenResult={host.environment?.openFiles ? openResult : undefined}\n />\n ) : undefined\n }\n automationsOnly\n gridId=\"automations-grid-v1\"\n describeTrigger={(workflow) =>\n workflow.on_demand ? l.manualTrigger : describeTrigger(workflow)\n }\n formatDate={formatFriendlyDate}\n renderPerson={renderPerson}\n onViewRuns={showHistory}\n onOpenRow={edit}\n onEdit={edit}\n triggerChipLabels={WORKFLOWS_PAGE_TRIGGER_CHIP_LABELS}\n labels={listLabels}\n // A narrow row (a phone) keeps the actions' icons, so the host's tabs keep their room.\n header={(isCompact) => (\n <>\n {runsFor && !hostTab && (\n <Button\n variant=\"ghost\"\n onClick={() => edit(runsFor)}\n aria-label={l.editAria}\n title={isCompact ? l.edit : undefined}\n >\n <Pencil className={isCompact ? 'size-4' : 'mr-1.5 size-4'} />\n {!isCompact && l.edit}\n </Button>\n )}\n <Button\n onClick={() => openBuilder({ kind: 'new' })}\n aria-label={isCompact ? l.newWorkflow : undefined}\n title={isCompact ? l.newWorkflow : undefined}\n data-testid=\"new-workflow-button\"\n >\n <Plus className={isCompact ? 'size-4' : 'mr-1.5 size-4'} />\n {!isCompact && l.newWorkflow}\n </Button>\n </>\n )}\n />\n <ConnectedTaskComposer\n kind=\"workflow\"\n saveOnly\n startLater\n open={editorOpen}\n onOpenChange={setEditorOpen}\n workflow={editing}\n />\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * The Workflows page, connected: one composition of the saved workflows' table\n * (`ConnectedWorkflowsTable`), the visual builder (`ConnectedWorkflowBuilder`) and a workflow's\n * history (`ConnectedWorkflowHistory`), on the shared selection lifecycle\n * (`useWorkflowsPageState`).\n *\n * - The table lists the saved workflows, with the host's catalogue (`workflows.catalogue` in the\n * host configuration), when it has one, above them in the host's categories.\n * - A workflow opens in the builder, which takes the page (Back returns to the list). A document\n * action (annotate or email documents), which runs without a thread, keeps its own editor.\n * - A workflow's history opens as a tab of the table, beside the host's own `tabs`.\n * - `openWorkflow(id, { view })` from anywhere opens the workflow's builder or history here; the\n * host only shows the page. `view: 'run'` on a catalogue entry opens its run page here\n * (`ConnectedWorkflowRunPage`, with the entry's project options).\n *\n * It navigates only through the environment: threads open with `openConversation`, an AI review's\n * result with `openFiles` (offered when the host has it), a catalogue entry runs with\n * `openWorkflow(id, { view: 'run' })`.\n */\n\nimport { useCallback, useMemo, useState, type ReactNode } from 'react'\nimport { ArrowLeft, Pencil, Play, Plus, Workflow as WorkflowIcon } from 'lucide-react'\nimport {\n useInvalidateTagData,\n useRefreshDocuments,\n useTags,\n useWorkflowRuns,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { Button, formatFriendlyDate } from '@arbidocs/react/ui'\nimport { PageHeader, type PageHeaderProps } from '../../components/PageHeader'\nimport { describeTrigger } from '../../agents/tasks/taskHelpers'\nimport type { TaskRunsDialogLabels } from '../../agents/tasks/TaskRunsDialog'\nimport type { WorkflowListLabels } from '../../agents/tasks/workflowTableLabels'\nimport { WEB_WORKFLOWS } from '../../agents/workflows/catalogue/registry'\nimport { useNamedWorkflows } from './useNamedWorkflows'\nimport { DEFAULT_WORKFLOW_TRIGGER } from '../../workflow-canvas/trigger'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { useOpenWorkflow } from './useOpenWorkflow'\nimport { useHost } from '../../provider/host'\nimport { useIntentRequest, workflowOpenRequest } from '../../provider/requests'\nimport {\n ConnectedWorkflowBuilder,\n scheduledTaskBuilderValue,\n type ConnectedWorkflowBuilderProps,\n} from '../ConnectedWorkflowBuilder'\nimport { ConnectedWorkflowHistory } from '../ConnectedWorkflowHistory'\nimport { ConnectedWorkflowsTable } from '../ConnectedWorkflowsTable'\nimport { ConnectedWorkflowRunPage } from './ConnectedWorkflowRunPage'\nimport { ConnectedSavedWorkflowRun, isSavedWorkflowId } from './ConnectedSavedWorkflowRun'\nimport { ConnectedTaskComposer } from '../tasks/ConnectedTaskComposer'\nimport { useRenderTaskPerson } from '../tasks/useTaskPeople'\nimport { useAiReviewStore } from '../files/store'\nimport { useWorkflowsPageState } from './useWorkflowsPageState'\nimport {\n DEFAULT_CONNECTED_WORKFLOWS_PAGE_LABELS,\n DEFAULT_WORKFLOWS_PAGE_TABLE_LABELS,\n WORKFLOWS_PAGE_TRIGGER_CHIP_LABELS,\n type ConnectedWorkflowsPageLabels,\n} from './workflowsPageLabels'\n\ntype WorkflowRun = NonNullable<ReturnType<typeof useWorkflowRuns>['data']>[number]\n\n/** A tab of the host's beside the saved workflows (e.g. the agents that run them). */\nexport interface WorkflowsPageTab {\n id: string\n label: string\n icon?: ReactNode\n content: ReactNode\n}\n\n/** The table's own tab (the saved workflows). */\nconst LIST_TAB = 'automations'\n\nexport interface ConnectedWorkflowsPageProps {\n /** A host deep link to a workflow's history (e.g. a `?workflow=` URL), taken once it loads. */\n historyWorkflowId?: string | null\n onHistoryWorkflowConsumed?: () => void\n /** A title block over the table (eyebrow, title, description). Absent: none. */\n pageHeader?: Omit<PageHeaderProps, 'actions' | 'tabs'>\n /** The host's tabs beside the saved workflows, before any open history. */\n tabs?: WorkflowsPageTab[]\n /**\n * One of the host's `tabs` to show instead of the saved workflows (a host deep link such as\n * `?tab=agents`): on mount, and again whenever it changes to another tab. Unknown ids show the\n * saved workflows.\n */\n initialTabId?: string | null\n /** The builder's words and options. */\n builderProps?: Pick<\n ConnectedWorkflowBuilderProps,\n | 'labels'\n | 'canvasLabels'\n | 'inspectorLabels'\n | 'triggerLabels'\n | 'connectedLabels'\n | 'eventKinds'\n | 'compose'\n >\n labels?: Partial<ConnectedWorkflowsPageLabels>\n tableLabels?: Partial<WorkflowListLabels>\n historyLabels?: Partial<TaskRunsDialogLabels>\n testId?: string\n}\n\nexport function ConnectedWorkflowsPage({\n historyWorkflowId,\n onHistoryWorkflowConsumed,\n pageHeader,\n tabs,\n initialTabId,\n builderProps,\n labels,\n tableLabels,\n historyLabels,\n testId = 'workflows-page',\n}: ConnectedWorkflowsPageProps) {\n // The default step catalogue in the host's assistant name.\n const webWorkflows = useNamedWorkflows(WEB_WORKFLOWS)\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_PAGE_LABELS, ...labels }\n const host = useHost()\n const config = host.workflows\n const { openConversation, openFiles } = useBlocksEnvironment()\n const openWorkflow = useOpenWorkflow()\n const renderPerson = useRenderTaskPerson()\n const refreshDocuments = useRefreshDocuments()\n const invalidateTags = useInvalidateTagData()\n const { data: tags = [] } = useTags()\n const [editing, setEditing] = useState<WorkflowResponse | null>(null)\n const [editorOpen, setEditorOpen] = useState(false)\n const [hostTabId, setHostTabId] = useState<string | null>(initialTabId ?? null)\n // The host's link is applied again when it names another tab (the page stays mounted when the\n // host's address changes), never over the person's own choice of tab otherwise.\n const [appliedTabId, setAppliedTabId] = useState(initialTabId)\n if (initialTabId !== appliedTabId) {\n setAppliedTabId(initialTabId)\n if (initialTabId) setHostTabId(initialTabId)\n }\n // The catalogue entry being run (`openWorkflow(id, { view: 'run' })`).\n const [runningId, setRunningId] = useState<string | null>(null)\n // A saved workflow started in another workspace than the open one (`runIn`).\n const [runningIn, setRunningIn] = useState<string | undefined>(undefined)\n // A workflow `openWorkflow(id, { view: 'runs' })` asked for, until it has loaded.\n const [requestedHistoryId, setRequestedHistoryId] = useState<string | null>(null)\n const consumeHistory = useCallback(() => {\n if (requestedHistoryId) setRequestedHistoryId(null)\n else onHistoryWorkflowConsumed?.()\n }, [requestedHistoryId, onHistoryWorkflowConsumed])\n const {\n workflows,\n builder,\n builderKey,\n openBuilder,\n closeBuilder,\n builderSaved,\n historyFor: runsFor,\n historyTabs,\n activeHistoryId,\n openHistory,\n closeHistoryTab,\n selectHistoryTab,\n } = useWorkflowsPageState({\n historyWorkflowId: requestedHistoryId ?? historyWorkflowId,\n onHistoryWorkflowConsumed: consumeHistory,\n })\n const listLabels = useMemo(\n () => ({ ...DEFAULT_WORKFLOWS_PAGE_TABLE_LABELS, ...tableLabels }),\n [tableLabels]\n )\n const hostTab = tabs?.find((tab) => tab.id === hostTabId)\n const showHistory = (workflow: WorkflowResponse | null) => {\n setHostTabId(null)\n openHistory(workflow)\n }\n\n useIntentRequest(workflowOpenRequest, ({ workflowId, view, preset, runIn }) => {\n if (!workflowId && preset) {\n setRunningId(null)\n setHostTabId(null)\n openBuilder({ kind: 'new', preset })\n return\n }\n if (view === 'run') {\n if (!workflowId) return\n closeBuilder()\n setRunningId(workflowId)\n setRunningIn(runIn)\n return\n }\n setRunningId(null)\n if (workflowId && view !== 'runs') {\n openBuilder({ kind: 'saved', id: workflowId })\n return\n }\n closeBuilder()\n setHostTabId(null)\n if (workflowId) setRequestedHistoryId(workflowId)\n else selectHistoryTab(null)\n })\n\n const edit = (workflow: WorkflowResponse) => {\n showHistory(workflow)\n // Every workflow opens in the visual builder: stepped ones as their steps, a classic one (a\n // single prompt or skill) as one agent step, a reminder with no steps yet. Only document actions\n // (annotate / email documents), which run without a thread, keep their own editor.\n if (!workflow.action) {\n openBuilder({ kind: 'saved', id: workflow.external_id })\n return\n }\n setEditing(workflow)\n setEditorOpen(true)\n }\n\n // An AI review's result: its documents re-read, Files narrowed to its label, its fields shown.\n const openResult = async (execution: WorkflowRun) => {\n await refreshDocuments(execution.document_ext_ids)\n await invalidateTags()\n const fieldIds =\n (execution.result?.tag_ext_ids as string[] | undefined) ?? runsFor?.action?.tag_ext_ids ?? []\n useAiReviewStore.getState().setRun({\n docIds: execution.document_ext_ids,\n tags: fieldIds.map((fieldId) => ({\n id: fieldId,\n name: tags.find((tag) => tag.external_id === fieldId)?.name ?? 'Review',\n })),\n })\n useAiReviewStore.getState().setOpen(true)\n openFiles(\n execution.label_ext_id ? { filters: { [execution.label_ext_id]: 'include' } } : undefined\n )\n }\n const renderErrorReport = config?.renderErrorReport\n\n const running = runningId\n ? config?.catalogue?.find((entry) => entry.workflow.id === runningId)\n : undefined\n if (running && running.runnable !== false) {\n const stepWorkflows = config?.stepWorkflows ?? webWorkflows\n return (\n // The page in the Workflows page's frame: padded, scrolling.\n <div className=\"h-full min-h-0 w-full overflow-auto p-4 sm:p-6\">\n <ConnectedWorkflowRunPage\n key={running.workflow.id}\n workflow={running.workflow}\n projectFrom={running.projectFrom}\n inputsFromProject={running.inputsFromProject}\n onProjectCreated={running.onProjectCreated}\n options={{ resolveWorkflow: (id) => stepWorkflows.find((w) => w.id === id) }}\n renderIcon={config?.renderIcon}\n onOpenConversation={(id) => openConversation(id)}\n pageHeader={{\n eyebrow: running.category,\n leading: (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => setRunningId(null)}\n aria-label={l.back}\n title={l.back}\n data-testid=\"workflow-run-back\"\n >\n <ArrowLeft className=\"size-4\" />\n </Button>\n ),\n }}\n testIdPrefix=\"workflow-run\"\n />\n </div>\n )\n }\n\n // A saved workflow run by id (from this workspace's list, or one started \"in\" this workspace from\n // the skills workspace): the server copies its steps into the run.\n if (runningId && !running && isSavedWorkflowId(runningId)) {\n return (\n <div className=\"h-full min-h-0 w-full overflow-auto p-4 sm:p-6\">\n <ConnectedSavedWorkflowRun\n key={runningId}\n workflowId={runningId}\n workspaceId={runningIn}\n resolveWorkflow={(id) => (config?.stepWorkflows ?? webWorkflows).find((w) => w.id === id)}\n renderIcon={config?.renderIcon}\n onOpenConversation={(id) => openConversation(id)}\n leading={\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => setRunningId(null)}\n aria-label={l.back}\n title={l.back}\n data-testid=\"workflow-run-back\"\n >\n <ArrowLeft className=\"size-4\" />\n </Button>\n }\n />\n </div>\n )\n }\n\n if (builder) {\n const template =\n builder.kind === 'template'\n ? config?.catalogue?.find((entry) => entry.workflow.id === builder.id)\n : undefined\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-3 overflow-auto p-4\"\n data-testid=\"workflow-builder\"\n >\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={closeBuilder}\n data-testid=\"workflow-builder-back\"\n >\n <ArrowLeft className=\"size-4\" /> {l.back}\n </Button>\n {template && template.runnable !== false && openWorkflow && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => openWorkflow(template.workflow.id, { view: 'run' })}\n data-testid=\"workflow-builder-run\"\n >\n <Play className=\"size-4\" /> {l.runTemplate}\n </Button>\n )}\n </div>\n <ConnectedWorkflowBuilder\n key={builderKey}\n workflowId={builder.kind === 'saved' ? builder.id : undefined}\n initial={\n template\n ? { workflow: template.workflow, trigger: DEFAULT_WORKFLOW_TRIGGER }\n : builder.kind === 'new' && builder.preset === 'schedule'\n ? scheduledTaskBuilderValue()\n : undefined\n }\n workflows={config?.stepWorkflows ?? webWorkflows}\n renderIcon={config?.renderIcon}\n onSaved={(id) => builderSaved(id, builderKey)}\n testId=\"workflow-builder-canvas\"\n {...builderProps}\n />\n </div>\n )\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\" data-testid={testId}>\n {pageHeader && <PageHeader {...pageHeader} />}\n <ConnectedWorkflowsTable\n onOpenTemplate={(id) => openBuilder({ kind: 'template', id })}\n tabs={[\n ...(tabs ?? []).map(({ id, label, icon }) => ({ id, label, icon })),\n ...historyTabs.map((workflow) => ({\n id: workflow.external_id,\n label: workflow.name,\n icon: <WorkflowIcon className=\"size-3.5\" />,\n onClose: () => {\n closeHistoryTab(workflow.external_id)\n if (activeHistoryId === workflow.external_id) setEditorOpen(false)\n },\n })),\n ]}\n activeTabId={hostTab?.id ?? activeHistoryId ?? LIST_TAB}\n onTabChange={(id) => {\n if (tabs?.some((tab) => tab.id === id)) {\n setHostTabId(id)\n return\n }\n setHostTabId(null)\n selectHistoryTab(id === LIST_TAB ? null : id)\n if (editorOpen) {\n const workflow = workflows.find((item) => item.external_id === id)\n if (workflow) setEditing(workflow)\n else setEditorOpen(false)\n }\n }}\n content={\n hostTab ? (\n hostTab.content\n ) : runsFor ? (\n <ConnectedWorkflowHistory\n inline\n hideHeader\n workflow={runsFor}\n onOpenChange={(open) => !open && openHistory(null)}\n formatDate={formatFriendlyDate}\n labels={historyLabels}\n renderErrorReport={\n renderErrorReport &&\n ((run) =>\n renderErrorReport(\n JSON.stringify(\n {\n workflow_ext_id: runsFor.external_id,\n run_id: run.id,\n status: run.status,\n error: run.error,\n },\n null,\n 2\n )\n ))\n }\n // Offered where the host shows files (its `openFiles`).\n onOpenResult={host.environment?.openFiles ? openResult : undefined}\n />\n ) : undefined\n }\n automationsOnly\n gridId=\"automations-grid-v1\"\n describeTrigger={(workflow) =>\n workflow.on_demand ? l.manualTrigger : describeTrigger(workflow)\n }\n formatDate={formatFriendlyDate}\n renderPerson={renderPerson}\n onViewRuns={showHistory}\n onOpenRow={edit}\n onEdit={edit}\n triggerChipLabels={WORKFLOWS_PAGE_TRIGGER_CHIP_LABELS}\n labels={listLabels}\n // A narrow row (a phone) keeps the actions' icons, so the host's tabs keep their room.\n header={(isCompact) => (\n <>\n {runsFor && !hostTab && (\n <Button\n variant=\"ghost\"\n onClick={() => edit(runsFor)}\n aria-label={l.editAria}\n title={isCompact ? l.edit : undefined}\n >\n <Pencil className={isCompact ? 'size-4' : 'mr-1.5 size-4'} />\n {!isCompact && l.edit}\n </Button>\n )}\n <Button\n onClick={() => openBuilder({ kind: 'new' })}\n aria-label={isCompact ? l.newWorkflow : undefined}\n title={isCompact ? l.newWorkflow : undefined}\n data-testid=\"new-workflow-button\"\n >\n <Plus className={isCompact ? 'size-4' : 'mr-1.5 size-4'} />\n {!isCompact && l.newWorkflow}\n </Button>\n </>\n )}\n />\n <ConnectedTaskComposer\n kind=\"workflow\"\n saveOnly\n startLater\n open={editorOpen}\n onOpenChange={setEditorOpen}\n workflow={editing}\n />\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAqQgB,SAsKN,UAtKM,KAkDN,YAlDM;AAjPhB,SAAS,aAAa,SAAS,gBAAgC;AAC/D,SAAS,WAAW,QAAQ,MAAM,MAAM,YAAY,oBAAoB;AACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,kBAAwC;AACjD,SAAS,uBAAuB;AAGhC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,eAAe;AACxB,SAAS,kBAAkB,2BAA2B;AACtD;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,gCAAgC;AACzC,SAAS,+BAA+B;AAC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AC,cACP,iCACG;AAAA,qBAAW,CAAC,WACX;AAAA,YAAC;AAAA;AAAA,cACC,SAAQ;AAAA,cACR,SAAS,MAAM,KAAK,OAAO;AAAA,cAC3B,cAAY,EAAE;AAAA,cACd,OAAO,YAAY,EAAE,OAAO;AAAA,cAE5B;AAAA,oCAAC,UAAO,WAAW,YAAY,WAAW,iBAAiB;AAAA,gBAC1D,CAAC,aAAa,EAAE;AAAA;AAAA;AAAA,UACnB;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,MAAM,YAAY,EAAE,MAAM,MAAM,CAAC;AAAA,cAC1C,cAAY,YAAY,EAAE,cAAc;AAAA,cACxC,OAAO,YAAY,EAAE,cAAc;AAAA,cACnC,eAAY;AAAA,cAEZ;AAAA,oCAAC,QAAK,WAAW,YAAY,WAAW,iBAAiB;AAAA,gBACxD,CAAC,aAAa,EAAE;AAAA;AAAA;AAAA,UACnB;AAAA,WACF;AAAA;AAAA,IAEJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAQ;AAAA,QACR,YAAU;AAAA,QACV,MAAM;AAAA,QACN,cAAc;AAAA,QACd,UAAU;AAAA;AAAA,IACZ;AAAA,KACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Start a shared workflow in another workspace: the person picks one of the workspaces they belong
|
|
3
|
+
* to (a matter's, for a process of the skills workspace), and the workflow's run page opens there
|
|
4
|
+
* (`openWorkflow(id, { view: 'run', runIn })`), its pickers that workspace's. The server refuses a
|
|
5
|
+
* start by someone who is not a member of both.
|
|
6
|
+
*/
|
|
7
|
+
import { type WorkflowResponse } from '@arbidocs/react';
|
|
8
|
+
export interface StartWorkflowInDialogLabels {
|
|
9
|
+
title: (name: string) => string;
|
|
10
|
+
description: string;
|
|
11
|
+
choose: string;
|
|
12
|
+
start: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
none: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_START_WORKFLOW_IN_LABELS: StartWorkflowInDialogLabels;
|
|
17
|
+
export interface StartWorkflowInDialogProps {
|
|
18
|
+
workflow: WorkflowResponse;
|
|
19
|
+
onStart: (workspaceId: string) => void;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
labels?: Partial<StartWorkflowInDialogLabels>;
|
|
22
|
+
}
|
|
23
|
+
export declare function StartWorkflowInDialog({ workflow, onStart, onClose, labels, }: StartWorkflowInDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
|
+
import { useWorkspaces } from "@arbidocs/react";
|
|
5
|
+
import { Button, getEntityLabel } from "@arbidocs/react/ui";
|
|
6
|
+
import { ModalScaffold } from "../../settings/ModalScaffold.js";
|
|
7
|
+
const DEFAULT_START_WORKFLOW_IN_LABELS = {
|
|
8
|
+
title: (name) => `Start \u201C${name}\u201D in\u2026`,
|
|
9
|
+
description: `The run happens there: its files, people and threads are that ${getEntityLabel("WORKSPACE").toLowerCase()}'s.`,
|
|
10
|
+
choose: `Choose a ${getEntityLabel("WORKSPACE").toLowerCase()}`,
|
|
11
|
+
start: "Start",
|
|
12
|
+
cancel: "Cancel",
|
|
13
|
+
none: `You belong to no other ${getEntityLabel("WORKSPACE").toLowerCase()}.`
|
|
14
|
+
};
|
|
15
|
+
function StartWorkflowInDialog({
|
|
16
|
+
workflow,
|
|
17
|
+
onStart,
|
|
18
|
+
onClose,
|
|
19
|
+
labels
|
|
20
|
+
}) {
|
|
21
|
+
const l = { ...DEFAULT_START_WORKFLOW_IN_LABELS, ...labels };
|
|
22
|
+
const { data: workspaces = [] } = useWorkspaces();
|
|
23
|
+
const targets = useMemo(
|
|
24
|
+
() => workspaces.filter(
|
|
25
|
+
(ws) => ws.is_member !== false && ws.external_id !== workflow.workspace_ext_id
|
|
26
|
+
),
|
|
27
|
+
[workspaces, workflow.workspace_ext_id]
|
|
28
|
+
);
|
|
29
|
+
const [chosen, setChosen] = useState("");
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
ModalScaffold,
|
|
32
|
+
{
|
|
33
|
+
open: true,
|
|
34
|
+
onOpenChange: (open) => !open && onClose(),
|
|
35
|
+
title: l.title(workflow.name),
|
|
36
|
+
description: l.description,
|
|
37
|
+
showDescription: true,
|
|
38
|
+
size: "sm",
|
|
39
|
+
testId: "start-workflow-in-dialog",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx(ModalScaffold.Body, { children: targets.length ? /* @__PURE__ */ jsxs(
|
|
42
|
+
"select",
|
|
43
|
+
{
|
|
44
|
+
"aria-label": l.choose,
|
|
45
|
+
value: chosen,
|
|
46
|
+
onChange: (e) => setChosen(e.target.value),
|
|
47
|
+
className: "flex h-9 w-full rounded-md border border-input bg-background px-2 text-sm shadow-sm",
|
|
48
|
+
"data-testid": "start-workflow-in-select",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("option", { value: "", children: l.choose }),
|
|
51
|
+
targets.map((ws) => /* @__PURE__ */ jsx("option", { value: ws.external_id, children: ws.name }, ws.external_id))
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
) : /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.none }) }),
|
|
55
|
+
/* @__PURE__ */ jsxs(ModalScaffold.Footer, { children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onClose, children: l.cancel }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Button,
|
|
59
|
+
{
|
|
60
|
+
disabled: !chosen,
|
|
61
|
+
onClick: () => onStart(chosen),
|
|
62
|
+
"data-testid": "start-workflow-in-confirm",
|
|
63
|
+
children: l.start
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
DEFAULT_START_WORKFLOW_IN_LABELS,
|
|
73
|
+
StartWorkflowInDialog
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=StartWorkflowInDialog.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/connection/workflows/StartWorkflowInDialog.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * Start a shared workflow in another workspace: the person picks one of the workspaces they belong\n * to (a matter's, for a process of the skills workspace), and the workflow's run page opens there\n * (`openWorkflow(id, { view: 'run', runIn })`), its pickers that workspace's. The server refuses a\n * start by someone who is not a member of both.\n */\n\nimport { useMemo, useState } from 'react'\nimport { useWorkspaces, type WorkflowResponse } from '@arbidocs/react'\nimport { Button, getEntityLabel } from '@arbidocs/react/ui'\nimport { ModalScaffold } from '../../settings/ModalScaffold'\n\nexport interface StartWorkflowInDialogLabels {\n title: (name: string) => string\n description: string\n choose: string\n start: string\n cancel: string\n none: string\n}\n\nexport const DEFAULT_START_WORKFLOW_IN_LABELS: StartWorkflowInDialogLabels = {\n title: (name) => `Start \u201C${name}\u201D in\u2026`,\n description: `The run happens there: its files, people and threads are that ${getEntityLabel('WORKSPACE').toLowerCase()}'s.`,\n choose: `Choose a ${getEntityLabel('WORKSPACE').toLowerCase()}`,\n start: 'Start',\n cancel: 'Cancel',\n none: `You belong to no other ${getEntityLabel('WORKSPACE').toLowerCase()}.`,\n}\n\nexport interface StartWorkflowInDialogProps {\n workflow: WorkflowResponse\n onStart: (workspaceId: string) => void\n onClose: () => void\n labels?: Partial<StartWorkflowInDialogLabels>\n}\n\nexport function StartWorkflowInDialog({\n workflow,\n onStart,\n onClose,\n labels,\n}: StartWorkflowInDialogProps) {\n const l = { ...DEFAULT_START_WORKFLOW_IN_LABELS, ...labels }\n const { data: workspaces = [] } = useWorkspaces()\n // The workspaces the person belongs to, other than the workflow's own (a run there is its Run).\n const targets = useMemo(\n () =>\n workspaces.filter(\n (ws) => ws.is_member !== false && ws.external_id !== workflow.workspace_ext_id\n ),\n [workspaces, workflow.workspace_ext_id]\n )\n const [chosen, setChosen] = useState('')\n return (\n <ModalScaffold\n open\n onOpenChange={(open) => !open && onClose()}\n title={l.title(workflow.name)}\n description={l.description}\n showDescription\n size=\"sm\"\n testId=\"start-workflow-in-dialog\"\n >\n <ModalScaffold.Body>\n {targets.length ? (\n <select\n aria-label={l.choose}\n value={chosen}\n onChange={(e) => setChosen(e.target.value)}\n className=\"flex h-9 w-full rounded-md border border-input bg-background px-2 text-sm shadow-sm\"\n data-testid=\"start-workflow-in-select\"\n >\n <option value=\"\">{l.choose}</option>\n {targets.map((ws) => (\n <option key={ws.external_id} value={ws.external_id}>\n {ws.name}\n </option>\n ))}\n </select>\n ) : (\n <p className=\"text-sm text-muted-foreground\">{l.none}</p>\n )}\n </ModalScaffold.Body>\n <ModalScaffold.Footer>\n <Button variant=\"outline\" onClick={onClose}>\n {l.cancel}\n </Button>\n <Button\n disabled={!chosen}\n onClick={() => onStart(chosen)}\n data-testid=\"start-workflow-in-confirm\"\n >\n {l.start}\n </Button>\n </ModalScaffold.Footer>\n </ModalScaffold>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAkEU,SAOE,KAPF;AA3DV,SAAS,SAAS,gBAAgB;AAClC,SAAS,qBAA4C;AACrD,SAAS,QAAQ,sBAAsB;AACvC,SAAS,qBAAqB;AAWvB,MAAM,mCAAgE;AAAA,EAC3E,OAAO,CAAC,SAAS,eAAU,IAAI;AAAA,EAC/B,aAAa,iEAAiE,eAAe,WAAW,EAAE,YAAY,CAAC;AAAA,EACvH,QAAQ,YAAY,eAAe,WAAW,EAAE,YAAY,CAAC;AAAA,EAC7D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM,0BAA0B,eAAe,WAAW,EAAE,YAAY,CAAC;AAC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AC7B,eAAY;AAAA,cAEX,YAAE;AAAA;AAAA,UACL;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -45,6 +45,7 @@ export declare function useWorkflowsPageState({ initialBuilder, historyWorkflowI
|
|
|
45
45
|
agent_ext_id?: string | null;
|
|
46
46
|
auth_mode: import("@arbidocs/client").components["schemas"]["src__models__workflow__AuthMode"];
|
|
47
47
|
fact_ext_id?: string | null;
|
|
48
|
+
source_workflow_ext_id?: string | null;
|
|
48
49
|
last_fired_at?: string | null;
|
|
49
50
|
last_error?: string | null;
|
|
50
51
|
last_run_status?: string | null;
|
|
@@ -85,6 +86,7 @@ export declare function useWorkflowsPageState({ initialBuilder, historyWorkflowI
|
|
|
85
86
|
agent_ext_id?: string | null;
|
|
86
87
|
auth_mode: import("@arbidocs/client").components["schemas"]["src__models__workflow__AuthMode"];
|
|
87
88
|
fact_ext_id?: string | null;
|
|
89
|
+
source_workflow_ext_id?: string | null;
|
|
88
90
|
last_fired_at?: string | null;
|
|
89
91
|
last_error?: string | null;
|
|
90
92
|
last_run_status?: string | null;
|
|
@@ -120,6 +122,7 @@ export declare function useWorkflowsPageState({ initialBuilder, historyWorkflowI
|
|
|
120
122
|
agent_ext_id?: string | null;
|
|
121
123
|
auth_mode: import("@arbidocs/client").components["schemas"]["src__models__workflow__AuthMode"];
|
|
122
124
|
fact_ext_id?: string | null;
|
|
125
|
+
source_workflow_ext_id?: string | null;
|
|
123
126
|
last_fired_at?: string | null;
|
|
124
127
|
last_error?: string | null;
|
|
125
128
|
last_run_status?: string | null;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkUGSN47YE_cjs = require('../chunk-UGSN47YE.cjs');
|
|
5
5
|
var chunkKRQCUVH7_cjs = require('../chunk-KRQCUVH7.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkNVECYF2N_cjs = require('../chunk-NVECYF2N.cjs');
|
|
7
7
|
var chunkPBPO54KZ_cjs = require('../chunk-PBPO54KZ.cjs');
|
|
8
8
|
var chunkMWHVETKN_cjs = require('../chunk-MWHVETKN.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-F4ULSAOA.cjs');
|
|
10
10
|
require('../chunk-ZU2B2RZK.cjs');
|
|
11
11
|
var chunkOEJQFPWO_cjs = require('../chunk-OEJQFPWO.cjs');
|
|
12
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-GAVQFR6P.cjs');
|
|
13
13
|
require('../chunk-ZW6FPIFC.cjs');
|
|
14
14
|
require('../chunk-IPSHAMO2.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-VMXTOIXB.cjs');
|
|
16
16
|
require('../chunk-YZBDHBKI.cjs');
|
|
17
17
|
require('../chunk-CVPV4I7Z.cjs');
|
|
18
18
|
require('../chunk-PLIF5CUV.cjs');
|
|
@@ -21,11 +21,11 @@ require('../chunk-PLIF5CUV.cjs');
|
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "DEFAULT_PANEL_EDITOR_LABELS", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkUGSN47YE_cjs.DEFAULT_PANEL_EDITOR_LABELS; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "PanelEditor", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkUGSN47YE_cjs.PanelEditor; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "DASHBOARD_TEMPLATES", {
|
|
31
31
|
enumerable: true,
|
|
@@ -49,47 +49,47 @@ Object.defineProperty(exports, "usagePanels", {
|
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "ChartRenderer", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkNVECYF2N_cjs.ChartRenderer; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "ChartTable", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkNVECYF2N_cjs.ChartTable; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "DEFAULT_CHART_RENDERER_LABELS", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkNVECYF2N_cjs.DEFAULT_CHART_RENDERER_LABELS; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "DEFAULT_DASHBOARD_PANEL_LABELS", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkNVECYF2N_cjs.DEFAULT_DASHBOARD_PANEL_LABELS; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "DEFAULT_PANEL_VIEW_LABELS", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkNVECYF2N_cjs.DEFAULT_PANEL_VIEW_LABELS; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "DashboardCell", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkNVECYF2N_cjs.DashboardCell; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "DashboardGrid", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkNVECYF2N_cjs.DashboardGrid; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "DashboardPanel", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkNVECYF2N_cjs.DashboardPanel; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "PANEL_FORMATTERS", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkNVECYF2N_cjs.PANEL_FORMATTERS; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "PanelView", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkNVECYF2N_cjs.PanelView; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "clampPanelWidth", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkNVECYF2N_cjs.clampPanelWidth; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "DEFAULT_UNIT_FORMATTERS", {
|
|
95
95
|
enumerable: true,
|