@arbidocs/blocks 0.5.55 → 0.5.57
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-SPG5XOPH.cjs → ConnectedCallDock-PXETJN7A.cjs} +8 -8
- package/dist/{ConnectedCallDock-SPG5XOPH.cjs.map → ConnectedCallDock-PXETJN7A.cjs.map} +1 -1
- package/dist/{ConnectedCallDock-7SQ5MX6C.js → ConnectedCallDock-Q52GHY6G.js} +7 -7
- package/dist/{ConnectedCallDock-7SQ5MX6C.js.map → ConnectedCallDock-Q52GHY6G.js.map} +1 -1
- package/dist/{ConnectedCallRoom-K6QLTTZM.js → ConnectedCallRoom-TUTRI4Y2.js} +7 -7
- package/dist/{ConnectedCallRoom-K6QLTTZM.js.map → ConnectedCallRoom-TUTRI4Y2.js.map} +1 -1
- package/dist/{ConnectedCallRoom-GFZLXFRF.cjs → ConnectedCallRoom-XCD5R4ES.cjs} +8 -8
- package/dist/{ConnectedCallRoom-GFZLXFRF.cjs.map → ConnectedCallRoom-XCD5R4ES.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-FRWPDSCF.cjs → ConnectedNativeDocxComparison-5PZ6WSQZ.cjs} +17 -17
- package/dist/{ConnectedNativeDocxComparison-FRWPDSCF.cjs.map → ConnectedNativeDocxComparison-5PZ6WSQZ.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-RBYGJJRG.js → ConnectedNativeDocxComparison-XDXJY7BE.js} +16 -16
- package/dist/{ConnectedNativeDocxComparison-KF66UDAF.js.map → ConnectedNativeDocxComparison-XDXJY7BE.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-56H656VV.js → ConnectedNativeDocxEditor-LCG54CN6.js} +14 -14
- package/dist/{ConnectedNativeDocxEditor-56H656VV.js.map → ConnectedNativeDocxEditor-LCG54CN6.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-SFBUJLCE.cjs → ConnectedNativeDocxEditor-QPIT6V7X.cjs} +16 -16
- package/dist/{ConnectedNativeDocxEditor-SFBUJLCE.cjs.map → ConnectedNativeDocxEditor-QPIT6V7X.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-SC5P4I6K.cjs → ConnectedStreamedWordArtifact-27HU7JG2.cjs} +17 -17
- package/dist/ConnectedStreamedWordArtifact-27HU7JG2.cjs.map +1 -0
- package/dist/{ConnectedNativeDocxComparison-KF66UDAF.js → ConnectedStreamedWordArtifact-DJ2S2U5U.js} +16 -16
- package/dist/ConnectedStreamedWordArtifact-DJ2S2U5U.js.map +1 -0
- package/dist/{DocumentReviewCard-YMBLUCOJ.js → DocumentReviewCard-IOM476M4.js} +9 -9
- package/dist/{DocumentReviewCard-YMBLUCOJ.js.map → DocumentReviewCard-IOM476M4.js.map} +1 -1
- package/dist/{DocumentReviewCard-ZD76R6VW.cjs → DocumentReviewCard-S3ULXYVN.cjs} +14 -14
- package/dist/{DocumentReviewCard-ZD76R6VW.cjs.map → DocumentReviewCard-S3ULXYVN.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-HJTKCPX2.js → NativeDocxEditor-D6Z7BXTA.js} +4 -4
- package/dist/{NativeDocxEditor-HJTKCPX2.js.map → NativeDocxEditor-D6Z7BXTA.js.map} +1 -1
- package/dist/{NativeDocxEditor-TVZ6O6YS.cjs → NativeDocxEditor-HE4PQV5F.cjs} +8 -8
- package/dist/{NativeDocxEditor-TVZ6O6YS.cjs.map → NativeDocxEditor-HE4PQV5F.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-4DZ4YODA.js → WorkspaceTableView-F4PZMXN5.js} +4 -4
- package/dist/{WorkspaceTableView-4DZ4YODA.js.map → WorkspaceTableView-F4PZMXN5.js.map} +1 -1
- package/dist/{WorkspaceTableView-XHEVFCRP.cjs → WorkspaceTableView-OUPRGWRJ.cjs} +4 -4
- package/dist/{WorkspaceTableView-XHEVFCRP.cjs.map → WorkspaceTableView-OUPRGWRJ.cjs.map} +1 -1
- package/dist/agents/index.cjs +340 -340
- package/dist/agents/index.js +10 -10
- package/dist/calls/index.cjs +3 -3
- package/dist/calls/index.js +3 -3
- package/dist/chat/index.cjs +81 -81
- package/dist/chat/index.js +4 -4
- package/dist/{chunk-UF7YJ2N6.js → chunk-32SVMYRM.js} +4 -4
- package/dist/{chunk-UF7YJ2N6.js.map → chunk-32SVMYRM.js.map} +1 -1
- package/dist/{chunk-VFSHI7IX.js → chunk-5TFI4YW2.js} +3 -3
- package/dist/{chunk-VFSHI7IX.js.map → chunk-5TFI4YW2.js.map} +1 -1
- package/dist/{chunk-VM6UCMII.cjs → chunk-77U3DP44.cjs} +5 -5
- package/dist/{chunk-VM6UCMII.cjs.map → chunk-77U3DP44.cjs.map} +1 -1
- package/dist/{chunk-K7ZDC5A2.js → chunk-B2GL46SB.js} +3 -3
- package/dist/{chunk-K7ZDC5A2.js.map → chunk-B2GL46SB.js.map} +1 -1
- package/dist/chunk-BJT4TWWX.cjs +18 -0
- package/dist/{chunk-MVMQWERS.cjs.map → chunk-BJT4TWWX.cjs.map} +1 -1
- package/dist/{chunk-YTB6DLAD.cjs → chunk-BRYHW3OL.cjs} +4 -4
- package/dist/{chunk-YTB6DLAD.cjs.map → chunk-BRYHW3OL.cjs.map} +1 -1
- package/dist/{chunk-PSRMPGQU.js → chunk-C2J6FBLB.js} +3 -3
- package/dist/{chunk-PSRMPGQU.js.map → chunk-C2J6FBLB.js.map} +1 -1
- package/dist/{chunk-QXOB5BV3.cjs → chunk-CPQRQEJL.cjs} +3 -3
- package/dist/{chunk-QXOB5BV3.cjs.map → chunk-CPQRQEJL.cjs.map} +1 -1
- package/dist/{chunk-YXDHJC4P.js → chunk-DK4NN46N.js} +3 -3
- package/dist/{chunk-YXDHJC4P.js.map → chunk-DK4NN46N.js.map} +1 -1
- package/dist/{chunk-GPQDC2DG.js → chunk-FKWQAXG6.js} +4 -4
- package/dist/{chunk-GPQDC2DG.js.map → chunk-FKWQAXG6.js.map} +1 -1
- package/dist/{chunk-MLR3FOS7.js → chunk-GRMMUVQG.js} +4 -4
- package/dist/{chunk-MLR3FOS7.js.map → chunk-GRMMUVQG.js.map} +1 -1
- package/dist/{chunk-Y4B4BJGA.cjs → chunk-I3ITXJRO.cjs} +21 -21
- package/dist/{chunk-Y4B4BJGA.cjs.map → chunk-I3ITXJRO.cjs.map} +1 -1
- package/dist/{chunk-WM4JKQTL.cjs → chunk-I6CGE7RZ.cjs} +10 -10
- package/dist/{chunk-WM4JKQTL.cjs.map → chunk-I6CGE7RZ.cjs.map} +1 -1
- package/dist/{chunk-RXOEQQLW.js → chunk-JIXJR6L2.js} +4 -4
- package/dist/{chunk-RXOEQQLW.js.map → chunk-JIXJR6L2.js.map} +1 -1
- package/dist/{chunk-K4ZKREVK.js → chunk-JV2CJGHV.js} +3 -3
- package/dist/{chunk-K4ZKREVK.js.map → chunk-JV2CJGHV.js.map} +1 -1
- package/dist/{chunk-IVGOB4RW.cjs → chunk-KD6ECCAN.cjs} +3 -3
- package/dist/{chunk-IVGOB4RW.cjs.map → chunk-KD6ECCAN.cjs.map} +1 -1
- package/dist/chunk-KHUWQL2Q.cjs +18 -0
- package/dist/{chunk-NOQ3NSBD.cjs.map → chunk-KHUWQL2Q.cjs.map} +1 -1
- package/dist/{chunk-N4ARBAL6.cjs → chunk-KO3CME7Z.cjs} +9 -9
- package/dist/{chunk-N4ARBAL6.cjs.map → chunk-KO3CME7Z.cjs.map} +1 -1
- package/dist/{chunk-75Z5AUMM.js → chunk-KTC6OVQD.js} +3 -3
- package/dist/{chunk-75Z5AUMM.js.map → chunk-KTC6OVQD.js.map} +1 -1
- package/dist/{chunk-L7KXNEBC.cjs → chunk-L6KTANY2.cjs} +37 -37
- package/dist/{chunk-L7KXNEBC.cjs.map → chunk-L6KTANY2.cjs.map} +1 -1
- package/dist/{chunk-4NI6CVBC.cjs → chunk-L7ROIPS7.cjs} +27 -27
- package/dist/{chunk-4NI6CVBC.cjs.map → chunk-L7ROIPS7.cjs.map} +1 -1
- package/dist/{chunk-R42KJSBH.js → chunk-M24OG3RP.js} +6 -6
- package/dist/{chunk-R42KJSBH.js.map → chunk-M24OG3RP.js.map} +1 -1
- package/dist/{chunk-BTTUZZN3.js → chunk-NIA4H7QN.js} +3 -3
- package/dist/{chunk-BTTUZZN3.js.map → chunk-NIA4H7QN.js.map} +1 -1
- package/dist/{chunk-YQYA2XP3.cjs → chunk-NT2PELCF.cjs} +18 -18
- package/dist/{chunk-YQYA2XP3.cjs.map → chunk-NT2PELCF.cjs.map} +1 -1
- package/dist/{chunk-AEXFUPO7.js → chunk-ORFP3QJQ.js} +3 -3
- package/dist/{chunk-AEXFUPO7.js.map → chunk-ORFP3QJQ.js.map} +1 -1
- package/dist/{chunk-J25HZUGJ.js → chunk-PJJZEDR3.js} +3 -3
- package/dist/{chunk-J25HZUGJ.js.map → chunk-PJJZEDR3.js.map} +1 -1
- package/dist/{chunk-DV725PNE.cjs → chunk-Q6N56ZBF.cjs} +10 -10
- package/dist/{chunk-DV725PNE.cjs.map → chunk-Q6N56ZBF.cjs.map} +1 -1
- package/dist/{chunk-YTLDM4S5.js → chunk-QE7VE7HV.js} +9 -9
- package/dist/{chunk-YTLDM4S5.js.map → chunk-QE7VE7HV.js.map} +1 -1
- package/dist/{chunk-C5Y5AQ5B.js → chunk-QWVZTX2P.js} +3 -3
- package/dist/{chunk-C5Y5AQ5B.js.map → chunk-QWVZTX2P.js.map} +1 -1
- package/dist/{chunk-UIKLUVKV.js → chunk-RAK4EBNU.js} +3 -3
- package/dist/{chunk-UIKLUVKV.js.map → chunk-RAK4EBNU.js.map} +1 -1
- package/dist/{chunk-TTSSW6CH.js → chunk-RK2T6RFL.js} +3 -3
- package/dist/{chunk-TTSSW6CH.js.map → chunk-RK2T6RFL.js.map} +1 -1
- package/dist/{chunk-LMD5WNZB.js → chunk-RLTTVBCT.js} +6 -6
- package/dist/{chunk-LMD5WNZB.js.map → chunk-RLTTVBCT.js.map} +1 -1
- package/dist/{chunk-JBQ4NYDD.cjs → chunk-RZUZBHIH.cjs} +3 -3
- package/dist/{chunk-JBQ4NYDD.cjs.map → chunk-RZUZBHIH.cjs.map} +1 -1
- package/dist/{chunk-43KLNPR5.cjs → chunk-SRD5YJJI.cjs} +3 -3
- package/dist/{chunk-43KLNPR5.cjs.map → chunk-SRD5YJJI.cjs.map} +1 -1
- package/dist/{chunk-2XOTUCZ5.js → chunk-TM6YSWH5.js} +3 -3
- package/dist/{chunk-2XOTUCZ5.js.map → chunk-TM6YSWH5.js.map} +1 -1
- package/dist/{chunk-RXREIA7W.cjs → chunk-TX3JM4EI.cjs} +11 -11
- package/dist/{chunk-RXREIA7W.cjs.map → chunk-TX3JM4EI.cjs.map} +1 -1
- package/dist/{chunk-YD3RN2FY.cjs → chunk-UZCHVJ6L.cjs} +3 -3
- package/dist/{chunk-YD3RN2FY.cjs.map → chunk-UZCHVJ6L.cjs.map} +1 -1
- package/dist/{chunk-IEMN3P5Q.cjs → chunk-VY3JLGRZ.cjs} +7 -7
- package/dist/{chunk-IEMN3P5Q.cjs.map → chunk-VY3JLGRZ.cjs.map} +1 -1
- package/dist/{chunk-H7FV7YSG.js → chunk-WDJRMPRI.js} +3 -3
- package/dist/{chunk-H7FV7YSG.js.map → chunk-WDJRMPRI.js.map} +1 -1
- package/dist/{chunk-GKHIRR5A.cjs → chunk-WDR6FO22.cjs} +5 -5
- package/dist/{chunk-GKHIRR5A.cjs.map → chunk-WDR6FO22.cjs.map} +1 -1
- package/dist/{chunk-WVRAMYDQ.js → chunk-X5QOPSXT.js} +3 -3
- package/dist/{chunk-WVRAMYDQ.js.map → chunk-X5QOPSXT.js.map} +1 -1
- package/dist/{chunk-4ASLRHJC.cjs → chunk-XZVAKOE2.cjs} +4 -4
- package/dist/{chunk-4ASLRHJC.cjs.map → chunk-XZVAKOE2.cjs.map} +1 -1
- package/dist/{chunk-EP4K4YQG.cjs → chunk-YMZAHBFL.cjs} +6 -6
- package/dist/{chunk-EP4K4YQG.cjs.map → chunk-YMZAHBFL.cjs.map} +1 -1
- package/dist/{chunk-KYNWO6EC.js → chunk-YS7MLS4U.js} +4 -4
- package/dist/{chunk-KYNWO6EC.js.map → chunk-YS7MLS4U.js.map} +1 -1
- package/dist/{chunk-PICGTGEB.cjs → chunk-Z6DNYFVM.cjs} +3 -3
- package/dist/{chunk-PICGTGEB.cjs.map → chunk-Z6DNYFVM.cjs.map} +1 -1
- package/dist/{chunk-XTRV2JHZ.cjs → chunk-ZDX7X7R5.cjs} +35 -35
- package/dist/{chunk-XTRV2JHZ.cjs.map → chunk-ZDX7X7R5.cjs.map} +1 -1
- package/dist/connect/docx.cjs +20 -20
- package/dist/connect/docx.js +16 -16
- package/dist/connect/index.cjs +663 -663
- package/dist/connect/index.js +40 -40
- package/dist/connect/viewer.cjs +60 -60
- package/dist/connect/viewer.js +13 -13
- package/dist/docx/index.cjs +51 -51
- package/dist/docx/index.js +4 -4
- package/dist/facts/index.cjs +57 -57
- package/dist/facts/index.js +5 -5
- package/dist/files/index.cjs +236 -236
- package/dist/files/index.js +4 -4
- package/dist/home/index.cjs +29 -29
- package/dist/home/index.js +4 -4
- package/dist/index.cjs +658 -658
- package/dist/index.js +18 -18
- package/dist/settings/index.cjs +2 -2
- package/dist/settings/index.js +2 -2
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +21 -21
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +6 -6
- package/dist/studio/index.js +5 -5
- package/dist/workflow-canvas/index.cjs +41 -41
- package/dist/workflow-canvas/index.js +16 -16
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-RBYGJJRG.js.map +0 -1
- package/dist/ConnectedStreamedWordArtifact-SC5P4I6K.cjs.map +0 -1
- package/dist/chunk-MVMQWERS.cjs +0 -18
- package/dist/chunk-NOQ3NSBD.cjs +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAssistantDock, useChatSurface } from './chunk-
|
|
2
|
+
import { useAssistantDock, useChatSurface } from './chunk-C2J6FBLB.js';
|
|
3
3
|
import { Toaster } from './chunk-OKERRHLH.js';
|
|
4
4
|
import { Search, Pin, X, CheckCircle, Tag, Check } from 'lucide-react';
|
|
5
5
|
import { HoverCardContent, cn, Input, Button, Badge, Tabs, TabsList, TabsTrigger, TabsContent } from '@arbidocs/react/ui';
|
|
@@ -387,5 +387,5 @@ function AssistantToaster(props) {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
export { AssistantToaster, ContextActionButton, ContextCheckRow, ContextPanelContent, ContextPanelFooter, ContextPanelTabs, ContextPickerList, ContextPickerRow, ContextSearchInput, ContextSelectList, ContextSelectRow, DEFAULT_LABEL_PIN_ROW_LABELS, DEFAULT_PINNED_DOC_CHIP_LABELS, LabelPinRow, PinnedDocChip, useDismissibleCard };
|
|
390
|
-
//# sourceMappingURL=chunk-
|
|
391
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-QWVZTX2P.js.map
|
|
391
|
+
//# sourceMappingURL=chunk-QWVZTX2P.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/chat/PinnedDocChip.tsx","../src/chat/ContextPanel.tsx","../src/lib/useDismissibleCard.ts","../src/chat/LabelPinRow.tsx","../src/chat/AssistantToaster.tsx"],"names":["ContextPanelContent","jsx","cn","jsxs","ContextSearchInput","ContextActionButton","TagIcon"],"mappings":";;;;;;;AAUO,IAAM,8BAAA,GAAsD;AAAA,EACjE,KAAA,EAAO,OAAA;AAAA,EACP,aAAA,EAAe,CAAC,KAAA,KAAU,CAAA,MAAA,EAAS,KAAK,CAAA;AAC1C;AAiBO,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA,GAAS;AACX,CAAA,EAAuB;AACrB,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EAAe;AAC3C,EAAA,uBAAOA,IAAC,OAAA,EAAA,EAAS,GAAG,OAAO,QAAA,EAAU,IAAA,CAAK,UAAU,eAAA,EAAiB,CAAA;AACvE","file":"chunk-C5Y5AQ5B.js","sourcesContent":["import { Pin, X } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\n/** Every fixed string of the chip. Pass a partial `labels` to translate or reword. */\nexport interface PinnedDocChipLabels {\n unpin: string\n /** Accessible name; `title` is the pinned document's name. */\n unpinDocument: (title: string) => string\n}\n\nexport const DEFAULT_PINNED_DOC_CHIP_LABELS: PinnedDocChipLabels = {\n unpin: 'Unpin',\n unpinDocument: (title) => `Unpin ${title}`,\n}\n\nexport interface PinnedDocChipProps {\n title: string\n onUnpin: () => void\n className?: string\n labels?: Partial<PinnedDocChipLabels>\n testId?: string\n}\n\n/**\n * The pinned-document chip that lives inside a composer's attach button: shows which document\n * holds the full-context pin and unpins it in ONE tap (the X is always visible, so touch and\n * keyboard reach it). It is a span with button semantics because it sits inside the attach\n * `<button>`, where nested buttons are invalid; `stopPropagation` keeps the tap from also\n * triggering the parent.\n */\nexport function PinnedDocChip({\n title,\n onUnpin,\n className,\n labels,\n testId = 'unpin-document-button',\n}: PinnedDocChipProps) {\n const l = { ...DEFAULT_PINNED_DOC_CHIP_LABELS, ...labels }\n return (\n <span\n role=\"button\"\n tabIndex={0}\n data-slot=\"pinned-doc-chip\"\n onClick={(e) => {\n e.stopPropagation()\n onUnpin()\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation()\n onUnpin()\n }\n }}\n title={l.unpin}\n aria-label={l.unpinDocument(title)}\n className={cn(\n '-mx-0.5 flex min-w-0 items-center gap-1 rounded-sm px-1 text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className\n )}\n data-testid={testId}\n >\n <Pin className=\"h-3 w-3 shrink-0 fill-primary\" />\n <X className=\"order-last h-3 w-3 shrink-0 text-muted-foreground\" />\n <span className=\"truncate text-sm\">{title}</span>\n </span>\n )\n}\n","import {\n forwardRef,\n Fragment,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type MouseEventHandler,\n type ReactNode,\n} from 'react'\nimport { Check, CheckCircle, Search } from 'lucide-react'\nimport {\n Badge,\n Button,\n HoverCardContent,\n Input,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n cn,\n type ButtonProps,\n} from '@arbidocs/react/ui'\n\n/**\n * Parts of the composer's \"in this chat\" panels (files, facts): a card that opens upward from the\n * composer, a grouped pick list, and below it the labels, search and bulk actions.\n */\n\n/** The card itself: width follows the chat input (`--chat-input-width`), bounded on small screens. */\nexport const ContextPanelContent = forwardRef<\n ElementRef<typeof HoverCardContent>,\n ComponentPropsWithoutRef<typeof HoverCardContent>\n>(function ContextPanelContent({ className, onClick, ...props }, ref) {\n return (\n <HoverCardContent\n ref={ref}\n side=\"top\"\n align=\"start\"\n data-slot=\"context-panel\"\n // Clicks inside must not bubble (via the React portal) to a click-to-toggle wrapper.\n onClick={(e) => {\n e.stopPropagation()\n onClick?.(e)\n }}\n className={cn(\n 'w-[var(--chat-input-width,var(--radix-hover-card-content-available-width))] max-h-[var(--radix-hover-card-content-available-height)] max-w-[95vw] overflow-y-auto overscroll-contain rounded-md border border-border bg-muted p-3 shadow-lg',\n className\n )}\n {...props}\n />\n )\n})\n\nexport interface ContextPickerGroup {\n key: string\n heading: string\n /** Id of the heading element. */\n testId?: string\n /** Shown after the heading as `(n)`. */\n count: number\n children: ReactNode\n}\n\nexport interface ContextPickerListProps {\n groups: ContextPickerGroup[]\n /** Shown instead of the groups when every group is empty. */\n emptyText: string\n testId: string\n className?: string\n}\n\n/**\n * Two (or more) headed groups, e.g. \"In this conversation\" then \"In this workspace\". Each heading\n * pins to the top of the scroller and is pushed out by the next one; the second parks below the\n * first (32px = a heading's own height), so both stay visible however far down you scroll.\n */\nexport function ContextPickerList({\n groups,\n emptyText,\n testId,\n className,\n}: ContextPickerListProps) {\n const isEmpty = groups.every((g) => g.count === 0)\n return (\n <div\n className={cn('max-h-[400px] space-y-1 overflow-y-auto', className)}\n data-slot=\"context-picker-list\"\n data-testid={testId}\n onClick={(e) => e.stopPropagation()}\n >\n {isEmpty ? (\n <p className=\"p-2 text-sm text-muted-foreground\">{emptyText}</p>\n ) : (\n groups.map((g, index) => (\n <Fragment key={g.key}>\n <div\n className={cn(\n 'sticky z-10 bg-muted px-2 py-1.5 text-sm font-medium text-muted-foreground',\n index === 0 ? 'top-0' : 'top-8'\n )}\n data-testid={g.testId}\n >\n {g.heading} ({g.count})\n </div>\n {g.children}\n </Fragment>\n ))\n )}\n </div>\n )\n}\n\nfunction CheckGlyph({ isChecked, className }: { isChecked: boolean; className?: string }) {\n return (\n <span\n className={cn(\n 'flex size-3.5 shrink-0 items-center justify-center rounded-sm border',\n isChecked ? 'border-primary bg-primary text-primary-foreground' : 'border-input',\n className\n )}\n >\n {isChecked && <Check className=\"size-3\" />}\n </span>\n )\n}\n\nexport interface ContextPickerRowProps {\n isSelected: boolean\n onToggle: () => void\n testId?: string\n children: ReactNode\n}\n\n/** A whole-row toggle (e.g. a fact): check glyph then clamped text. */\nexport function ContextPickerRow({\n isSelected,\n onToggle,\n testId,\n children,\n}: ContextPickerRowProps) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n onToggle()\n }}\n aria-pressed={isSelected}\n data-testid={testId}\n className={cn(\n 'flex w-full items-start gap-2 rounded p-2 text-left text-sm transition-colors pointer-coarse:min-h-11',\n isSelected ? 'bg-primary/10' : 'bg-card hover:bg-muted'\n )}\n >\n <CheckGlyph isChecked={isSelected} className=\"mt-0.5\" />\n <span className=\"line-clamp-2 min-w-0 text-foreground\">{children}</span>\n </button>\n )\n}\n\nexport interface ContextCheckRowProps {\n isSelected: boolean\n /** The check toggle: accessible name (e.g. \"Add to conversation\"), handler and test id. */\n toggle: { label: string; onToggle: () => void; testId?: string }\n /** Status glyph between the toggle and the content. */\n status?: ReactNode\n testId?: string\n /** The row's content (e.g. a document pill that opens the document). */\n children: ReactNode\n}\n\n/** A row with its own check toggle plus a content slot (e.g. a document, which opens on click). */\nexport function ContextCheckRow({\n isSelected,\n toggle,\n status,\n testId,\n children,\n}: ContextCheckRowProps) {\n return (\n <div\n className=\"flex items-center gap-2 rounded px-1 py-0.5\"\n data-slot=\"context-check-row\"\n data-testid={testId}\n >\n <button\n type=\"button\"\n aria-label={toggle.label}\n aria-pressed={isSelected}\n onClick={toggle.onToggle}\n data-testid={toggle.testId}\n className=\"flex shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:size-11\"\n >\n <CheckGlyph isChecked={isSelected} />\n </button>\n {status}\n {children}\n </div>\n )\n}\n\nexport interface ContextSelectListProps {\n children: ReactNode\n}\n\n/** Compact single-select list (e.g. choose the document to pin). */\nexport function ContextSelectList({ children }: ContextSelectListProps) {\n return <div className=\"max-h-[150px] space-y-2 overflow-y-auto\">{children}</div>\n}\n\nexport interface ContextSelectRowProps {\n isSelected: boolean\n onSelect: MouseEventHandler<HTMLButtonElement>\n status?: ReactNode\n title: string\n testId?: string\n}\n\nexport function ContextSelectRow({\n isSelected,\n onSelect,\n status,\n title,\n testId,\n}: ContextSelectRowProps) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n onSelect(e)\n }}\n aria-pressed={isSelected}\n data-testid={testId}\n className={cn(\n 'flex w-full items-center gap-2 rounded p-2 text-left text-sm transition-colors pointer-coarse:min-h-11',\n isSelected ? 'border border-primary/30 bg-primary/10' : 'bg-card hover:bg-muted'\n )}\n >\n {status}\n <span className=\"min-w-0 flex-1 truncate text-foreground\" title={title}>\n {title}\n </span>\n {isSelected && <CheckCircle className=\"size-3.5 shrink-0 text-primary\" />}\n </button>\n )\n}\n\nexport interface ContextPanelFooterProps {\n /** Label shortcut chips (host-supplied row). */\n labels?: ReactNode\n /** The search box. */\n search: ReactNode\n /** Icon + title of the panel; omit when tabs already name it. */\n title?: ReactNode\n /** The action buttons, right aligned. */\n actions: ReactNode\n}\n\n/** Everything below the list: the panel opens upward, so its controls sit nearest the button. */\nexport function ContextPanelFooter({ labels, search, title, actions }: ContextPanelFooterProps) {\n return (\n <div className=\"mt-3 space-y-2 border-t border-border pt-3\" data-slot=\"context-panel-footer\">\n {labels}\n {search}\n <div\n className={cn(\n 'flex flex-wrap items-center gap-x-2 gap-y-1.5',\n title ? 'justify-between' : 'justify-end'\n )}\n >\n {title && (\n <div className=\"flex min-w-0 items-center gap-2 text-sm font-medium text-foreground\">\n {title}\n </div>\n )}\n <div className=\"flex flex-wrap items-center gap-1.5\">{actions}</div>\n </div>\n </div>\n )\n}\n\nexport const ContextSearchInput = forwardRef<\n HTMLInputElement,\n ComponentPropsWithoutRef<typeof Input>\n>(function ContextSearchInput({ className, onClick, ...props }, ref) {\n return (\n <div className=\"relative\" onClick={(e) => e.stopPropagation()}>\n <Search className=\"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n <Input\n ref={ref}\n className={cn('h-7 bg-background pl-7 text-sm', className)}\n onClick={onClick}\n {...props}\n />\n </div>\n )\n})\n\nexport interface ContextActionButtonProps extends Omit<ButtonProps, 'size'> {\n icon?: ReactNode\n /** Badge after the label; hidden at 0 / undefined. */\n count?: number\n /** Put the icon after the label (bulk Add / Remove) rather than before it. */\n isIconTrailing?: boolean\n}\n\n/** Compact action of the panel footer (stops click propagation so the card stays open). */\nexport const ContextActionButton = forwardRef<HTMLButtonElement, ContextActionButtonProps>(\n function ContextActionButton(\n { icon, count, isIconTrailing, onClick, children, className, variant = 'outline', ...props },\n ref\n ) {\n return (\n <Button\n ref={ref}\n variant={variant}\n size=\"sm\"\n className={cn('flex h-6 items-center gap-1 px-2 text-sm pointer-coarse:h-11', className)}\n onClick={(e) => {\n e.stopPropagation()\n onClick?.(e)\n }}\n {...props}\n >\n {!isIconTrailing && icon}\n {children}\n {isIconTrailing && icon}\n {count != null && count > 0 && (\n <Badge variant=\"outline\" className=\"badge-count ml-1\">\n {count}\n </Badge>\n )}\n </Button>\n )\n }\n)\n\nexport interface ContextTab {\n value: string\n /** Visible tab name, e.g. \"Documents\". */\n label: string\n /** Count shown in the tab label. */\n count: number\n testId?: string\n content: ReactNode\n}\n\nexport interface ContextPanelTabsProps {\n tabs: ContextTab[]\n value: string\n onValueChange: (value: string) => void\n testId?: string\n /** Extra classes for the tab strip (e.g. leave room for a sheet's close button). */\n listClassName?: string\n}\n\n/** The panel's tab strip (Radix tabs: roving tabindex, arrow keys) and the active tab's content. */\nexport function ContextPanelTabs({\n tabs,\n value,\n onValueChange,\n testId,\n listClassName,\n}: ContextPanelTabsProps) {\n return (\n <Tabs value={value} onValueChange={onValueChange} data-testid={testId}>\n <TabsList\n className={cn('grid h-auto w-full grid-cols-2 pointer-coarse:h-auto', listClassName)}\n >\n {tabs.map((t) => (\n <TabsTrigger key={t.value} value={t.value} data-testid={t.testId} className=\"gap-1.5\">\n {t.label}\n <Badge variant=\"outline\" className=\"badge-count\">\n {t.count}\n </Badge>\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.value} value={t.value} className=\"mt-3\">\n {t.content}\n </TabsContent>\n ))}\n </Tabs>\n )\n}\n","import { useEffect, type RefObject } from 'react'\n\nexport interface UseDismissibleCardOptions {\n isOpen: boolean\n onClose: () => void\n /** The card's content: clicks inside never dismiss. */\n contentRef: RefObject<HTMLElement | null>\n /** Focused when the card opens (the panel is opened to find something: typing just works). */\n focusRef?: RefObject<HTMLElement | null>\n}\n\n/**\n * Behaviour of a click-opened card: focus its search box on open, Escape closes it, and a press\n * outside it (or outside any portaled popper that belongs to it, e.g. a dropdown menu opened from\n * inside) closes it too. Bound only while open.\n */\nexport function useDismissibleCard({\n isOpen,\n onClose,\n contentRef,\n focusRef,\n}: UseDismissibleCardOptions): void {\n // rAF lets the portaled content mount before focusing.\n useEffect(() => {\n if (!isOpen) return\n const id = requestAnimationFrame(() => focusRef?.current?.focus())\n return () => cancelAnimationFrame(id)\n }, [isOpen, focusRef])\n\n useEffect(() => {\n if (!isOpen) return\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Escape') return\n e.stopPropagation()\n onClose()\n }\n document.addEventListener('keydown', onKeyDown)\n return () => document.removeEventListener('keydown', onKeyDown)\n }, [isOpen, onClose])\n\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (e: MouseEvent) => {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (contentRef.current?.contains(target)) return\n if (target.closest('[data-radix-popper-content-wrapper]')) return\n onClose()\n }\n document.addEventListener('mousedown', onPointerDown)\n return () => document.removeEventListener('mousedown', onPointerDown)\n }, [isOpen, onClose, contentRef])\n}\n","import { Tag as TagIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PinnableLabel {\n id: string\n name: string\n /** The label's own colour (any CSS colour): the same hue everywhere the label appears. */\n color: string\n /** Ids of the items carrying this label. */\n itemIds: string[]\n}\n\nexport interface LabelPinRowLabels {\n remove: (count: number, name: string) => string\n add: (count: number, name: string) => string\n}\n\nexport const DEFAULT_LABEL_PIN_ROW_LABELS: LabelPinRowLabels = {\n remove: (count, name) => `Remove the ${count} “${name}” item(s) from this chat`,\n add: (count, name) => `Add the ${count} “${name}” item(s) to this chat`,\n}\n\nexport interface LabelPinRowProps {\n labels: PinnableLabel[]\n /** Ids currently in the conversation. */\n selectedIds: string[]\n /** Add every id (already de-duplicated against the chat). */\n onAdd: (ids: string[]) => void\n /** Remove every id. */\n onRemove: (ids: string[]) => void\n testId?: string\n copy?: Partial<LabelPinRowLabels>\n}\n\n/**\n * Label shortcuts inside the in-chat panels: one chip per label in use; clicking it pins\n * everything carrying that label. A chip whose items are ALL in the chat reads as active and\n * clicking it takes them back out, so a label is a toggle rather than a one-way add.\n */\nexport function LabelPinRow({\n labels,\n selectedIds,\n onAdd,\n onRemove,\n testId = 'label-pin-row',\n copy,\n}: LabelPinRowProps) {\n const l = { ...DEFAULT_LABEL_PIN_ROW_LABELS, ...copy }\n const usable = labels.filter((label) => label.itemIds.length > 0)\n if (usable.length === 0) return null\n\n const selectedSet = new Set(selectedIds)\n\n return (\n <div\n className=\"flex flex-wrap items-center gap-1\"\n data-slot=\"label-pin-row\"\n data-testid={testId}\n >\n <TagIcon className=\"size-3.5 shrink-0 text-muted-foreground\" aria-hidden />\n {usable.map((label) => {\n const allIn = label.itemIds.every((id) => selectedSet.has(id))\n return (\n <button\n key={label.id}\n type=\"button\"\n aria-pressed={allIn}\n title={\n allIn\n ? l.remove(label.itemIds.length, label.name)\n : l.add(label.itemIds.length, label.name)\n }\n onClick={() =>\n allIn\n ? onRemove(label.itemIds)\n : onAdd(label.itemIds.filter((id) => !selectedSet.has(id)))\n }\n className={cn(\n 'flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11',\n allIn ? 'text-white' : 'bg-muted text-foreground hover:brightness-95'\n )}\n // Pinned reads as the label filled in with its own colour; at rest it's the muted\n // pill with the colour on the dot, matching the label pills on documents and facts.\n style={\n allIn\n ? { backgroundColor: label.color, borderColor: label.color }\n : { borderColor: `${label.color}66` }\n }\n data-testid={`${testId}-${label.id}`}\n >\n {!allIn && (\n <span\n className=\"size-1.5 shrink-0 rounded-full\"\n style={{ backgroundColor: label.color }}\n aria-hidden\n />\n )}\n <span className=\"max-w-[120px] truncate\">{label.name}</span>\n <span className=\"tabular-nums opacity-70\">{label.itemIds.length}</span>\n </button>\n )\n })}\n </div>\n )\n}\n","import { Toaster, type ShellToasterProps } from '../shell/Toaster'\nimport { useAssistantDock } from './AssistantDock'\nimport { useChatSurface } from './chat-surface'\n\nexport type AssistantToasterProps = Omit<ShellToasterProps, 'dockOpen'>\n\n/**\n * The shell `Toaster` wired to the assistant dock: while the dock is open (and offered: a mounted\n * page chat hides it) a right-aligned toast stack slides clear of it. Pass `dockWidth` when the\n * `AssistantDock` has a custom `width`.\n */\nexport function AssistantToaster(props: AssistantToasterProps) {\n const dock = useAssistantDock()\n const { isDockAvailable } = useChatSurface()\n return <Toaster {...props} dockOpen={dock.isOpen && isDockAvailable} />\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/chat/PinnedDocChip.tsx","../src/chat/ContextPanel.tsx","../src/lib/useDismissibleCard.ts","../src/chat/LabelPinRow.tsx","../src/chat/AssistantToaster.tsx"],"names":["ContextPanelContent","jsx","cn","jsxs","ContextSearchInput","ContextActionButton","TagIcon"],"mappings":";;;;;;;AAUO,IAAM,8BAAA,GAAsD;AAAA,EACjE,KAAA,EAAO,OAAA;AAAA,EACP,aAAA,EAAe,CAAC,KAAA,KAAU,CAAA,MAAA,EAAS,KAAK,CAAA;AAC1C;AAiBO,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA,GAAS;AACX,CAAA,EAAuB;AACrB,EAAA,MAAM,CAAA,GAAI,EAAE,GAAG,8BAAA,EAAgC,GAAG,MAAA,EAAO;AACzD,EAAA,uBACE,IAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,QAAA,EAAU,CAAA;AAAA,MACV,WAAA,EAAU,iBAAA;AAAA,MACV,OAAA,EAAS,CAAC,CAAA,KAAM;AACd,QAAA,CAAA,CAAE,eAAA,EAAgB;AAClB,QAAA,OAAA,EAAQ;AAAA,MACV,CAAA;AAAA,MACA,SAAA,EAAW,CAAC,CAAA,KAAM;AAChB,QAAA,IAAI,CAAA,CAAE,GAAA,KAAQ,OAAA,IAAW,CAAA,CAAE,QAAQ,GAAA,EAAK;AACtC,UAAA,CAAA,CAAE,eAAA,EAAgB;AAClB,UAAA,OAAA,EAAQ;AAAA,QACV;AAAA,MACF,CAAA;AAAA,MACA,OAAO,CAAA,CA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QAAA,EAAA;AAAA,gBAAA,CAAC,yBACAD,GAAAA;AAAA,kBAAC,MAAA;AAAA,kBAAA;AAAA,oBACC,SAAA,EAAU,gCAAA;AAAA,oBACV,KAAA,EAAO,EAAE,eAAA,EAAiB,KAAA,CAAM,KAAA,EAAM;AAAA,oBACtC,aAAA,EAAW;AAAA;AAAA,iBACb;AAAA,gCAEFA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,wBAAA,EAA0B,gBAAM,IAAA,EAAK,CAAA;AAAA,gCACrDA,GAAAA,CAAC,MAAA,EAAA,EAAK,WAAU,yBAAA,EAA2B,QAAA,EAAA,KAAA,CAAM,QAAQ,MAAA,EAAO;AAAA;AAAA,aAAA;AAAA,YAlC3D,KAAA,CAAM;AAAA,WAmCb;AAAA,QAEJ,CAAC;AAAA;AAAA;AAAA,GACH;AAEJ;AC7FO,SAAS,iBAAiB,KAAA,EAA8B;AAC7D,EAAA,MAAM,OAAO,gBAAA,EAAiB;AAC9B,EAAA,MAAM,EAAE,eAAA,EAAgB,GAAI,cAAA,EAAe;AAC3C,EAAA,uBAAOA,IAAC,OAAA,EAAA,EAAS,GAAG,OAAO,QAAA,EAAU,IAAA,CAAK,UAAU,eAAA,EAAiB,CAAA;AACvE","file":"chunk-QWVZTX2P.js","sourcesContent":["import { Pin, X } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\n/** Every fixed string of the chip. Pass a partial `labels` to translate or reword. */\nexport interface PinnedDocChipLabels {\n unpin: string\n /** Accessible name; `title` is the pinned document's name. */\n unpinDocument: (title: string) => string\n}\n\nexport const DEFAULT_PINNED_DOC_CHIP_LABELS: PinnedDocChipLabels = {\n unpin: 'Unpin',\n unpinDocument: (title) => `Unpin ${title}`,\n}\n\nexport interface PinnedDocChipProps {\n title: string\n onUnpin: () => void\n className?: string\n labels?: Partial<PinnedDocChipLabels>\n testId?: string\n}\n\n/**\n * The pinned-document chip that lives inside a composer's attach button: shows which document\n * holds the full-context pin and unpins it in ONE tap (the X is always visible, so touch and\n * keyboard reach it). It is a span with button semantics because it sits inside the attach\n * `<button>`, where nested buttons are invalid; `stopPropagation` keeps the tap from also\n * triggering the parent.\n */\nexport function PinnedDocChip({\n title,\n onUnpin,\n className,\n labels,\n testId = 'unpin-document-button',\n}: PinnedDocChipProps) {\n const l = { ...DEFAULT_PINNED_DOC_CHIP_LABELS, ...labels }\n return (\n <span\n role=\"button\"\n tabIndex={0}\n data-slot=\"pinned-doc-chip\"\n onClick={(e) => {\n e.stopPropagation()\n onUnpin()\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation()\n onUnpin()\n }\n }}\n title={l.unpin}\n aria-label={l.unpinDocument(title)}\n className={cn(\n '-mx-0.5 flex min-w-0 items-center gap-1 rounded-sm px-1 text-foreground hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className\n )}\n data-testid={testId}\n >\n <Pin className=\"h-3 w-3 shrink-0 fill-primary\" />\n <X className=\"order-last h-3 w-3 shrink-0 text-muted-foreground\" />\n <span className=\"truncate text-sm\">{title}</span>\n </span>\n )\n}\n","import {\n forwardRef,\n Fragment,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type MouseEventHandler,\n type ReactNode,\n} from 'react'\nimport { Check, CheckCircle, Search } from 'lucide-react'\nimport {\n Badge,\n Button,\n HoverCardContent,\n Input,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n cn,\n type ButtonProps,\n} from '@arbidocs/react/ui'\n\n/**\n * Parts of the composer's \"in this chat\" panels (files, facts): a card that opens upward from the\n * composer, a grouped pick list, and below it the labels, search and bulk actions.\n */\n\n/** The card itself: width follows the chat input (`--chat-input-width`), bounded on small screens. */\nexport const ContextPanelContent = forwardRef<\n ElementRef<typeof HoverCardContent>,\n ComponentPropsWithoutRef<typeof HoverCardContent>\n>(function ContextPanelContent({ className, onClick, ...props }, ref) {\n return (\n <HoverCardContent\n ref={ref}\n side=\"top\"\n align=\"start\"\n data-slot=\"context-panel\"\n // Clicks inside must not bubble (via the React portal) to a click-to-toggle wrapper.\n onClick={(e) => {\n e.stopPropagation()\n onClick?.(e)\n }}\n className={cn(\n 'w-[var(--chat-input-width,var(--radix-hover-card-content-available-width))] max-h-[var(--radix-hover-card-content-available-height)] max-w-[95vw] overflow-y-auto overscroll-contain rounded-md border border-border bg-muted p-3 shadow-lg',\n className\n )}\n {...props}\n />\n )\n})\n\nexport interface ContextPickerGroup {\n key: string\n heading: string\n /** Id of the heading element. */\n testId?: string\n /** Shown after the heading as `(n)`. */\n count: number\n children: ReactNode\n}\n\nexport interface ContextPickerListProps {\n groups: ContextPickerGroup[]\n /** Shown instead of the groups when every group is empty. */\n emptyText: string\n testId: string\n className?: string\n}\n\n/**\n * Two (or more) headed groups, e.g. \"In this conversation\" then \"In this workspace\". Each heading\n * pins to the top of the scroller and is pushed out by the next one; the second parks below the\n * first (32px = a heading's own height), so both stay visible however far down you scroll.\n */\nexport function ContextPickerList({\n groups,\n emptyText,\n testId,\n className,\n}: ContextPickerListProps) {\n const isEmpty = groups.every((g) => g.count === 0)\n return (\n <div\n className={cn('max-h-[400px] space-y-1 overflow-y-auto', className)}\n data-slot=\"context-picker-list\"\n data-testid={testId}\n onClick={(e) => e.stopPropagation()}\n >\n {isEmpty ? (\n <p className=\"p-2 text-sm text-muted-foreground\">{emptyText}</p>\n ) : (\n groups.map((g, index) => (\n <Fragment key={g.key}>\n <div\n className={cn(\n 'sticky z-10 bg-muted px-2 py-1.5 text-sm font-medium text-muted-foreground',\n index === 0 ? 'top-0' : 'top-8'\n )}\n data-testid={g.testId}\n >\n {g.heading} ({g.count})\n </div>\n {g.children}\n </Fragment>\n ))\n )}\n </div>\n )\n}\n\nfunction CheckGlyph({ isChecked, className }: { isChecked: boolean; className?: string }) {\n return (\n <span\n className={cn(\n 'flex size-3.5 shrink-0 items-center justify-center rounded-sm border',\n isChecked ? 'border-primary bg-primary text-primary-foreground' : 'border-input',\n className\n )}\n >\n {isChecked && <Check className=\"size-3\" />}\n </span>\n )\n}\n\nexport interface ContextPickerRowProps {\n isSelected: boolean\n onToggle: () => void\n testId?: string\n children: ReactNode\n}\n\n/** A whole-row toggle (e.g. a fact): check glyph then clamped text. */\nexport function ContextPickerRow({\n isSelected,\n onToggle,\n testId,\n children,\n}: ContextPickerRowProps) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n onToggle()\n }}\n aria-pressed={isSelected}\n data-testid={testId}\n className={cn(\n 'flex w-full items-start gap-2 rounded p-2 text-left text-sm transition-colors pointer-coarse:min-h-11',\n isSelected ? 'bg-primary/10' : 'bg-card hover:bg-muted'\n )}\n >\n <CheckGlyph isChecked={isSelected} className=\"mt-0.5\" />\n <span className=\"line-clamp-2 min-w-0 text-foreground\">{children}</span>\n </button>\n )\n}\n\nexport interface ContextCheckRowProps {\n isSelected: boolean\n /** The check toggle: accessible name (e.g. \"Add to conversation\"), handler and test id. */\n toggle: { label: string; onToggle: () => void; testId?: string }\n /** Status glyph between the toggle and the content. */\n status?: ReactNode\n testId?: string\n /** The row's content (e.g. a document pill that opens the document). */\n children: ReactNode\n}\n\n/** A row with its own check toggle plus a content slot (e.g. a document, which opens on click). */\nexport function ContextCheckRow({\n isSelected,\n toggle,\n status,\n testId,\n children,\n}: ContextCheckRowProps) {\n return (\n <div\n className=\"flex items-center gap-2 rounded px-1 py-0.5\"\n data-slot=\"context-check-row\"\n data-testid={testId}\n >\n <button\n type=\"button\"\n aria-label={toggle.label}\n aria-pressed={isSelected}\n onClick={toggle.onToggle}\n data-testid={toggle.testId}\n className=\"flex shrink-0 items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:size-11\"\n >\n <CheckGlyph isChecked={isSelected} />\n </button>\n {status}\n {children}\n </div>\n )\n}\n\nexport interface ContextSelectListProps {\n children: ReactNode\n}\n\n/** Compact single-select list (e.g. choose the document to pin). */\nexport function ContextSelectList({ children }: ContextSelectListProps) {\n return <div className=\"max-h-[150px] space-y-2 overflow-y-auto\">{children}</div>\n}\n\nexport interface ContextSelectRowProps {\n isSelected: boolean\n onSelect: MouseEventHandler<HTMLButtonElement>\n status?: ReactNode\n title: string\n testId?: string\n}\n\nexport function ContextSelectRow({\n isSelected,\n onSelect,\n status,\n title,\n testId,\n}: ContextSelectRowProps) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n onSelect(e)\n }}\n aria-pressed={isSelected}\n data-testid={testId}\n className={cn(\n 'flex w-full items-center gap-2 rounded p-2 text-left text-sm transition-colors pointer-coarse:min-h-11',\n isSelected ? 'border border-primary/30 bg-primary/10' : 'bg-card hover:bg-muted'\n )}\n >\n {status}\n <span className=\"min-w-0 flex-1 truncate text-foreground\" title={title}>\n {title}\n </span>\n {isSelected && <CheckCircle className=\"size-3.5 shrink-0 text-primary\" />}\n </button>\n )\n}\n\nexport interface ContextPanelFooterProps {\n /** Label shortcut chips (host-supplied row). */\n labels?: ReactNode\n /** The search box. */\n search: ReactNode\n /** Icon + title of the panel; omit when tabs already name it. */\n title?: ReactNode\n /** The action buttons, right aligned. */\n actions: ReactNode\n}\n\n/** Everything below the list: the panel opens upward, so its controls sit nearest the button. */\nexport function ContextPanelFooter({ labels, search, title, actions }: ContextPanelFooterProps) {\n return (\n <div className=\"mt-3 space-y-2 border-t border-border pt-3\" data-slot=\"context-panel-footer\">\n {labels}\n {search}\n <div\n className={cn(\n 'flex flex-wrap items-center gap-x-2 gap-y-1.5',\n title ? 'justify-between' : 'justify-end'\n )}\n >\n {title && (\n <div className=\"flex min-w-0 items-center gap-2 text-sm font-medium text-foreground\">\n {title}\n </div>\n )}\n <div className=\"flex flex-wrap items-center gap-1.5\">{actions}</div>\n </div>\n </div>\n )\n}\n\nexport const ContextSearchInput = forwardRef<\n HTMLInputElement,\n ComponentPropsWithoutRef<typeof Input>\n>(function ContextSearchInput({ className, onClick, ...props }, ref) {\n return (\n <div className=\"relative\" onClick={(e) => e.stopPropagation()}>\n <Search className=\"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground\" />\n <Input\n ref={ref}\n className={cn('h-7 bg-background pl-7 text-sm', className)}\n onClick={onClick}\n {...props}\n />\n </div>\n )\n})\n\nexport interface ContextActionButtonProps extends Omit<ButtonProps, 'size'> {\n icon?: ReactNode\n /** Badge after the label; hidden at 0 / undefined. */\n count?: number\n /** Put the icon after the label (bulk Add / Remove) rather than before it. */\n isIconTrailing?: boolean\n}\n\n/** Compact action of the panel footer (stops click propagation so the card stays open). */\nexport const ContextActionButton = forwardRef<HTMLButtonElement, ContextActionButtonProps>(\n function ContextActionButton(\n { icon, count, isIconTrailing, onClick, children, className, variant = 'outline', ...props },\n ref\n ) {\n return (\n <Button\n ref={ref}\n variant={variant}\n size=\"sm\"\n className={cn('flex h-6 items-center gap-1 px-2 text-sm pointer-coarse:h-11', className)}\n onClick={(e) => {\n e.stopPropagation()\n onClick?.(e)\n }}\n {...props}\n >\n {!isIconTrailing && icon}\n {children}\n {isIconTrailing && icon}\n {count != null && count > 0 && (\n <Badge variant=\"outline\" className=\"badge-count ml-1\">\n {count}\n </Badge>\n )}\n </Button>\n )\n }\n)\n\nexport interface ContextTab {\n value: string\n /** Visible tab name, e.g. \"Documents\". */\n label: string\n /** Count shown in the tab label. */\n count: number\n testId?: string\n content: ReactNode\n}\n\nexport interface ContextPanelTabsProps {\n tabs: ContextTab[]\n value: string\n onValueChange: (value: string) => void\n testId?: string\n /** Extra classes for the tab strip (e.g. leave room for a sheet's close button). */\n listClassName?: string\n}\n\n/** The panel's tab strip (Radix tabs: roving tabindex, arrow keys) and the active tab's content. */\nexport function ContextPanelTabs({\n tabs,\n value,\n onValueChange,\n testId,\n listClassName,\n}: ContextPanelTabsProps) {\n return (\n <Tabs value={value} onValueChange={onValueChange} data-testid={testId}>\n <TabsList\n className={cn('grid h-auto w-full grid-cols-2 pointer-coarse:h-auto', listClassName)}\n >\n {tabs.map((t) => (\n <TabsTrigger key={t.value} value={t.value} data-testid={t.testId} className=\"gap-1.5\">\n {t.label}\n <Badge variant=\"outline\" className=\"badge-count\">\n {t.count}\n </Badge>\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.value} value={t.value} className=\"mt-3\">\n {t.content}\n </TabsContent>\n ))}\n </Tabs>\n )\n}\n","import { useEffect, type RefObject } from 'react'\n\nexport interface UseDismissibleCardOptions {\n isOpen: boolean\n onClose: () => void\n /** The card's content: clicks inside never dismiss. */\n contentRef: RefObject<HTMLElement | null>\n /** Focused when the card opens (the panel is opened to find something: typing just works). */\n focusRef?: RefObject<HTMLElement | null>\n}\n\n/**\n * Behaviour of a click-opened card: focus its search box on open, Escape closes it, and a press\n * outside it (or outside any portaled popper that belongs to it, e.g. a dropdown menu opened from\n * inside) closes it too. Bound only while open.\n */\nexport function useDismissibleCard({\n isOpen,\n onClose,\n contentRef,\n focusRef,\n}: UseDismissibleCardOptions): void {\n // rAF lets the portaled content mount before focusing.\n useEffect(() => {\n if (!isOpen) return\n const id = requestAnimationFrame(() => focusRef?.current?.focus())\n return () => cancelAnimationFrame(id)\n }, [isOpen, focusRef])\n\n useEffect(() => {\n if (!isOpen) return\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Escape') return\n e.stopPropagation()\n onClose()\n }\n document.addEventListener('keydown', onKeyDown)\n return () => document.removeEventListener('keydown', onKeyDown)\n }, [isOpen, onClose])\n\n useEffect(() => {\n if (!isOpen) return\n const onPointerDown = (e: MouseEvent) => {\n const target = e.target as HTMLElement | null\n if (!target) return\n if (contentRef.current?.contains(target)) return\n if (target.closest('[data-radix-popper-content-wrapper]')) return\n onClose()\n }\n document.addEventListener('mousedown', onPointerDown)\n return () => document.removeEventListener('mousedown', onPointerDown)\n }, [isOpen, onClose, contentRef])\n}\n","import { Tag as TagIcon } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\n\nexport interface PinnableLabel {\n id: string\n name: string\n /** The label's own colour (any CSS colour): the same hue everywhere the label appears. */\n color: string\n /** Ids of the items carrying this label. */\n itemIds: string[]\n}\n\nexport interface LabelPinRowLabels {\n remove: (count: number, name: string) => string\n add: (count: number, name: string) => string\n}\n\nexport const DEFAULT_LABEL_PIN_ROW_LABELS: LabelPinRowLabels = {\n remove: (count, name) => `Remove the ${count} “${name}” item(s) from this chat`,\n add: (count, name) => `Add the ${count} “${name}” item(s) to this chat`,\n}\n\nexport interface LabelPinRowProps {\n labels: PinnableLabel[]\n /** Ids currently in the conversation. */\n selectedIds: string[]\n /** Add every id (already de-duplicated against the chat). */\n onAdd: (ids: string[]) => void\n /** Remove every id. */\n onRemove: (ids: string[]) => void\n testId?: string\n copy?: Partial<LabelPinRowLabels>\n}\n\n/**\n * Label shortcuts inside the in-chat panels: one chip per label in use; clicking it pins\n * everything carrying that label. A chip whose items are ALL in the chat reads as active and\n * clicking it takes them back out, so a label is a toggle rather than a one-way add.\n */\nexport function LabelPinRow({\n labels,\n selectedIds,\n onAdd,\n onRemove,\n testId = 'label-pin-row',\n copy,\n}: LabelPinRowProps) {\n const l = { ...DEFAULT_LABEL_PIN_ROW_LABELS, ...copy }\n const usable = labels.filter((label) => label.itemIds.length > 0)\n if (usable.length === 0) return null\n\n const selectedSet = new Set(selectedIds)\n\n return (\n <div\n className=\"flex flex-wrap items-center gap-1\"\n data-slot=\"label-pin-row\"\n data-testid={testId}\n >\n <TagIcon className=\"size-3.5 shrink-0 text-muted-foreground\" aria-hidden />\n {usable.map((label) => {\n const allIn = label.itemIds.every((id) => selectedSet.has(id))\n return (\n <button\n key={label.id}\n type=\"button\"\n aria-pressed={allIn}\n title={\n allIn\n ? l.remove(label.itemIds.length, label.name)\n : l.add(label.itemIds.length, label.name)\n }\n onClick={() =>\n allIn\n ? onRemove(label.itemIds)\n : onAdd(label.itemIds.filter((id) => !selectedSet.has(id)))\n }\n className={cn(\n 'flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11',\n allIn ? 'text-white' : 'bg-muted text-foreground hover:brightness-95'\n )}\n // Pinned reads as the label filled in with its own colour; at rest it's the muted\n // pill with the colour on the dot, matching the label pills on documents and facts.\n style={\n allIn\n ? { backgroundColor: label.color, borderColor: label.color }\n : { borderColor: `${label.color}66` }\n }\n data-testid={`${testId}-${label.id}`}\n >\n {!allIn && (\n <span\n className=\"size-1.5 shrink-0 rounded-full\"\n style={{ backgroundColor: label.color }}\n aria-hidden\n />\n )}\n <span className=\"max-w-[120px] truncate\">{label.name}</span>\n <span className=\"tabular-nums opacity-70\">{label.itemIds.length}</span>\n </button>\n )\n })}\n </div>\n )\n}\n","import { Toaster, type ShellToasterProps } from '../shell/Toaster'\nimport { useAssistantDock } from './AssistantDock'\nimport { useChatSurface } from './chat-surface'\n\nexport type AssistantToasterProps = Omit<ShellToasterProps, 'dockOpen'>\n\n/**\n * The shell `Toaster` wired to the assistant dock: while the dock is open (and offered: a mounted\n * page chat hides it) a right-aligned toast stack slides clear of it. Pass `dockWidth` when the\n * `AssistantDock` has a custom `width`.\n */\nexport function AssistantToaster(props: AssistantToasterProps) {\n const dock = useAssistantDock()\n const { isDockAvailable } = useChatSurface()\n return <Toaster {...props} dockOpen={dock.isOpen && isDockAvailable} />\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { buildWorkflowScopeSource, documentScopeLabels, WorkflowDocumentsField, WorkflowLauncher, isScheduledWorkflow, WorkflowsTable, workflowSignal, workflowTriggerType } from './chunk-
|
|
2
|
+
import { buildWorkflowScopeSource, documentScopeLabels, WorkflowDocumentsField, WorkflowLauncher, isScheduledWorkflow, WorkflowsTable, workflowSignal, workflowTriggerType } from './chunk-M24OG3RP.js';
|
|
3
3
|
import { useListedDocuments, useConnectedTags, useConnectedConversations } from './chunk-3DUXPPFJ.js';
|
|
4
4
|
import { useConnectedWorkspace } from './chunk-HPXE4BWW.js';
|
|
5
5
|
import { useHost } from './chunk-BH4MK2J5.js';
|
|
@@ -296,5 +296,5 @@ function ConnectedWorkflowsTable({
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
export { ConnectedWorkflowDocumentsField, ConnectedWorkflowLauncher, ConnectedWorkflowsTable, DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, toWorkflowFieldDocument, useConnectedAgentOptions, useConnectedWorkflowScopeSource, useConnectedWorkspaceRole, useOpenWorkflow };
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
300
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-RAK4EBNU.js.map
|
|
300
|
+
//# sourceMappingURL=chunk-RAK4EBNU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/workflows/useOpenWorkflow.ts","../src/connection/ConnectedWorkflowsTable.tsx"],"names":["useMemo","useAgents","useState","jsx"],"mappings":";;;;;;;;;;;AAsBA,IAAM,gBAAA,mBAAmB,IAAI,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAG9E,SAAS,wBAAwB,GAAA,EAA+C;AAErF,EAAA,MAAM,UAAU,gBAAA,CAAiB,GAAA,CAAA,CAAK,IAAI,SAAA,IAAa,EAAA,EAAI,aAAa,CAAA;AACxE,EAAA,OAAO;AAAA,IACL,IAAI,GAAA,CAAI,WAAA;AAAA,IACR,OAAO,GAAA,CAAI,YAAA,EAAc,KAAA,IAAS,GAAA,CAAI,aAAa,GAAA,CAAI,WAAA;AAAA,IACvD,UAAU,GAAA,CAAI,SAAA;AAAA,IACd,KAAA,EAAO,OAAA,GAAU,IAAA,GAAQ,GAAA,CAAI,OAAA,IAAW,IAAA;AAAA,IACxC,MAAA,EAAQ,OAAA,GAAU,IAAA,GAAQ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,QAAA,IAAI,OAAO,KAAA,EAAO;AAChB,UAAA,UAAA,GAAa,QAAQ,CAAA;AACrB,UAAA,MAAA,CAAO,CAAA,CAAE,WAAW,OAAO,CAAA;AAC3B,UAAA;AAAA,QACF;AACA,QAAA,IAAI,MAAA,CAAO,YAAA,IAAgB,CAAC,MAAA,CAAO,mBAAA,EAAqB;AAEtD,UAAA,UAAA,GAAa,QAAQ,CAAA;AACrB,UAAA,MAAA,CAAO,CAAA,CAAE,cAAA,CAAe,QAAQ,CAAA,EAAG,SAAS,CAAA;AAC5C,UAAA;AAAA,QACF;AACA,QAAA,IAAI,CAAC,MAAA,CAAO,mBAAA,QAA2B,IAAI,KAAA,CAAM,EAAE,QAAQ,CAAA;AAAA,MAC7D,CAAC;AAAA;AAAA,GAEL;AAEJ","file":"chunk-UIKLUVKV.js","sourcesContent":["/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedTags, useListedDocuments, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useListedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useListedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * How to open a workflow in the host's Workflows page, or `undefined` while there is none (the\n * host has no `openWorkflow`, or the `workflows` feature is off).\n */\n\nimport { useFeature } from '@arbidocs/react'\nimport { useBlocksEnvironment, type BlocksEnvironment } from '../../provider/environment'\n\nexport function useOpenWorkflow(): BlocksEnvironment['openWorkflow'] {\n const { openWorkflow } = useBlocksEnvironment()\n const enabled = useFeature('workflows')\n return enabled ? openWorkflow : undefined\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n *\n * `groupBy=\"category\"` lists the host's catalogue (the host configuration's `workflows.catalogue`)\n * in its categories above the saved workflows: an entry opens in the builder (`onOpenTemplate`) or\n * runs (the environment's `openWorkflow(id, { view: 'run' })`).\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useRunWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport type { WorkflowCatalogueRow } from '../agents/tasks/WorkflowCatalogueSections'\nimport {\n isScheduledWorkflow,\n workflowSignal,\n workflowTriggerType,\n} from '../agents/tasks/workflowRows'\nimport { workflowSteps } from '../agents/workflows/run'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useOpenWorkflow } from './workflows/useOpenWorkflow'\nimport { useHost } from '../provider/host'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n /** When a workflow that starts on a step signal starts (the default trigger text). */\n signalTrigger: (signal: string) => string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n signalTrigger: (signal) => `When a step signals ${signal}`,\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n | 'catalogue'\n | 'categories'\n> {\n /**\n * Which saved workflows to list: `scheduled` (those that start on a date or a repeat), or a\n * predicate. Default: all.\n */\n filter?: 'scheduled' | ((workflow: WorkflowResponse) => boolean)\n /**\n * When a workflow starts, in the host's words. Default: the step signal it starts on, else its\n * trigger type.\n */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger,\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n groupBy,\n renderIcon,\n onRunTemplate,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const openWorkflow = useOpenWorkflow()\n const host = useHost().workflows\n const catalogueEntries = groupBy === 'category' ? host?.catalogue : undefined\n const catalogue = useMemo(\n () =>\n catalogueEntries?.map(({ workflow, category, note, runnable }): WorkflowCatalogueRow => ({\n id: workflow.id,\n title: workflow.title,\n description: workflow.description,\n icon: workflow.icon,\n category,\n stepCount: workflowSteps(workflow).length,\n note,\n runnable,\n })),\n [catalogueEntries]\n )\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => {\n const keep = filter === 'scheduled' ? isScheduledWorkflow : filter\n return keep ? saved.filter(keep) : saved\n }, [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={\n describeTrigger ??\n ((w) => {\n const signal = workflowSignal(w)\n return signal ? l.signalTrigger(signal) : workflowTriggerType(w).replaceAll('_', ' ')\n })\n }\n groupBy={groupBy}\n catalogue={catalogue}\n categories={host?.categories}\n renderIcon={renderIcon ?? host?.renderIcon}\n onRunTemplate={onRunTemplate ?? (openWorkflow && ((id) => openWorkflow(id, { view: 'run' })))}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/connection/ConnectedWorkflowLauncher.tsx","../src/connection/workflows/useOpenWorkflow.ts","../src/connection/ConnectedWorkflowsTable.tsx"],"names":["useMemo","useAgents","useState","jsx"],"mappings":";;;;;;;;;;;AAsBA,IAAM,gBAAA,mBAAmB,IAAI,GAAA,CAAI,CAAC,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAC,CAAA;AAG9E,SAAS,wBAAwB,GAAA,EAA+C;AAErF,EAAA,MAAM,UAAU,gBAAA,CAAiB,GAAA,CAAA,CAAK,IAAI,SAAA,IAAa,EAAA,EAAI,aAAa,CAAA;AACxE,EAAA,OAAO;AAAA,IACL,IAAI,GAAA,CAAI,WAAA;AAAA,IACR,OAAO,GAAA,CAAI,YAAA,EAAc,KAAA,IAAS,GAAA,CAAI,aAAa,GAAA,CAAI,WAAA;AAAA,IACvD,UAAU,GAAA,CAAI,SAAA;AAAA,IACd,KAAA,EAAO,OAAA,GAAU,IAAA,GAAQ,GAAA,CAAI,OAAA,IAAW,IAAA;AAAA,IACxC,MAAA,EAAQ,OAAA,GAAU,IAAA,G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AC3E,QAAA,IAAI,OAAO,KAAA,EAAO;AAChB,UAAA,UAAA,GAAa,QAAQ,CAAA;AACrB,UAAA,MAAA,CAAO,CAAA,CAAE,WAAW,OAAO,CAAA;AAC3B,UAAA;AAAA,QACF;AACA,QAAA,IAAI,MAAA,CAAO,YAAA,IAAgB,CAAC,MAAA,CAAO,mBAAA,EAAqB;AAEtD,UAAA,UAAA,GAAa,QAAQ,CAAA;AACrB,UAAA,MAAA,CAAO,CAAA,CAAE,cAAA,CAAe,QAAQ,CAAA,EAAG,SAAS,CAAA;AAC5C,UAAA;AAAA,QACF;AACA,QAAA,IAAI,CAAC,MAAA,CAAO,mBAAA,QAA2B,IAAI,KAAA,CAAM,EAAE,QAAQ,CAAA;AAAA,MAC7D,CAAC;AAAA;AAAA,GAEL;AAEJ","file":"chunk-RAK4EBNU.js","sourcesContent":["/**\n * The workflow launcher bound to the connection: the open workspace's folders, labels and files\n * behind its scope and `documents` fields (files can be added right there), and the user's agents\n * behind \"Run as\". The host still says what a launch does (`onLaunch`): open a chat, start a task.\n */\n\nimport { useCallback, useMemo, useRef, useState } from 'react'\nimport { useAgents, useThumbnails, useUploadDocuments } from '@arbidocs/react'\nimport { WorkflowLauncher, type WorkflowLauncherProps } from '../agents/workflows/WorkflowLauncher'\nimport {\n WorkflowDocumentsField,\n type WorkflowDocumentsFieldLabels,\n type WorkflowFieldDocument,\n} from '../agents/workflows/WorkflowDocumentsField'\nimport type { WorkflowScopeSource } from '../agents/workflows/WorkflowConfigDialog'\nimport { buildWorkflowScopeSource, documentScopeLabels } from '../agents/workflows/workspaceScope'\nimport type { AgentOption } from '../agents/workflows/AgentSelect'\nimport type { WorkflowField, WorkflowScope } from '../agents/workflows/types'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedTags, useListedDocuments, type ConnectedDocument } from './workspaceData'\n\nconst IMAGE_FILE_TYPES = new Set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'webp'])\n\n/** A workspace document as a `documents` field offers it. */\nexport function toWorkflowFieldDocument(doc: ConnectedDocument): WorkflowFieldDocument {\n // Pages and tokens are a text-parsing concept: never meaningful for an image.\n const isImage = IMAGE_FILE_TYPES.has((doc.file_type ?? '').toLowerCase())\n return {\n id: doc.external_id,\n title: doc.doc_metadata?.title || doc.file_name || doc.external_id,\n fileName: doc.file_name,\n pages: isImage ? null : (doc.n_pages ?? null),\n tokens: isImage ? null : (doc.tokens ?? null),\n status: doc.status,\n isImage,\n }\n}\n\n/** The open workspace's folders and labels for a workflow's scope field. */\nexport function useConnectedWorkflowScopeSource(): WorkflowScopeSource {\n const { data: docs } = useListedDocuments()\n const { data: tags } = useConnectedTags()\n return useMemo(() => buildWorkflowScopeSource(docs, documentScopeLabels(tags)), [docs, tags])\n}\n\n/** The user's agents, for \"Run as\". */\nexport function useConnectedAgentOptions(): AgentOption[] {\n const { data: agents } = useAgents()\n return useMemo(\n () => (agents ?? []).map((a) => ({ id: a.external_id, label: a.given_name || a.email })),\n [agents]\n )\n}\n\nexport interface ConnectedWorkflowDocumentsFieldProps {\n field: WorkflowField\n value: WorkflowScope\n onChange: (value: WorkflowScope) => void\n /** Add files the host's way (its upload dialog). Absent: they are uploaded here. */\n onAddFiles?: (files?: File[]) => void\n labels?: Partial<WorkflowDocumentsFieldLabels>\n}\n\n/**\n * A workflow `documents` field over the open workspace's files: pick, add (or drop) files, see the\n * chosen images. A launcher's or a task composer's `renderDocuments`.\n */\nexport function ConnectedWorkflowDocumentsField({\n field,\n value,\n onChange,\n onAddFiles,\n labels,\n}: ConnectedWorkflowDocumentsFieldProps) {\n const { notify } = useBlocksEnvironment()\n const { ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: docs, loaded } = useListedDocuments()\n const uploadDocuments = useUploadDocuments()\n const documents = useMemo(() => docs.map(toWorkflowFieldDocument), [docs])\n const chosen = value.documents ?? []\n const { data: thumbnails } = useThumbnails(chosen, { enabled: (field.max ?? 1) > 1 })\n const input = useRef<HTMLInputElement>(null)\n const [adding, setAdding] = useState(false)\n\n const upload = useCallback(\n async (files: File[]) => {\n setAdding(true)\n try {\n await ensureWorkspaceOpen()\n // Each new document joins the shared list as it lands.\n for (const file of files) await uploadDocuments.mutateAsync({ files: [file] })\n } catch (error) {\n notify(error instanceof Error && error.message ? error.message : String(error), 'error')\n } finally {\n setAdding(false)\n }\n },\n [uploadDocuments, ensureWorkspaceOpen, notify]\n )\n\n return (\n <>\n {!onAddFiles && (\n <input\n ref={input}\n type=\"file\"\n multiple\n className=\"hidden\"\n aria-label=\"Add files\"\n data-testid=\"workflow-add-files-input\"\n onChange={(e) => {\n const files = Array.from(e.target.files ?? [])\n e.target.value = ''\n if (files.length) void upload(files)\n }}\n />\n )}\n <WorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n documents={documents}\n loaded={loaded}\n thumbnailOf={(id) => thumbnails?.[id]}\n onAddFiles={\n onAddFiles ?? ((files) => (files?.length ? void upload(files) : input.current?.click()))\n }\n adding={adding}\n labels={labels}\n />\n </>\n )\n}\n\nexport interface ConnectedWorkflowLauncherProps extends Omit<\n WorkflowLauncherProps,\n 'scopeSource' | 'renderDocuments' | 'agents'\n> {\n /** Add files from a `documents` field the host's way (its upload dialog). Absent: uploaded here. */\n onAddFiles?: (files?: File[]) => void\n}\n\nexport function ConnectedWorkflowLauncher({\n onAddFiles,\n ...props\n}: ConnectedWorkflowLauncherProps) {\n const scopeSource = useConnectedWorkflowScopeSource()\n const agents = useConnectedAgentOptions()\n return (\n <WorkflowLauncher\n {...props}\n scopeSource={scopeSource}\n agents={agents}\n renderDocuments={(field, value, onChange) => (\n <ConnectedWorkflowDocumentsField\n field={field}\n value={value}\n onChange={onChange}\n onAddFiles={onAddFiles}\n />\n )}\n />\n )\n}\n","/**\n * How to open a workflow in the host's Workflows page, or `undefined` while there is none (the\n * host has no `openWorkflow`, or the `workflows` feature is off).\n */\n\nimport { useFeature } from '@arbidocs/react'\nimport { useBlocksEnvironment, type BlocksEnvironment } from '../../provider/environment'\n\nexport function useOpenWorkflow(): BlocksEnvironment['openWorkflow'] {\n const { openWorkflow } = useBlocksEnvironment()\n const enabled = useFeature('workflows')\n return enabled ? openWorkflow : undefined\n}\n","/**\n * The saved workflows bound to the connection: when each starts, its last run (a link to the thread\n * it created) and next run, who runs it, pause and resume, share, run now, delete (one or many), and\n * the workflow's history. The host opens a workflow (its builder) and its history; threads open\n * through the environment's `openConversation`, failures are told through its `notify`.\n *\n * `groupBy=\"category\"` lists the host's catalogue (the host configuration's `workflows.catalogue`)\n * in its categories above the saved workflows: an entry opens in the builder (`onOpenTemplate`) or\n * runs (the environment's `openWorkflow(id, { view: 'run' })`).\n */\n\nimport { useEffect, useMemo, useState } from 'react'\nimport {\n useAgents,\n useDeleteWorkflow,\n useRunWorkflow,\n useUpdateWorkflow,\n useWorkflows,\n useWorkspaceUsers,\n type WorkflowResponse,\n} from '@arbidocs/react'\nimport { WorkflowsTable, type WorkflowsTableProps } from '../agents/tasks/WorkflowsTable'\nimport type { WorkflowCatalogueRow } from '../agents/tasks/WorkflowCatalogueSections'\nimport {\n isScheduledWorkflow,\n workflowSignal,\n workflowTriggerType,\n} from '../agents/tasks/workflowRows'\nimport { workflowSteps } from '../agents/workflows/run'\nimport { fmtDate } from '../lib/format'\nimport { useBlocksEnvironment } from '../provider/environment'\nimport { useOpenWorkflow } from './workflows/useOpenWorkflow'\nimport { useHost } from '../provider/host'\nimport { useConnectedWorkspace } from './ConnectionProvider'\nimport { useConnectedConversations } from './workspaceData'\n\n/** The viewer's role in the open workspace, and the workspace's members. */\nexport function useConnectedWorkspaceRole() {\n const { workspaceId, live, userId, ensureWorkspaceOpen } = useConnectedWorkspace()\n const { data: members = [] } = useWorkspaceUsers(workspaceId ?? undefined, {\n enabled: live && !!workspaceId,\n beforeFetch: ensureWorkspaceOpen,\n })\n const role = members.find((m) => m.user.external_id === userId)?.role\n return {\n members,\n role,\n /** An owner or a collaborator edits, pauses, resumes and runs what is shared with the workspace. */\n canEditShared: role === 'owner' || role === 'collaborator',\n /** With an item's creator, the only one who deletes it. */\n isWorkspaceOwner: role === 'owner',\n }\n}\n\nexport interface ConnectedWorkflowsTableLabels {\n /** A change (pause, share, delete) that failed without a message. */\n updateFailed: string\n deleteTitle: string\n deleteOne: (name: string) => string\n deleteMany: (count: number) => string\n /** A run that failed: its history has the error report. */\n runFailed: string\n /** A run that created no thread. */\n noThread: string\n /** A document action that started (it has no thread): what is happening. */\n documentAction: (workflow: WorkflowResponse) => string\n untitledTask: string\n /** When a workflow that starts on a step signal starts (the default trigger text). */\n signalTrigger: (signal: string) => string\n}\n\nexport const DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS: ConnectedWorkflowsTableLabels = {\n updateFailed: 'Could not update the workflow',\n deleteTitle: 'Delete workflow',\n deleteOne: (name) => `Delete “${name}”? Threads it already created stay.`,\n deleteMany: (count) => `Delete ${count} workflows? Threads they already created stay.`,\n runFailed: 'The workflow failed. You can send an error report from its history.',\n noThread: 'The workflow did not create a thread.',\n documentAction: (workflow) =>\n workflow.action?.type === 'email_documents'\n ? 'Preparing your document email'\n : 'Reviewing documents',\n untitledTask: 'Untitled thread',\n signalTrigger: (signal) => `When a step signals ${signal}`,\n}\n\ntype TableProps = WorkflowsTableProps<WorkflowResponse>\n\nexport interface ConnectedWorkflowsTableProps extends Omit<\n TableProps,\n | 'workflows'\n | 'isLoading'\n | 'busyId'\n | 'describeTrigger'\n | 'formatDate'\n | 'onToggleActive'\n | 'onToggleShared'\n | 'onDelete'\n | 'onDeleteMany'\n | 'onToggleActiveMany'\n | 'onRun'\n | 'onOpenThread'\n | 'lastRuns'\n | 'agentNames'\n | 'taskNames'\n | 'canEditShared'\n | 'isWorkspaceOwner'\n | 'catalogue'\n | 'categories'\n> {\n /**\n * Which saved workflows to list: `scheduled` (those that start on a date or a repeat), or a\n * predicate. Default: all.\n */\n filter?: 'scheduled' | ((workflow: WorkflowResponse) => boolean)\n /**\n * When a workflow starts, in the host's words. Default: the step signal it starts on, else its\n * trigger type.\n */\n describeTrigger?: TableProps['describeTrigger']\n formatDate?: TableProps['formatDate']\n connectedLabels?: Partial<ConnectedWorkflowsTableLabels>\n}\n\nconst messageOf = (error: unknown) => (error instanceof Error ? error.message : '')\n\nexport function ConnectedWorkflowsTable({\n filter,\n describeTrigger,\n formatDate = fmtDate,\n onViewRuns,\n connectedLabels,\n groupBy,\n renderIcon,\n onRunTemplate,\n ...tableProps\n}: ConnectedWorkflowsTableProps) {\n const l = { ...DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS, ...connectedLabels }\n const { notify, confirm, openConversation } = useBlocksEnvironment()\n const openWorkflow = useOpenWorkflow()\n const host = useHost().workflows\n const catalogueEntries = groupBy === 'category' ? host?.catalogue : undefined\n const catalogue = useMemo(\n () =>\n catalogueEntries?.map(({ workflow, category, note, runnable }): WorkflowCatalogueRow => ({\n id: workflow.id,\n title: workflow.title,\n description: workflow.description,\n icon: workflow.icon,\n category,\n stepCount: workflowSteps(workflow).length,\n note,\n runnable,\n })),\n [catalogueEntries]\n )\n const { canEditShared, isWorkspaceOwner } = useConnectedWorkspaceRole()\n const { data: saved = [], isLoading } = useWorkflows({ live: true })\n const { data: conversations, refetch } = useConnectedConversations({ live: true })\n const { data: agents = [] } = useAgents()\n const update = useUpdateWorkflow()\n const remove = useDeleteWorkflow()\n const run = useRunWorkflow()\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const workflows = useMemo(() => {\n const keep = filter === 'scheduled' ? isScheduledWorkflow : filter\n return keep ? saved.filter(keep) : saved\n }, [saved, filter])\n // A clock or an event fired a workflow: the thread it created is new to the conversation list.\n const firingStamp = saved.map((w) => `${w.external_id}:${w.last_fired_at ?? ''}`).join('|')\n useEffect(() => {\n void refetch?.()\n }, [firingStamp, refetch])\n\n const lastRuns = useMemo(() => {\n const out: NonNullable<TableProps['lastRuns']> = {}\n for (const c of conversations) {\n const id = c.workflow_ext_id\n if (id && (!out[id] || Date.parse(c.created_at) > Date.parse(out[id].at)))\n out[id] = { conversationId: c.external_id, at: c.created_at, threadStatus: c.status }\n }\n return out\n }, [conversations])\n const agentNames = useMemo(\n () => Object.fromEntries(agents.map((a) => [a.external_id, a.given_name || a.email])),\n [agents]\n )\n const taskNames = useMemo(\n () =>\n Object.fromEntries(\n conversations\n .filter((c) => c.status != null)\n .map((c) => [c.external_id, c.title || l.untitledTask])\n ),\n [conversations, l.untitledTask]\n )\n\n const act = async (workflow: WorkflowResponse, action: () => Promise<unknown>) => {\n setBusyId(workflow.external_id)\n try {\n await action()\n } catch (error) {\n notify(messageOf(error) || l.updateFailed, 'error')\n } finally {\n setBusyId(null)\n }\n }\n const setActive = (workflow: WorkflowResponse, active: boolean) =>\n act(workflow, () => update.mutateAsync({ workflowId: workflow.external_id, patch: { active } }))\n const deleteAll = async (items: WorkflowResponse[]) => {\n if (!items.length) return\n const ok = await confirm({\n title: l.deleteTitle,\n message: items.length === 1 ? l.deleteOne(items[0].name) : l.deleteMany(items.length),\n })\n if (!ok) return\n for (const workflow of items)\n await act(workflow, () => remove.mutateAsync(workflow.external_id))\n }\n\n return (\n <WorkflowsTable\n {...tableProps}\n workflows={workflows}\n isLoading={isLoading}\n busyId={busyId}\n describeTrigger={\n describeTrigger ??\n ((w) => {\n const signal = workflowSignal(w)\n return signal ? l.signalTrigger(signal) : workflowTriggerType(w).replaceAll('_', ' ')\n })\n }\n groupBy={groupBy}\n catalogue={catalogue}\n categories={host?.categories}\n renderIcon={renderIcon ?? host?.renderIcon}\n onRunTemplate={onRunTemplate ?? (openWorkflow && ((id) => openWorkflow(id, { view: 'run' })))}\n formatDate={formatDate}\n agentNames={agentNames}\n taskNames={taskNames}\n lastRuns={lastRuns}\n canEditShared={canEditShared}\n isWorkspaceOwner={isWorkspaceOwner}\n onOpenThread={(conversationId) => openConversation(conversationId)}\n onViewRuns={onViewRuns}\n onToggleActive={(workflow, active) => void setActive(workflow, active)}\n onToggleActiveMany={(items, active) => {\n void (async () => {\n for (const workflow of items) await setActive(workflow, active)\n })()\n }}\n onToggleShared={(workflow, shared) =>\n void act(workflow, () =>\n update.mutateAsync({ workflowId: workflow.external_id, patch: { shared } })\n )\n }\n onDelete={(workflow) => void deleteAll([workflow])}\n onDeleteMany={(items) => void deleteAll(items)}\n onRun={(workflow) =>\n void act(workflow, async () => {\n const result = await run.mutateAsync(workflow.external_id)\n if (result.conversation_ext_id) openConversation(result.conversation_ext_id)\n if (result.error) {\n onViewRuns?.(workflow)\n notify(l.runFailed, 'error')\n return\n }\n if (result.execution_id && !result.conversation_ext_id) {\n // A document action runs without a thread: its history shows how it goes.\n onViewRuns?.(workflow)\n notify(l.documentAction(workflow), 'success')\n return\n }\n if (!result.conversation_ext_id) throw new Error(l.noThread)\n })\n }\n />\n )\n}\n"]}
|
|
@@ -3,9 +3,9 @@ import { ModalBreadcrumbHeader } from './chunk-RC6VTY2H.js';
|
|
|
3
3
|
import { LabelPickerList, DEFAULT_LABEL_MULTI_SELECT_LABELS, RowNavigatorControls } from './chunk-JMQLTMJ7.js';
|
|
4
4
|
import { ShareControl } from './chunk-K4BGOPGG.js';
|
|
5
5
|
import { ToneBadge } from './chunk-5LXQPP2K.js';
|
|
6
|
+
import { ActionLink } from './chunk-CEF3RNQD.js';
|
|
6
7
|
import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
|
|
7
8
|
import { FilterInput } from './chunk-YU2KUMGE.js';
|
|
8
|
-
import { ActionLink } from './chunk-CEF3RNQD.js';
|
|
9
9
|
import { GridView } from './chunk-7F5Z4K5W.js';
|
|
10
10
|
import { TONE_SURFACE } from './chunk-AUS3KBHJ.js';
|
|
11
11
|
import { formatCount } from './chunk-5VYJP6XD.js';
|
|
@@ -7884,5 +7884,5 @@ function ExplorerFileNavigator({
|
|
|
7884
7884
|
}
|
|
7885
7885
|
|
|
7886
7886
|
export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CHROME, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_DOCUMENT_COLUMNS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_FOLDER_FILTER_LABELS, DEFAULT_FOLDER_PICKER_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DOCUMENTS_ROW_HEIGHT_DEFAULT, DOCUMENTS_ROW_HEIGHT_INITIAL, DOCUMENT_TYPE_OPTIONS, DocStatusIcon, DocTagBar, DocumentGrid, DocumentLabelBar, DocumentNameCellFrame, DocumentRowMenu, DocumentSearchList, DocumentsFolderButton, EMAIL_VIEW_COLUMNS, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileNavigator, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FailedStageIcon, FieldAttribution, FieldFolderSelect, FieldFolderValue, FieldLabelsSelect, FieldNativeSelect, FieldRow, FieldValue, FieldWithAttribution, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesFilterBar, FilesModalFooter, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesTagsButton, FilesToolbar, FilesViewCenter, FilterButton, FolderBreadcrumb2 as FolderBreadcrumb, FolderCell, FolderCommandList, FolderFilterButton, FolderPickerRow, FolderProviderIcon, FolderSummary, FolderTree, FolderTreePicker, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, LINE_PX, MAX_LINES, MIN_LINES, MediaPreviewView, MoveToFolderDialog, MultiSelectCellEditor, NavDocumentPicker, NavigatorPickerBar, PassageStepper, PdfPageNav, PrivacyExplainerModal, RECENTLY_DELETED_HINT, RECENTLY_DELETED_HINT_PLURAL, ROW_MIN, RejectedFilesList, RelatedDocsCell, RowDensityControl, SELECTION_COL_ID, SelectedFilesList, ShareToggle, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagPassagePanel, TaskSection, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialog, UrlInputDialogView, VendorLogo, ViewSelectorMenu, ViewerControlBar, ViewerFrame, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, ViewerTitle, ViewerZoomControl, applyColumnLayout, applyViewColumns, buildExplorerEntries, canChangeVisibility, canDeleteDocument, canEditDocumentFields, captureColumnWidths, collectFolderDocs, columnItems, columnsMatch, confirmHideFromMembers, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, formatFolderSegment, getExplorerDisplayName, getMediaPreview, hasFolderProviderIcon, isDocumentLabel, isExplorerDocument, isMediaUrl, joinFolderPath, linesForRowHeight, parseFolderSegments, pinnedLeftColumns, resolveDocumentGridLayout, rowHeightForLines, searchExplorerDocuments, shareStateOf, shareTooltipFor, sortExplorerFiles, sortFields, summariseDocTags, toggleColumn, upsertView, useGridViews, visibilityAudience, visibilityToggleTooltip, visibleColumns, widthsMatch };
|
|
7887
|
-
//# sourceMappingURL=chunk-
|
|
7888
|
-
//# sourceMappingURL=chunk-
|
|
7887
|
+
//# sourceMappingURL=chunk-RK2T6RFL.js.map
|
|
7888
|
+
//# sourceMappingURL=chunk-RK2T6RFL.js.map
|