@arbidocs/blocks 0.4.137 → 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 (203) 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 +457 -418
  5. package/dist/agents/index.js +12 -13
  6. package/dist/agents/skills/SkillLibraryDetail.d.ts +26 -0
  7. package/dist/agents/skills/index.d.ts +2 -0
  8. package/dist/agents/skills/skillLibrary.d.ts +46 -0
  9. package/dist/calendar/CalendarFormDialog.d.ts +13 -0
  10. package/dist/calendar/ProposeTimeDialog.d.ts +22 -0
  11. package/dist/calendar/WeeklyHoursEditor.d.ts +7 -0
  12. package/dist/calendar/access-setup.d.ts +8 -0
  13. package/dist/calendar/api-mapping.d.ts +22 -0
  14. package/dist/calendar/booking-form.d.ts +46 -0
  15. package/dist/calendar/conference.d.ts +11 -0
  16. package/dist/calendar/errors.d.ts +7 -0
  17. package/dist/calendar/feeds.d.ts +2 -0
  18. package/dist/calendar/freebusy.d.ts +22 -0
  19. package/dist/calendar/ics.d.ts +33 -0
  20. package/dist/calendar/index.cjs +472 -4293
  21. package/dist/calendar/index.cjs.map +1 -1
  22. package/dist/calendar/index.d.ts +17 -1
  23. package/dist/calendar/index.js +1 -4227
  24. package/dist/calendar/index.js.map +1 -1
  25. package/dist/calendar/requests.d.ts +42 -0
  26. package/dist/calendar/room-window.d.ts +6 -0
  27. package/dist/calendar/settings-value.d.ts +4 -0
  28. package/dist/calls/index.cjs +4 -4
  29. package/dist/calls/index.js +3 -3
  30. package/dist/chat/index.cjs +141 -141
  31. package/dist/chat/index.js +6 -6
  32. package/dist/{chunk-M33QUNFH.js → chunk-22WFGXG2.js} +3 -3
  33. package/dist/{chunk-M33QUNFH.js.map → chunk-22WFGXG2.js.map} +1 -1
  34. package/dist/{chunk-VMESMX7N.js → chunk-453PNNNW.js} +3 -3
  35. package/dist/{chunk-VMESMX7N.js.map → chunk-453PNNNW.js.map} +1 -1
  36. package/dist/{chunk-2KUCVSFF.js → chunk-45LRMW54.js} +3 -3
  37. package/dist/{chunk-2KUCVSFF.js.map → chunk-45LRMW54.js.map} +1 -1
  38. package/dist/chunk-5FTIHRZH.cjs +177 -0
  39. package/dist/chunk-5FTIHRZH.cjs.map +1 -0
  40. package/dist/{chunk-FUTMU4FR.js → chunk-5HFPRI3W.js} +3 -3
  41. package/dist/{chunk-FUTMU4FR.js.map → chunk-5HFPRI3W.js.map} +1 -1
  42. package/dist/{chunk-JY73DJOS.cjs → chunk-5UXDUOOB.cjs} +84 -1211
  43. package/dist/chunk-5UXDUOOB.cjs.map +1 -0
  44. package/dist/{chunk-ATJUVHVB.js → chunk-6QMWP5IU.js} +1445 -11
  45. package/dist/chunk-6QMWP5IU.js.map +1 -0
  46. package/dist/chunk-6YTHQ73P.cjs +5334 -0
  47. package/dist/chunk-6YTHQ73P.cjs.map +1 -0
  48. package/dist/{chunk-KMNZ2RVO.js → chunk-7QUUZBQZ.js} +15 -1109
  49. package/dist/chunk-7QUUZBQZ.js.map +1 -0
  50. package/dist/{chunk-C3ZRLULA.cjs → chunk-7X255TOM.cjs} +5 -5
  51. package/dist/{chunk-C3ZRLULA.cjs.map → chunk-7X255TOM.cjs.map} +1 -1
  52. package/dist/chunk-A3XPS2EU.js +245 -0
  53. package/dist/chunk-A3XPS2EU.js.map +1 -0
  54. package/dist/chunk-B3AHCIV5.js +5206 -0
  55. package/dist/chunk-B3AHCIV5.js.map +1 -0
  56. package/dist/{chunk-2Q7FDZAY.js → chunk-BPBSSMRB.js} +5 -163
  57. package/dist/chunk-BPBSSMRB.js.map +1 -0
  58. package/dist/{chunk-KSHKTOY2.js → chunk-CKCBBYTA.js} +205 -5
  59. package/dist/chunk-CKCBBYTA.js.map +1 -0
  60. package/dist/chunk-CYNF5PZI.js +170 -0
  61. package/dist/chunk-CYNF5PZI.js.map +1 -0
  62. package/dist/{chunk-OPTBQSCV.cjs → chunk-DJM7DLCT.cjs} +3 -3
  63. package/dist/{chunk-OPTBQSCV.cjs.map → chunk-DJM7DLCT.cjs.map} +1 -1
  64. package/dist/{chunk-E5OYHJMU.js → chunk-DN55PRGS.js} +4 -4
  65. package/dist/{chunk-E5OYHJMU.js.map → chunk-DN55PRGS.js.map} +1 -1
  66. package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
  67. package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
  68. package/dist/{chunk-KDUGTKVI.cjs → chunk-GFNELPDP.cjs} +17 -6
  69. package/dist/chunk-GFNELPDP.cjs.map +1 -0
  70. package/dist/{chunk-OGBXV326.cjs → chunk-GFRQG36Y.cjs} +2 -243
  71. package/dist/chunk-GFRQG36Y.cjs.map +1 -0
  72. package/dist/{chunk-WXYQ66KC.cjs → chunk-HEMU73OP.cjs} +2 -166
  73. package/dist/chunk-HEMU73OP.cjs.map +1 -0
  74. package/dist/{chunk-UUHUQHXR.cjs → chunk-JZNXRMLH.cjs} +6 -6
  75. package/dist/{chunk-UUHUQHXR.cjs.map → chunk-JZNXRMLH.cjs.map} +1 -1
  76. package/dist/{chunk-HDYWXEQU.cjs → chunk-K3HNLWZZ.cjs} +8 -8
  77. package/dist/{chunk-HDYWXEQU.cjs.map → chunk-K3HNLWZZ.cjs.map} +1 -1
  78. package/dist/{chunk-7M4C6CK7.js → chunk-KTFDUSON.js} +4 -4
  79. package/dist/{chunk-7M4C6CK7.js.map → chunk-KTFDUSON.js.map} +1 -1
  80. package/dist/{chunk-HLB4DIYV.cjs → chunk-MABUMUCA.cjs} +6 -6
  81. package/dist/{chunk-HLB4DIYV.cjs.map → chunk-MABUMUCA.cjs.map} +1 -1
  82. package/dist/{chunk-RQ2Y7USX.cjs → chunk-MIDXCYZB.cjs} +235 -15
  83. package/dist/chunk-MIDXCYZB.cjs.map +1 -0
  84. package/dist/{chunk-L3T7OJRX.js → chunk-MTPWZQTL.js} +4 -4
  85. package/dist/{chunk-L3T7OJRX.js.map → chunk-MTPWZQTL.js.map} +1 -1
  86. package/dist/{chunk-BUNZWOPX.cjs → chunk-O4ZIQDUT.cjs} +5 -5
  87. package/dist/{chunk-BUNZWOPX.cjs.map → chunk-O4ZIQDUT.cjs.map} +1 -1
  88. package/dist/{chunk-W3VYZXNS.js → chunk-O6W6RW3B.js} +5 -240
  89. package/dist/chunk-O6W6RW3B.js.map +1 -0
  90. package/dist/{chunk-WS5EX7DN.cjs → chunk-OGP6MQXQ.cjs} +3 -3
  91. package/dist/{chunk-WS5EX7DN.cjs.map → chunk-OGP6MQXQ.cjs.map} +1 -1
  92. package/dist/{chunk-6F7SZCVL.cjs → chunk-OWCEQKAR.cjs} +3 -3
  93. package/dist/{chunk-6F7SZCVL.cjs.map → chunk-OWCEQKAR.cjs.map} +1 -1
  94. package/dist/{chunk-OQ7RUNOC.js → chunk-PC5KVHX3.js} +22 -6
  95. package/dist/chunk-PC5KVHX3.js.map +1 -0
  96. package/dist/{chunk-CHVCTKF4.cjs → chunk-ULEDHANM.cjs} +1543 -66
  97. package/dist/chunk-ULEDHANM.cjs.map +1 -0
  98. package/dist/{chunk-L2PAPOZ5.js → chunk-US3S4DCB.js} +17 -6
  99. package/dist/chunk-US3S4DCB.js.map +1 -0
  100. package/dist/chunk-V46W7YLI.cjs +252 -0
  101. package/dist/chunk-V46W7YLI.cjs.map +1 -0
  102. package/dist/{chunk-3RJN2VTL.js → chunk-XDQXDWE7.js} +3 -3
  103. package/dist/{chunk-3RJN2VTL.js.map → chunk-XDQXDWE7.js.map} +1 -1
  104. package/dist/{chunk-EHOPZBAX.cjs → chunk-XOC44HQY.cjs} +12 -12
  105. package/dist/{chunk-EHOPZBAX.cjs.map → chunk-XOC44HQY.cjs.map} +1 -1
  106. package/dist/{chunk-YOMPLCP6.js → chunk-Y5KTM3V5.js} +3 -3
  107. package/dist/{chunk-YOMPLCP6.js.map → chunk-Y5KTM3V5.js.map} +1 -1
  108. package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
  109. package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
  110. package/dist/{chunk-AAFX64WD.cjs → chunk-ZXAWOLBQ.cjs} +22 -5
  111. package/dist/chunk-ZXAWOLBQ.cjs.map +1 -0
  112. package/dist/citations/QuietMarks.d.ts +5 -2
  113. package/dist/citations/index.cjs +15 -14
  114. package/dist/citations/index.js +3 -2
  115. package/dist/collaboration/index.cjs +51 -51
  116. package/dist/collaboration/index.js +3 -3
  117. package/dist/connect/docx.cjs +6 -6
  118. package/dist/connect/docx.js +5 -5
  119. package/dist/connect/index.cjs +6595 -1600
  120. package/dist/connect/index.cjs.map +1 -1
  121. package/dist/connect/index.d.ts +5 -0
  122. package/dist/connect/index.js +5064 -90
  123. package/dist/connect/index.js.map +1 -1
  124. package/dist/connection/ConnectedAgentCreator.d.ts +37 -0
  125. package/dist/connection/ConnectedSkillsLibrary.d.ts +26 -0
  126. package/dist/connection/ConnectedWorkflowHistory.d.ts +45 -0
  127. package/dist/connection/ConnectionProvider.d.ts +3 -1
  128. package/dist/connection/calendar/AddCalendarDialogs.d.ts +9 -0
  129. package/dist/connection/calendar/BookingPagesPanel.d.ts +13 -0
  130. package/dist/connection/calendar/CalendarAccountsPanel.d.ts +5 -0
  131. package/dist/connection/calendar/CalendarSettingsDialog.d.ts +12 -0
  132. package/dist/connection/calendar/ConnectedCalendar.d.ts +13 -0
  133. package/dist/connection/calendar/ConnectedMailInviteCard.d.ts +12 -0
  134. package/dist/connection/calendar/ConnectedPublicBooking.d.ts +9 -0
  135. package/dist/connection/calendar/ConnectedUpcomingEvents.d.ts +12 -0
  136. package/dist/connection/calendar/CopyField.d.ts +9 -0
  137. package/dist/connection/calendar/EventEditorDialog.d.ts +29 -0
  138. package/dist/connection/calendar/EventScheduling.d.ts +8 -0
  139. package/dist/connection/calendar/InvitationsPanel.d.ts +5 -0
  140. package/dist/connection/calendar/OpenAccessPanel.d.ts +7 -0
  141. package/dist/connection/calendar/PublishCalendarDialog.d.ts +8 -0
  142. package/dist/connection/calendar/RoomsDirectoryPanel.d.ts +8 -0
  143. package/dist/connection/calendar/ShareCalendarDialog.d.ts +6 -0
  144. package/dist/connection/calendar/copy.d.ts +2 -0
  145. package/dist/connection/calendar/index.d.ts +6 -0
  146. package/dist/connection/calendar/store.d.ts +47 -0
  147. package/dist/connection/calendar/types.d.ts +36 -0
  148. package/dist/connection/calendar/useWebinarAttendee.d.ts +3 -0
  149. package/dist/connection/notification-center/ConnectedNotificationCenter.d.ts +15 -0
  150. package/dist/connection/notification-center/NotificationCenter.d.ts +37 -0
  151. package/dist/connection/notification-center/NotificationEvent.d.ts +33 -0
  152. package/dist/connection/notification-center/index.d.ts +4 -0
  153. package/dist/connection/notification-center/items.d.ts +44 -0
  154. package/dist/document-tools/index.cjs +1 -1
  155. package/dist/document-tools/index.js +1 -1
  156. package/dist/facts/index.cjs +6 -6
  157. package/dist/facts/index.js +6 -6
  158. package/dist/files/index.cjs +6 -6
  159. package/dist/files/index.js +6 -6
  160. package/dist/home/index.cjs +20 -20
  161. package/dist/home/index.js +5 -5
  162. package/dist/index.cjs +969 -928
  163. package/dist/index.cjs.map +1 -1
  164. package/dist/index.js +26 -25
  165. package/dist/index.js.map +1 -1
  166. package/dist/retrieval/index.cjs +1 -1
  167. package/dist/retrieval/index.js +1 -1
  168. package/dist/settings/index.cjs +58 -72
  169. package/dist/settings/index.cjs.map +1 -1
  170. package/dist/settings/index.js +6 -23
  171. package/dist/settings/index.js.map +1 -1
  172. package/dist/shell/index.cjs +61 -60
  173. package/dist/shell/index.js +5 -4
  174. package/dist/site/index.cjs +5 -5
  175. package/dist/site/index.js +1 -1
  176. package/dist/studio/index.cjs +11 -11
  177. package/dist/studio/index.js +9 -9
  178. package/dist/workflow-canvas/index.cjs +69 -70
  179. package/dist/workflow-canvas/index.cjs.map +1 -1
  180. package/dist/workflow-canvas/index.js +14 -15
  181. package/dist/workflow-canvas/index.js.map +1 -1
  182. package/dist/workspaces/index.cjs +2 -2
  183. package/dist/workspaces/index.js +2 -2
  184. package/node_modules/@arbidocs/coedit/package.json +1 -1
  185. package/package.json +4 -4
  186. package/dist/chunk-2Q7FDZAY.js.map +0 -1
  187. package/dist/chunk-AAFX64WD.cjs.map +0 -1
  188. package/dist/chunk-ATJUVHVB.js.map +0 -1
  189. package/dist/chunk-CHVCTKF4.cjs.map +0 -1
  190. package/dist/chunk-CQCC7LE7.js +0 -210
  191. package/dist/chunk-CQCC7LE7.js.map +0 -1
  192. package/dist/chunk-JY73DJOS.cjs.map +0 -1
  193. package/dist/chunk-KDUGTKVI.cjs.map +0 -1
  194. package/dist/chunk-KMNZ2RVO.js.map +0 -1
  195. package/dist/chunk-KSHKTOY2.js.map +0 -1
  196. package/dist/chunk-L2PAPOZ5.js.map +0 -1
  197. package/dist/chunk-OGBXV326.cjs.map +0 -1
  198. package/dist/chunk-OQ7RUNOC.js.map +0 -1
  199. package/dist/chunk-RFIBUWLF.cjs +0 -232
  200. package/dist/chunk-RFIBUWLF.cjs.map +0 -1
  201. package/dist/chunk-RQ2Y7USX.cjs.map +0 -1
  202. package/dist/chunk-W3VYZXNS.js.map +0 -1
  203. package/dist/chunk-WXYQ66KC.cjs.map +0 -1
@@ -1,27 +1,26 @@
1
1
  "use client";
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';
5
+ import { EmptyState } from './chunk-P6GHJSLR.js';
2
6
  import { CellHoverIcon } from './chunk-RFXJYIDV.js';
3
- import { MultiSelect } from './chunk-CQCC7LE7.js';
4
7
  import { ToneBadge } from './chunk-5LXQPP2K.js';
5
- import { useWorkflowView, useControllableState, PersonPill, DEFAULT_TASK_ACTIVITY_LABELS, TaskActivityTimeline, activeStepId, DEFAULT_STEP_BAR_LABELS, StepBarFrame, workflowRunStatusLabel, STEP_LABEL_CURRENT, STEP_LABEL, STEP_LABEL_MAX, SchemaForm } from './chunk-ATJUVHVB.js';
6
- import { TriStateFilterMenu } from './chunk-KSHKTOY2.js';
7
- import { EmptyState } from './chunk-P6GHJSLR.js';
8
- import { ScopePicker, FoldSection, AddFilesFirst } from './chunk-3RJN2VTL.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
- 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-YOMPLCP6.js';
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, Globe, Download, Lock, 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, LayoutGrid, List, 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, Tooltip, TooltipTrigger, TooltipContent, Badge, Slider, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, 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,606 +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
- function SkillTypeBadge({ type, className }) {
870
- return /* @__PURE__ */ jsx(
871
- "span",
872
- {
873
- className: cn(
874
- "shrink-0 rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground",
875
- className
876
- ),
877
- "data-slot": "skill-type-badge",
878
- children: type
879
- }
880
- );
881
- }
882
- var DEFAULT_SKILL_GLOBAL_BADGE_LABELS = {
883
- global: "Global",
884
- globalTitle: "Shared with everyone in the marketplace"
885
- };
886
- function SkillGlobalBadge({
887
- className,
888
- labels
889
- }) {
890
- const l = { ...DEFAULT_SKILL_GLOBAL_BADGE_LABELS, ...labels };
891
- return /* @__PURE__ */ jsxs(
892
- "span",
893
- {
894
- className: cn(
895
- "inline-flex shrink-0 items-center gap-1 rounded bg-accent px-1.5 py-0.5 text-xs uppercase tracking-wide text-accent-foreground",
896
- className
897
- ),
898
- title: l.globalTitle,
899
- "data-slot": "skill-global-badge",
900
- children: [
901
- /* @__PURE__ */ jsx(Globe, { className: "size-3" }),
902
- l.global
903
- ]
904
- }
905
- );
906
- }
907
- function SkillActionButton({
908
- label,
909
- tooltip,
910
- onClick,
911
- children,
912
- testId
913
- }) {
914
- return /* @__PURE__ */ jsxs(Tooltip, { children: [
915
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, onFocusCapture: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
916
- Button,
917
- {
918
- variant: "ghost",
919
- size: "icon",
920
- className: "size-7 shrink-0 pointer-coarse:size-11",
921
- onClick: (e) => {
922
- e.stopPropagation();
923
- onClick(e);
924
- },
925
- "aria-label": label,
926
- "data-testid": testId,
927
- children
928
- }
929
- ) }),
930
- /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: tooltip ?? label }) })
931
- ] });
932
- }
933
- function activateOnKey(handler) {
934
- return (e) => {
935
- if (e.target !== e.currentTarget) return;
936
- if (e.key === "Enter" || e.key === " ") {
937
- e.preventDefault();
938
- handler();
939
- }
940
- };
941
- }
942
341
  var DEFAULT_SKILL_CARD_LABELS = {
943
342
  global: "Global",
944
343
  globalTitle: "Shared with everyone in the marketplace",
@@ -1132,334 +531,6 @@ function SkillRow({
1132
531
  }
1133
532
  );
1134
533
  }
1135
- var DEFAULT_SKILL_GENERATE_FORM_LABELS = {
1136
- title: "Generate with AI",
1137
- hint: "Describe what the skill should do. The assistant drafts it in chat, then you can edit it here.",
1138
- placeholder: "e.g. Summarize a contract into key obligations, dates, and parties",
1139
- generate: "Generate with AI",
1140
- writeManually: "\u2026or write it manually"
1141
- };
1142
- function SkillGenerateForm({
1143
- onGenerate,
1144
- onManual,
1145
- icon,
1146
- labels,
1147
- testIds
1148
- }) {
1149
- const l = { ...DEFAULT_SKILL_GENERATE_FORM_LABELS, ...labels };
1150
- const [desc, setDesc] = useState("");
1151
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", "data-slot": "skill-generate-form", children: [
1152
- /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-muted p-4", children: [
1153
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
1154
- /* @__PURE__ */ jsx(Wand2, { className: "size-4 text-primary" }),
1155
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: l.title })
1156
- ] }),
1157
- /* @__PURE__ */ jsx("p", { className: "mb-3 text-xs text-muted-foreground", children: l.hint }),
1158
- /* @__PURE__ */ jsx(
1159
- Textarea,
1160
- {
1161
- value: desc,
1162
- onChange: (e) => setDesc(e.target.value),
1163
- rows: 4,
1164
- placeholder: l.placeholder,
1165
- "data-testid": testIdOr(testIds?.description, { testId: "skills-panel-ai-desc" })
1166
- }
1167
- ),
1168
- /* @__PURE__ */ jsx("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ jsxs(
1169
- Button,
1170
- {
1171
- size: "sm",
1172
- disabled: !desc.trim(),
1173
- onClick: () => onGenerate(desc.trim()),
1174
- "data-testid": testIdOr(testIds?.generate, { testId: "skills-panel-ai-generate" }),
1175
- children: [
1176
- icon && /* @__PURE__ */ jsx("span", { className: "mr-1 [&>svg]:size-4", children: icon }),
1177
- l.generate
1178
- ]
1179
- }
1180
- ) })
1181
- ] }),
1182
- /* @__PURE__ */ jsx(
1183
- "button",
1184
- {
1185
- type: "button",
1186
- className: "self-start text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline pointer-coarse:min-h-11",
1187
- onClick: onManual,
1188
- "data-testid": testIdOr(testIds?.writeManually, { testId: "skills-panel-write-manually" }),
1189
- children: l.writeManually
1190
- }
1191
- )
1192
- ] });
1193
- }
1194
- var DEFAULT_SKILL_EDIT_FORM_LABELS = {
1195
- name: "Name",
1196
- namePlaceholder: "contract-summary",
1197
- invokedAs: (name) => /* @__PURE__ */ jsxs(Fragment, { children: [
1198
- "Invoked as ",
1199
- /* @__PURE__ */ jsxs("span", { className: "font-mono", children: [
1200
- "/",
1201
- name || "skill-name"
1202
- ] })
1203
- ] }),
1204
- description: "Description",
1205
- descriptionPlaceholder: "What it does and when to use it",
1206
- instructions: "Instructions",
1207
- cancel: "Cancel",
1208
- saving: "Saving\u2026",
1209
- saveChanges: "Save changes",
1210
- create: "Create skill"
1211
- };
1212
- var FIELD_LABEL = "text-xs font-semibold uppercase tracking-wide text-muted-foreground";
1213
- function SkillEditForm({
1214
- name,
1215
- onNameChange,
1216
- isNameLocked,
1217
- nameError,
1218
- description,
1219
- onDescriptionChange,
1220
- editor,
1221
- isSaving,
1222
- isEditing,
1223
- onSave,
1224
- onCancel,
1225
- labels,
1226
- testIds
1227
- }) {
1228
- const l = { ...DEFAULT_SKILL_EDIT_FORM_LABELS, ...labels };
1229
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-slot": "skill-edit-form", children: [
1230
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4", children: [
1231
- /* @__PURE__ */ jsxs("div", { children: [
1232
- /* @__PURE__ */ jsx(Label, { htmlFor: "sp-name", className: FIELD_LABEL, children: l.name }),
1233
- /* @__PURE__ */ jsx(
1234
- Input,
1235
- {
1236
- id: "sp-name",
1237
- value: name,
1238
- disabled: isNameLocked,
1239
- placeholder: l.namePlaceholder,
1240
- onChange: (e) => onNameChange(e.target.value),
1241
- className: "mt-1",
1242
- "data-testid": testIdOr(testIds?.name, { testId: "skills-panel-edit-name" })
1243
- }
1244
- ),
1245
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: l.invokedAs(name) }),
1246
- nameError && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: nameError })
1247
- ] }),
1248
- /* @__PURE__ */ jsxs("div", { children: [
1249
- /* @__PURE__ */ jsx(Label, { htmlFor: "sp-desc", className: FIELD_LABEL, children: l.description }),
1250
- /* @__PURE__ */ jsx(
1251
- Input,
1252
- {
1253
- id: "sp-desc",
1254
- value: description,
1255
- placeholder: l.descriptionPlaceholder,
1256
- onChange: (e) => onDescriptionChange(e.target.value),
1257
- className: "mt-1",
1258
- "data-testid": testIdOr(testIds?.description, { testId: "skills-panel-edit-desc" })
1259
- }
1260
- )
1261
- ] }),
1262
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
1263
- /* @__PURE__ */ jsx(Label, { className: `${FIELD_LABEL} mb-1`, children: l.instructions }),
1264
- /* @__PURE__ */ jsx("div", { className: "min-h-[240px] flex-1 overflow-hidden rounded-md border border-border", children: editor })
1265
- ] })
1266
- ] }),
1267
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 border-t border-border px-4 py-3", children: [
1268
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: onCancel, children: l.cancel }),
1269
- /* @__PURE__ */ jsx(
1270
- Button,
1271
- {
1272
- size: "sm",
1273
- onClick: onSave,
1274
- disabled: isSaving,
1275
- "data-testid": testIdOr(testIds?.save, { testId: "skills-panel-edit-save" }),
1276
- children: isSaving ? l.saving : isEditing ? l.saveChanges : l.create
1277
- }
1278
- )
1279
- ] })
1280
- ] });
1281
- }
1282
- function SkillFilterChips({
1283
- options,
1284
- value,
1285
- onChange,
1286
- label,
1287
- testIdPrefix = "skills-filter",
1288
- className
1289
- }) {
1290
- return /* @__PURE__ */ jsx(
1291
- "div",
1292
- {
1293
- role: "radiogroup",
1294
- "aria-label": label,
1295
- className: cn("flex flex-wrap gap-2", className),
1296
- "data-slot": "skill-filter-chips",
1297
- children: options.map((option) => {
1298
- const selected = option.id === value;
1299
- return /* @__PURE__ */ jsxs(
1300
- "button",
1301
- {
1302
- type: "button",
1303
- role: "radio",
1304
- "aria-checked": selected,
1305
- onClick: () => onChange(option.id),
1306
- "data-testid": `${testIdPrefix}-${option.id}`,
1307
- className: cn(
1308
- "inline-flex min-h-8 items-center gap-1.5 rounded-full border px-3 text-sm transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1309
- selected ? "border-primary bg-primary/10 text-foreground" : "border-border bg-background text-muted-foreground [&:hover]:bg-muted"
1310
- ),
1311
- children: [
1312
- option.label,
1313
- option.count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.count })
1314
- ]
1315
- },
1316
- option.id
1317
- );
1318
- })
1319
- }
1320
- );
1321
- }
1322
- var DEFAULT_SKILL_VIEW_TOGGLE_LABELS = {
1323
- group: "View",
1324
- gallery: "Gallery",
1325
- list: "List"
1326
- };
1327
- function SkillViewToggle({ value, onChange, labels, testId }) {
1328
- const l = { ...DEFAULT_SKILL_VIEW_TOGGLE_LABELS, ...labels };
1329
- const item = (view, label, icon) => /* @__PURE__ */ jsx(
1330
- "button",
1331
- {
1332
- type: "button",
1333
- role: "radio",
1334
- "aria-checked": value === view,
1335
- "aria-label": label,
1336
- title: label,
1337
- onClick: () => onChange(view),
1338
- "data-testid": `${testId ?? "skills-view-toggle"}-${view}`,
1339
- className: cn(
1340
- "flex size-8 items-center justify-center rounded-md pointer-coarse:size-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1341
- value === view ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
1342
- ),
1343
- children: icon
1344
- }
1345
- );
1346
- return /* @__PURE__ */ jsxs(
1347
- "div",
1348
- {
1349
- role: "radiogroup",
1350
- "aria-label": l.group,
1351
- className: "inline-flex shrink-0 gap-0.5 rounded-lg bg-muted p-0.5",
1352
- "data-testid": testId ?? "skills-view-toggle",
1353
- children: [
1354
- item("gallery", l.gallery, /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" })),
1355
- item("list", l.list, /* @__PURE__ */ jsx(List, { className: "size-4" }))
1356
- ]
1357
- }
1358
- );
1359
- }
1360
- function SkillTile({
1361
- name,
1362
- description,
1363
- sourceLabel,
1364
- type,
1365
- icon,
1366
- layout,
1367
- selected,
1368
- onSelect,
1369
- testId
1370
- }) {
1371
- const isRow = layout === "list";
1372
- return /* @__PURE__ */ jsxs(
1373
- "div",
1374
- {
1375
- role: "button",
1376
- tabIndex: 0,
1377
- "aria-pressed": selected,
1378
- onClick: onSelect,
1379
- onKeyDown: activateOnKey(onSelect),
1380
- "data-testid": testId ?? `skill-tile-${name}`,
1381
- "data-skill-name": name,
1382
- "data-slot": "skill-tile",
1383
- className: cn(
1384
- "flex cursor-pointer rounded-lg border p-3 text-left transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1385
- isRow ? "items-center gap-3" : "h-full flex-col gap-2",
1386
- selected ? "border-primary bg-primary/5" : "border-transparent bg-muted [&:hover]:bg-accent"
1387
- ),
1388
- children: [
1389
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
1390
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", children: icon }),
1391
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-foreground", children: name })
1392
- ] }),
1393
- /* @__PURE__ */ jsx(
1394
- "p",
1395
- {
1396
- className: cn(
1397
- "min-w-0 text-sm text-muted-foreground",
1398
- isRow ? "flex-1 truncate max-sm:hidden" : "line-clamp-3"
1399
- ),
1400
- children: description
1401
- }
1402
- ),
1403
- /* @__PURE__ */ jsxs("div", { className: cn("flex shrink-0 items-center gap-1.5", isRow && "ml-auto"), children: [
1404
- type && type !== "markdown" && /* @__PURE__ */ jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground", children: type }),
1405
- /* @__PURE__ */ jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
1406
- ] })
1407
- ]
1408
- }
1409
- );
1410
- }
1411
- function SkillDetail({
1412
- title,
1413
- sourceLabel,
1414
- description,
1415
- icon,
1416
- notice,
1417
- children,
1418
- actions,
1419
- testId
1420
- }) {
1421
- return /* @__PURE__ */ jsxs(
1422
- "section",
1423
- {
1424
- className: "flex min-h-0 flex-1 flex-col",
1425
- "data-testid": testId ?? "skill-detail",
1426
- "data-slot": "skill-detail",
1427
- "aria-label": title,
1428
- children: [
1429
- /* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto p-4", children: [
1430
- /* @__PURE__ */ jsxs("header", { className: "space-y-1", children: [
1431
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
1432
- icon && /* @__PURE__ */ jsx("span", { className: "text-ai-ink [&>svg]:size-5", children: icon }),
1433
- /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-foreground", children: title }),
1434
- /* @__PURE__ */ jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
1435
- ] }),
1436
- description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }),
1437
- notice && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground", children: notice })
1438
- ] }),
1439
- children
1440
- ] }),
1441
- actions && /* @__PURE__ */ jsx(
1442
- "div",
1443
- {
1444
- className: "flex flex-wrap gap-2 border-t border-border bg-background p-3",
1445
- "data-slot": "skill-detail-actions",
1446
- children: actions
1447
- }
1448
- )
1449
- ]
1450
- }
1451
- );
1452
- }
1453
- function SkillDetailSection({
1454
- title,
1455
- children,
1456
- testId
1457
- }) {
1458
- return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", "data-testid": testId, children: [
1459
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }),
1460
- children
1461
- ] });
1462
- }
1463
534
  var DEFAULT_TASK_PLAN_LABELS = {
1464
535
  emptyTitle: "Draft a plan to review",
1465
536
  emptyBody: "The assistant writes a short checklist of what its work must cover. You can edit it, and it checks its own draft against it before handing it to you.",
@@ -5068,37 +4139,6 @@ function NewThreadDialog({
5068
4139
  }
5069
4140
  ) });
5070
4141
  }
5071
- function TaskActivityDialog({
5072
- open,
5073
- onOpenChange,
5074
- taskName,
5075
- events,
5076
- isLoading,
5077
- isError,
5078
- labels,
5079
- testId,
5080
- ...timeline
5081
- }) {
5082
- const l = { ...DEFAULT_TASK_ACTIVITY_LABELS, ...labels };
5083
- const id = testIdOr(testId, { testId: "task-activity" });
5084
- const count = events?.length ?? 0;
5085
- const scrollToEnd = useCallback(
5086
- (el) => {
5087
- if (count >= 0) el?.scrollIntoView?.({ block: "end" });
5088
- },
5089
- [count]
5090
- );
5091
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { presentation: "sheet", className: "max-h-[80dvh] sm:max-w-lg", "data-testid": id, children: [
5092
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
5093
- /* @__PURE__ */ jsx(DialogTitle, { children: l.title }),
5094
- /* @__PURE__ */ jsx(DialogDescription, { className: "truncate", children: taskName })
5095
- ] }),
5096
- /* @__PURE__ */ jsxs("div", { className: "max-h-[55dvh] overflow-y-auto pr-1", "data-testid": `${id}-scroll`, children: [
5097
- 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 }),
5098
- /* @__PURE__ */ jsx("div", { ref: scrollToEnd })
5099
- ] })
5100
- ] }) });
5101
- }
5102
4142
  function TaskFlow({
5103
4143
  items,
5104
4144
  className
@@ -6118,140 +5158,6 @@ function TaskThreadChip({
6118
5158
  }
6119
5159
  );
6120
5160
  }
6121
- var DEFAULT_TASK_RUNS_DIALOG_LABELS = {
6122
- title: (taskName) => `Run history \u2014 ${taskName}`,
6123
- description: "Every time this task ran. Open a run to read or watch it in its conversation.",
6124
- loading: "Loading runs\u2026",
6125
- empty: "This task hasn\u2019t run yet.",
6126
- open: "Open"
6127
- };
6128
- var STATUS_STYLE = {
6129
- running: "bg-ai-soft text-ai-ink",
6130
- success: "bg-green-bg text-green-text",
6131
- completed: "bg-green-bg text-green-text",
6132
- failed: "bg-red-bg text-red-text"
6133
- };
6134
- function TaskRunsDialog({
6135
- inline = false,
6136
- renderErrorReport,
6137
- hideHeader = false,
6138
- open,
6139
- onOpenChange,
6140
- taskName,
6141
- runs,
6142
- isLoading,
6143
- onOpenRun,
6144
- onOpenResult,
6145
- getRunHref,
6146
- testIds,
6147
- labels
6148
- }) {
6149
- const l = { ...DEFAULT_TASK_RUNS_DIALOG_LABELS, ...labels };
6150
- const columns = useMemo(
6151
- () => [
6152
- {
6153
- colId: "status",
6154
- field: "status",
6155
- headerName: "Status",
6156
- width: 160,
6157
- minWidth: 140,
6158
- cellRenderer: ({ data }) => data && /* @__PURE__ */ jsx(
6159
- "span",
6160
- {
6161
- className: cn(
6162
- "rounded-full px-2 py-0.5 text-xs font-medium capitalize",
6163
- STATUS_STYLE[data.status] ?? "text-muted-foreground"
6164
- ),
6165
- children: workflowRunStatusLabel(data.status)
6166
- }
6167
- )
6168
- },
6169
- { colId: "when", field: "when", headerName: "Run", flex: 2, minWidth: 240 },
6170
- {
6171
- colId: "result",
6172
- headerName: "",
6173
- width: 280,
6174
- minWidth: 220,
6175
- sortable: false,
6176
- cellRenderer: ({ data: run }) => {
6177
- if (!run) return null;
6178
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center gap-2", children: [
6179
- run.error && renderErrorReport?.(run),
6180
- (run.conversationId || run.resultId && onOpenResult) && /* @__PURE__ */ jsx(Button, { asChild: true, variant: "ghost", size: "sm", className: "h-7 gap-1.5", children: /* @__PURE__ */ jsxs(
6181
- ActionLink,
6182
- {
6183
- href: getRunHref?.(run),
6184
- onSelect: () => {
6185
- if (run.conversationId) onOpenRun(run.conversationId);
6186
- else if (run.resultId) onOpenResult?.(run.resultId);
6187
- onOpenChange(false);
6188
- },
6189
- "data-testid": testIdOr(testIds?.open, { testId: "task-run-open" }),
6190
- children: [
6191
- /* @__PURE__ */ jsx(Eye, { size: 13 }),
6192
- " ",
6193
- l.open
6194
- ]
6195
- }
6196
- ) })
6197
- ] });
6198
- }
6199
- }
6200
- ],
6201
- [onOpenRun, onOpenResult, getRunHref, onOpenChange, testIds?.open, l.open, renderErrorReport]
6202
- );
6203
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
6204
- hideHeader ? null : inline ? /* @__PURE__ */ jsx(
6205
- TabHeader,
6206
- {
6207
- tabs: [
6208
- {
6209
- id: "history",
6210
- label: l.title(taskName),
6211
- count: runs.length,
6212
- countIcon: /* @__PURE__ */ jsx(History, { size: 14 }),
6213
- presentation: "count",
6214
- onClose: () => onOpenChange(false)
6215
- }
6216
- ],
6217
- activeTabId: "history",
6218
- onTabChange: () => {
6219
- }
6220
- }
6221
- ) : /* @__PURE__ */ jsxs(DialogHeader, { children: [
6222
- /* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2", children: [
6223
- /* @__PURE__ */ jsx(History, { size: 16 }),
6224
- " ",
6225
- l.title(taskName)
6226
- ] }),
6227
- /* @__PURE__ */ jsx(DialogDescription, { children: l.description })
6228
- ] }),
6229
- /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(
6230
- GridView,
6231
- {
6232
- testId: testIdOr(testIds?.list, { testId: "task-runs-list" }),
6233
- gridId: "workflow-runs",
6234
- items: runs,
6235
- columnDefs: columns,
6236
- getItemId: (run) => run.id,
6237
- getRowTestId: () => testIdOr(testIds?.row, { testId: "task-run-row" }),
6238
- isLoading,
6239
- loadingMessage: l.loading,
6240
- emptyState: { title: l.empty },
6241
- height: "100%"
6242
- }
6243
- ) })
6244
- ] });
6245
- 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(
6246
- DialogContent,
6247
- {
6248
- presentation: "sheet",
6249
- className: "flex h-[min(32rem,calc(100dvh-2rem))] min-h-0 max-w-3xl flex-col",
6250
- "data-testid": testIdOr(testIds?.modal, { testId: "task-runs-modal" }),
6251
- children: content
6252
- }
6253
- ) });
6254
- }
6255
5161
  var DEFAULT_TASKS_CHROME_LABELS = {
6256
5162
  tasksTab: "Tasks",
6257
5163
  newTask: "New task"
@@ -9297,6 +8203,6 @@ function AgentCreateView({
9297
8203
  ] });
9298
8204
  }
9299
8205
 
9300
- 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_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_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, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, 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 };
9301
- //# sourceMappingURL=chunk-KMNZ2RVO.js.map
9302
- //# sourceMappingURL=chunk-KMNZ2RVO.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