@agent-native/dispatch 0.23.5 → 0.24.2

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 (224) hide show
  1. package/dist/actions/list-connected-agents.d.ts +1 -0
  2. package/dist/actions/list-connected-agents.js +5 -1
  3. package/dist/actions/list-connected-agents.js.map +1 -1
  4. package/dist/actions/list-dispatch-usage-metrics.d.ts +2 -0
  5. package/dist/actions/list-dispatch-usage-metrics.js +11 -1
  6. package/dist/actions/list-dispatch-usage-metrics.js.map +1 -1
  7. package/dist/actions/provider-api-register.d.ts +12 -12
  8. package/dist/actions/remix-workspace-template.js +4 -3
  9. package/dist/actions/remix-workspace-template.js.map +1 -1
  10. package/dist/actions/scaffold-workspace-app.js +3 -2
  11. package/dist/actions/scaffold-workspace-app.js.map +1 -1
  12. package/dist/actions/start-workspace-app-creation.js +3 -2
  13. package/dist/actions/start-workspace-app-creation.js.map +1 -1
  14. package/dist/actions/view-screen.js +11 -1
  15. package/dist/actions/view-screen.js.map +1 -1
  16. package/dist/components/admin-navigation.d.ts.map +1 -1
  17. package/dist/components/admin-navigation.js +21 -5
  18. package/dist/components/admin-navigation.js.map +1 -1
  19. package/dist/components/app-icon.js +1 -1
  20. package/dist/components/app-icon.js.map +1 -1
  21. package/dist/components/app-list-row.d.ts +1 -1
  22. package/dist/components/app-list-row.d.ts.map +1 -1
  23. package/dist/components/app-list-row.js +1 -1
  24. package/dist/components/app-list-row.js.map +1 -1
  25. package/dist/components/app-open-actions.d.ts +1 -17
  26. package/dist/components/app-open-actions.d.ts.map +1 -1
  27. package/dist/components/app-open-actions.js +1 -20
  28. package/dist/components/app-open-actions.js.map +1 -1
  29. package/dist/components/app-row-settings.d.ts +6 -0
  30. package/dist/components/app-row-settings.d.ts.map +1 -0
  31. package/dist/components/app-row-settings.js +11 -0
  32. package/dist/components/app-row-settings.js.map +1 -0
  33. package/dist/components/automation-run-history-dialog.d.ts.map +1 -1
  34. package/dist/components/automation-run-history-dialog.js +3 -2
  35. package/dist/components/automation-run-history-dialog.js.map +1 -1
  36. package/dist/components/connected-app-card.d.ts.map +1 -1
  37. package/dist/components/connected-app-card.js +3 -2
  38. package/dist/components/connected-app-card.js.map +1 -1
  39. package/dist/components/create-app-popover.js +2 -2
  40. package/dist/components/create-app-popover.js.map +1 -1
  41. package/dist/components/dispatch-control-plane.d.ts.map +1 -1
  42. package/dist/components/dispatch-control-plane.js +23 -7
  43. package/dist/components/dispatch-control-plane.js.map +1 -1
  44. package/dist/components/dispatch-shell.d.ts.map +1 -1
  45. package/dist/components/dispatch-shell.js +5 -1
  46. package/dist/components/dispatch-shell.js.map +1 -1
  47. package/dist/components/docs-link.d.ts +16 -0
  48. package/dist/components/docs-link.d.ts.map +1 -0
  49. package/dist/components/docs-link.js +34 -0
  50. package/dist/components/docs-link.js.map +1 -0
  51. package/dist/components/layout/Layout.d.ts +1 -0
  52. package/dist/components/layout/Layout.d.ts.map +1 -1
  53. package/dist/components/layout/Layout.js +43 -35
  54. package/dist/components/layout/Layout.js.map +1 -1
  55. package/dist/components/messaging-setup-panel.d.ts.map +1 -1
  56. package/dist/components/messaging-setup-panel.js +3 -2
  57. package/dist/components/messaging-setup-panel.js.map +1 -1
  58. package/dist/components/usage-alerts-panel.d.ts +11 -0
  59. package/dist/components/usage-alerts-panel.d.ts.map +1 -0
  60. package/dist/components/usage-alerts-panel.js +125 -0
  61. package/dist/components/usage-alerts-panel.js.map +1 -0
  62. package/dist/components/workspace-app-card.d.ts +3 -1
  63. package/dist/components/workspace-app-card.d.ts.map +1 -1
  64. package/dist/components/workspace-app-card.js +70 -29
  65. package/dist/components/workspace-app-card.js.map +1 -1
  66. package/dist/components/workspace-app-search.d.ts +10 -0
  67. package/dist/components/workspace-app-search.d.ts.map +1 -0
  68. package/dist/components/workspace-app-search.js +27 -0
  69. package/dist/components/workspace-app-search.js.map +1 -0
  70. package/dist/components/workspace-resource-effective-stack.d.ts.map +1 -1
  71. package/dist/components/workspace-resource-effective-stack.js +3 -2
  72. package/dist/components/workspace-resource-effective-stack.js.map +1 -1
  73. package/dist/components/workspace-template-card.d.ts.map +1 -1
  74. package/dist/components/workspace-template-card.js +10 -15
  75. package/dist/components/workspace-template-card.js.map +1 -1
  76. package/dist/hooks/use-navigation-state.d.ts +2 -0
  77. package/dist/hooks/use-navigation-state.d.ts.map +1 -1
  78. package/dist/hooks/use-navigation-state.js +10 -0
  79. package/dist/hooks/use-navigation-state.js.map +1 -1
  80. package/dist/lib/embed-session-recovery.d.ts +3 -0
  81. package/dist/lib/embed-session-recovery.d.ts.map +1 -0
  82. package/dist/lib/embed-session-recovery.js +18 -0
  83. package/dist/lib/embed-session-recovery.js.map +1 -0
  84. package/dist/lib/other-apps.d.ts +2 -0
  85. package/dist/lib/other-apps.d.ts.map +1 -1
  86. package/dist/lib/other-apps.js.map +1 -1
  87. package/dist/lib/workspace-app-layout.d.ts +19 -0
  88. package/dist/lib/workspace-app-layout.d.ts.map +1 -0
  89. package/dist/lib/workspace-app-layout.js +75 -0
  90. package/dist/lib/workspace-app-layout.js.map +1 -0
  91. package/dist/lib/workspace-apps.d.ts +14 -0
  92. package/dist/lib/workspace-apps.d.ts.map +1 -1
  93. package/dist/lib/workspace-apps.js +66 -0
  94. package/dist/lib/workspace-apps.js.map +1 -1
  95. package/dist/lib/workspace-apps.test.d.ts +2 -0
  96. package/dist/lib/workspace-apps.test.d.ts.map +1 -0
  97. package/dist/lib/workspace-apps.test.js +33 -0
  98. package/dist/lib/workspace-apps.test.js.map +1 -0
  99. package/dist/routes/pages/$appId.d.ts.map +1 -1
  100. package/dist/routes/pages/$appId.js +4 -2
  101. package/dist/routes/pages/$appId.js.map +1 -1
  102. package/dist/routes/pages/agents.d.ts.map +1 -1
  103. package/dist/routes/pages/agents.js +2 -3
  104. package/dist/routes/pages/agents.js.map +1 -1
  105. package/dist/routes/pages/apps.$appId.d.ts.map +1 -1
  106. package/dist/routes/pages/apps.$appId.js +17 -13
  107. package/dist/routes/pages/apps.$appId.js.map +1 -1
  108. package/dist/routes/pages/apps.d.ts.map +1 -1
  109. package/dist/routes/pages/apps.js +31 -16
  110. package/dist/routes/pages/apps.js.map +1 -1
  111. package/dist/routes/pages/audit.d.ts.map +1 -1
  112. package/dist/routes/pages/audit.js +2 -1
  113. package/dist/routes/pages/audit.js.map +1 -1
  114. package/dist/routes/pages/chat.d.ts.map +1 -1
  115. package/dist/routes/pages/chat.js +7 -2
  116. package/dist/routes/pages/chat.js.map +1 -1
  117. package/dist/routes/pages/dreams.d.ts.map +1 -1
  118. package/dist/routes/pages/dreams.js +14 -18
  119. package/dist/routes/pages/dreams.js.map +1 -1
  120. package/dist/routes/pages/integrations.d.ts.map +1 -1
  121. package/dist/routes/pages/integrations.js +51 -14
  122. package/dist/routes/pages/integrations.js.map +1 -1
  123. package/dist/routes/pages/metrics.d.ts.map +1 -1
  124. package/dist/routes/pages/metrics.js +146 -17
  125. package/dist/routes/pages/metrics.js.map +1 -1
  126. package/dist/routes/pages/operations.js +1 -1
  127. package/dist/routes/pages/operations.js.map +1 -1
  128. package/dist/routes/pages/settings.d.ts.map +1 -1
  129. package/dist/routes/pages/settings.js +19 -2
  130. package/dist/routes/pages/settings.js.map +1 -1
  131. package/dist/routes/pages/thread-debug.d.ts.map +1 -1
  132. package/dist/routes/pages/thread-debug.js +5 -8
  133. package/dist/routes/pages/thread-debug.js.map +1 -1
  134. package/dist/routes/pages/vault.d.ts.map +1 -1
  135. package/dist/routes/pages/vault.js +1 -1
  136. package/dist/routes/pages/vault.js.map +1 -1
  137. package/dist/routes/pages/workspace.d.ts.map +1 -1
  138. package/dist/routes/pages/workspace.js +13 -10
  139. package/dist/routes/pages/workspace.js.map +1 -1
  140. package/dist/server/index.d.ts.map +1 -1
  141. package/dist/server/index.js +3 -0
  142. package/dist/server/index.js.map +1 -1
  143. package/dist/server/lib/app-creation-store.d.ts.map +1 -1
  144. package/dist/server/lib/app-creation-store.js +12 -52
  145. package/dist/server/lib/app-creation-store.js.map +1 -1
  146. package/dist/server/lib/usage-metrics-store.d.ts +17 -0
  147. package/dist/server/lib/usage-metrics-store.d.ts.map +1 -1
  148. package/dist/server/lib/usage-metrics-store.js +187 -30
  149. package/dist/server/lib/usage-metrics-store.js.map +1 -1
  150. package/dist/server/plugins/agent-chat.js +2 -0
  151. package/dist/server/plugins/agent-chat.js.map +1 -1
  152. package/dist/server/plugins/integrations.d.ts.map +1 -1
  153. package/dist/server/plugins/integrations.js +1 -0
  154. package/dist/server/plugins/integrations.js.map +1 -1
  155. package/dist/shared/app-roles.d.ts +9 -0
  156. package/dist/shared/app-roles.d.ts.map +1 -0
  157. package/dist/shared/app-roles.js +7 -0
  158. package/dist/shared/app-roles.js.map +1 -0
  159. package/package.json +4 -3
  160. package/src/actions/list-connected-agents.spec.ts +73 -0
  161. package/src/actions/list-connected-agents.ts +6 -2
  162. package/src/actions/list-dispatch-usage-metrics.ts +11 -1
  163. package/src/actions/remix-workspace-template.spec.ts +29 -0
  164. package/src/actions/remix-workspace-template.ts +13 -6
  165. package/src/actions/scaffold-workspace-app.ts +12 -5
  166. package/src/actions/start-workspace-app-creation.ts +8 -2
  167. package/src/actions/view-screen.ts +13 -1
  168. package/src/components/admin-navigation.tsx +57 -11
  169. package/src/components/app-icon.spec.tsx +34 -0
  170. package/src/components/app-icon.tsx +1 -1
  171. package/src/components/app-list-row.tsx +1 -2
  172. package/src/components/app-open-actions.tsx +5 -114
  173. package/src/components/app-row-settings.tsx +54 -0
  174. package/src/components/automation-run-history-dialog.tsx +8 -4
  175. package/src/components/connected-app-card.tsx +3 -2
  176. package/src/components/create-app-popover.spec.tsx +1 -1
  177. package/src/components/create-app-popover.tsx +2 -2
  178. package/src/components/dispatch-control-plane.spec.tsx +44 -3
  179. package/src/components/dispatch-control-plane.tsx +83 -27
  180. package/src/components/dispatch-shell.tsx +7 -1
  181. package/src/components/docs-link.tsx +52 -0
  182. package/src/components/layout/Layout.spec.tsx +13 -0
  183. package/src/components/layout/Layout.tsx +63 -32
  184. package/src/components/messaging-setup-panel.tsx +10 -3
  185. package/src/components/usage-alerts-panel.tsx +445 -0
  186. package/src/components/workspace-app-card.spec.tsx +130 -9
  187. package/src/components/workspace-app-card.tsx +128 -71
  188. package/src/components/workspace-app-search.tsx +96 -0
  189. package/src/components/workspace-resource-effective-stack.tsx +10 -5
  190. package/src/components/workspace-template-card.spec.tsx +53 -24
  191. package/src/components/workspace-template-card.tsx +16 -26
  192. package/src/hooks/use-navigation-state.ts +12 -0
  193. package/src/lib/embed-session-recovery.spec.ts +63 -0
  194. package/src/lib/embed-session-recovery.ts +26 -0
  195. package/src/lib/other-apps.ts +2 -0
  196. package/src/lib/workspace-app-layout.spec.ts +47 -0
  197. package/src/lib/workspace-app-layout.ts +121 -0
  198. package/src/lib/workspace-apps.test.ts +64 -0
  199. package/src/lib/workspace-apps.ts +82 -0
  200. package/src/routes/pages/$appId.tsx +3 -6
  201. package/src/routes/pages/agents.tsx +6 -3
  202. package/src/routes/pages/apps.$appId.tsx +16 -17
  203. package/src/routes/pages/apps.tsx +116 -62
  204. package/src/routes/pages/audit.tsx +28 -8
  205. package/src/routes/pages/chat.spec.tsx +10 -0
  206. package/src/routes/pages/chat.tsx +8 -0
  207. package/src/routes/pages/dreams.tsx +92 -142
  208. package/src/routes/pages/integrations.tsx +147 -68
  209. package/src/routes/pages/metrics.tsx +460 -102
  210. package/src/routes/pages/operations.tsx +2 -2
  211. package/src/routes/pages/settings.tsx +27 -10
  212. package/src/routes/pages/thread-debug.tsx +18 -36
  213. package/src/routes/pages/vault.tsx +7 -2
  214. package/src/routes/pages/workspace.tsx +92 -56
  215. package/src/server/index.ts +4 -0
  216. package/src/server/lib/app-creation-store.spec.ts +90 -43
  217. package/src/server/lib/app-creation-store.ts +15 -61
  218. package/src/server/lib/usage-metrics-store.spec.ts +117 -0
  219. package/src/server/lib/usage-metrics-store.ts +249 -30
  220. package/src/server/plugins/agent-chat.spec.ts +4 -0
  221. package/src/server/plugins/agent-chat.ts +2 -0
  222. package/src/server/plugins/integrations.ts +1 -0
  223. package/src/shared/app-roles.ts +8 -0
  224. package/src/styles/dispatch.css +9 -0
@@ -1 +1 @@
1
- {"version":3,"file":"app-icon.js","sourceRoot":"","sources":["../../src/components/app-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,MAAM,YAAY,GAAqC;IACrD,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,YAAY;IAC3B,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,UAAU;IAClB,iBAAiB,EAAE,gBAAgB;IACnC,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,QAAQ;IACd,aAAa,EAAE,iBAAiB;IAChC,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,yFAAyF;AACzF,MAAM,iBAAiB,GAGnB;IACF,SAAS,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE;IACzD,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE;IACnD,KAA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,GAAG,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;QACxC,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,EAAU,EAAE,IAAY;IACtC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import {\n IconBrain,\n IconBrandChrome,\n IconBrandJira,\n IconCalendar,\n IconChartBar,\n IconCode,\n IconFileText,\n IconFolder,\n IconLayoutBoard,\n IconListCheck,\n IconMail,\n IconMessageCircle,\n IconPhoto,\n IconPresentation,\n IconRoute,\n IconSettings,\n IconStack2,\n IconUsers,\n} from \"@tabler/icons-react\";\nimport type { CSSProperties } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\ntype AppIconComponent = typeof IconStack2;\n\nconst ICONS_BY_KEY: Record<string, AppIconComponent> = {\n barchart2: IconChartBar,\n brandjira: IconBrandJira,\n brain: IconBrain,\n calendardays: IconCalendar,\n calendarmonth: IconCalendar,\n chartbar: IconChartBar,\n code: IconCode,\n filetext: IconFileText,\n folder: IconFolder,\n galleryhorizontal: IconPresentation,\n globe: IconBrandChrome,\n layoutboard: IconLayoutBoard,\n listcheck: IconListCheck,\n mail: IconMail,\n messagecircle: IconMessageCircle,\n photo: IconPhoto,\n presentation: IconPresentation,\n route: IconRoute,\n settings: IconSettings,\n stack2: IconStack2,\n users: IconUsers,\n};\n\n/** Keep the Dispatch rail visually identical to the desktop app for first-party apps. */\nconst APP_VISUALS_BY_ID: Record<\n string,\n { icon: AppIconComponent; colorRgb: string }\n> = {\n analytics: { icon: IconChartBar, colorRgb: \"245 158 11\" },\n assets: { icon: IconPhoto, colorRgb: \"15 118 110\" },\n brain: { icon: IconBrain, colorRgb: \"139 92 246\" },\n calendar: { icon: IconCalendar, colorRgb: \"0 181 255\" },\n chat: { icon: IconMessageCircle, colorRgb: \"24 24 27\" },\n clips: { icon: IconStack2, colorRgb: \"14 165 233\" },\n content: { icon: IconFileText, colorRgb: \"16 185 129\" },\n crm: { icon: IconUsers, colorRgb: \"37 99 235\" },\n design: { icon: IconStack2, colorRgb: \"244 114 182\" },\n dispatch: { icon: IconRoute, colorRgb: \"20 184 166\" },\n factory: { icon: IconUsers, colorRgb: \"124 58 237\" },\n forms: { icon: IconStack2, colorRgb: \"6 182 212\" },\n macros: { icon: IconCode, colorRgb: \"113 113 122\" },\n mail: { icon: IconMail, colorRgb: \"59 130 246\" },\n plan: { icon: IconLayoutBoard, colorRgb: \"82 82 91\" },\n slides: { icon: IconPresentation, colorRgb: \"236 72 153\" },\n tasks: { icon: IconListCheck, colorRgb: \"99 102 241\" },\n};\n\nfunction appIconComponent(\n id: string,\n name: string,\n iconKey?: string,\n): AppIconComponent {\n const normalizedIconKey = iconKey?.trim().toLowerCase();\n if (normalizedIconKey && ICONS_BY_KEY[normalizedIconKey]) {\n return ICONS_BY_KEY[normalizedIconKey];\n }\n\n const standardVisuals = APP_VISUALS_BY_ID[id.trim().toLowerCase()];\n if (standardVisuals) return standardVisuals.icon;\n\n const haystack = `${id} ${name}`.toLowerCase();\n\n if (haystack.includes(\"mail\") || haystack.includes(\"email\")) {\n return IconMail;\n }\n if (\n haystack.includes(\"analytics\") ||\n haystack.includes(\"metric\") ||\n haystack.includes(\"indicator\") ||\n haystack.includes(\"gtm\")\n ) {\n return IconChartBar;\n }\n if (haystack.includes(\"coach\") || haystack.includes(\"agent\")) {\n return IconBrain;\n }\n return IconStack2;\n}\n\nfunction safeHexColor(color: string | undefined): string | null {\n const normalized = color?.trim();\n return normalized && /^#[0-9a-f]{6}$/i.test(normalized) ? normalized : null;\n}\n\nexport function AppIcon({\n id,\n name,\n icon,\n color,\n className,\n size = \"md\",\n monochrome = false,\n}: {\n id: string;\n name: string;\n icon?: string;\n color?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n monochrome?: boolean;\n}) {\n const Icon = appIconComponent(id, name, icon);\n const customColor = safeHexColor(color);\n const standardColorRgb = APP_VISUALS_BY_ID[id.trim().toLowerCase()]?.colorRgb;\n const style = customColor\n ? ({\n \"--dispatch-app-icon-color\": customColor,\n backgroundColor:\n \"color-mix(in srgb, var(--dispatch-app-icon-color) 14%, transparent)\",\n color: \"var(--dispatch-app-icon-color)\",\n } as CSSProperties)\n : standardColorRgb\n ? ({\n \"--dispatch-app-icon-color-rgb\": standardColorRgb,\n backgroundColor: \"rgb(var(--dispatch-app-icon-color-rgb) / 0.14)\",\n color: \"rgb(var(--dispatch-app-icon-color-rgb))\",\n } as CSSProperties)\n : ({\n \"--dispatch-app-icon-hue\": `${appHue(id, name)} 72% 44%`,\n backgroundColor: \"hsl(var(--dispatch-app-icon-hue) / 0.14)\",\n color: \"hsl(var(--dispatch-app-icon-hue))\",\n } as CSSProperties);\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg\",\n size === \"sm\" ? \"size-7\" : \"size-10\",\n monochrome && \"bg-transparent text-sidebar-foreground/70\",\n className,\n )}\n style={monochrome ? undefined : style}\n >\n <Icon size={size === \"sm\" ? 15 : 19} strokeWidth={1.8} />\n </span>\n );\n}\n\nfunction hashForApp(id: string, name: string): number {\n let hash = 0;\n for (const character of `${id}:${name}`) {\n hash = (hash * 31 + character.charCodeAt(0)) | 0;\n }\n return hash;\n}\n\nfunction appHue(id: string, name: string): number {\n return 20 + (Math.abs(hashForApp(id, name)) % 320);\n}\n"]}
1
+ {"version":3,"file":"app-icon.js","sourceRoot":"","sources":["../../src/components/app-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,eAAe,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,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import {\n IconBrain,\n IconBrandChrome,\n IconBrandJira,\n IconCalendar,\n IconChartBar,\n IconCode,\n IconFileText,\n IconFolder,\n IconLayoutBoard,\n IconListCheck,\n IconMail,\n IconMessageCircle,\n IconPhoto,\n IconPresentation,\n IconRoute,\n IconSettings,\n IconStack2,\n IconUsers,\n} from \"@tabler/icons-react\";\nimport type { CSSProperties } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\ntype AppIconComponent = typeof IconStack2;\n\nconst ICONS_BY_KEY: Record<string, AppIconComponent> = {\n barchart2: IconChartBar,\n brandjira: IconBrandJira,\n brain: IconBrain,\n calendardays: IconCalendar,\n calendarmonth: IconCalendar,\n chartbar: IconChartBar,\n code: IconCode,\n filetext: IconFileText,\n folder: IconFolder,\n galleryhorizontal: IconPresentation,\n globe: IconBrandChrome,\n layoutboard: IconLayoutBoard,\n listcheck: IconListCheck,\n mail: IconMail,\n messagecircle: IconMessageCircle,\n photo: IconPhoto,\n presentation: IconPresentation,\n route: IconRoute,\n settings: IconSettings,\n stack2: IconStack2,\n users: IconUsers,\n};\n\n/** Keep the Dispatch rail visually identical to the desktop app for first-party apps. */\nconst APP_VISUALS_BY_ID: Record<\n string,\n { icon: AppIconComponent; colorRgb: string }\n> = {\n analytics: { icon: IconChartBar, colorRgb: \"245 158 11\" },\n assets: { icon: IconPhoto, colorRgb: \"15 118 110\" },\n brain: { icon: IconBrain, colorRgb: \"139 92 246\" },\n calendar: { icon: IconCalendar, colorRgb: \"0 181 255\" },\n chat: { icon: IconMessageCircle, colorRgb: \"24 24 27\" },\n clips: { icon: IconStack2, colorRgb: \"14 165 233\" },\n content: { icon: IconFileText, colorRgb: \"16 185 129\" },\n crm: { icon: IconUsers, colorRgb: \"37 99 235\" },\n design: { icon: IconStack2, colorRgb: \"244 114 182\" },\n dispatch: { icon: IconRoute, colorRgb: \"20 184 166\" },\n factory: { icon: IconUsers, colorRgb: \"124 58 237\" },\n forms: { icon: IconStack2, colorRgb: \"6 182 212\" },\n macros: { icon: IconCode, colorRgb: \"113 113 122\" },\n mail: { icon: IconMail, colorRgb: \"59 130 246\" },\n plan: { icon: IconLayoutBoard, colorRgb: \"47 111 237\" },\n slides: { icon: IconPresentation, colorRgb: \"236 72 153\" },\n tasks: { icon: IconListCheck, colorRgb: \"99 102 241\" },\n};\n\nfunction appIconComponent(\n id: string,\n name: string,\n iconKey?: string,\n): AppIconComponent {\n const normalizedIconKey = iconKey?.trim().toLowerCase();\n if (normalizedIconKey && ICONS_BY_KEY[normalizedIconKey]) {\n return ICONS_BY_KEY[normalizedIconKey];\n }\n\n const standardVisuals = APP_VISUALS_BY_ID[id.trim().toLowerCase()];\n if (standardVisuals) return standardVisuals.icon;\n\n const haystack = `${id} ${name}`.toLowerCase();\n\n if (haystack.includes(\"mail\") || haystack.includes(\"email\")) {\n return IconMail;\n }\n if (\n haystack.includes(\"analytics\") ||\n haystack.includes(\"metric\") ||\n haystack.includes(\"indicator\") ||\n haystack.includes(\"gtm\")\n ) {\n return IconChartBar;\n }\n if (haystack.includes(\"coach\") || haystack.includes(\"agent\")) {\n return IconBrain;\n }\n return IconStack2;\n}\n\nfunction safeHexColor(color: string | undefined): string | null {\n const normalized = color?.trim();\n return normalized && /^#[0-9a-f]{6}$/i.test(normalized) ? normalized : null;\n}\n\nexport function AppIcon({\n id,\n name,\n icon,\n color,\n className,\n size = \"md\",\n monochrome = false,\n}: {\n id: string;\n name: string;\n icon?: string;\n color?: string;\n className?: string;\n size?: \"sm\" | \"md\";\n monochrome?: boolean;\n}) {\n const Icon = appIconComponent(id, name, icon);\n const customColor = safeHexColor(color);\n const standardColorRgb = APP_VISUALS_BY_ID[id.trim().toLowerCase()]?.colorRgb;\n const style = customColor\n ? ({\n \"--dispatch-app-icon-color\": customColor,\n backgroundColor:\n \"color-mix(in srgb, var(--dispatch-app-icon-color) 14%, transparent)\",\n color: \"var(--dispatch-app-icon-color)\",\n } as CSSProperties)\n : standardColorRgb\n ? ({\n \"--dispatch-app-icon-color-rgb\": standardColorRgb,\n backgroundColor: \"rgb(var(--dispatch-app-icon-color-rgb) / 0.14)\",\n color: \"rgb(var(--dispatch-app-icon-color-rgb))\",\n } as CSSProperties)\n : ({\n \"--dispatch-app-icon-hue\": `${appHue(id, name)} 72% 44%`,\n backgroundColor: \"hsl(var(--dispatch-app-icon-hue) / 0.14)\",\n color: \"hsl(var(--dispatch-app-icon-hue))\",\n } as CSSProperties);\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-lg\",\n size === \"sm\" ? \"size-7\" : \"size-10\",\n monochrome && \"bg-transparent text-sidebar-foreground/70\",\n className,\n )}\n style={monochrome ? undefined : style}\n >\n <Icon size={size === \"sm\" ? 15 : 19} strokeWidth={1.8} />\n </span>\n );\n}\n\nfunction hashForApp(id: string, name: string): number {\n let hash = 0;\n for (const character of `${id}:${name}`) {\n hash = (hash * 31 + character.charCodeAt(0)) | 0;\n }\n return hash;\n}\n\nfunction appHue(id: string, name: string): number {\n return 20 + (Math.abs(hashForApp(id, name)) % 320);\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- export declare const APP_LIST_GRID_CLASS = "mx-auto w-full max-w-[1000px] xl:grid xl:grid-cols-2 xl:gap-3 xl:overflow-visible xl:rounded-none xl:bg-transparent";
2
+ export declare const APP_LIST_GRID_CLASS = "w-full xl:grid xl:grid-cols-2 xl:gap-3";
3
3
  export declare const APP_LIST_GRID_ROW_CLASS = "xl:rounded-2xl xl:border xl:border-transparent xl:bg-card xl:transition-[background-color,border-color] xl:hover:border-border xl:focus-within:border-ring/50";
4
4
  export declare function AppList({ children, className, }: {
5
5
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"app-list-row.d.ts","sourceRoot":"","sources":["../../src/components/app-list-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,mBAAmB,wHACuF,CAAC;AACxH,eAAO,MAAM,uBAAuB,kKAC6H,CAAC;AAElK,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAMA;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAWA"}
1
+ {"version":3,"file":"app-list-row.d.ts","sourceRoot":"","sources":["../../src/components/app-list-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,mBAAmB,2CAA2C,CAAC;AAC5E,eAAO,MAAM,uBAAuB,kKAC6H,CAAC;AAElK,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAMA;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAWA"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
- export const APP_LIST_GRID_CLASS = "mx-auto w-full max-w-[1000px] xl:grid xl:grid-cols-2 xl:gap-3 xl:overflow-visible xl:rounded-none xl:bg-transparent";
3
+ export const APP_LIST_GRID_CLASS = "w-full xl:grid xl:grid-cols-2 xl:gap-3";
4
4
  export const APP_LIST_GRID_ROW_CLASS = "xl:rounded-2xl xl:border xl:border-transparent xl:bg-card xl:transition-[background-color,border-color] xl:hover:border-border xl:focus-within:border-ring/50";
5
5
  export function AppList({ children, className, }) {
6
6
  return (_jsx("div", { className: cn("overflow-hidden rounded-2xl bg-card", className), children: children }));
@@ -1 +1 @@
1
- {"version":3,"file":"app-list-row.js","sourceRoot":"","sources":["../../src/components/app-list-row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAC9B,qHAAqH,CAAC;AACxH,MAAM,CAAC,MAAM,uBAAuB,GAClC,+JAA+J,CAAC;AAElK,MAAM,UAAU,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GAIV;IACC,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,SAAS,CAAC,YACjE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,GAIV;IACC,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,kKAAkK,EAClK,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\nexport const APP_LIST_GRID_CLASS =\n \"mx-auto w-full max-w-[1000px] xl:grid xl:grid-cols-2 xl:gap-3 xl:overflow-visible xl:rounded-none xl:bg-transparent\";\nexport const APP_LIST_GRID_ROW_CLASS =\n \"xl:rounded-2xl xl:border xl:border-transparent xl:bg-card xl:transition-[background-color,border-color] xl:hover:border-border xl:focus-within:border-ring/50\";\n\nexport function AppList({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) {\n return (\n <div className={cn(\"overflow-hidden rounded-2xl bg-card\", className)}>\n {children}\n </div>\n );\n}\n\nexport function AppListRow({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n \"group flex min-w-0 items-center gap-3 border-b px-4 py-3.5 last:border-b-0 transition-[background-color,border-color] hover:bg-muted/30 focus-within:bg-muted/30\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"app-list-row.js","sourceRoot":"","sources":["../../src/components/app-list-row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,wCAAwC,CAAC;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAClC,+JAA+J,CAAC;AAElK,MAAM,UAAU,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,GAIV;IACC,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,qCAAqC,EAAE,SAAS,CAAC,YACjE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,GAIV;IACC,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,kKAAkK,EAClK,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { cn } from \"../lib/utils\";\n\nexport const APP_LIST_GRID_CLASS = \"w-full xl:grid xl:grid-cols-2 xl:gap-3\";\nexport const APP_LIST_GRID_ROW_CLASS =\n \"xl:rounded-2xl xl:border xl:border-transparent xl:bg-card xl:transition-[background-color,border-color] xl:hover:border-border xl:focus-within:border-ring/50\";\n\nexport function AppList({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) {\n return (\n <div className={cn(\"overflow-hidden rounded-2xl bg-card\", className)}>\n {children}\n </div>\n );\n}\n\nexport function AppListRow({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n \"group flex min-w-0 items-center gap-3 border-b px-4 py-3.5 last:border-b-0 transition-[background-color,border-color] hover:bg-muted/30 focus-within:bg-muted/30\",\n className,\n )}\n >\n {children}\n </div>\n );\n}\n"]}
@@ -1,18 +1,2 @@
1
- export interface AppOpenActionLabels {
2
- addApp: string;
3
- openApp: string;
4
- openInline: string;
5
- openInNewTab: string;
6
- }
7
- export declare function AppOpenActions({ name, href, target, rel, labels: labelOverrides, onAddApp, onOpenInline, showInlineOption, showNewTabOption, }: {
8
- name: string;
9
- href: string | null;
10
- target?: "_blank";
11
- rel?: string;
12
- labels?: Partial<AppOpenActionLabels>;
13
- onAddApp?: () => void;
14
- onOpenInline?: () => void;
15
- showInlineOption?: boolean;
16
- showNewTabOption?: boolean;
17
- }): import("node_modules/@types/react").JSX.Element;
1
+ export { AppOpenActions, type AppOpenActionLabels, type AppOpenActionMenuItem, } from "@agent-native/core/client/chat-first";
18
2
  //# sourceMappingURL=app-open-actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-open-actions.d.ts","sourceRoot":"","sources":["../../src/components/app-open-actions.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AASD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,GAAG,EACH,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,YAAY,EACZ,gBAAwB,EACxB,gBAAwB,GACzB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,mDAqEA"}
1
+ {"version":3,"file":"app-open-actions.d.ts","sourceRoot":"","sources":["../../src/components/app-open-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,sCAAsC,CAAC"}
@@ -1,21 +1,2 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconChevronDown, IconPlus } from "@tabler/icons-react";
3
- import { Button } from "./ui/button.js";
4
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "./ui/dropdown-menu.js";
5
- const DEFAULT_LABELS = {
6
- addApp: "Add app",
7
- openApp: "Open app",
8
- openInline: "Open inline",
9
- openInNewTab: "Open in new tab",
10
- };
11
- export function AppOpenActions({ name, href, target, rel, labels: labelOverrides, onAddApp, onOpenInline, showInlineOption = false, showNewTabOption = false, }) {
12
- const labels = { ...DEFAULT_LABELS, ...labelOverrides };
13
- const canOfferNewTab = showNewTabOption && target !== "_blank";
14
- const hasMenu = Boolean(onAddApp) ||
15
- (Boolean(href) && (showInlineOption || canOfferNewTab));
16
- if (!href && !hasMenu) {
17
- return (_jsx(Button, { size: "sm", variant: "outline", disabled: true, children: labels.openApp }));
18
- }
19
- return (_jsxs("div", { className: "flex shrink-0 overflow-hidden rounded-md border border-border focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", children: [_jsx(Button, { asChild: Boolean(href), size: "sm", variant: "outline", className: "rounded-none border-0 border-e border-border", disabled: !href, children: href ? (_jsx("a", { href: href, target: target, rel: rel, children: labels.openApp })) : (_jsx("span", { children: labels.openApp })) }), hasMenu ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { type: "button", size: "sm", variant: "outline", className: "size-9 rounded-none border-0 p-0", "aria-label": `Open options for ${name}`, children: _jsx(IconChevronDown, { size: 15 }) }) }), _jsxs(DropdownMenuContent, { align: "end", className: "min-w-40", children: [onAddApp ? (_jsxs(DropdownMenuItem, { onSelect: onAddApp, children: [_jsx(IconPlus, { size: 14, className: "mr-2" }), labels.addApp] })) : null, showInlineOption && href ? (_jsx(DropdownMenuItem, { onSelect: onOpenInline, children: labels.openInline })) : null, canOfferNewTab && href ? (_jsx(DropdownMenuItem, { asChild: true, children: _jsx("a", { href: href, target: "_blank", rel: "noreferrer", children: labels.openInNewTab }) })) : null] })] })) : null] }));
20
- }
1
+ export { AppOpenActions, } from "@agent-native/core/client/chat-first";
21
2
  //# sourceMappingURL=app-open-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-open-actions.js","sourceRoot":"","sources":["../../src/components/app-open-actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAS5B,MAAM,cAAc,GAAwB;IAC1C,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,iBAAiB;CAChC,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,GAAG,EACH,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,YAAY,EACZ,gBAAgB,GAAG,KAAK,EACxB,gBAAgB,GAAG,KAAK,GAWzB;IACC,MAAM,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IACxD,MAAM,cAAc,GAAG,gBAAgB,IAAI,MAAM,KAAK,QAAQ,CAAC;IAC/D,MAAM,OAAO,GACX,OAAO,CAAC,QAAQ,CAAC;QACjB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,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AAI,CAAC,CAAC,CAAC,CAC1B,KAAC,gBAAgB,IAAC,QAAQ,EAAE,YAAY,YACrC,MAAM,CAAC,UAAU,GACD,CACpB,CAAC,CAAC,CAAC,IAAI,EACP,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,CACxB,KAAC,gBAAgB,IAAC,OAAO,kBACvB,YAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,YAC5C,MAAM,CAAC,YAAY,GAClB,GACa,CACpB,CAAC,CAAC,CAAC,IAAI,IACY,IACT,CAChB,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconChevronDown, IconPlus } from \"@tabler/icons-react\";\n\nimport { Button } from \"./ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\n\nexport interface AppOpenActionLabels {\n addApp: string;\n openApp: string;\n openInline: string;\n openInNewTab: string;\n}\n\nconst DEFAULT_LABELS: AppOpenActionLabels = {\n addApp: \"Add app\",\n openApp: \"Open app\",\n openInline: \"Open inline\",\n openInNewTab: \"Open in new tab\",\n};\n\nexport function AppOpenActions({\n name,\n href,\n target,\n rel,\n labels: labelOverrides,\n onAddApp,\n onOpenInline,\n showInlineOption = false,\n showNewTabOption = false,\n}: {\n name: string;\n href: string | null;\n target?: \"_blank\";\n rel?: string;\n labels?: Partial<AppOpenActionLabels>;\n onAddApp?: () => void;\n onOpenInline?: () => void;\n showInlineOption?: boolean;\n showNewTabOption?: boolean;\n}) {\n const labels = { ...DEFAULT_LABELS, ...labelOverrides };\n const canOfferNewTab = showNewTabOption && target !== \"_blank\";\n const hasMenu =\n Boolean(onAddApp) ||\n (Boolean(href) && (showInlineOption || canOfferNewTab));\n\n if (!href && !hasMenu) {\n return (\n <Button size=\"sm\" variant=\"outline\" disabled>\n {labels.openApp}\n </Button>\n );\n }\n\n return (\n <div className=\"flex shrink-0 overflow-hidden rounded-md border border-border focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2\">\n <Button\n asChild={Boolean(href)}\n size=\"sm\"\n variant=\"outline\"\n className=\"rounded-none border-0 border-e border-border\"\n disabled={!href}\n >\n {href ? (\n <a href={href} target={target} rel={rel}>\n {labels.openApp}\n </a>\n ) : (\n <span>{labels.openApp}</span>\n )}\n </Button>\n {hasMenu ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n className=\"size-9 rounded-none border-0 p-0\"\n aria-label={`Open options for ${name}`}\n >\n <IconChevronDown size={15} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"min-w-40\">\n {onAddApp ? (\n <DropdownMenuItem onSelect={onAddApp}>\n <IconPlus size={14} className=\"mr-2\" />\n {labels.addApp}\n </DropdownMenuItem>\n ) : null}\n {showInlineOption && href ? (\n <DropdownMenuItem onSelect={onOpenInline}>\n {labels.openInline}\n </DropdownMenuItem>\n ) : null}\n {canOfferNewTab && href ? (\n <DropdownMenuItem asChild>\n <a href={href} target=\"_blank\" rel=\"noreferrer\">\n {labels.openInNewTab}\n </a>\n </DropdownMenuItem>\n ) : null}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"app-open-actions.js","sourceRoot":"","sources":["../../src/components/app-open-actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAGf,MAAM,sCAAsC,CAAC","sourcesContent":["export {\n AppOpenActions,\n type AppOpenActionLabels,\n type AppOpenActionMenuItem,\n} from \"@agent-native/core/client/chat-first\";\n"]}
@@ -0,0 +1,6 @@
1
+ export declare function AppRowSettings({ name, addAppLabel, onAddApp, }: {
2
+ name: string;
3
+ addAppLabel?: string;
4
+ onAddApp: () => void;
5
+ }): import("node_modules/@types/react").JSX.Element;
6
+ //# sourceMappingURL=app-row-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-row-settings.d.ts","sourceRoot":"","sources":["../../src/components/app-row-settings.tsx"],"names":[],"mappings":"AAeA,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,WAAuB,EACvB,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,mDA8BA"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { APP_ACTION_MENU_CONTENT_CLASS } from "@agent-native/core/client/chat-first";
3
+ import { IconPlus, IconSettings } from "@tabler/icons-react";
4
+ import { Button } from "./ui/button.js";
5
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "./ui/dropdown-menu.js";
6
+ import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip.js";
7
+ const APP_ROW_ACTION_CLASS = "size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground";
8
+ export function AppRowSettings({ name, addAppLabel = "Add app", onAddApp, }) {
9
+ return (_jsxs(DropdownMenu, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": `Settings for ${name}`, className: APP_ROW_ACTION_CLASS, children: _jsx(IconSettings, { size: 15 }) }) }) }), _jsx(TooltipContent, { children: "App settings" })] }), _jsx(DropdownMenuContent, { align: "end", className: APP_ACTION_MENU_CONTENT_CLASS, children: _jsxs(DropdownMenuItem, { onSelect: onAddApp, children: [_jsx(IconPlus, { size: 14, "aria-hidden": "true" }), addAppLabel] }) })] }));
10
+ }
11
+ //# sourceMappingURL=app-row-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-row-settings.js","sourceRoot":"","sources":["../../src/components/app-row-settings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,oBAAoB,GACxB,6PAA6P,CAAC;AAEhQ,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,WAAW,GAAG,SAAS,EACvB,QAAQ,GAKT;IACC,OAAO,CACL,MAAC,YAAY,eACX,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,mBAAmB,IAAC,OAAO,kBAC1B,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,gBACG,gBAAgB,IAAI,EAAE,EAClC,SAAS,EAAE,oBAAoB,YAE/B,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,GACnB,GACW,GACP,EACjB,KAAC,cAAc,+BAA8B,IACrC,EACV,KAAC,mBAAmB,IAClB,KAAK,EAAC,KAAK,EACX,SAAS,EAAE,6BAA6B,YAExC,MAAC,gBAAgB,IAAC,QAAQ,EAAE,QAAQ,aAClC,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,iBAAc,MAAM,GAAG,EACxC,WAAW,IACK,GACC,IACT,CAChB,CAAC;AACJ,CAAC","sourcesContent":["import { APP_ACTION_MENU_CONTENT_CLASS } from \"@agent-native/core/client/chat-first\";\nimport { IconPlus, IconSettings } from \"@tabler/icons-react\";\n\nimport { Button } from \"./ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\n\nconst APP_ROW_ACTION_CLASS =\n \"size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground\";\n\nexport function AppRowSettings({\n name,\n addAppLabel = \"Add app\",\n onAddApp,\n}: {\n name: string;\n addAppLabel?: string;\n onAddApp: () => void;\n}) {\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`Settings for ${name}`}\n className={APP_ROW_ACTION_CLASS}\n >\n <IconSettings size={15} />\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>App settings</TooltipContent>\n </Tooltip>\n <DropdownMenuContent\n align=\"end\"\n className={APP_ACTION_MENU_CONTENT_CLASS}\n >\n <DropdownMenuItem onSelect={onAddApp}>\n <IconPlus size={14} aria-hidden=\"true\" />\n {addAppLabel}\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"automation-run-history-dialog.d.ts","sourceRoot":"","sources":["../../src/components/automation-run-history-dialog.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAqBjE,UAAU,+BAA+B;IACvC,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAgCD,wBAAgB,0BAA0B,CAAC,EACzC,UAAU,EACV,IAAI,EACJ,YAAY,GACb,EAAE,+BAA+B,mDAwKjC"}
1
+ {"version":3,"file":"automation-run-history-dialog.d.ts","sourceRoot":"","sources":["../../src/components/automation-run-history-dialog.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAsBjE,UAAU,+BAA+B;IACvC,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAgCD,wBAAgB,0BAA0B,CAAC,EACzC,UAAU,EACV,IAAI,EACJ,YAAY,GACb,EAAE,+BAA+B,mDA4KjC"}
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useActionQuery } from "@agent-native/core/client/hooks";
3
- import { IconAlertTriangle, IconClock, IconExternalLink, IconLoader2, } from "@tabler/icons-react";
3
+ import { IconAlertTriangle, IconClock, IconExternalLink, } from "@tabler/icons-react";
4
4
  import { Link } from "react-router";
5
5
  import { automationScopeLabel, automationTarget, } from "../lib/automation-display.js";
6
6
  import { ActionQueryError } from "./action-query-error.js";
7
7
  import { Badge } from "./ui/badge.js";
8
8
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./ui/dialog.js";
9
+ import { Skeleton } from "./ui/skeleton.js";
9
10
  function runStatusVariant(status) {
10
11
  if (status === "error")
11
12
  return "destructive";
@@ -53,7 +54,7 @@ export function AutomationRunHistoryDialog({ automation, open, onOpenChange, })
53
54
  : "Execution history" })] }), automation ? (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-2 gap-x-4 gap-y-3 rounded-lg border bg-muted/20 p-3 text-sm", children: [_jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Status" }), _jsx("div", { className: "mt-1 font-medium", children: automation.lastStatus ??
54
55
  (automation.enabled ? "ready" : "paused") })] }), _jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Last check" }), _jsx("div", { className: "mt-1 font-medium", children: automation.lastCheck
55
56
  ? formatTimestamp(new Date(automation.lastCheck).getTime())
56
- : "Not recorded" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Created by" }), _jsx("div", { className: "mt-1 break-words font-medium", children: automation.createdBy ?? "Unknown" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Timezone" }), _jsx("div", { className: "mt-1 font-medium", children: automation.timezone ?? "Account default" })] })] }), automation.lastError ? (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3", children: [_jsx(IconAlertTriangle, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-destructive", children: "Latest scheduler result" }), _jsx("p", { className: "mt-1 break-words text-sm text-muted-foreground", children: automation.lastError })] })] })) : null, _jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Past runs" }), _jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Only executions that actually started appear here. Blocked or skipped scheduler checks are shown above, not as fake runs." })] }), runs.length > 0 ? (_jsxs(Badge, { variant: "outline", children: [runs.length, " shown"] })) : null] }), _jsx("div", { className: "mt-3", children: runsQuery.isLoading ? (_jsxs("div", { className: "flex items-center gap-2 rounded-lg border p-4 text-sm text-muted-foreground", children: [_jsx(IconLoader2, { className: "size-4 animate-spin" }), "Loading run history..."] })) : runsQuery.isError ? (_jsx(ActionQueryError, { error: runsQuery.error, onRetry: () => void runsQuery.refetch() })) : runs.length === 0 ? (_jsx("div", { className: "rounded-lg border border-dashed p-4 text-sm text-muted-foreground", children: "This automation has not recorded an execution yet. If it is enabled but shows no runs, inspect the latest scheduler result and last check above." })) : (_jsx("ul", { className: "divide-y rounded-lg border", children: runs.map((run) => {
57
+ : "Not recorded" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Created by" }), _jsx("div", { className: "mt-1 break-words font-medium", children: automation.createdBy ?? "Unknown" })] }), _jsxs("div", { children: [_jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: "Timezone" }), _jsx("div", { className: "mt-1 font-medium", children: automation.timezone ?? "Account default" })] })] }), automation.lastError ? (_jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3", children: [_jsx(IconAlertTriangle, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-destructive", children: "Latest scheduler result" }), _jsx("p", { className: "mt-1 break-words text-sm text-muted-foreground", children: automation.lastError })] })] })) : null, _jsxs("div", { children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm font-semibold text-foreground", children: "Past runs" }), _jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Only executions that actually started appear here. Blocked or skipped scheduler checks are shown above, not as fake runs." })] }), runs.length > 0 ? (_jsxs(Badge, { variant: "outline", children: [runs.length, " shown"] })) : null] }), _jsx("div", { className: "mt-3", children: runsQuery.isLoading ? (_jsx("div", { className: "space-y-3 rounded-lg border p-4", children: Array.from({ length: 3 }).map((_, index) => (_jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-4 w-2/3" }), _jsx(Skeleton, { className: "h-3 w-1/2" })] }, index))) })) : runsQuery.isError ? (_jsx(ActionQueryError, { error: runsQuery.error, onRetry: () => void runsQuery.refetch() })) : runs.length === 0 ? (_jsx("div", { className: "rounded-lg border border-dashed p-4 text-sm text-muted-foreground", children: "This automation has not recorded an execution yet. If it is enabled but shows no runs, inspect the latest scheduler result and last check above." })) : (_jsx("ul", { className: "divide-y rounded-lg border", children: runs.map((run) => {
57
58
  const debugPath = runDebugPath(run);
58
59
  const duration = formatDuration(run);
59
60
  return (_jsxs("li", { className: "space-y-2 p-3", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm", children: [_jsx(Badge, { variant: runStatusVariant(run.status), children: run.status }), _jsx("span", { className: "text-muted-foreground", children: formatTimestamp(run.startedAt) }), duration ? (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(IconClock, { className: "size-3.5" }), duration] })) : null, debugPath ? (_jsxs(Link, { to: debugPath, className: "ml-auto inline-flex items-center gap-1 text-xs font-medium text-foreground underline-offset-4 hover:underline", children: [_jsx(IconExternalLink, { className: "size-3.5" }), "Open debug"] })) : null] }), run.error ? (_jsx("p", { className: "break-words text-sm text-destructive", children: run.error })) : null] }, run.id));
@@ -1 +1 @@
1
- {"version":3,"file":"automation-run-history-dialog.js","sourceRoot":"","sources":["../../src/components/automation-run-history-dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AAkBrB,SAAS,gBAAgB,CACvB,MAA+B;IAE/B,IAAI,MAAM,KAAK,OAAO;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V,CAAC;AACJ,CAAC","sourcesContent":["import { useActionQuery } from \"@agent-native/core/client/hooks\";\nimport {\n IconAlertTriangle,\n IconClock,\n IconExternalLink,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { Link } from \"react-router\";\n\nimport {\n automationScopeLabel,\n automationTarget,\n} from \"../lib/automation-display\";\nimport type { DispatchAutomationItem } from \"../lib/automations\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { Badge } from \"./ui/badge\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"./ui/dialog\";\n\ninterface AutomationRun {\n id: string;\n runId: string | null;\n threadId: string | null;\n status: \"running\" | \"success\" | \"error\" | \"interrupted\";\n startedAt: number;\n finishedAt: number | null;\n error: string | null;\n}\n\ninterface AutomationRunHistoryDialogProps {\n automation: DispatchAutomationItem | null;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\nfunction runStatusVariant(\n status: AutomationRun[\"status\"],\n): \"default\" | \"destructive\" | \"outline\" {\n if (status === \"error\") return \"destructive\";\n if (status === \"success\") return \"default\";\n return \"outline\";\n}\n\nfunction formatTimestamp(value: number): string {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? \"Unknown time\" : date.toLocaleString();\n}\n\nfunction formatDuration(run: AutomationRun): string | null {\n if (!run.finishedAt) return null;\n const seconds = Math.max(\n 0,\n Math.round((run.finishedAt - run.startedAt) / 1000),\n );\n return `${seconds}s`;\n}\n\nfunction runDebugPath(run: AutomationRun): string | null {\n const params = new URLSearchParams();\n if (run.runId) params.set(\"runId\", run.runId);\n else if (run.threadId) params.set(\"threadId\", run.threadId);\n else return null;\n return `/admin/thread-debug?${params.toString()}`;\n}\n\nexport function AutomationRunHistoryDialog({\n automation,\n open,\n onOpenChange,\n}: AutomationRunHistoryDialogProps) {\n const scope =\n automation?.scope === \"organization\" ||\n automation?.owner.startsWith(\"__organization__:\") ||\n automation?.owner === \"__shared__\"\n ? \"organization\"\n : \"personal\";\n const runsQuery = useActionQuery<AutomationRun[]>(\n \"list-automation-runs\",\n {\n name: automation?.name ?? \"\",\n scope,\n appId: automation?.appId ?? \"dispatch\",\n },\n {\n enabled: open && Boolean(automation),\n staleTime: 5_000,\n },\n );\n const runs = runsQuery.data ?? [];\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-h-[85vh] max-w-2xl overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{automation?.name ?? \"Automation details\"}</DialogTitle>\n <DialogDescription>\n {automation\n ? `${automationTarget(automation)} · ${automationScopeLabel(automation)}`\n : \"Execution history\"}\n </DialogDescription>\n </DialogHeader>\n\n {automation ? (\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-2 gap-x-4 gap-y-3 rounded-lg border bg-muted/20 p-3 text-sm\">\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Status\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.lastStatus ??\n (automation.enabled ? \"ready\" : \"paused\")}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Last check\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.lastCheck\n ? formatTimestamp(new Date(automation.lastCheck).getTime())\n : \"Not recorded\"}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Created by\n </div>\n <div className=\"mt-1 break-words font-medium\">\n {automation.createdBy ?? \"Unknown\"}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Timezone\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.timezone ?? \"Account default\"}\n </div>\n </div>\n </div>\n\n {automation.lastError ? (\n <div className=\"flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3\">\n <IconAlertTriangle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-destructive\">\n Latest scheduler result\n </p>\n <p className=\"mt-1 break-words text-sm text-muted-foreground\">\n {automation.lastError}\n </p>\n </div>\n </div>\n ) : null}\n\n <div>\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h3 className=\"text-sm font-semibold text-foreground\">\n Past runs\n </h3>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n Only executions that actually started appear here. Blocked\n or skipped scheduler checks are shown above, not as fake\n runs.\n </p>\n </div>\n {runs.length > 0 ? (\n <Badge variant=\"outline\">{runs.length} shown</Badge>\n ) : null}\n </div>\n\n <div className=\"mt-3\">\n {runsQuery.isLoading ? (\n <div className=\"flex items-center gap-2 rounded-lg border p-4 text-sm text-muted-foreground\">\n <IconLoader2 className=\"size-4 animate-spin\" />\n Loading run history...\n </div>\n ) : runsQuery.isError ? (\n <ActionQueryError\n error={runsQuery.error}\n onRetry={() => void runsQuery.refetch()}\n />\n ) : runs.length === 0 ? (\n <div className=\"rounded-lg border border-dashed p-4 text-sm text-muted-foreground\">\n This automation has not recorded an execution yet. If it is\n enabled but shows no runs, inspect the latest scheduler\n result and last check above.\n </div>\n ) : (\n <ul className=\"divide-y rounded-lg border\">\n {runs.map((run) => {\n const debugPath = runDebugPath(run);\n const duration = formatDuration(run);\n return (\n <li key={run.id} className=\"space-y-2 p-3\">\n <div className=\"flex flex-wrap items-center gap-2 text-sm\">\n <Badge variant={runStatusVariant(run.status)}>\n {run.status}\n </Badge>\n <span className=\"text-muted-foreground\">\n {formatTimestamp(run.startedAt)}\n </span>\n {duration ? (\n <span className=\"inline-flex items-center gap-1 text-xs text-muted-foreground\">\n <IconClock className=\"size-3.5\" />\n {duration}\n </span>\n ) : null}\n {debugPath ? (\n <Link\n to={debugPath}\n className=\"ml-auto inline-flex items-center gap-1 text-xs font-medium text-foreground underline-offset-4 hover:underline\"\n >\n <IconExternalLink className=\"size-3.5\" />\n Open debug\n </Link>\n ) : null}\n </div>\n {run.error ? (\n <p className=\"break-words text-sm text-destructive\">\n {run.error}\n </p>\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </div>\n </div>\n ) : null}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
1
+ {"version":3,"file":"automation-run-history-dialog.js","sourceRoot":"","sources":["../../src/components/automation-run-history-dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAkBzC,SAAS,gBAAgB,CACvB,MAA+B;IAE/B,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,aAAa,CAAC;IAC7C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;AAC/E,CAAC;AAED,SAAS,cAAc,CAAC,GAAkB;IACxC,IAAI,CAAC,GAAG,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CACtB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AAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;4CACpC,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;4CACrC,OAAO,CACL,cAAiB,SAAS,EAAC,eAAe,aACxC,eAAK,SAAS,EAAC,2CAA2C,aACxD,KAAC,KAAK,IAAC,OAAO,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,YACzC,GAAG,CAAC,MAAM,GACL,EACR,eAAM,SAAS,EAAC,uBAAuB,YACpC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,GAC1B,EACN,QAAQ,CAAC,CAAC,CAAC,CACV,gBAAM,SAAS,EAAC,8DAA8D,aAC5E,KAAC,SAAS,IAAC,SAAS,EAAC,UAAU,GAAG,EACjC,QAAQ,IACJ,CACR,CAAC,CAAC,CAAC,IAAI,EACP,SAAS,CAAC,CAAC,CAAC,CACX,MAAC,IAAI,IACH,EAAE,EAAE,SAAS,EACb,SAAS,EAAC,+GAA+G,aAEzH,KAAC,gBAAgB,IAAC,SAAS,EAAC,UAAU,GAAG,kBAEpC,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CACX,YAAG,SAAS,EAAC,sCAAsC,YAChD,GAAG,CAAC,KAAK,GACR,CACL,CAAC,CAAC,CAAC,IAAI,KA5BD,GAAG,CAAC,EAAE,CA6BV,CACN,CAAC;wCACJ,CAAC,CAAC,GACC,CACN,GACG,IACF,IACF,CACP,CAAC,CAAC,CAAC,IAAI,IACM,GACT,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { useActionQuery } from \"@agent-native/core/client/hooks\";\nimport {\n IconAlertTriangle,\n IconClock,\n IconExternalLink,\n} from \"@tabler/icons-react\";\nimport { Link } from \"react-router\";\n\nimport {\n automationScopeLabel,\n automationTarget,\n} from \"../lib/automation-display\";\nimport type { DispatchAutomationItem } from \"../lib/automations\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { Badge } from \"./ui/badge\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"./ui/dialog\";\nimport { Skeleton } from \"./ui/skeleton\";\n\ninterface AutomationRun {\n id: string;\n runId: string | null;\n threadId: string | null;\n status: \"running\" | \"success\" | \"error\" | \"interrupted\";\n startedAt: number;\n finishedAt: number | null;\n error: string | null;\n}\n\ninterface AutomationRunHistoryDialogProps {\n automation: DispatchAutomationItem | null;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\nfunction runStatusVariant(\n status: AutomationRun[\"status\"],\n): \"default\" | \"destructive\" | \"outline\" {\n if (status === \"error\") return \"destructive\";\n if (status === \"success\") return \"default\";\n return \"outline\";\n}\n\nfunction formatTimestamp(value: number): string {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? \"Unknown time\" : date.toLocaleString();\n}\n\nfunction formatDuration(run: AutomationRun): string | null {\n if (!run.finishedAt) return null;\n const seconds = Math.max(\n 0,\n Math.round((run.finishedAt - run.startedAt) / 1000),\n );\n return `${seconds}s`;\n}\n\nfunction runDebugPath(run: AutomationRun): string | null {\n const params = new URLSearchParams();\n if (run.runId) params.set(\"runId\", run.runId);\n else if (run.threadId) params.set(\"threadId\", run.threadId);\n else return null;\n return `/admin/thread-debug?${params.toString()}`;\n}\n\nexport function AutomationRunHistoryDialog({\n automation,\n open,\n onOpenChange,\n}: AutomationRunHistoryDialogProps) {\n const scope =\n automation?.scope === \"organization\" ||\n automation?.owner.startsWith(\"__organization__:\") ||\n automation?.owner === \"__shared__\"\n ? \"organization\"\n : \"personal\";\n const runsQuery = useActionQuery<AutomationRun[]>(\n \"list-automation-runs\",\n {\n name: automation?.name ?? \"\",\n scope,\n appId: automation?.appId ?? \"dispatch\",\n },\n {\n enabled: open && Boolean(automation),\n staleTime: 5_000,\n },\n );\n const runs = runsQuery.data ?? [];\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className=\"max-h-[85vh] max-w-2xl overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{automation?.name ?? \"Automation details\"}</DialogTitle>\n <DialogDescription>\n {automation\n ? `${automationTarget(automation)} · ${automationScopeLabel(automation)}`\n : \"Execution history\"}\n </DialogDescription>\n </DialogHeader>\n\n {automation ? (\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-2 gap-x-4 gap-y-3 rounded-lg border bg-muted/20 p-3 text-sm\">\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Status\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.lastStatus ??\n (automation.enabled ? \"ready\" : \"paused\")}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Last check\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.lastCheck\n ? formatTimestamp(new Date(automation.lastCheck).getTime())\n : \"Not recorded\"}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Created by\n </div>\n <div className=\"mt-1 break-words font-medium\">\n {automation.createdBy ?? \"Unknown\"}\n </div>\n </div>\n <div>\n <div className=\"text-[11px] uppercase tracking-wide text-muted-foreground\">\n Timezone\n </div>\n <div className=\"mt-1 font-medium\">\n {automation.timezone ?? \"Account default\"}\n </div>\n </div>\n </div>\n\n {automation.lastError ? (\n <div className=\"flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 p-3\">\n <IconAlertTriangle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-destructive\">\n Latest scheduler result\n </p>\n <p className=\"mt-1 break-words text-sm text-muted-foreground\">\n {automation.lastError}\n </p>\n </div>\n </div>\n ) : null}\n\n <div>\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h3 className=\"text-sm font-semibold text-foreground\">\n Past runs\n </h3>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n Only executions that actually started appear here. Blocked\n or skipped scheduler checks are shown above, not as fake\n runs.\n </p>\n </div>\n {runs.length > 0 ? (\n <Badge variant=\"outline\">{runs.length} shown</Badge>\n ) : null}\n </div>\n\n <div className=\"mt-3\">\n {runsQuery.isLoading ? (\n <div className=\"space-y-3 rounded-lg border p-4\">\n {Array.from({ length: 3 }).map((_, index) => (\n <div key={index} className=\"space-y-2\">\n <Skeleton className=\"h-4 w-2/3\" />\n <Skeleton className=\"h-3 w-1/2\" />\n </div>\n ))}\n </div>\n ) : runsQuery.isError ? (\n <ActionQueryError\n error={runsQuery.error}\n onRetry={() => void runsQuery.refetch()}\n />\n ) : runs.length === 0 ? (\n <div className=\"rounded-lg border border-dashed p-4 text-sm text-muted-foreground\">\n This automation has not recorded an execution yet. If it is\n enabled but shows no runs, inspect the latest scheduler\n result and last check above.\n </div>\n ) : (\n <ul className=\"divide-y rounded-lg border\">\n {runs.map((run) => {\n const debugPath = runDebugPath(run);\n const duration = formatDuration(run);\n return (\n <li key={run.id} className=\"space-y-2 p-3\">\n <div className=\"flex flex-wrap items-center gap-2 text-sm\">\n <Badge variant={runStatusVariant(run.status)}>\n {run.status}\n </Badge>\n <span className=\"text-muted-foreground\">\n {formatTimestamp(run.startedAt)}\n </span>\n {duration ? (\n <span className=\"inline-flex items-center gap-1 text-xs text-muted-foreground\">\n <IconClock className=\"size-3.5\" />\n {duration}\n </span>\n ) : null}\n {debugPath ? (\n <Link\n to={debugPath}\n className=\"ml-auto inline-flex items-center gap-1 text-xs font-medium text-foreground underline-offset-4 hover:underline\"\n >\n <IconExternalLink className=\"size-3.5\" />\n Open debug\n </Link>\n ) : null}\n </div>\n {run.error ? (\n <p className=\"break-words text-sm text-destructive\">\n {run.error}\n </p>\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </div>\n </div>\n ) : null}\n </DialogContent>\n </Dialog>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"connected-app-card.d.ts","sourceRoot":"","sources":["../../src/components/connected-app-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAK7D,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAwBA"}
1
+ {"version":3,"file":"connected-app-card.d.ts","sourceRoot":"","sources":["../../src/components/connected-app-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAK7D,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAyBA"}
@@ -4,9 +4,10 @@ import { AppIcon } from "./app-icon.js";
4
4
  import { AppListRow } from "./app-list-row.js";
5
5
  import { AppOpenActions } from "./app-open-actions.js";
6
6
  export function ConnectedAppCard({ app, className, }) {
7
- return (_jsxs(AppListRow, { className: className, children: [_jsx(AppIcon, { id: app.id, name: app.name, color: app.color, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-sm font-semibold text-foreground", children: app.name }), _jsx("div", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: app.description || app.url })] }), _jsx(AppOpenActions, { name: app.name, href: withBuilderUtmTrackingParams(app.url, {
7
+ const launchUrl = app.homeUrl ?? app.url;
8
+ return (_jsxs(AppListRow, { className: className, children: [_jsx(AppIcon, { id: app.id, name: app.name, color: app.color, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-sm font-semibold text-foreground", children: app.name }), _jsx("div", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: app.description || app.url })] }), _jsx(AppOpenActions, { name: app.name, href: withBuilderUtmTrackingParams(launchUrl, {
8
9
  campaign: "product",
9
10
  content: "dispatch_app",
10
- }), target: "_blank", rel: "noopener noreferrer", showNewTabOption: true })] }));
11
+ }), rel: "noopener noreferrer", showNewTabOption: true })] }));
11
12
  }
12
13
  //# sourceMappingURL=connected-app-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connected-app-card.js","sourceRoot":"","sources":["../../src/components/connected-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAG/F,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,GAIV;IACC,OAAO,CACL,MAAC,UAAU,IAAC,SAAS,EAAE,SAAS,aAC9B,KAAC,OAAO,IAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,EAAC,IAAI,GAAG,EACnE,eAAK,SAAS,EAAC,gBAAgB,aAC7B,cAAK,SAAS,EAAC,gDAAgD,YAC5D,GAAG,CAAC,IAAI,GACL,EACN,cAAK,SAAS,EAAC,+CAA+C,YAC3D,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG,GACvB,IACF,EACN,KAAC,cAAc,IACb,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,IAAI,EAAE,4BAA4B,CAAC,GAAG,CAAC,GAAG,EAAE;oBAC1C,QAAQ,EAAE,SAAS;oBACnB,OAAO,EAAE,cAAc;iBACxB,CAAC,EACF,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,gBAAgB,SAChB,IACS,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { withBuilderUtmTrackingParams } from \"@agent-native/core/shared/builder-link-tracking\";\n\nimport type { ConnectedAppSummary } from \"../lib/other-apps\";\nimport { AppIcon } from \"./app-icon\";\nimport { AppListRow } from \"./app-list-row\";\nimport { AppOpenActions } from \"./app-open-actions\";\n\nexport function ConnectedAppCard({\n app,\n className,\n}: {\n app: ConnectedAppSummary;\n className?: string;\n}) {\n return (\n <AppListRow className={className}>\n <AppIcon id={app.id} name={app.name} color={app.color} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-semibold text-foreground\">\n {app.name}\n </div>\n <div className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {app.description || app.url}\n </div>\n </div>\n <AppOpenActions\n name={app.name}\n href={withBuilderUtmTrackingParams(app.url, {\n campaign: \"product\",\n content: \"dispatch_app\",\n })}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n showNewTabOption\n />\n </AppListRow>\n );\n}\n"]}
1
+ {"version":3,"file":"connected-app-card.js","sourceRoot":"","sources":["../../src/components/connected-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAG/F,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,GAIV;IACC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC;IAEzC,OAAO,CACL,MAAC,UAAU,IAAC,SAAS,EAAE,SAAS,aAC9B,KAAC,OAAO,IAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,EAAC,IAAI,GAAG,EACnE,eAAK,SAAS,EAAC,gBAAgB,aAC7B,cAAK,SAAS,EAAC,gDAAgD,YAC5D,GAAG,CAAC,IAAI,GACL,EACN,cAAK,SAAS,EAAC,+CAA+C,YAC3D,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,GAAG,GACvB,IACF,EACN,KAAC,cAAc,IACb,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,IAAI,EAAE,4BAA4B,CAAC,SAAS,EAAE;oBAC5C,QAAQ,EAAE,SAAS;oBACnB,OAAO,EAAE,cAAc;iBACxB,CAAC,EACF,GAAG,EAAC,qBAAqB,EACzB,gBAAgB,SAChB,IACS,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { withBuilderUtmTrackingParams } from \"@agent-native/core/shared/builder-link-tracking\";\n\nimport type { ConnectedAppSummary } from \"../lib/other-apps\";\nimport { AppIcon } from \"./app-icon\";\nimport { AppListRow } from \"./app-list-row\";\nimport { AppOpenActions } from \"./app-open-actions\";\n\nexport function ConnectedAppCard({\n app,\n className,\n}: {\n app: ConnectedAppSummary;\n className?: string;\n}) {\n const launchUrl = app.homeUrl ?? app.url;\n\n return (\n <AppListRow className={className}>\n <AppIcon id={app.id} name={app.name} color={app.color} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-semibold text-foreground\">\n {app.name}\n </div>\n <div className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {app.description || app.url}\n </div>\n </div>\n <AppOpenActions\n name={app.name}\n href={withBuilderUtmTrackingParams(launchUrl, {\n campaign: \"product\",\n content: \"dispatch_app\",\n })}\n rel=\"noopener noreferrer\"\n showNewTabOption\n />\n </AppListRow>\n );\n}\n"]}
@@ -215,7 +215,7 @@ export function CreateAppFlow({ onClose, className = "", }) {
215
215
  const submitWithSelectedAccess = () => submit(prompt);
216
216
  const isCreatingBuilderBranch = isSubmitting && !isInBuilderFrame() && !isDevMode;
217
217
  if (branchUrl) {
218
- return (_jsxs("div", { className: `flex min-h-[260px] flex-col items-center justify-center gap-5 px-6 py-8 text-center ${className}`, children: [_jsx("span", { className: "flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary", children: _jsx(IconCheck, { className: "size-5", "aria-hidden": "true" }) }), _jsxs("div", { className: "space-y-2", children: [_jsx("h2", { className: "text-base font-semibold text-foreground", children: "Your Builder branch is ready" }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: "Continue building and editing your app in Builder." })] }), _jsx(Button, { asChild: true, className: "w-full sm:w-auto", children: _jsxs("a", { href: branchUrl, target: "_blank", rel: "noreferrer", children: ["Open Builder branch ", _jsx(IconArrowUpRight, { "aria-hidden": "true" })] }) })] }));
218
+ return (_jsxs("div", { className: `flex min-h-[260px] flex-col items-center justify-center gap-5 px-6 py-8 text-center ${className}`, children: [_jsx("span", { className: "flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary", children: _jsx(IconCheck, { className: "size-5", "aria-hidden": "true" }) }), _jsxs("div", { className: "space-y-2", children: [_jsx("h2", { className: "text-base font-semibold text-foreground", children: "Your Builder branch is ready" }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: "Continue building and editing your app in Builder." })] }), _jsx(Button, { asChild: true, className: "w-full sm:w-auto", children: _jsxs("a", { href: branchUrl, target: "_blank", rel: "noreferrer", children: ["Open in Builder ", _jsx(IconArrowUpRight, { "aria-hidden": "true" })] }) })] }));
219
219
  }
220
220
  if (isCreatingBuilderBranch) {
221
221
  return (_jsxs("div", { className: `flex min-h-[260px] flex-col items-center justify-center gap-4 px-6 py-8 text-center ${className}`, "aria-live": "polite", children: [_jsx(IconLoader2, { className: "size-7 animate-spin text-muted-foreground", "aria-hidden": "true" }), _jsxs("div", { className: "space-y-2", children: [_jsx("h2", { className: "text-base font-semibold text-foreground", children: "Creating your Builder branch" }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: "This usually takes a few seconds." })] })] }));
@@ -243,7 +243,7 @@ export function CreateAppFlow({ onClose, className = "", }) {
243
243
  : "Selected apps"] }), resource.description ? (_jsx("div", { className: "line-clamp-2", children: resource.description })) : null] })] })] }, resource.id));
244
244
  }))] }), _jsx("div", { className: "flex items-center justify-end gap-2", children: _jsxs(Button, { type: "button", size: "sm", onClick: submitWithSelectedAccess, disabled: !prompt.trim() || isSubmitting, children: [isSubmitting ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(IconPlus, { className: "h-3.5 w-3.5" })), "Create app"] }) }), !prompt.trim() ? (_jsx("p", { className: "px-1 text-[11px] text-muted-foreground/70", children: "Add a prompt on the previous step before creating the app." })) : null] })), statusMessage ? (_jsxs("div", { className: `flex flex-col gap-2 rounded-md border px-3 py-2 text-xs ${isErrorFailureReason(failureReason)
245
245
  ? "border-destructive/40 bg-destructive/10 text-destructive"
246
- : "border-border bg-muted/40 text-muted-foreground"}`, children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [isErrorFailureReason(failureReason) ? (_jsx(IconAlertTriangle, { className: "h-3.5 w-3.5 shrink-0" })) : null, _jsx("span", { children: statusMessage }), branchUrl ? (_jsxs("a", { href: branchUrl, target: "_blank", rel: "noreferrer", className: "inline-flex items-center gap-1 font-medium text-foreground underline", children: ["Open branch ", _jsx(IconArrowUpRight, { className: "h-3 w-3" })] })) : null] }), failureReason === "builder-not-connected" ? (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => connectFlow.start(), disabled: connectFlow.connecting, className: "w-fit", children: connectFlow.connecting ? "Connecting..." : "Connect Builder" }), _jsxs("a", { href: LOCAL_APP_DOCS_URL, target: "_blank", rel: "noreferrer", "data-create-app-local-link": true, className: "inline-flex items-center gap-1 text-xs font-medium text-foreground underline underline-offset-2", children: ["Create locally ", _jsx(IconArrowUpRight, { className: "h-3 w-3" })] })] })) : null, failureReason === "credential-store-unavailable" ||
246
+ : "border-border bg-muted/40 text-muted-foreground"}`, children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [isErrorFailureReason(failureReason) ? (_jsx(IconAlertTriangle, { className: "h-3.5 w-3.5 shrink-0" })) : null, _jsx("span", { children: statusMessage }), branchUrl ? (_jsxs("a", { href: branchUrl, target: "_blank", rel: "noreferrer", className: "inline-flex items-center gap-1 font-medium text-foreground underline", children: ["Open in Builder ", _jsx(IconArrowUpRight, { className: "h-3 w-3" })] })) : null] }), failureReason === "builder-not-connected" ? (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: () => connectFlow.start(), disabled: connectFlow.connecting, className: "w-fit", children: connectFlow.connecting ? "Connecting..." : "Connect Builder" }), _jsxs("a", { href: LOCAL_APP_DOCS_URL, target: "_blank", rel: "noreferrer", "data-create-app-local-link": true, className: "inline-flex items-center gap-1 text-xs font-medium text-foreground underline underline-offset-2", children: ["Create locally ", _jsx(IconArrowUpRight, { className: "h-3 w-3" })] })] })) : null, failureReason === "credential-store-unavailable" ||
247
247
  failureReason === "builder-error" ? (_jsx(Button, { type: "button", size: "sm", variant: "outline", onClick: submitWithSelectedAccess, disabled: isSubmitting, className: "w-fit", children: "Try again" })) : null] })) : null] }));
248
248
  }
249
249
  export function CreateAppPopover({ trigger, align = "center", }) {