@arbidocs/blocks 0.4.138 → 0.4.139

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.
Files changed (191) hide show
  1. package/dist/agents/definitions/AgentConnectInstructions.d.ts +12 -0
  2. package/dist/agents/definitions/defaults.d.ts +12 -0
  3. package/dist/agents/definitions/index.d.ts +2 -0
  4. package/dist/agents/index.cjs +335 -320
  5. package/dist/agents/index.js +9 -10
  6. package/dist/calendar/CalendarFormDialog.d.ts +13 -0
  7. package/dist/calendar/ProposeTimeDialog.d.ts +22 -0
  8. package/dist/calendar/WeeklyHoursEditor.d.ts +7 -0
  9. package/dist/calendar/access-setup.d.ts +8 -0
  10. package/dist/calendar/api-mapping.d.ts +22 -0
  11. package/dist/calendar/booking-form.d.ts +46 -0
  12. package/dist/calendar/conference.d.ts +11 -0
  13. package/dist/calendar/errors.d.ts +7 -0
  14. package/dist/calendar/feeds.d.ts +2 -0
  15. package/dist/calendar/freebusy.d.ts +22 -0
  16. package/dist/calendar/ics.d.ts +33 -0
  17. package/dist/calendar/index.cjs +472 -4293
  18. package/dist/calendar/index.cjs.map +1 -1
  19. package/dist/calendar/index.d.ts +17 -1
  20. package/dist/calendar/index.js +1 -4227
  21. package/dist/calendar/index.js.map +1 -1
  22. package/dist/calendar/requests.d.ts +42 -0
  23. package/dist/calendar/room-window.d.ts +6 -0
  24. package/dist/calendar/settings-value.d.ts +4 -0
  25. package/dist/calls/index.cjs +4 -4
  26. package/dist/calls/index.js +3 -3
  27. package/dist/chat/index.cjs +138 -138
  28. package/dist/chat/index.js +4 -4
  29. package/dist/{chunk-ED4HHTIA.js → chunk-22WFGXG2.js} +3 -3
  30. package/dist/{chunk-ED4HHTIA.js.map → chunk-22WFGXG2.js.map} +1 -1
  31. package/dist/{chunk-5BXEYYH6.js → chunk-453PNNNW.js} +3 -3
  32. package/dist/{chunk-5BXEYYH6.js.map → chunk-453PNNNW.js.map} +1 -1
  33. package/dist/{chunk-2KUCVSFF.js → chunk-45LRMW54.js} +3 -3
  34. package/dist/{chunk-2KUCVSFF.js.map → chunk-45LRMW54.js.map} +1 -1
  35. package/dist/chunk-5FTIHRZH.cjs +177 -0
  36. package/dist/chunk-5FTIHRZH.cjs.map +1 -0
  37. package/dist/{chunk-FUTMU4FR.js → chunk-5HFPRI3W.js} +3 -3
  38. package/dist/{chunk-FUTMU4FR.js.map → chunk-5HFPRI3W.js.map} +1 -1
  39. package/dist/{chunk-MJKBVIV3.cjs → chunk-5UXDUOOB.cjs} +39 -751
  40. package/dist/chunk-5UXDUOOB.cjs.map +1 -0
  41. package/dist/{chunk-XVME4XYD.js → chunk-6QMWP5IU.js} +847 -9
  42. package/dist/chunk-6QMWP5IU.js.map +1 -0
  43. package/dist/chunk-6YTHQ73P.cjs +5334 -0
  44. package/dist/chunk-6YTHQ73P.cjs.map +1 -0
  45. package/dist/{chunk-UBEI6WFJ.js → chunk-7QUUZBQZ.js} +13 -706
  46. package/dist/chunk-7QUUZBQZ.js.map +1 -0
  47. package/dist/{chunk-JVL7HUIQ.cjs → chunk-7X255TOM.cjs} +5 -5
  48. package/dist/{chunk-JVL7HUIQ.cjs.map → chunk-7X255TOM.cjs.map} +1 -1
  49. package/dist/chunk-A3XPS2EU.js +245 -0
  50. package/dist/chunk-A3XPS2EU.js.map +1 -0
  51. package/dist/chunk-B3AHCIV5.js +5206 -0
  52. package/dist/chunk-B3AHCIV5.js.map +1 -0
  53. package/dist/{chunk-2Q7FDZAY.js → chunk-BPBSSMRB.js} +5 -163
  54. package/dist/chunk-BPBSSMRB.js.map +1 -0
  55. package/dist/{chunk-KSHKTOY2.js → chunk-CKCBBYTA.js} +205 -5
  56. package/dist/chunk-CKCBBYTA.js.map +1 -0
  57. package/dist/chunk-CYNF5PZI.js +170 -0
  58. package/dist/chunk-CYNF5PZI.js.map +1 -0
  59. package/dist/{chunk-OPTBQSCV.cjs → chunk-DJM7DLCT.cjs} +3 -3
  60. package/dist/{chunk-OPTBQSCV.cjs.map → chunk-DJM7DLCT.cjs.map} +1 -1
  61. package/dist/{chunk-E5OYHJMU.js → chunk-DN55PRGS.js} +4 -4
  62. package/dist/{chunk-E5OYHJMU.js.map → chunk-DN55PRGS.js.map} +1 -1
  63. package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
  64. package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
  65. package/dist/{chunk-KDUGTKVI.cjs → chunk-GFNELPDP.cjs} +17 -6
  66. package/dist/chunk-GFNELPDP.cjs.map +1 -0
  67. package/dist/{chunk-OGBXV326.cjs → chunk-GFRQG36Y.cjs} +2 -243
  68. package/dist/chunk-GFRQG36Y.cjs.map +1 -0
  69. package/dist/{chunk-WXYQ66KC.cjs → chunk-HEMU73OP.cjs} +2 -166
  70. package/dist/chunk-HEMU73OP.cjs.map +1 -0
  71. package/dist/{chunk-UUHUQHXR.cjs → chunk-JZNXRMLH.cjs} +6 -6
  72. package/dist/{chunk-UUHUQHXR.cjs.map → chunk-JZNXRMLH.cjs.map} +1 -1
  73. package/dist/{chunk-IE5CUCZK.cjs → chunk-K3HNLWZZ.cjs} +8 -8
  74. package/dist/{chunk-IE5CUCZK.cjs.map → chunk-K3HNLWZZ.cjs.map} +1 -1
  75. package/dist/{chunk-JO3EMZ4X.js → chunk-KTFDUSON.js} +3 -3
  76. package/dist/{chunk-JO3EMZ4X.js.map → chunk-KTFDUSON.js.map} +1 -1
  77. package/dist/{chunk-HLB4DIYV.cjs → chunk-MABUMUCA.cjs} +6 -6
  78. package/dist/{chunk-HLB4DIYV.cjs.map → chunk-MABUMUCA.cjs.map} +1 -1
  79. package/dist/{chunk-RQ2Y7USX.cjs → chunk-MIDXCYZB.cjs} +235 -15
  80. package/dist/chunk-MIDXCYZB.cjs.map +1 -0
  81. package/dist/{chunk-ZNI4SW2G.js → chunk-MTPWZQTL.js} +4 -4
  82. package/dist/{chunk-ZNI4SW2G.js.map → chunk-MTPWZQTL.js.map} +1 -1
  83. package/dist/{chunk-OAL3B2ZU.cjs → chunk-O4ZIQDUT.cjs} +5 -5
  84. package/dist/{chunk-OAL3B2ZU.cjs.map → chunk-O4ZIQDUT.cjs.map} +1 -1
  85. package/dist/{chunk-W3VYZXNS.js → chunk-O6W6RW3B.js} +5 -240
  86. package/dist/chunk-O6W6RW3B.js.map +1 -0
  87. package/dist/{chunk-WS5EX7DN.cjs → chunk-OGP6MQXQ.cjs} +3 -3
  88. package/dist/{chunk-WS5EX7DN.cjs.map → chunk-OGP6MQXQ.cjs.map} +1 -1
  89. package/dist/{chunk-OQ7RUNOC.js → chunk-PC5KVHX3.js} +22 -6
  90. package/dist/chunk-PC5KVHX3.js.map +1 -0
  91. package/dist/{chunk-3BI6EWKP.cjs → chunk-ULEDHANM.cjs} +874 -14
  92. package/dist/chunk-ULEDHANM.cjs.map +1 -0
  93. package/dist/{chunk-L2PAPOZ5.js → chunk-US3S4DCB.js} +17 -6
  94. package/dist/chunk-US3S4DCB.js.map +1 -0
  95. package/dist/chunk-V46W7YLI.cjs +252 -0
  96. package/dist/chunk-V46W7YLI.cjs.map +1 -0
  97. package/dist/{chunk-3RJN2VTL.js → chunk-XDQXDWE7.js} +3 -3
  98. package/dist/{chunk-3RJN2VTL.js.map → chunk-XDQXDWE7.js.map} +1 -1
  99. package/dist/{chunk-7YLJHTDC.cjs → chunk-XOC44HQY.cjs} +3 -3
  100. package/dist/{chunk-7YLJHTDC.cjs.map → chunk-XOC44HQY.cjs.map} +1 -1
  101. package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
  102. package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
  103. package/dist/{chunk-AAFX64WD.cjs → chunk-ZXAWOLBQ.cjs} +22 -5
  104. package/dist/chunk-ZXAWOLBQ.cjs.map +1 -0
  105. package/dist/citations/QuietMarks.d.ts +5 -2
  106. package/dist/citations/index.cjs +15 -14
  107. package/dist/citations/index.js +3 -2
  108. package/dist/collaboration/index.cjs +42 -42
  109. package/dist/collaboration/index.js +2 -2
  110. package/dist/connect/docx.cjs +6 -6
  111. package/dist/connect/docx.js +5 -5
  112. package/dist/connect/index.cjs +4797 -184
  113. package/dist/connect/index.cjs.map +1 -1
  114. package/dist/connect/index.d.ts +4 -0
  115. package/dist/connect/index.js +4687 -94
  116. package/dist/connect/index.js.map +1 -1
  117. package/dist/connection/ConnectedAgentCreator.d.ts +37 -0
  118. package/dist/connection/ConnectedWorkflowHistory.d.ts +45 -0
  119. package/dist/connection/ConnectionProvider.d.ts +3 -1
  120. package/dist/connection/calendar/AddCalendarDialogs.d.ts +9 -0
  121. package/dist/connection/calendar/BookingPagesPanel.d.ts +13 -0
  122. package/dist/connection/calendar/CalendarAccountsPanel.d.ts +5 -0
  123. package/dist/connection/calendar/CalendarSettingsDialog.d.ts +12 -0
  124. package/dist/connection/calendar/ConnectedCalendar.d.ts +13 -0
  125. package/dist/connection/calendar/ConnectedMailInviteCard.d.ts +12 -0
  126. package/dist/connection/calendar/ConnectedPublicBooking.d.ts +9 -0
  127. package/dist/connection/calendar/ConnectedUpcomingEvents.d.ts +12 -0
  128. package/dist/connection/calendar/CopyField.d.ts +9 -0
  129. package/dist/connection/calendar/EventEditorDialog.d.ts +29 -0
  130. package/dist/connection/calendar/EventScheduling.d.ts +8 -0
  131. package/dist/connection/calendar/InvitationsPanel.d.ts +5 -0
  132. package/dist/connection/calendar/OpenAccessPanel.d.ts +7 -0
  133. package/dist/connection/calendar/PublishCalendarDialog.d.ts +8 -0
  134. package/dist/connection/calendar/RoomsDirectoryPanel.d.ts +8 -0
  135. package/dist/connection/calendar/ShareCalendarDialog.d.ts +6 -0
  136. package/dist/connection/calendar/copy.d.ts +2 -0
  137. package/dist/connection/calendar/index.d.ts +6 -0
  138. package/dist/connection/calendar/store.d.ts +47 -0
  139. package/dist/connection/calendar/types.d.ts +36 -0
  140. package/dist/connection/calendar/useWebinarAttendee.d.ts +3 -0
  141. package/dist/connection/notification-center/ConnectedNotificationCenter.d.ts +15 -0
  142. package/dist/connection/notification-center/NotificationCenter.d.ts +37 -0
  143. package/dist/connection/notification-center/NotificationEvent.d.ts +33 -0
  144. package/dist/connection/notification-center/index.d.ts +4 -0
  145. package/dist/connection/notification-center/items.d.ts +44 -0
  146. package/dist/facts/index.cjs +6 -6
  147. package/dist/facts/index.js +6 -6
  148. package/dist/files/index.cjs +6 -6
  149. package/dist/files/index.js +6 -6
  150. package/dist/home/index.cjs +20 -20
  151. package/dist/home/index.js +5 -5
  152. package/dist/index.cjs +921 -904
  153. package/dist/index.cjs.map +1 -1
  154. package/dist/index.js +22 -21
  155. package/dist/index.js.map +1 -1
  156. package/dist/retrieval/index.cjs +1 -1
  157. package/dist/retrieval/index.js +1 -1
  158. package/dist/settings/index.cjs +52 -66
  159. package/dist/settings/index.cjs.map +1 -1
  160. package/dist/settings/index.js +6 -23
  161. package/dist/settings/index.js.map +1 -1
  162. package/dist/shell/index.cjs +61 -60
  163. package/dist/shell/index.js +5 -4
  164. package/dist/studio/index.cjs +8 -8
  165. package/dist/studio/index.js +6 -6
  166. package/dist/workflow-canvas/index.cjs +28 -29
  167. package/dist/workflow-canvas/index.cjs.map +1 -1
  168. package/dist/workflow-canvas/index.js +11 -12
  169. package/dist/workflow-canvas/index.js.map +1 -1
  170. package/dist/workspaces/index.cjs +2 -2
  171. package/dist/workspaces/index.js +2 -2
  172. package/node_modules/@arbidocs/coedit/package.json +1 -1
  173. package/package.json +4 -4
  174. package/dist/chunk-2Q7FDZAY.js.map +0 -1
  175. package/dist/chunk-3BI6EWKP.cjs.map +0 -1
  176. package/dist/chunk-AAFX64WD.cjs.map +0 -1
  177. package/dist/chunk-CQCC7LE7.js +0 -210
  178. package/dist/chunk-CQCC7LE7.js.map +0 -1
  179. package/dist/chunk-KDUGTKVI.cjs.map +0 -1
  180. package/dist/chunk-KSHKTOY2.js.map +0 -1
  181. package/dist/chunk-L2PAPOZ5.js.map +0 -1
  182. package/dist/chunk-MJKBVIV3.cjs.map +0 -1
  183. package/dist/chunk-OGBXV326.cjs.map +0 -1
  184. package/dist/chunk-OQ7RUNOC.js.map +0 -1
  185. package/dist/chunk-RFIBUWLF.cjs +0 -232
  186. package/dist/chunk-RFIBUWLF.cjs.map +0 -1
  187. package/dist/chunk-RQ2Y7USX.cjs.map +0 -1
  188. package/dist/chunk-UBEI6WFJ.js.map +0 -1
  189. package/dist/chunk-W3VYZXNS.js.map +0 -1
  190. package/dist/chunk-WXYQ66KC.cjs.map +0 -1
  191. package/dist/chunk-XVME4XYD.js.map +0 -1
@@ -1,27 +1,26 @@
1
1
  "use client";
2
- import { MultiSelect } from './chunk-CQCC7LE7.js';
3
- import { useWorkflowView, useControllableState, SkillTypeBadge, SkillGlobalBadge, SkillActionButton, activateOnKey, PersonPill, DEFAULT_TASK_ACTIVITY_LABELS, TaskActivityTimeline, activeStepId, DEFAULT_STEP_BAR_LABELS, StepBarFrame, workflowRunStatusLabel, STEP_LABEL_CURRENT, STEP_LABEL, STEP_LABEL_MAX, SchemaForm } from './chunk-XVME4XYD.js';
4
- import { ScopePicker, FoldSection, AddFilesFirst } from './chunk-3RJN2VTL.js';
5
- import { TriStateFilterMenu } from './chunk-KSHKTOY2.js';
2
+ import { useWorkflowView, SkillTypeBadge, SkillGlobalBadge, SkillActionButton, activateOnKey, PersonPill, activeStepId, DEFAULT_STEP_BAR_LABELS, StepBarFrame, STEP_LABEL_CURRENT, STEP_LABEL, STEP_LABEL_MAX, useControllableState, SchemaForm } from './chunk-6QMWP5IU.js';
3
+ import { ScopePicker, AddFilesFirst } from './chunk-XDQXDWE7.js';
4
+ import { TriStateFilterMenu, MultiSelect } from './chunk-CKCBBYTA.js';
6
5
  import { EmptyState } from './chunk-P6GHJSLR.js';
7
6
  import { CellHoverIcon } from './chunk-RFXJYIDV.js';
8
7
  import { ToneBadge } from './chunk-5LXQPP2K.js';
9
8
  import { ActionLink } from './chunk-444XKG46.js';
10
9
  import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
11
10
  import { FilterInput } from './chunk-YU2KUMGE.js';
12
- import { GridView } from './chunk-N5YEF3LC.js';
11
+ import { useBlocksEnvironment } from './chunk-YNIBUKV5.js';
13
12
  import { TabHeader } from './chunk-4WWM3GQ5.js';
14
13
  import { DEFAULT_STEP_RECORD_LABELS, DEFAULT_STEP_DOCUMENT_LABELS, DEFAULT_STEP_KIND_LABELS, isWorkflowScope, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useMentionAutocomplete, composeWorkflowPrompt, StepChip, StepDocumentButton, stepLevels, isRunFinished, stepKindOf, stepDocuments, eventWaitingDocuments, waitingForDocumentsText, defaultInputs, STEP_KIND_ICONS, StepDocumentCards, StepRecord, splitDocRef, validateInputs, waitingDocuments } from './chunk-Y5KTM3V5.js';
15
14
  import { toMessageMentions, extractMentions, MentionMenu } from './chunk-AA3PT6KR.js';
15
+ import { formatCount } from './chunk-OXF2IFXG.js';
16
+ import { GridView } from './chunk-N5YEF3LC.js';
17
+ import { ModalHeader } from './chunk-TX2ZICS7.js';
16
18
  import { useIsPhone } from './chunk-SLSBJRWW.js';
17
19
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
18
- import { useBlocksEnvironment } from './chunk-YNIBUKV5.js';
19
- import { ModalHeader } from './chunk-TX2ZICS7.js';
20
- import { formatCount } from './chunk-OXF2IFXG.js';
21
20
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
22
- import { memo, forwardRef, useState, useMemo, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
23
- import { ChevronDown, ChevronRight, Plus, Trash2, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Loader2, Wand2, X, Download, Lock, Globe, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, ArrowUpRight, SendHorizontal, Zap, MessagesSquare, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, CornerLeftUp, CornerUpLeft, CircleDashed, RotateCcw, ListPlus, Clock, CircleCheck, Hand, Flag, Play } from 'lucide-react';
24
- import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Badge, Slider, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, Tooltip, TooltipTrigger, TooltipContent, EntityPill, ThreadVisibilityIcon, DialogClose, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, Checkbox, UserEntity, DropdownMenuSeparator, PopoverClose } from '@arbidocs/react/ui';
21
+ import { memo, forwardRef, useState, useMemo, useRef, useEffect, useLayoutEffect } from 'react';
22
+ import { ChevronDown, ChevronRight, Plus, Trash2, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Download, Lock, Globe, ListChecks, Loader2, AlertTriangle, FileX, SkipForward, X, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, ArrowUpRight, SendHorizontal, Zap, MessagesSquare, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, CornerLeftUp, CornerUpLeft, CircleDashed, RotateCcw, History, ListPlus, Clock, CircleCheck, Hand, Flag, Play } from 'lucide-react';
23
+ import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Badge, Slider, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, VisibilityToggle, Tooltip, TooltipTrigger, TooltipContent, EntityPill, ThreadVisibilityIcon, DialogClose, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, Checkbox, UserEntity, DropdownMenuSeparator, PopoverClose } from '@arbidocs/react/ui';
25
24
 
26
25
  function defaultScopeRenderer(scopeSource) {
27
26
  if (!scopeSource) return void 0;
@@ -339,533 +338,6 @@ function AgentGallery({
339
338
  )
340
339
  ] });
341
340
  }
342
- function CapabilityTile({
343
- label,
344
- description,
345
- icon: Icon,
346
- selected,
347
- onToggle,
348
- testId,
349
- className
350
- }) {
351
- return /* @__PURE__ */ jsxs(
352
- "button",
353
- {
354
- type: "button",
355
- onClick: onToggle,
356
- "aria-pressed": selected,
357
- "data-testid": testId,
358
- "data-slot": "capability-tile",
359
- className: cn(
360
- "flex flex-col items-start gap-1 rounded-lg p-3 text-left transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
361
- selected ? "bg-accent text-accent-foreground ring-1 ring-inset ring-primary/30" : "bg-muted hover:bg-accent/60",
362
- className
363
- ),
364
- children: [
365
- /* @__PURE__ */ jsx(Icon, { size: 16, className: selected ? "text-accent-foreground" : "text-muted-foreground" }),
366
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium leading-tight", children: label }),
367
- /* @__PURE__ */ jsx("span", { className: "text-xs leading-tight text-muted-foreground", children: description })
368
- ]
369
- }
370
- );
371
- }
372
- function CapabilityGrid({
373
- children,
374
- testId,
375
- className
376
- }) {
377
- return /* @__PURE__ */ jsx(
378
- "div",
379
- {
380
- className: cn("grid grid-cols-2 gap-2 sm:grid-cols-4", className),
381
- "data-testid": testIdOr(testId, { testId: "agent-capabilities" }),
382
- children
383
- }
384
- );
385
- }
386
- var DEFAULT_AGENT_TYPE_SELECTOR_LABELS = {
387
- agentType: "Agent type"
388
- };
389
- function AgentTypeSelector({
390
- value,
391
- onChange,
392
- options,
393
- label,
394
- labels,
395
- testId,
396
- optionTestId
397
- }) {
398
- const l = { ...DEFAULT_AGENT_TYPE_SELECTOR_LABELS, ...labels };
399
- return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", "data-testid": testIdOr(testId, { testId: "agent-type-selector" }), children: [
400
- /* @__PURE__ */ jsx(Label, { children: label ?? l.agentType }),
401
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2", children: options.map((opt) => /* @__PURE__ */ jsxs(
402
- "button",
403
- {
404
- type: "button",
405
- onClick: () => onChange(opt.value),
406
- "aria-pressed": value === opt.value,
407
- "data-testid": testIdOr(optionTestId?.(opt.value), { testId: `agent-type-${opt.value}` }),
408
- className: cn(
409
- "rounded-lg p-3 text-left transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
410
- value === opt.value ? "bg-accent text-accent-foreground ring-1 ring-inset ring-primary/30" : "bg-muted hover:bg-accent/60"
411
- ),
412
- children: [
413
- /* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: opt.title }),
414
- /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-xs text-muted-foreground", children: opt.description })
415
- ]
416
- },
417
- opt.value
418
- )) })
419
- ] });
420
- }
421
- var DEFAULT_AGENT_AVATAR_FIELD_LABELS = {
422
- painting: "Painting\u2026",
423
- generate: "Generate avatar",
424
- regenerate: "Regenerate"
425
- };
426
- function AgentAvatarField({
427
- picture,
428
- isBusy,
429
- canGenerate,
430
- onGenerate,
431
- labels,
432
- testIds
433
- }) {
434
- const l = { ...DEFAULT_AGENT_AVATAR_FIELD_LABELS, ...labels };
435
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", "data-slot": "agent-avatar-field", children: [
436
- /* @__PURE__ */ jsx(
437
- "div",
438
- {
439
- className: "flex size-24 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted",
440
- "data-testid": testIdOr(testIds?.preview, { testId: "agent-avatar-preview" }),
441
- children: isBusy ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1 text-ai-ink", children: [
442
- /* @__PURE__ */ jsx(Loader2, { className: "size-7 animate-spin" }),
443
- /* @__PURE__ */ jsx("span", { className: "text-xs", children: l.painting })
444
- ] }) : picture ? /* @__PURE__ */ jsx("img", { src: picture, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ jsx(Bot, { className: "size-10 text-ai-ink/70" })
445
- }
446
- ),
447
- /* @__PURE__ */ jsxs(
448
- Button,
449
- {
450
- variant: "outline",
451
- size: "sm",
452
- className: "h-8 gap-1 px-2 text-xs pointer-coarse:h-11",
453
- disabled: isBusy || !canGenerate,
454
- onClick: onGenerate,
455
- "data-testid": testIdOr(testIds?.generate, { testId: "agent-avatar-generate" }),
456
- children: [
457
- /* @__PURE__ */ jsx(Wand2, { size: 12 }),
458
- " ",
459
- picture ? l.regenerate : l.generate
460
- ]
461
- }
462
- )
463
- ] });
464
- }
465
- var DEFAULT_AGENT_CREATOR_LABELS = {
466
- titleNew: "New agent",
467
- titleEdit: (name) => `Edit ${name}`,
468
- descriptionNew: "Say what this agent is for. Everything else follows from that.",
469
- descriptionEdit: "Change what this agent is for, or fine-tune it under Advanced.",
470
- describe: "What should it do?",
471
- describePlaceholder: "e.g. Reads new files each morning and tells me what changed, with sources.",
472
- describeHint: "This becomes the agent\u2019s persona and shapes every answer.",
473
- startFrom: "Or start from",
474
- summaryHeading: "What it can do (its tools)",
475
- summaryCan: (list) => `Can ${list}.`,
476
- summaryCannot: (list) => `Cannot ${list}.`,
477
- summaryNone: "It can read your files and answer. Nothing else is switched on yet.",
478
- summaryModel: (model) => `Uses ${model}.`,
479
- summaryModelAuto: "Uses the default model.",
480
- summaryWorkspaces: (list) => `Can read ${list}.`,
481
- summaryNoWorkspaces: "Cannot read any workspace yet. Give it access under Advanced.",
482
- summaryName: (name) => `Will be called ${name}.`,
483
- workspaceAccess: "Workspace access",
484
- workspaceAccessHint: "Each workspace stays separate. The agent can only read the ones you tick here.",
485
- workspaceAlready: "Already has access",
486
- revokeWorkspace: (name) => `Remove access to ${name}`,
487
- noWorkspacesToGrant: "You have no workspaces yet.",
488
- name: "Name",
489
- nameHint: "Letters, digits, - and _ only; must start with a letter or digit.",
490
- nameInvalid: "Letters, digits, - and _ only; must start with a letter or digit.",
491
- advanced: "Advanced",
492
- capabilities: "Tools",
493
- toolsHint: "Tools are switches on this agent: what it may do on its own, such as search the web or run code. Change them any time.",
494
- summaryChange: "Change tools",
495
- model: "Model",
496
- modelAuto: "Automatic",
497
- cancel: "Cancel",
498
- create: "Create agent",
499
- save: "Save changes",
500
- saving: "Saving\u2026"
501
- };
502
- var NAME_RE = /^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;
503
- var FILLER = /* @__PURE__ */ new Set([
504
- "a",
505
- "an",
506
- "the",
507
- "who",
508
- "that",
509
- "which",
510
- "to",
511
- "for",
512
- "and",
513
- "of",
514
- "i",
515
- "my"
516
- ]);
517
- function deriveAgentName(description) {
518
- const words = description.toLowerCase().replace(/[^a-z0-9\s-]/g, " ").split(/\s+/).filter((w) => w && !FILLER.has(w)).slice(0, 3);
519
- return words.join("-").slice(0, 64);
520
- }
521
- var isValidAgentName = (name) => NAME_RE.test(name) && name.length <= 64;
522
- var joinList = (items) => items.length <= 2 ? items.join(" and ") : `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}`;
523
- function summarizeCapabilities(capabilities, enabled, modelName, labels = DEFAULT_AGENT_CREATOR_LABELS) {
524
- const on = capabilities.filter((c) => enabled[c.key]).map((c) => c.label.toLowerCase());
525
- const off = capabilities.filter((c) => !enabled[c.key]).map((c) => c.label.toLowerCase());
526
- const lines = [];
527
- if (on.length === 0) lines.push(labels.summaryNone);
528
- else {
529
- lines.push(labels.summaryCan(joinList(on)));
530
- if (off.length > 0) lines.push(labels.summaryCannot(joinList(off)));
531
- }
532
- lines.push(modelName ? labels.summaryModel(modelName) : labels.summaryModelAuto);
533
- return lines;
534
- }
535
- function summarizeAgent(capabilities, values, workspaces, labels = DEFAULT_AGENT_CREATOR_LABELS) {
536
- const lines = summarizeCapabilities(capabilities, values.capabilities, values.modelName, labels);
537
- const names = workspaces.filter((w) => values.workspaceIds.includes(w.id)).map((w) => w.name);
538
- lines.push(
539
- names.length > 0 ? labels.summaryWorkspaces(joinList(names)) : labels.summaryNoWorkspaces
540
- );
541
- if (values.name) lines.push(labels.summaryName(values.name));
542
- return lines;
543
- }
544
- var BLANK = {
545
- name: "",
546
- persona: "",
547
- capabilities: {},
548
- modelName: "",
549
- type: "builtin",
550
- workspaceIds: []
551
- };
552
- function AgentCreator({
553
- open,
554
- onOpenChange,
555
- isEdit = false,
556
- agentName,
557
- capabilities,
558
- templates = [],
559
- models = [],
560
- workspaces = [],
561
- grantedWorkspaceIds = [],
562
- onRevokeWorkspace,
563
- revokingWorkspaceId,
564
- avatar,
565
- types,
566
- values: valuesProp,
567
- initialValues,
568
- onValuesChange,
569
- advanced,
570
- isSaving,
571
- onSubmit,
572
- labels,
573
- testId
574
- }) {
575
- const l = { ...DEFAULT_AGENT_CREATOR_LABELS, ...labels };
576
- const seed = useMemo(
577
- () => ({ ...BLANK, ...initialValues }),
578
- // Seeded once per open.
579
- // eslint-disable-next-line react-hooks/exhaustive-deps
580
- [open]
581
- );
582
- const [values, setValues] = useControllableState(
583
- valuesProp,
584
- seed,
585
- onValuesChange
586
- );
587
- const [advancedOpen, setAdvancedOpen] = useState(false);
588
- const [nameTouched, setNameTouched] = useState(false);
589
- useEffect(() => {
590
- if (open) {
591
- if (valuesProp === void 0) setValues(seed);
592
- setAdvancedOpen(false);
593
- setNameTouched(Boolean(seed.name));
594
- }
595
- }, [open]);
596
- const id = testIdOr(testId, { testId: "agent-creator" });
597
- const name = values.name;
598
- const nameValid = isValidAgentName(name);
599
- const canSubmit = (isEdit || nameValid) && !isSaving;
600
- const patch = (next) => setValues({ ...values, ...next });
601
- const setPersona = (persona) => patch({ persona, ...!isEdit && !nameTouched ? { name: deriveAgentName(persona) } : {} });
602
- const applyTemplate = (t) => patch({
603
- persona: t.persona,
604
- capabilities: Object.fromEntries(
605
- capabilities.map((c) => [c.key, t.capabilities.includes(c.key)])
606
- ),
607
- ...!isEdit && !nameTouched ? { name: deriveAgentName(t.persona) } : {}
608
- });
609
- const summary = summarizeAgent(capabilities, values, workspaces, l);
610
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
611
- DialogContent,
612
- {
613
- presentation: "sheet",
614
- className: "max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-xl",
615
- "data-testid": id,
616
- children: [
617
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
618
- /* @__PURE__ */ jsx(DialogTitle, { children: isEdit ? l.titleEdit(agentName ?? name) : l.titleNew }),
619
- /* @__PURE__ */ jsx(DialogDescription, { children: isEdit ? l.descriptionEdit : l.descriptionNew })
620
- ] }),
621
- /* @__PURE__ */ jsxs(
622
- "form",
623
- {
624
- className: "flex flex-col gap-5",
625
- onSubmit: (event) => {
626
- event.preventDefault();
627
- if (canSubmit) onSubmit(values);
628
- },
629
- children: [
630
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
631
- /* @__PURE__ */ jsx(Label, { htmlFor: "agent-creator-describe", children: l.describe }),
632
- /* @__PURE__ */ jsx(
633
- Textarea,
634
- {
635
- id: "agent-creator-describe",
636
- "data-testid": `${id}-describe`,
637
- value: values.persona,
638
- placeholder: l.describePlaceholder,
639
- rows: 4,
640
- autoFocus: true,
641
- onChange: (e) => setPersona(e.target.value)
642
- }
643
- ),
644
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: l.describeHint })
645
- ] }),
646
- !isEdit && templates.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", "data-testid": `${id}-templates`, children: [
647
- /* @__PURE__ */ jsx(Label, { children: l.startFrom }),
648
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: templates.map((t) => /* @__PURE__ */ jsx(
649
- "button",
650
- {
651
- type: "button",
652
- title: t.description,
653
- onClick: () => applyTemplate(t),
654
- "data-testid": `${id}-template-${t.id}`,
655
- className: cn(
656
- "rounded-full border border-border px-3 py-1.5 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11 [&:hover]:bg-accent"
657
- ),
658
- children: t.title
659
- },
660
- t.id
661
- )) })
662
- ] }),
663
- /* @__PURE__ */ jsxs(
664
- "div",
665
- {
666
- className: "rounded-lg bg-muted p-3 text-sm",
667
- "data-testid": `${id}-summary`,
668
- "aria-live": "polite",
669
- children: [
670
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground", children: [
671
- /* @__PURE__ */ jsx(Sparkles, { className: "size-4 text-ai-ink", "aria-hidden": "true" }),
672
- l.summaryHeading
673
- ] }),
674
- summary.map((line) => /* @__PURE__ */ jsx("p", { children: line }, line)),
675
- /* @__PURE__ */ jsx(
676
- "button",
677
- {
678
- type: "button",
679
- onClick: () => setAdvancedOpen(true),
680
- "data-testid": `${id}-summary-change`,
681
- className: "mt-1 text-xs font-medium text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
682
- children: l.summaryChange
683
- }
684
- )
685
- ]
686
- }
687
- ),
688
- /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-4", children: [
689
- typeof avatar === "function" ? avatar(values) : avatar,
690
- !isEdit && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
691
- /* @__PURE__ */ jsx(Label, { htmlFor: "agent-creator-name", children: l.name }),
692
- /* @__PURE__ */ jsx(
693
- Input,
694
- {
695
- id: "agent-creator-name",
696
- "data-testid": `${id}-name`,
697
- value: name,
698
- placeholder: "research-assistant",
699
- "aria-invalid": name !== "" && !nameValid ? true : void 0,
700
- onChange: (e) => {
701
- setNameTouched(true);
702
- patch({ name: e.target.value });
703
- }
704
- }
705
- ),
706
- name !== "" && !nameValid && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: l.nameInvalid })
707
- ] })
708
- ] }),
709
- /* @__PURE__ */ jsx(
710
- FoldSection,
711
- {
712
- label: l.advanced,
713
- open: advancedOpen,
714
- onOpenChange: setAdvancedOpen,
715
- testId: `${id}-advanced-toggle`,
716
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
717
- !isEdit && types && types.length > 0 && /* @__PURE__ */ jsx(
718
- AgentTypeSelector,
719
- {
720
- value: values.type,
721
- onChange: (type) => patch({ type }),
722
- options: types,
723
- testId: `${id}-type`,
724
- optionTestId: (value) => `${id}-type-${value}`
725
- }
726
- ),
727
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
728
- /* @__PURE__ */ jsx(Label, { children: l.capabilities }),
729
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: l.toolsHint }),
730
- /* @__PURE__ */ jsx(CapabilityGrid, { testId: `${id}-capabilities`, children: capabilities.map((c) => /* @__PURE__ */ jsx(
731
- CapabilityTile,
732
- {
733
- label: c.label,
734
- description: c.description,
735
- icon: c.icon,
736
- selected: Boolean(values.capabilities[c.key]),
737
- onToggle: () => patch({
738
- capabilities: {
739
- ...values.capabilities,
740
- [c.key]: !values.capabilities[c.key]
741
- }
742
- }),
743
- testId: `${id}-cap-${c.key}`
744
- },
745
- c.key
746
- )) })
747
- ] }),
748
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", "data-testid": `${id}-workspaces`, children: [
749
- /* @__PURE__ */ jsx(Label, { children: l.workspaceAccess }),
750
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: l.workspaceAccessHint }),
751
- workspaces.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: l.noWorkspacesToGrant }) : /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: workspaces.map((w) => {
752
- const already = grantedWorkspaceIds.includes(w.id);
753
- const on = already || values.workspaceIds.includes(w.id);
754
- return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
755
- /* @__PURE__ */ jsx(
756
- "button",
757
- {
758
- type: "button",
759
- role: "checkbox",
760
- "aria-checked": on,
761
- disabled: already,
762
- title: already ? l.workspaceAlready : void 0,
763
- "data-testid": `${id}-workspace-${w.id}`,
764
- onClick: () => patch({
765
- workspaceIds: on ? values.workspaceIds.filter((x) => x !== w.id) : [...values.workspaceIds, w.id]
766
- }),
767
- className: cn(
768
- "rounded-md border px-3 py-1.5 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-60 pointer-coarse:min-h-11",
769
- on ? "border-primary bg-primary/10 text-primary" : "border-border [&:hover:not(:disabled)]:bg-accent"
770
- ),
771
- children: w.name
772
- }
773
- ),
774
- already && onRevokeWorkspace && /* @__PURE__ */ jsx(
775
- "button",
776
- {
777
- type: "button",
778
- "aria-label": l.revokeWorkspace(w.name),
779
- title: l.revokeWorkspace(w.name),
780
- disabled: revokingWorkspaceId === w.id,
781
- "data-testid": `${id}-workspace-${w.id}-revoke`,
782
- onClick: () => onRevokeWorkspace(w.id),
783
- className: "flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 pointer-coarse:size-11",
784
- children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": true })
785
- }
786
- )
787
- ] }, w.id);
788
- }) })
789
- ] }),
790
- models.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
791
- /* @__PURE__ */ jsx(Label, { children: l.model }),
792
- /* @__PURE__ */ jsxs(
793
- Select,
794
- {
795
- value: values.modelName || "__auto__",
796
- onValueChange: (v) => patch({ modelName: v === "__auto__" ? "" : v }),
797
- children: [
798
- /* @__PURE__ */ jsx(SelectTrigger, { "data-testid": `${id}-model`, className: "pointer-coarse:min-h-11", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
799
- /* @__PURE__ */ jsxs(SelectContent, { children: [
800
- /* @__PURE__ */ jsx(SelectItem, { value: "__auto__", children: l.modelAuto }),
801
- models.map((m) => /* @__PURE__ */ jsx(SelectItem, { value: m, children: m }, m))
802
- ] })
803
- ]
804
- }
805
- )
806
- ] }),
807
- typeof advanced === "function" ? advanced(values) : advanced
808
- ] })
809
- }
810
- ),
811
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 border-t border-border pt-3", children: [
812
- /* @__PURE__ */ jsx(
813
- Button,
814
- {
815
- type: "button",
816
- variant: "ghost",
817
- onClick: () => onOpenChange(false),
818
- "data-testid": `${id}-cancel`,
819
- className: "pointer-coarse:min-h-11",
820
- children: l.cancel
821
- }
822
- ),
823
- /* @__PURE__ */ jsxs(
824
- Button,
825
- {
826
- type: "submit",
827
- disabled: !canSubmit,
828
- "data-testid": `${id}-submit`,
829
- className: "gap-1.5 pointer-coarse:min-h-11",
830
- children: [
831
- isSaving ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx(Sparkles, { className: "size-4" }),
832
- isSaving ? l.saving : isEdit ? l.save : l.create
833
- ]
834
- }
835
- )
836
- ] })
837
- ]
838
- }
839
- )
840
- ]
841
- }
842
- ) });
843
- }
844
-
845
- // src/agents/definitions/persona.ts
846
- function composePersona(name, description) {
847
- const body = description.trim();
848
- const preamble = `You are ${name}, an AI agent.`;
849
- return body ? `${preamble} ${body}` : preamble;
850
- }
851
- function stripPersonaPreamble(persona) {
852
- return persona.replace(/^You are .+?, an AI agent\.\s*/, "").trim();
853
- }
854
- function agentCreatorToConfigSection(values, capabilityKeys) {
855
- return {
856
- PERSONA: composePersona(values.name, values.persona),
857
- ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
858
- ...Object.fromEntries(capabilityKeys.map((k) => [k, !!values.capabilities[k]]))
859
- };
860
- }
861
- function agentConfigSectionToValues(section, capabilityKeys) {
862
- const s = section ?? {};
863
- return {
864
- persona: stripPersonaPreamble(String(s.PERSONA ?? "")),
865
- modelName: String(s.AGENT_MODEL_NAME ?? ""),
866
- capabilities: Object.fromEntries(capabilityKeys.map((k) => [k, Boolean(s[k])]))
867
- };
868
- }
869
341
  var DEFAULT_SKILL_CARD_LABELS = {
870
342
  global: "Global",
871
343
  globalTitle: "Shared with everyone in the marketplace",
@@ -4667,37 +4139,6 @@ function NewThreadDialog({
4667
4139
  }
4668
4140
  ) });
4669
4141
  }
4670
- function TaskActivityDialog({
4671
- open,
4672
- onOpenChange,
4673
- taskName,
4674
- events,
4675
- isLoading,
4676
- isError,
4677
- labels,
4678
- testId,
4679
- ...timeline
4680
- }) {
4681
- const l = { ...DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
4682
- const id = testIdOr(testId, { testId: "task-activity" });
4683
- const count = events?.length ?? 0;
4684
- const scrollToEnd = useCallback(
4685
- (el) => {
4686
- if (count >= 0) el?.scrollIntoView?.({ block: "end" });
4687
- },
4688
- [count]
4689
- );
4690
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { presentation: "sheet", className: "max-h-[80dvh] sm:max-w-lg", "data-testid": id, children: [
4691
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
4692
- /* @__PURE__ */ jsx(DialogTitle, { children: l.title }),
4693
- /* @__PURE__ */ jsx(DialogDescription, { className: "truncate", children: taskName })
4694
- ] }),
4695
- /* @__PURE__ */ jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
4696
- isLoading && !events ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.loading }) : isError && !events ? /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: l.error }) : count === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: l.empty }) : /* @__PURE__ */ jsx(TaskActivityTimeline, { events: events ?? [], labels, testId: id, ...timeline }),
4697
- /* @__PURE__ */ jsx("div", { ref: scrollToEnd })
4698
- ] })
4699
- ] }) });
4700
- }
4701
4142
  function TaskFlow({
4702
4143
  items,
4703
4144
  className
@@ -5717,140 +5158,6 @@ function TaskThreadChip({
5717
5158
  }
5718
5159
  );
5719
5160
  }
5720
- var DEFAULT_TASK_RUNS_DIALOG_LABELS = {
5721
- title: (taskName) => `Run history \u2014 ${taskName}`,
5722
- description: "Every time this task ran. Open a run to read or watch it in its conversation.",
5723
- loading: "Loading runs\u2026",
5724
- empty: "This task hasn\u2019t run yet.",
5725
- open: "Open"
5726
- };
5727
- var STATUS_STYLE = {
5728
- running: "bg-ai-soft text-ai-ink",
5729
- success: "bg-green-bg text-green-text",
5730
- completed: "bg-green-bg text-green-text",
5731
- failed: "bg-red-bg text-red-text"
5732
- };
5733
- function TaskRunsDialog({
5734
- inline = false,
5735
- renderErrorReport,
5736
- hideHeader = false,
5737
- open,
5738
- onOpenChange,
5739
- taskName,
5740
- runs,
5741
- isLoading,
5742
- onOpenRun,
5743
- onOpenResult,
5744
- getRunHref,
5745
- testIds,
5746
- labels
5747
- }) {
5748
- const l = { ...DEFAULT_TASK_RUNS_DIALOG_LABELS, ...labels };
5749
- const columns = useMemo(
5750
- () => [
5751
- {
5752
- colId: "status",
5753
- field: "status",
5754
- headerName: "Status",
5755
- width: 160,
5756
- minWidth: 140,
5757
- cellRenderer: ({ data }) => data && /* @__PURE__ */ jsx(
5758
- "span",
5759
- {
5760
- className: cn(
5761
- "rounded-full px-2 py-0.5 text-xs font-medium capitalize",
5762
- STATUS_STYLE[data.status] ?? "text-muted-foreground"
5763
- ),
5764
- children: workflowRunStatusLabel(data.status)
5765
- }
5766
- )
5767
- },
5768
- { colId: "when", field: "when", headerName: "Run", flex: 2, minWidth: 240 },
5769
- {
5770
- colId: "result",
5771
- headerName: "",
5772
- width: 280,
5773
- minWidth: 220,
5774
- sortable: false,
5775
- cellRenderer: ({ data: run }) => {
5776
- if (!run) return null;
5777
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center gap-2", children: [
5778
- run.error && renderErrorReport?.(run),
5779
- (run.conversationId || run.resultId && onOpenResult) && /* @__PURE__ */ jsx(Button, { asChild: true, variant: "ghost", size: "sm", className: "h-7 gap-1.5", children: /* @__PURE__ */ jsxs(
5780
- ActionLink,
5781
- {
5782
- href: getRunHref?.(run),
5783
- onSelect: () => {
5784
- if (run.conversationId) onOpenRun(run.conversationId);
5785
- else if (run.resultId) onOpenResult?.(run.resultId);
5786
- onOpenChange(false);
5787
- },
5788
- "data-testid": testIdOr(testIds?.open, { testId: "task-run-open" }),
5789
- children: [
5790
- /* @__PURE__ */ jsx(Eye, { size: 13 }),
5791
- " ",
5792
- l.open
5793
- ]
5794
- }
5795
- ) })
5796
- ] });
5797
- }
5798
- }
5799
- ],
5800
- [onOpenRun, onOpenResult, getRunHref, onOpenChange, testIds?.open, l.open, renderErrorReport]
5801
- );
5802
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
5803
- hideHeader ? null : inline ? /* @__PURE__ */ jsx(
5804
- TabHeader,
5805
- {
5806
- tabs: [
5807
- {
5808
- id: "history",
5809
- label: l.title(taskName),
5810
- count: runs.length,
5811
- countIcon: /* @__PURE__ */ jsx(History, { size: 14 }),
5812
- presentation: "count",
5813
- onClose: () => onOpenChange(false)
5814
- }
5815
- ],
5816
- activeTabId: "history",
5817
- onTabChange: () => {
5818
- }
5819
- }
5820
- ) : /* @__PURE__ */ jsxs(DialogHeader, { children: [
5821
- /* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2", children: [
5822
- /* @__PURE__ */ jsx(History, { size: 16 }),
5823
- " ",
5824
- l.title(taskName)
5825
- ] }),
5826
- /* @__PURE__ */ jsx(DialogDescription, { children: l.description })
5827
- ] }),
5828
- /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(
5829
- GridView,
5830
- {
5831
- testId: testIdOr(testIds?.list, { testId: "task-runs-list" }),
5832
- gridId: "workflow-runs",
5833
- items: runs,
5834
- columnDefs: columns,
5835
- getItemId: (run) => run.id,
5836
- getRowTestId: () => testIdOr(testIds?.row, { testId: "task-run-row" }),
5837
- isLoading,
5838
- loadingMessage: l.loading,
5839
- emptyState: { title: l.empty },
5840
- height: "100%"
5841
- }
5842
- ) })
5843
- ] });
5844
- return inline ? /* @__PURE__ */ jsx("section", { className: "flex min-h-0 flex-1 flex-col", "data-testid": "automation-history", children: content }) : /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx(
5845
- DialogContent,
5846
- {
5847
- presentation: "sheet",
5848
- className: "flex h-[min(32rem,calc(100dvh-2rem))] min-h-0 max-w-3xl flex-col",
5849
- "data-testid": testIdOr(testIds?.modal, { testId: "task-runs-modal" }),
5850
- children: content
5851
- }
5852
- ) });
5853
- }
5854
5161
  var DEFAULT_TASKS_CHROME_LABELS = {
5855
5162
  tasksTab: "Tasks",
5856
5163
  newTask: "New task"
@@ -8896,6 +8203,6 @@ function AgentCreateView({
8896
8203
  ] });
8897
8204
  }
8898
8205
 
8899
- export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillCard, SkillRow, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowRunStatus, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowTaskFields, workflowToComposerValues, workflowWhen };
8900
- //# sourceMappingURL=chunk-UBEI6WFJ.js.map
8901
- //# sourceMappingURL=chunk-UBEI6WFJ.js.map
8206
+ export { AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentEditView, AgentGallery, AgentMainView, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillCard, SkillRow, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowRunStatus, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsToolbar, asTaskStatus, authModeFor, buildRRule, buildTaskRows, compactThreadActivity, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isoToLocalInput, linkedRunsFromActivity, localInputToIso, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowTaskFields, workflowToComposerValues, workflowWhen };
8207
+ //# sourceMappingURL=chunk-7QUUZBQZ.js.map
8208
+ //# sourceMappingURL=chunk-7QUUZBQZ.js.map