@sleep2agi/agent-network-dashboard 0.4.5-preview.6 → 0.4.5-preview.7

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 (153) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +2 -2
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +2 -2
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/admin.html +2 -2
  24. package/.next/server/app/admin.rsc +2 -2
  25. package/.next/server/app/admin.segments/_full.segment.rsc +2 -2
  26. package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  27. package/.next/server/app/admin.segments/_index.segment.rsc +2 -2
  28. package/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
  31. package/.next/server/app/index.html +2 -2
  32. package/.next/server/app/index.rsc +2 -2
  33. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  36. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  37. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  38. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/login.html +2 -2
  40. package/.next/server/app/login.rsc +2 -2
  41. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  42. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  43. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  44. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  45. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  46. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  47. package/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/logs.html +2 -2
  49. package/.next/server/app/logs.rsc +2 -2
  50. package/.next/server/app/logs.segments/_full.segment.rsc +2 -2
  51. package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
  52. package/.next/server/app/logs.segments/_index.segment.rsc +2 -2
  53. package/.next/server/app/logs.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
  55. package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
  56. package/.next/server/app/messages/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/messages.html +2 -2
  58. package/.next/server/app/messages.rsc +2 -2
  59. package/.next/server/app/messages.segments/_full.segment.rsc +2 -2
  60. package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
  61. package/.next/server/app/messages.segments/_index.segment.rsc +2 -2
  62. package/.next/server/app/messages.segments/_tree.segment.rsc +2 -2
  63. package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
  64. package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
  65. package/.next/server/app/node/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/node.html +2 -2
  67. package/.next/server/app/node.rsc +2 -2
  68. package/.next/server/app/node.segments/_full.segment.rsc +2 -2
  69. package/.next/server/app/node.segments/_head.segment.rsc +1 -1
  70. package/.next/server/app/node.segments/_index.segment.rsc +2 -2
  71. package/.next/server/app/node.segments/_tree.segment.rsc +2 -2
  72. package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
  73. package/.next/server/app/node.segments/node.segment.rsc +1 -1
  74. package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/nodes.html +2 -2
  76. package/.next/server/app/nodes.rsc +2 -2
  77. package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
  78. package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
  79. package/.next/server/app/nodes.segments/_index.segment.rsc +2 -2
  80. package/.next/server/app/nodes.segments/_tree.segment.rsc +2 -2
  81. package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
  82. package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
  83. package/.next/server/app/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/server-logs/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/server-logs.html +2 -2
  86. package/.next/server/app/server-logs.rsc +2 -2
  87. package/.next/server/app/server-logs.segments/_full.segment.rsc +2 -2
  88. package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
  89. package/.next/server/app/server-logs.segments/_index.segment.rsc +2 -2
  90. package/.next/server/app/server-logs.segments/_tree.segment.rsc +2 -2
  91. package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
  92. package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
  93. package/.next/server/app/settings/networks/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/settings/networks.html +2 -2
  95. package/.next/server/app/settings/networks.rsc +2 -2
  96. package/.next/server/app/settings/networks.segments/_full.segment.rsc +2 -2
  97. package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
  98. package/.next/server/app/settings/networks.segments/_index.segment.rsc +2 -2
  99. package/.next/server/app/settings/networks.segments/_tree.segment.rsc +2 -2
  100. package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
  101. package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
  102. package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
  103. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app/settings/tokens/page_client-reference-manifest.js +1 -1
  105. package/.next/server/app/settings/tokens.html +2 -2
  106. package/.next/server/app/settings/tokens.rsc +2 -2
  107. package/.next/server/app/settings/tokens.segments/_full.segment.rsc +2 -2
  108. package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
  109. package/.next/server/app/settings/tokens.segments/_index.segment.rsc +2 -2
  110. package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +2 -2
  111. package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
  112. package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
  113. package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
  114. package/.next/server/app/settings.html +2 -2
  115. package/.next/server/app/settings.rsc +2 -2
  116. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  117. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  118. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  119. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  121. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  122. package/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
  123. package/.next/server/app/tasks/page.js.nft.json +1 -1
  124. package/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  125. package/.next/server/app/tasks.html +2 -2
  126. package/.next/server/app/tasks.rsc +3 -3
  127. package/.next/server/app/tasks.segments/_full.segment.rsc +3 -3
  128. package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
  129. package/.next/server/app/tasks.segments/_index.segment.rsc +2 -2
  130. package/.next/server/app/tasks.segments/_tree.segment.rsc +2 -2
  131. package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +2 -2
  132. package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
  133. package/.next/server/chunks/ssr/{_0d-fuox._.js → _0uw5cjt._.js} +2 -2
  134. package/.next/server/chunks/ssr/_0uw5cjt._.js.map +1 -0
  135. package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js +1 -1
  136. package/.next/server/chunks/ssr/app_tasks_page_tsx_0z-d6mp._.js.map +1 -1
  137. package/.next/server/middleware-build-manifest.js +3 -3
  138. package/.next/server/pages/404.html +2 -2
  139. package/.next/server/pages/500.html +1 -1
  140. package/.next/server/server-reference-manifest.js +1 -1
  141. package/.next/server/server-reference-manifest.json +1 -1
  142. package/.next/static/chunks/0xh3wr5rwvifr.css +2 -0
  143. package/.next/static/chunks/11v5tec4s1168.js +1 -0
  144. package/.next/trace +2 -2
  145. package/.next/trace-build +1 -1
  146. package/app/tasks/page.tsx +44 -24
  147. package/package.json +1 -1
  148. package/.next/server/chunks/ssr/_0d-fuox._.js.map +0 -1
  149. package/.next/static/chunks/0m328uz90rp81.js +0 -1
  150. package/.next/static/chunks/0p4_o2jw2v9n_.css +0 -2
  151. /package/.next/static/{aliOmgYOuDD7xT9T9MLOA → kyIvxswGu-u-KGQRAaXfV}/_buildManifest.js +0 -0
  152. /package/.next/static/{aliOmgYOuDD7xT9T9MLOA → kyIvxswGu-u-KGQRAaXfV}/_clientMiddlewareManifest.js +0 -0
  153. /package/.next/static/{aliOmgYOuDD7xT9T9MLOA → kyIvxswGu-u-KGQRAaXfV}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../app/components/utils.ts","../../../../app/components/EmptyState.tsx","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/style.js","../../../../app/components/AliasAvatar.tsx"],"sourcesContent":["export function timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nexport function statusColor(status: string, hasSse: boolean): string {\n if (hasSse && status === 'working') return 'bg-green-500';\n if (hasSse && status === 'idle') return 'bg-emerald-400';\n if (hasSse) return 'bg-blue-400';\n if (status === 'offline') return 'bg-gray-500';\n return 'bg-yellow-400';\n}\n\nexport function formatUptime(seconds: number): string {\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n if (h > 0) return `${h}h ${m}m`;\n return `${m}m`;\n}\n","'use client';\n\nimport Link from 'next/link';\n\nexport type EmptyVariant = 'nodes' | 'tasks' | 'messages' | 'logs' | 'tokens' | 'networks' | 'generic';\n\ninterface EmptyStateProps {\n /** Picks the icon glyph and default copy if title/sub omitted. */\n variant?: EmptyVariant;\n /** Optional override headline. */\n title?: string;\n /** Optional override sub-copy. */\n sub?: string;\n /** Optional CTA: text + href (internal) or onClick. */\n cta?: { label: string; href?: string; onClick?: () => void };\n /** Compact mode for in-card empty states (smaller padding). */\n compact?: boolean;\n}\n\nconst DEFAULTS: Record<EmptyVariant, { title: string; sub: string }> = {\n nodes: { title: 'No agents in this network', sub: 'Agent sessions will appear here once they connect to the CommHub.' },\n tasks: { title: 'No tasks yet', sub: 'Tasks will appear here when agents send them via CommHub.' },\n messages: { title: 'No messages', sub: 'Messages between agents will appear here.' },\n logs: { title: 'No audit logs', sub: 'Events will appear here when users register, login, or perform actions.' },\n tokens: { title: 'No API tokens', sub: 'Create one to authenticate CLI tools and external integrations.' },\n networks: { title: 'No networks found', sub: 'Create one or sign in with V3 auth to see your networks.' },\n generic: { title: 'Nothing here yet', sub: 'Data will appear here once available.' },\n};\n\n/**\n * Minimal monochrome SVG glyphs per variant. No filled shapes, no gradients,\n * no AI-decoration — just thin-stroke line art that fades into the page.\n * 64×64 viewBox; rendered at 56×56 (compact 40×40).\n */\nfunction Glyph({ variant, size }: { variant: EmptyVariant; size: number }) {\n const s = { width: size, height: size };\n const baseProps = {\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.25,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n };\n\n switch (variant) {\n case 'nodes':\n // Mesh with dashed edges = \"nodes will land here\"\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"14\" r=\"4\" />\n <circle cx=\"14\" cy=\"44\" r=\"4\" />\n <circle cx=\"50\" cy=\"44\" r=\"4\" />\n <line x1=\"32\" y1=\"18\" x2=\"14\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"32\" y1=\"18\" x2=\"50\" y2=\"40\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <line x1=\"18\" y1=\"44\" x2=\"46\" y2=\"44\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n </g>\n </svg>\n );\n case 'tasks':\n // Empty checkbox list\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <rect x=\"14\" y=\"14\" width=\"36\" height=\"6\" rx=\"1.5\" />\n <rect x=\"14\" y=\"26\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.6\" />\n <rect x=\"14\" y=\"38\" width=\"36\" height=\"6\" rx=\"1.5\" opacity=\"0.35\" />\n </g>\n </svg>\n );\n case 'messages':\n // Speech bubble outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M14 18 h36 a3 3 0 0 1 3 3 v18 a3 3 0 0 1 -3 3 h-18 l-8 6 v-6 h-10 a3 3 0 0 1 -3 -3 v-18 a3 3 0 0 1 3 -3 z\" />\n <line x1=\"22\" y1=\"28\" x2=\"42\" y2=\"28\" opacity=\"0.5\" />\n <line x1=\"22\" y1=\"34\" x2=\"36\" y2=\"34\" opacity=\"0.5\" />\n </g>\n </svg>\n );\n case 'logs':\n // Document with lines\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <path d=\"M18 12 h22 l8 8 v32 a2 2 0 0 1 -2 2 h-28 a2 2 0 0 1 -2 -2 v-38 a2 2 0 0 1 2 -2 z\" />\n <path d=\"M40 12 v8 h8\" opacity=\"0.6\" />\n <line x1=\"24\" y1=\"32\" x2=\"40\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"24\" y1=\"38\" x2=\"40\" y2=\"38\" opacity=\"0.4\" />\n <line x1=\"24\" y1=\"44\" x2=\"34\" y2=\"44\" opacity=\"0.25\" />\n </g>\n </svg>\n );\n case 'tokens':\n // Key outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"22\" cy=\"32\" r=\"8\" />\n <line x1=\"30\" y1=\"32\" x2=\"54\" y2=\"32\" />\n <line x1=\"44\" y1=\"32\" x2=\"44\" y2=\"38\" />\n <line x1=\"50\" y1=\"32\" x2=\"50\" y2=\"40\" />\n </g>\n </svg>\n );\n case 'networks':\n // Globe-ish concentric ovals\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"18\" />\n <ellipse cx=\"32\" cy=\"32\" rx=\"18\" ry=\"9\" opacity=\"0.55\" />\n <line x1=\"14\" y1=\"32\" x2=\"50\" y2=\"32\" opacity=\"0.55\" />\n <line x1=\"32\" y1=\"14\" x2=\"32\" y2=\"50\" opacity=\"0.55\" />\n </g>\n </svg>\n );\n case 'generic':\n default:\n // Soft sparkle outline\n return (\n <svg viewBox=\"0 0 64 64\" {...s}>\n <g {...baseProps}>\n <circle cx=\"32\" cy=\"32\" r=\"14\" strokeDasharray=\"3 3\" opacity=\"0.6\" />\n <circle cx=\"32\" cy=\"32\" r=\"3\" />\n </g>\n </svg>\n );\n }\n}\n\nexport function EmptyState({ variant = 'generic', title, sub, cta, compact = false }: EmptyStateProps) {\n const d = DEFAULTS[variant];\n const headline = title ?? d.title;\n const subcopy = sub ?? d.sub;\n const iconSize = compact ? 40 : 56;\n\n return (\n <div className={`text-center ${compact ? 'py-8' : 'py-16'} px-4`} role=\"status\">\n <div className=\"anet-empty-glyph inline-flex items-center justify-center mb-4 text-gray-500\" aria-hidden>\n <Glyph variant={variant} size={iconSize} />\n </div>\n <h3 className={`font-medium text-gray-300 ${compact ? 'text-sm' : 'text-base'}`}>{headline}</h3>\n {subcopy && (\n <p className={`text-gray-500 ${compact ? 'text-xs mt-1.5' : 'text-sm mt-2'} max-w-md mx-auto leading-relaxed`}>\n {subcopy}\n </p>\n )}\n {cta && (\n <div className=\"mt-4\">\n {cta.href ? (\n <Link href={cta.href} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </Link>\n ) : (\n <button onClick={cta.onClick} className=\"inline-flex items-center gap-1.5 text-sm font-medium text-cyan-400 hover:text-cyan-300\">\n {cta.label}\n <span aria-hidden>→</span>\n </button>\n )}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Overview-specific variant with a hint about cross-network global count.\n * Kept here so /app/page.tsx can drop in without ceremony.\n */\nexport function NodesEmptyState({ hint }: { hint?: { global_count?: number; filtered_network?: string } }) {\n if (hint?.global_count) {\n return (\n <EmptyState\n variant=\"nodes\"\n title=\"No agents in this network\"\n sub={`Server has ${hint.global_count} nodes globally, but none are registered to the current network. Switch network or contact admin.`}\n />\n );\n }\n return (\n <EmptyState\n variant=\"nodes\"\n cta={{ label: 'Run anet quickstart', href: 'https://anet.sh' }}\n />\n );\n}\n","require('client-only');\nvar React = require('react');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n/*\nBased on Glamor's sheet\nhttps://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js\n*/ function _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nvar isProd = typeof process !== \"undefined\" && process.env && process.env.NODE_ENV === \"production\";\nvar isString = function(o) {\n return Object.prototype.toString.call(o) === \"[object String]\";\n};\nvar StyleSheet = /*#__PURE__*/ function() {\n function StyleSheet(param) {\n var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? \"stylesheet\" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;\n invariant$1(isString(name), \"`name` must be a string\");\n this._name = name;\n this._deletedRulePlaceholder = \"#\" + name + \"-deleted-rule____{}\";\n invariant$1(typeof optimizeForSpeed === \"boolean\", \"`optimizeForSpeed` must be a boolean\");\n this._optimizeForSpeed = optimizeForSpeed;\n this._serverSheet = undefined;\n this._tags = [];\n this._injected = false;\n this._rulesCount = 0;\n var node = typeof window !== \"undefined\" && document.querySelector('meta[property=\"csp-nonce\"]');\n this._nonce = node ? node.getAttribute(\"content\") : null;\n }\n var _proto = StyleSheet.prototype;\n _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {\n invariant$1(typeof bool === \"boolean\", \"`setOptimizeForSpeed` accepts a boolean\");\n invariant$1(this._rulesCount === 0, \"optimizeForSpeed cannot be when rules have already been inserted\");\n this.flush();\n this._optimizeForSpeed = bool;\n this.inject();\n };\n _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {\n return this._optimizeForSpeed;\n };\n _proto.inject = function inject() {\n var _this = this;\n invariant$1(!this._injected, \"sheet already injected\");\n this._injected = true;\n if (typeof window !== \"undefined\" && this._optimizeForSpeed) {\n this._tags[0] = this.makeStyleTag(this._name);\n this._optimizeForSpeed = \"insertRule\" in this.getSheet();\n if (!this._optimizeForSpeed) {\n if (!isProd) {\n console.warn(\"StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.\");\n }\n this.flush();\n this._injected = true;\n }\n return;\n }\n this._serverSheet = {\n cssRules: [],\n insertRule: function(rule, index) {\n if (typeof index === \"number\") {\n _this._serverSheet.cssRules[index] = {\n cssText: rule\n };\n } else {\n _this._serverSheet.cssRules.push({\n cssText: rule\n });\n }\n return index;\n },\n deleteRule: function(index) {\n _this._serverSheet.cssRules[index] = null;\n }\n };\n };\n _proto.getSheetForTag = function getSheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n }\n // this weirdness brought to you by firefox\n for(var i = 0; i < document.styleSheets.length; i++){\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n };\n _proto.getSheet = function getSheet() {\n return this.getSheetForTag(this._tags[this._tags.length - 1]);\n };\n _proto.insertRule = function insertRule(rule, index) {\n invariant$1(isString(rule), \"`insertRule` accepts only strings\");\n if (typeof window === \"undefined\") {\n if (typeof index !== \"number\") {\n index = this._serverSheet.cssRules.length;\n }\n this._serverSheet.insertRule(rule, index);\n return this._rulesCount++;\n }\n if (this._optimizeForSpeed) {\n var sheet = this.getSheet();\n if (typeof index !== \"number\") {\n index = sheet.cssRules.length;\n }\n // this weirdness for perf, and chrome's weird bug\n // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n return -1;\n }\n } else {\n var insertionPoint = this._tags[index];\n this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));\n }\n return this._rulesCount++;\n };\n _proto.replaceRule = function replaceRule(index, rule) {\n if (this._optimizeForSpeed || typeof window === \"undefined\") {\n var sheet = typeof window !== \"undefined\" ? this.getSheet() : this._serverSheet;\n if (!rule.trim()) {\n rule = this._deletedRulePlaceholder;\n }\n if (!sheet.cssRules[index]) {\n // @TBD Should we throw an error?\n return index;\n }\n sheet.deleteRule(index);\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n // In order to preserve the indices we insert a deleteRulePlaceholder\n sheet.insertRule(this._deletedRulePlaceholder, index);\n }\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"old rule at index `\" + index + \"` not found\");\n tag.textContent = rule;\n }\n return index;\n };\n _proto.deleteRule = function deleteRule(index) {\n if (typeof window === \"undefined\") {\n this._serverSheet.deleteRule(index);\n return;\n }\n if (this._optimizeForSpeed) {\n this.replaceRule(index, \"\");\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"rule at index `\" + index + \"` not found\");\n tag.parentNode.removeChild(tag);\n this._tags[index] = null;\n }\n };\n _proto.flush = function flush() {\n this._injected = false;\n this._rulesCount = 0;\n if (typeof window !== \"undefined\") {\n this._tags.forEach(function(tag) {\n return tag && tag.parentNode.removeChild(tag);\n });\n this._tags = [];\n } else {\n // simpler on server\n this._serverSheet.cssRules = [];\n }\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n if (typeof window === \"undefined\") {\n return this._serverSheet.cssRules;\n }\n return this._tags.reduce(function(rules, tag) {\n if (tag) {\n rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {\n return rule.cssText === _this._deletedRulePlaceholder ? null : rule;\n }));\n } else {\n rules.push(null);\n }\n return rules;\n }, []);\n };\n _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {\n if (cssString) {\n invariant$1(isString(cssString), \"makeStyleTag accepts only strings as second parameter\");\n }\n var tag = document.createElement(\"style\");\n if (this._nonce) tag.setAttribute(\"nonce\", this._nonce);\n tag.type = \"text/css\";\n tag.setAttribute(\"data-\" + name, \"\");\n if (cssString) {\n tag.appendChild(document.createTextNode(cssString));\n }\n var head = document.head || document.getElementsByTagName(\"head\")[0];\n if (relativeToTag) {\n head.insertBefore(tag, relativeToTag);\n } else {\n head.appendChild(tag);\n }\n return tag;\n };\n _createClass(StyleSheet, [\n {\n key: \"length\",\n get: function get() {\n return this._rulesCount;\n }\n }\n ]);\n return StyleSheet;\n}();\nfunction invariant$1(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheet: \" + message + \".\");\n }\n}\n\nfunction hash(str) {\n var _$hash = 5381, i = str.length;\n while(i){\n _$hash = _$hash * 33 ^ str.charCodeAt(--i);\n }\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;\n}\nvar stringHash = hash;\n\nvar sanitize = function(rule) {\n return rule.replace(/\\/style/gi, \"\\\\/style\");\n};\nvar cache = {};\n/**\n * computeId\n *\n * Compute and memoize a jsx id from a basedId and optionally props.\n */ function computeId(baseId, props) {\n if (!props) {\n return \"jsx-\" + baseId;\n }\n var propsToString = String(props);\n var key = baseId + propsToString;\n if (!cache[key]) {\n cache[key] = \"jsx-\" + stringHash(baseId + \"-\" + propsToString);\n }\n return cache[key];\n}\n/**\n * computeSelector\n *\n * Compute and memoize dynamic selectors.\n */ function computeSelector(id, css) {\n var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;\n // Sanitize SSR-ed CSS.\n // Client side code doesn't need to be sanitized since we use\n // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).\n if (typeof window === \"undefined\") {\n css = sanitize(css);\n }\n var idcss = id + css;\n if (!cache[idcss]) {\n cache[idcss] = css.replace(selectoPlaceholderRegexp, id);\n }\n return cache[idcss];\n}\n\nfunction mapRulesToStyle(cssRules, options) {\n if (options === void 0) options = {};\n return cssRules.map(function(args) {\n var id = args[0];\n var css = args[1];\n return /*#__PURE__*/ React__default[\"default\"].createElement(\"style\", {\n id: \"__\" + id,\n // Avoid warnings upon render with a key\n key: \"__\" + id,\n nonce: options.nonce ? options.nonce : undefined,\n dangerouslySetInnerHTML: {\n __html: css\n }\n });\n });\n}\nvar StyleSheetRegistry = /*#__PURE__*/ function() {\n function StyleSheetRegistry(param) {\n var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;\n this._sheet = styleSheet || new StyleSheet({\n name: \"styled-jsx\",\n optimizeForSpeed: optimizeForSpeed\n });\n this._sheet.inject();\n if (styleSheet && typeof optimizeForSpeed === \"boolean\") {\n this._sheet.setOptimizeForSpeed(optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n }\n var _proto = StyleSheetRegistry.prototype;\n _proto.add = function add(props) {\n var _this = this;\n if (undefined === this._optimizeForSpeed) {\n this._optimizeForSpeed = Array.isArray(props.children);\n this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n if (typeof window !== \"undefined\" && !this._fromServer) {\n this._fromServer = this.selectFromServer();\n this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {\n acc[tagName] = 0;\n return acc;\n }, {});\n }\n var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;\n // Deduping: just increase the instances count.\n if (styleId in this._instancesCounts) {\n this._instancesCounts[styleId] += 1;\n return;\n }\n var indices = rules.map(function(rule) {\n return _this._sheet.insertRule(rule);\n })// Filter out invalid rules\n .filter(function(index) {\n return index !== -1;\n });\n this._indices[styleId] = indices;\n this._instancesCounts[styleId] = 1;\n };\n _proto.remove = function remove(props) {\n var _this = this;\n var styleId = this.getIdAndRules(props).styleId;\n invariant(styleId in this._instancesCounts, \"styleId: `\" + styleId + \"` not found\");\n this._instancesCounts[styleId] -= 1;\n if (this._instancesCounts[styleId] < 1) {\n var tagFromServer = this._fromServer && this._fromServer[styleId];\n if (tagFromServer) {\n tagFromServer.parentNode.removeChild(tagFromServer);\n delete this._fromServer[styleId];\n } else {\n this._indices[styleId].forEach(function(index) {\n return _this._sheet.deleteRule(index);\n });\n delete this._indices[styleId];\n }\n delete this._instancesCounts[styleId];\n }\n };\n _proto.update = function update(props, nextProps) {\n this.add(nextProps);\n this.remove(props);\n };\n _proto.flush = function flush() {\n this._sheet.flush();\n this._sheet.inject();\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {\n return [\n styleId,\n _this._fromServer[styleId]\n ];\n }) : [];\n var cssRules = this._sheet.cssRules();\n return fromServer.concat(Object.keys(this._indices).map(function(styleId) {\n return [\n styleId,\n _this._indices[styleId].map(function(index) {\n return cssRules[index].cssText;\n }).join(_this._optimizeForSpeed ? \"\" : \"\\n\")\n ];\n })// filter out empty rules\n .filter(function(rule) {\n return Boolean(rule[1]);\n }));\n };\n _proto.styles = function styles(options) {\n return mapRulesToStyle(this.cssRules(), options);\n };\n _proto.getIdAndRules = function getIdAndRules(props) {\n var css = props.children, dynamic = props.dynamic, id = props.id;\n if (dynamic) {\n var styleId = computeId(id, dynamic);\n return {\n styleId: styleId,\n rules: Array.isArray(css) ? css.map(function(rule) {\n return computeSelector(styleId, rule);\n }) : [\n computeSelector(styleId, css)\n ]\n };\n }\n return {\n styleId: computeId(id),\n rules: Array.isArray(css) ? css : [\n css\n ]\n };\n };\n /**\n * selectFromServer\n *\n * Collects style tags from the document with id __jsx-XXX\n */ _proto.selectFromServer = function selectFromServer() {\n var elements = Array.prototype.slice.call(document.querySelectorAll('[id^=\"__jsx-\"]'));\n return elements.reduce(function(acc, element) {\n var id = element.id.slice(2);\n acc[id] = element;\n return acc;\n }, {});\n };\n return StyleSheetRegistry;\n}();\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheetRegistry: \" + message + \".\");\n }\n}\nvar StyleSheetContext = /*#__PURE__*/ React.createContext(null);\nStyleSheetContext.displayName = \"StyleSheetContext\";\nfunction createStyleRegistry() {\n return new StyleSheetRegistry();\n}\nfunction StyleRegistry(param) {\n var configuredRegistry = param.registry, children = param.children;\n var rootRegistry = React.useContext(StyleSheetContext);\n var ref = React.useState(function() {\n return rootRegistry || configuredRegistry || createStyleRegistry();\n }), registry = ref[0];\n return /*#__PURE__*/ React__default[\"default\"].createElement(StyleSheetContext.Provider, {\n value: registry\n }, children);\n}\nfunction useStyleRegistry() {\n return React.useContext(StyleSheetContext);\n}\n\n// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.\n// https://github.com/reactwg/react-18/discussions/110\nvar useInsertionEffect = React__default[\"default\"].useInsertionEffect || React__default[\"default\"].useLayoutEffect;\nvar defaultRegistry = typeof window !== \"undefined\" ? createStyleRegistry() : undefined;\nfunction JSXStyle(props) {\n var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();\n // If `registry` does not exist, we do nothing here.\n if (!registry) {\n return null;\n }\n if (typeof window === \"undefined\") {\n registry.add(props);\n return null;\n }\n useInsertionEffect(function() {\n registry.add(props);\n return function() {\n registry.remove(props);\n };\n // props.children can be string[], will be striped since id is identical\n }, [\n props.id,\n String(props.dynamic)\n ]);\n return null;\n}\nJSXStyle.dynamic = function(info) {\n return info.map(function(tagInfo) {\n var baseId = tagInfo[0];\n var props = tagInfo[1];\n return computeId(baseId, props);\n }).join(\" \");\n};\n\nexports.StyleRegistry = StyleRegistry;\nexports.createStyleRegistry = createStyleRegistry;\nexports.style = JSXStyle;\nexports.useStyleRegistry = useStyleRegistry;\n","module.exports = require('./dist/index').style\n","/** Hue-hashed avatar pill for agent aliases. Same alias → same color across\n * every page (Messages, Nodes, TopoGraph). Use the `size` prop for inline\n * pills (16/20) vs card headers (28). Round 21 introduced the palette;\n * round 22 promotes it from app/messages to a shared component. */\n\nconst AVATAR_HUES = [180, 200, 220, 270, 300, 330, 30, 90];\n\nexport function aliasAvatarColors(alias: string): { bg: string; ring: string; text: string } {\n let h = 0;\n for (let i = 0; i < alias.length; i++) h = (h * 31 + alias.charCodeAt(i)) >>> 0;\n const hue = AVATAR_HUES[h % AVATAR_HUES.length];\n return {\n bg: `hsl(${hue} 55% 22%)`,\n ring: `hsl(${hue} 60% 45%)`,\n text: `hsl(${hue} 80% 78%)`,\n };\n}\n\nexport function aliasInitial(alias?: string): string {\n if (!alias) return '·';\n const ch = alias.trim().match(/[\\p{L}\\p{N}]/u)?.[0] || alias.trim()[0] || '·';\n return ch.toUpperCase();\n}\n\ninterface AliasAvatarProps {\n alias: string;\n size?: number;\n className?: string;\n}\n\nexport function AliasAvatar({ alias, size = 28, className = '' }: AliasAvatarProps) {\n const c = aliasAvatarColors(alias);\n const fs = Math.max(9, Math.round(size * 0.42));\n return (\n <span\n className={`anet-alias-avatar inline-flex items-center justify-center rounded-full border shrink-0 font-semibold ${className}`}\n style={{\n width: size,\n height: size,\n fontSize: fs,\n backgroundColor: c.bg,\n borderColor: c.ring,\n color: c.text,\n }}\n title={alias}\n aria-hidden\n >\n {aliasInitial(alias)}\n </span>\n );\n}\n"],"names":["timeAgo","dateStr","diff","Date","now","replace","getTime","s","Math","floor","statusColor","status","hasSse","formatUptime","seconds","h","m","DEFAULTS","nodes","title","sub","tasks","messages","logs","tokens","networks","generic","Glyph","variant","size","width","height","baseProps","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","viewBox","cx","cy","r","x1","y1","x2","y2","strokeDasharray","opacity","x","y","rx","d","ry","EmptyState","cta","compact","headline","subcopy","iconSize","className","role","href","label","onClick","NodesEmptyState","hint","global_count","React","_interopDefaultLegacy","e","React__default","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","isProd","process","env","isString","o","toString","call","StyleSheet","param","ref","_name","name","_optimizeForSpeed","optimizeForSpeed","invariant$1","_deletedRulePlaceholder","_serverSheet","undefined","_tags","_injected","_rulesCount","node","document","querySelector","_nonce","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","_this","cssRules","insertRule","rule","index","cssText","push","deleteRule","getSheetForTag","tag","sheet","styleSheets","ownerNode","getSheet","insertionPoint","replaceRule","trim","error","console","warn","makeStyleTag","cssString","relativeToTag","createElement","setAttribute","type","appendChild","createTextNode","head","getElementsByTagName","insertBefore","get","condition","message","Error","hash","str","_$hash","charCodeAt","stringHash","sanitize","cache","computeId","baseId","propsToString","String","computeSelector","id","css","selectoPlaceholderRegexp","idcss","mapRulesToStyle","options","map","args","nonce","dangerouslySetInnerHTML","__html","StyleSheetRegistry","_styleSheet","styleSheet","_sheet","_fromServer","_indices","_instancesCounts","add","Array","isArray","children","getIdAndRules","styleId","rules","indices","filter","remove","invariant","tagFromServer","parentNode","removeChild","forEach","update","nextProps","fromServer","keys","concat","join","Boolean","styles","dynamic","selectFromServer","elements","slice","querySelectorAll","reduce","acc","element","StyleSheetContext","createContext","displayName","createStyleRegistry","StyleRegistry","configuredRegistry","registry","rootRegistry","useContext","useState","Provider","value","useStyleRegistry","useInsertionEffect","useLayoutEffect","defaultRegistry","JSXStyle","info","tagInfo","exports","style","module","AVATAR_HUES","aliasAvatarColors","alias","hue","bg","ring","text","aliasInitial","ch","match","toUpperCase","AliasAvatar","c","fs","max","round","fontSize","backgroundColor","borderColor","color"],"mappings":"6DAkBO,SAASa,AAAaC,CAAe,EAC1C,IAAMC,EAAIP,KAAKC,KAAK,CAACK,EAAU,MACzBE,EAAIR,KAAKC,KAAK,CAAEK,EAAU,KAAQ,WACxC,AAAIC,EAAI,EAAU,CAAP,AAAO,EAAGA,EAAE,EAAE,EAAEC,EAAE,CAAC,CAAC,CACxB,CAAA,EAAGA,EAAE,CAAC,CAAC,AAChB,cAvBO,SAAiBf,AAARD,CAAuB,EACrC,GAAI,CAACC,EAAS,MAAO,KAErB,IAAMM,EAAIC,KAAKC,KAAK,CAACP,CADRC,KAAKC,GAAG,GAAK,IAAID,KAAKF,EAAQI,OAAO,CAAC,IAAK,KAAO,KAAKC,OAAO,EAAA,EAC/C,YAC5B,AAAIC,EAAI,GAAW,CAAP,AAAO,EAAGA,EAAE,KAAK,CAAC,CAC1BA,EAAI,KAAa,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,IAAI,KAAK,CAAC,CAC7CA,EAAI,MAAc,CAAP,AAAO,EAAGC,KAAKC,KAAK,CAACF,EAAI,MAAM,KAAK,CAAC,CAC7C,CAAA,EAAGC,KAAKC,KAAK,CAACF,EAAI,OAAO,KAAK,CAAC,AACxC,6CCNA,EAAA,EAAA,CAAA,CAAA,OAiBA,IAAMU,EAAiE,CACrEC,MAAU,CAAEC,MAAO,4BAA+BC,IAAK,mEAAoE,EAC3HC,MAAU,CAAEF,MAAO,eAA+BC,IAAK,2DAA4D,EACnHE,SAAU,CAAEH,MAAO,cAA+BC,IAAK,2CAA4C,EACnGG,KAAU,CAAEJ,MAAO,gBAA+BC,IAAK,yEAA0E,EACjII,OAAU,CAAEL,MAAO,gBAA+BC,IAAK,iEAAkE,EACzHK,SAAU,CAAEN,MAAO,oBAA+BC,IAAK,0DAA2D,EAClHM,QAAU,CAAEP,MAAO,mBAA+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AC,IAAI,EAAED,EAAI,SAAS,CAAC,CACzBE,KAAM,CAAC,IAAI,EAAEF,EAAI,SAAS,CAAC,CAC3BG,KAAM,CAAC,IAAI,EAAEH,EAAI,SAAS,CAAC,AAC7B,CACF,EAe8BD,GACtBW,EAAKlP,KAAKmP,GAAG,CAAC,EAAGnP,KAAKoP,KAAK,CAAQ,IAAP/N,IAClC,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CACC8B,UAAW,CAAC,qGAAqG,EAAEA,EAAAA,CAAW,CAC9HgL,MAAO,CACL7M,MAAOD,EACPE,OAAQF,EACRgO,SAAUH,EACVI,gBAAiBL,EAAER,EAAE,CACrBc,YAAaN,EAAEP,IAAI,CACnBc,MAAOP,EAAEN,IAAI,AACf,EACAhO,MAAO4N,EACP,aAAW,CAAA,CAAA,WAEGA,AA5BlB,CA4BKK,CA1BEC,CADIN,CADP,CAACA,AACYxG,IAAI,GADT,AACY+G,KAAK,CAAC,kBAAkB,CAAC,EAAE,EAAIP,EAAMxG,IAAI,EAAE,CAAC,EAAE,EAAI,GAAA,EAChEgH,WAAW,GAFF,KA+BrB","ignoreList":[2,3]}
@@ -1,3 +1,3 @@
1
- module.exports=[69474,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(22397),f=a.i(31626),g=a.i(43515);let h={created:"text-gray-400",delivered:"text-blue-400",running:"text-green-400",replied:"text-purple-400",failed:"text-red-400",closed:"text-gray-500"};function i({taskId:a,onClose:d}){let[e,j]=(0,c.useState)(null),[k,l]=(0,c.useState)([]),[m,n]=(0,c.useState)(!0);(0,c.useEffect)(()=>{(async()=>{try{let[b,c]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(a)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(a)}&limit=50`)]),d=await b.json(),e=await c.json();d.tasks?.[0]&&j(d.tasks[0]),l(e.events||[])}catch{}finally{n(!1)}})()},[a]);let o=e?[{label:"Created",time:e.created_at,color:"bg-gray-400"},{label:"Delivered",time:e.delivered_at,color:"bg-blue-400"},{label:"Started",time:e.started_at,color:"bg-green-400"},{label:"Completed",time:e.completed_at,color:"bg-purple-400"}]:[],p=e?.started_at&&e?.completed_at?Math.round((new Date(e.completed_at).getTime()-new Date(e.started_at).getTime())/1e3):null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:d,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40"}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:"Task Detail"}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500 mt-0.5",children:[a.slice(0,16),"..."]})]}),(0,b.jsx)("button",{onClick:d,className:"jsx-c3e56cbc81656d9 text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,b.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-c3e56cbc81656d9 w-5 h-5",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-c3e56cbc81656d9"})})})]}),m?(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 flex justify-center py-16",children:(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):e?(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 px-5 py-5 space-y-5",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-lg font-bold ${h[e.status]||"text-gray-400"}`,children:e.status}),"normal"!==e.priority&&(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-xs px-2 py-0.5 rounded border ${"high"===e.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:e.priority}),null!==p&&(0,b.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500",children:["⏱ ",p<60?`${p}s`:`${Math.floor(p/60)}m ${p%60}s`]})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-blue-400 font-medium",children:e.from_name||"--"}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:"→"}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-cyan-400 font-medium",children:e.to_name||"--"})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-3",children:"Timeline"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-3",children:o.map((a,c)=>(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex flex-col items-center",children:[(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-3 h-3 rounded-full ${a.time?a.color:"bg-gray-700"}`}),c<o.length-1&&(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-0.5 h-4 mt-1 ${a.time&&o[c+1]?.time?"bg-gray-600":"bg-gray-800"}`})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex-1",children:[(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 text-xs font-medium ${a.time?"text-gray-300":"text-gray-600"}`,children:a.label}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:a.time||"Pending"})]})]},a.label))})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap",children:e.content||"--"})]}),e.result&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:e.result})]}),k.length>0&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:["Events (",k.length,")"]}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-1.5 max-h-40 overflow-y-auto",children:k.map(a=>(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-[11px]",children:[(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 w-1.5 h-1.5 rounded-full shrink-0 ${"running"===a.to_status?"bg-green-400":"replied"===a.to_status?"bg-purple-400":"failed"===a.to_status?"bg-red-400":"bg-blue-400"}`}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-400",children:a.event_type}),a.from_status&&(0,b.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:[a.from_status,"→",a.to_status]}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600 ml-auto",children:(0,g.timeAgo)(a.created_at)})]},a.id))})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-600 space-y-1",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Task ID: ",e.task_id]}),e.expires_at&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Expires: ",e.expires_at]})]})]}):(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-center py-16 text-gray-500",children:"Task not found"})]}),(0,b.jsx)(f.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}var j=a.i(53142);let k=["","created","delivered","acked","running","replied","closed","failed","cancelled","expired"],l={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"},m={created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"};function n(a){let b=l[a]||"bg-gray-500/10 text-gray-400 border-gray-500/20";return`text-xs px-2 py-0.5 rounded-md border ${b}`}function o(a){return"high"===a?"text-red-400":"low"===a?"text-gray-600":"text-gray-400"}function p(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}function q(){let a,f,g,h=(0,d.useSearchParams)(),{networkId:q}=(0,e.useNetworkId)(),[r,s]=(0,c.useState)([]),[t,u]=(0,c.useState)(0),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)(new Set),[B,C]=(0,c.useState)(h.get("status")||""),[D,E]=(0,c.useState)(""),[F,G]=(0,c.useState)(""),[H,I]=(0,c.useState)(null),J=a=>{A(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},K=(0,c.useCallback)(async()=>{try{let a=new URLSearchParams;q&&a.set("network_id",q),B&&a.set("status",B),D&&a.set("from_name",D),F&&a.set("to_name",F),a.set("limit","100");let b=await fetch(`/api/hub/tasks?${a.toString()}`);if(401===b.status)return void window.location.assign("/login");let c=await b.json();s(c.tasks||[]),u(c.count??(c.tasks?.length||0)),y("")}catch(a){y(a instanceof Error?a.message:"fetch failed")}finally{w(!1)}},[B,D,F,q]);return(0,c.useEffect)(()=>{w(!0),K();let a=setInterval(K,5e3);return()=>clearInterval(a)},[K]),(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Tasks"}),(0,b.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:t})]}),(0,b.jsx)("div",{className:"anet-tabstrip-wrap mb-4",children:(0,b.jsx)("div",{className:"anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin",children:["",...k.filter(Boolean)].map(a=>(0,b.jsxs)("button",{onClick:()=>C(a),className:`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap ${B===a?`${l[a]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40"}`,children:[a&&(0,b.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:m[a]||"#6b7280"}}),(0,b.jsx)("span",{children:a||"All"})]},a))})}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,b.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:"From node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"}),(0,b.jsx)("input",{type:"text",value:F,onChange:a=>G(a.target.value),placeholder:"To node...",className:"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40"})]}),r.length>0&&!B&&(a={},r.forEach(b=>{a[b.status]=(a[b.status]||0)+1}),f=r.length||1,(g=[{key:"running",color:"bg-green-500",text:"text-green-400"},{key:"delivered",color:"bg-blue-500",text:"text-blue-400"},{key:"replied",color:"bg-purple-500",text:"text-purple-400"},{key:"failed",color:"bg-red-500",text:"text-red-400"},{key:"expired",color:"bg-orange-500",text:"text-orange-400"}].filter(b=>a[b.key])).length?(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:g.map(c=>(0,b.jsx)("div",{className:c.color,style:{width:`${a[c.key]/f*100}%`}},c.key))}),(0,b.jsx)("div",{className:"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500",children:g.map(c=>(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${c.color} mr-1`}),a[c.key]," ",c.key]},c.key))})]}):null),x&&(0,b.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:x}),v?(0,b.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(a=>(0,b.jsx)("div",{className:"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40"},a))}):0===r.length?(0,b.jsx)(j.EmptyState,{variant:"tasks",sub:B||D||F?"No tasks match the current filters. Try clearing them.":"Tasks will appear here when agents send them via CommHub."}):(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,b.jsx)("div",{className:"col-span-1",children:"Status"}),(0,b.jsx)("div",{className:"col-span-2",children:"From"}),(0,b.jsx)("div",{className:"col-span-2",children:"To"}),(0,b.jsx)("div",{className:"col-span-4",children:"Content"}),(0,b.jsx)("div",{className:"col-span-1",children:"Priority"}),(0,b.jsx)("div",{className:"col-span-2",children:"Time"})]}),r.map(a=>{let c=z.has(a.task_id);return(0,b.jsxs)("div",{className:`anet-task-row group bg-[#111128] border rounded-lg px-4 py-3 transition-all duration-200 cursor-pointer ${c?"border-[#3a3a5a] shadow-lg shadow-black/20":"border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]"}`,onClick:()=>J(a.task_id),role:"button",tabIndex:0,"aria-expanded":c,onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),J(a.task_id))},children:[(0,b.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,b.jsx)("div",{className:"col-span-1",children:(0,b.jsx)("span",{className:n(a.status),children:a.status})}),(0,b.jsx)("div",{className:"col-span-2 text-sm text-blue-400 truncate",title:a.from_name,children:a.from_name||"--"}),(0,b.jsx)("div",{className:"col-span-2 text-sm text-cyan-400 truncate",title:a.to_name,children:a.to_name||"--"}),(0,b.jsx)("div",{className:"col-span-4 text-xs text-gray-400 truncate",title:a.content,children:a.content||"--"}),(0,b.jsx)("div",{className:"col-span-1",children:(0,b.jsx)("span",{className:`text-xs ${o(a.priority)}`,children:a.priority||"normal"})}),(0,b.jsxs)("div",{className:"col-span-2 text-xs text-gray-500 flex items-center justify-between gap-2",title:a.created_at,children:[(0,b.jsx)("span",{className:"truncate",children:p(a.created_at)}),(0,b.jsx)("svg",{"aria-hidden":!0,className:`shrink-0 text-gray-600 group-hover:text-gray-400 transition-transform duration-200 ${c?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,b.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:n(a.status),children:a.status}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:`text-xs ${o(a.priority)}`,children:a.priority||"normal"}),(0,b.jsx)("svg",{"aria-hidden":!0,className:`text-gray-600 transition-transform duration-200 ${c?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,b.jsxs)("div",{className:"text-xs text-gray-500",children:[(0,b.jsx)("span",{className:"text-blue-400",children:a.from_name||"--"}),(0,b.jsx)("span",{className:"text-gray-600 mx-1",children:"→"}),(0,b.jsx)("span",{className:"text-cyan-400",children:a.to_name||"--"})]}),(0,b.jsx)("div",{className:"text-xs text-gray-400 line-clamp-1",children:a.content||"--"}),(0,b.jsx)("div",{className:"text-xs text-gray-600",children:p(a.created_at)})]}),(0,b.jsx)("div",{className:`grid transition-all duration-300 ease-out ${c?"grid-rows-[1fr] opacity-100 mt-3":"grid-rows-[0fr] opacity-0"}`,"aria-hidden":!c,children:(0,b.jsx)("div",{className:"overflow-hidden",children:(0,b.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a] space-y-3",children:[a.content&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Content"}),(0,b.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:a.content})]}),a.result&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Result"}),(0,b.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto",children:a.result})]}),(0,b.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[["Created",a.created_at],["Delivered",a.delivered_at],["Started",a.started_at],["Completed",a.completed_at]].map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:"text-gray-600",children:[a,": "]}),(0,b.jsx)("span",{className:"text-gray-400",children:c?p(c):"--"})]},a))}),a.expires_at&&(0,b.jsxs)("div",{className:"text-xs",children:[(0,b.jsx)("span",{className:"text-gray-600",children:"Expires: "}),(0,b.jsx)("span",{className:"text-orange-400",children:a.expires_at})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"text-xs text-gray-600 truncate",title:a.task_id,children:["ID: ",a.task_id]}),(0,b.jsxs)("div",{className:"flex gap-2 shrink-0",children:[("failed"===a.status||"expired"===a.status)&&(0,b.jsx)("button",{onClick:async b=>{b.stopPropagation(),await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:a.to_name,task:a.content,priority:a.priority})}),K()},className:"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10",children:"Retry"}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),I(a.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})})})]},a.task_id)})]}),H&&(0,b.jsx)(i,{taskId:H,onClose:()=>I(null)})]})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading tasks..."}),children:(0,b.jsx)(q,{})})}],69474)}];
1
+ module.exports=[69474,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(22397),f=a.i(31626),g=a.i(43515);let h={created:"text-gray-400",delivered:"text-blue-400",running:"text-green-400",replied:"text-purple-400",failed:"text-red-400",closed:"text-gray-500"};function i({taskId:a,onClose:d}){let[e,j]=(0,c.useState)(null),[k,l]=(0,c.useState)([]),[m,n]=(0,c.useState)(!0);(0,c.useEffect)(()=>{(async()=>{try{let[b,c]=await Promise.all([fetch(`/api/hub/tasks?task_id=${encodeURIComponent(a)}`),fetch(`/api/hub/task-events?task_id=${encodeURIComponent(a)}&limit=50`)]),d=await b.json(),e=await c.json();d.tasks?.[0]&&j(d.tasks[0]),l(e.events||[])}catch{}finally{n(!1)}})()},[a]);let o=e?[{label:"Created",time:e.created_at,color:"bg-gray-400"},{label:"Delivered",time:e.delivered_at,color:"bg-blue-400"},{label:"Started",time:e.started_at,color:"bg-green-400"},{label:"Completed",time:e.completed_at,color:"bg-purple-400"}]:[],p=e?.started_at&&e?.completed_at?Math.round((new Date(e.completed_at).getTime()-new Date(e.started_at).getTime())/1e3):null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:d,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40"}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:"Task Detail"}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500 mt-0.5",children:[a.slice(0,16),"..."]})]}),(0,b.jsx)("button",{onClick:d,className:"jsx-c3e56cbc81656d9 text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]",children:(0,b.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-c3e56cbc81656d9 w-5 h-5",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12",className:"jsx-c3e56cbc81656d9"})})})]}),m?(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 flex justify-center py-16",children:(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}):e?(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 px-5 py-5 space-y-5",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-lg font-bold ${h[e.status]||"text-gray-400"}`,children:e.status}),"normal"!==e.priority&&(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 text-xs px-2 py-0.5 rounded border ${"high"===e.priority?"text-red-300 border-red-500/20":"text-gray-400 border-gray-600/20"}`,children:e.priority}),null!==p&&(0,b.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500",children:["⏱ ",p<60?`${p}s`:`${Math.floor(p/60)}m ${p%60}s`]})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-blue-400 font-medium",children:e.from_name||"--"}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:"→"}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-cyan-400 font-medium",children:e.to_name||"--"})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-3",children:"Timeline"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-3",children:o.map((a,c)=>(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex flex-col items-center",children:[(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-3 h-3 rounded-full ${a.time?a.color:"bg-gray-700"}`}),c<o.length-1&&(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 w-0.5 h-4 mt-1 ${a.time&&o[c+1]?.time?"bg-gray-600":"bg-gray-800"}`})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex-1",children:[(0,b.jsx)("div",{className:`jsx-c3e56cbc81656d9 text-xs font-medium ${a.time?"text-gray-300":"text-gray-600"}`,children:a.label}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:a.time||"Pending"})]})]},a.label))})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Input"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap",children:e.content||"--"})]}),e.result&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:"Output"}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto",children:e.result})]}),k.length>0&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 bg-[#111128] border border-[#2a2a4a] rounded-xl p-4",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-xs text-gray-500 uppercase mb-2",children:["Events (",k.length,")"]}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 space-y-1.5 max-h-40 overflow-y-auto",children:k.map(a=>(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-2 text-[11px]",children:[(0,b.jsx)("span",{className:`jsx-c3e56cbc81656d9 w-1.5 h-1.5 rounded-full shrink-0 ${"running"===a.to_status?"bg-green-400":"replied"===a.to_status?"bg-purple-400":"failed"===a.to_status?"bg-red-400":"bg-blue-400"}`}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-400",children:a.event_type}),a.from_status&&(0,b.jsxs)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600",children:[a.from_status,"→",a.to_status]}),(0,b.jsx)("span",{className:"jsx-c3e56cbc81656d9 text-gray-600 ml-auto",children:(0,g.timeAgo)(a.created_at)})]},a.id))})]}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-600 space-y-1",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Task ID: ",e.task_id]}),e.expires_at&&(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:["Expires: ",e.expires_at]})]})]}):(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-center py-16 text-gray-500",children:"Task not found"})]}),(0,b.jsx)(f.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}var j=a.i(53142),k=a.i(1720);let l=["","created","delivered","acked","running","replied","closed","failed","cancelled","expired"],m={created:"bg-gray-500/10 text-gray-400 border-gray-500/20",delivered:"bg-blue-500/10 text-blue-300 border-blue-500/20",acked:"bg-cyan-500/10 text-cyan-300 border-cyan-500/20",running:"bg-green-500/10 text-green-300 border-green-500/20",replied:"bg-purple-500/10 text-purple-300 border-purple-500/20",closed:"bg-gray-500/10 text-gray-500 border-gray-500/20",failed:"bg-red-500/10 text-red-300 border-red-500/20",cancelled:"bg-yellow-500/10 text-yellow-300 border-yellow-500/20",expired:"bg-orange-500/10 text-orange-300 border-orange-500/20"},n={created:"#9ca3af",delivered:"#60a5fa",acked:"#22d3ee",running:"#4ade80",replied:"#a78bfa",closed:"#6b7280",failed:"#f87171",cancelled:"#facc15",expired:"#fb923c"};function o(a){let b=m[a]||"bg-gray-500/10 text-gray-400 border-gray-500/20";return`text-xs px-2 py-0.5 rounded-md border ${b}`}function p(a){return"high"===a?"text-red-400":"low"===a?"text-gray-600":"text-gray-400"}function q(a){if(!a)return"--";let b=Math.floor((Date.now()-new Date(a.replace(" ","T")+"Z").getTime())/1e3);return b<60?`${b}s ago`:b<3600?`${Math.floor(b/60)}m ago`:b<86400?`${Math.floor(b/3600)}h ago`:`${Math.floor(b/86400)}d ago`}function r(){let a,f,g,h=(0,d.useSearchParams)(),{networkId:r}=(0,e.useNetworkId)(),[s,t]=(0,c.useState)([]),[u,v]=(0,c.useState)(0),[w,x]=(0,c.useState)(!0),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(new Set),[C,D]=(0,c.useState)(h.get("status")||""),[E,F]=(0,c.useState)(""),[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(null),K=a=>{B(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},L=(0,c.useCallback)(async()=>{try{let a=new URLSearchParams;r&&a.set("network_id",r),C&&a.set("status",C),E&&a.set("from_name",E),G&&a.set("to_name",G),a.set("limit","100");let b=await fetch(`/api/hub/tasks?${a.toString()}`);if(401===b.status)return void window.location.assign("/login");let c=await b.json();t(c.tasks||[]),v(c.count??(c.tasks?.length||0)),z("")}catch(a){z(a instanceof Error?a.message:"fetch failed")}finally{x(!1)}},[C,E,G,r]);return(0,c.useEffect)(()=>{x(!0),L();let a=setInterval(L,5e3);return()=>clearInterval(a)},[L]),(0,b.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,b.jsx)("h1",{className:"text-2xl font-bold text-white lg:ml-0 ml-10",children:"Tasks"}),(0,b.jsx)("span",{className:"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30",children:u})]}),(0,b.jsx)("div",{className:"anet-tabstrip-wrap mb-4",children:(0,b.jsx)("div",{className:"anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin",children:["",...l.filter(Boolean)].map(a=>(0,b.jsxs)("button",{onClick:()=>D(a),className:`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap ${C===a?`${m[a]||"bg-cyan-500/10 text-cyan-300 border-cyan-500/20"} border`:"text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40"}`,children:[a&&(0,b.jsx)("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:n[a]||"#6b7280"}}),(0,b.jsx)("span",{children:a||"All"})]},a))})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40",children:[(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"From"}),(0,b.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"any node",className:"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40",children:[(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-gray-600",children:"To"}),(0,b.jsx)("input",{type:"text",value:G,onChange:a=>H(a.target.value),placeholder:"any node",className:"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none"})]}),(C||E||G)&&(0,b.jsx)("button",{type:"button",onClick:()=>{D(""),F(""),H("")},className:"rounded-lg border border-gray-700 px-2.5 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:border-gray-600",children:"Clear filters"})]}),s.length>0&&!C&&(a={},s.forEach(b=>{a[b.status]=(a[b.status]||0)+1}),f=s.length||1,(g=[{key:"running",color:"bg-green-500",text:"text-green-400"},{key:"delivered",color:"bg-blue-500",text:"text-blue-400"},{key:"replied",color:"bg-purple-500",text:"text-purple-400"},{key:"failed",color:"bg-red-500",text:"text-red-400"},{key:"expired",color:"bg-orange-500",text:"text-orange-400"}].filter(b=>a[b.key])).length?(0,b.jsxs)("div",{className:"mb-6",children:[(0,b.jsx)("div",{className:"flex h-2 rounded-full overflow-hidden bg-gray-800",children:g.map(c=>(0,b.jsx)("div",{className:c.color,style:{width:`${a[c.key]/f*100}%`}},c.key))}),(0,b.jsx)("div",{className:"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500",children:g.map(c=>(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${c.color} mr-1`}),a[c.key]," ",c.key]},c.key))})]}):null),y&&(0,b.jsx)("div",{className:"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm",children:y}),w?(0,b.jsx)("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(a=>(0,b.jsx)("div",{className:"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40"},a))}):0===s.length?(0,b.jsx)(j.EmptyState,{variant:"tasks",sub:C||E||G?"No tasks match the current filters. Try clearing them.":"Tasks will appear here when agents send them via CommHub."}):(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase",children:[(0,b.jsx)("div",{className:"col-span-1",children:"Status"}),(0,b.jsx)("div",{className:"col-span-2",children:"From"}),(0,b.jsx)("div",{className:"col-span-2",children:"To"}),(0,b.jsx)("div",{className:"col-span-4",children:"Content"}),(0,b.jsx)("div",{className:"col-span-1",children:"Priority"}),(0,b.jsx)("div",{className:"col-span-2",children:"Time"})]}),s.map(a=>{let c=A.has(a.task_id);return(0,b.jsxs)("div",{className:`anet-task-row group bg-[#111128] border rounded-lg px-4 py-3 transition-all duration-200 cursor-pointer ${c?"border-[#3a3a5a] shadow-lg shadow-black/20":"border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]"}`,onClick:()=>K(a.task_id),role:"button",tabIndex:0,"aria-expanded":c,onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),K(a.task_id))},children:[(0,b.jsxs)("div",{className:"hidden sm:grid sm:grid-cols-12 gap-2 items-center",children:[(0,b.jsx)("div",{className:"col-span-1",children:(0,b.jsx)("span",{className:o(a.status),children:a.status})}),(0,b.jsxs)("div",{className:"col-span-2 flex items-center gap-1.5 min-w-0",title:a.from_name,children:[a.from_name&&(0,b.jsx)(k.AliasAvatar,{alias:a.from_name,size:18}),(0,b.jsx)("span",{className:"truncate text-sm text-gray-200",children:a.from_name||"--"})]}),(0,b.jsxs)("div",{className:"col-span-2 flex items-center gap-1.5 min-w-0",title:a.to_name,children:[a.to_name&&(0,b.jsx)(k.AliasAvatar,{alias:a.to_name,size:18}),(0,b.jsx)("span",{className:"truncate text-sm text-gray-200",children:a.to_name||"--"})]}),(0,b.jsx)("div",{className:"col-span-4 text-xs text-gray-400 truncate",title:a.content,children:a.content||"--"}),(0,b.jsx)("div",{className:"col-span-1",children:(0,b.jsx)("span",{className:`text-xs ${p(a.priority)}`,children:a.priority||"normal"})}),(0,b.jsxs)("div",{className:"col-span-2 text-xs text-gray-500 flex items-center justify-between gap-2",title:a.created_at,children:[(0,b.jsx)("span",{className:"truncate",children:q(a.created_at)}),(0,b.jsx)("svg",{"aria-hidden":!0,className:`shrink-0 text-gray-600 group-hover:text-gray-400 transition-transform duration-200 ${c?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,b.jsxs)("div",{className:"sm:hidden space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:o(a.status),children:a.status}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:`text-xs ${p(a.priority)}`,children:a.priority||"normal"}),(0,b.jsx)("svg",{"aria-hidden":!0,className:`text-gray-600 transition-transform duration-200 ${c?"rotate-180":""}`,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-gray-300 min-w-0",children:[a.from_name&&(0,b.jsx)(k.AliasAvatar,{alias:a.from_name,size:16}),(0,b.jsx)("span",{className:"truncate max-w-[40%]",children:a.from_name||"--"}),(0,b.jsx)("span",{className:"text-gray-600",children:"→"}),a.to_name&&(0,b.jsx)(k.AliasAvatar,{alias:a.to_name,size:16}),(0,b.jsx)("span",{className:"truncate max-w-[40%]",children:a.to_name||"--"})]}),(0,b.jsx)("div",{className:"text-xs text-gray-400 line-clamp-1",children:a.content||"--"}),(0,b.jsx)("div",{className:"text-xs text-gray-600",children:q(a.created_at)})]}),(0,b.jsx)("div",{className:`grid transition-all duration-300 ease-out ${c?"grid-rows-[1fr] opacity-100 mt-3":"grid-rows-[0fr] opacity-0"}`,"aria-hidden":!c,children:(0,b.jsx)("div",{className:"overflow-hidden",children:(0,b.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a] space-y-3",children:[a.content&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Content"}),(0,b.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]",children:a.content})]}),a.result&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs text-gray-600 mb-1",children:"Result"}),(0,b.jsx)("div",{className:"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto",children:a.result})]}),(0,b.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[["Created",a.created_at],["Delivered",a.delivered_at],["Started",a.started_at],["Completed",a.completed_at]].map(([a,c])=>(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{className:"text-gray-600",children:[a,": "]}),(0,b.jsx)("span",{className:"text-gray-400",children:c?q(c):"--"})]},a))}),a.expires_at&&(0,b.jsxs)("div",{className:"text-xs",children:[(0,b.jsx)("span",{className:"text-gray-600",children:"Expires: "}),(0,b.jsx)("span",{className:"text-orange-400",children:a.expires_at})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"text-xs text-gray-600 truncate",title:a.task_id,children:["ID: ",a.task_id]}),(0,b.jsxs)("div",{className:"flex gap-2 shrink-0",children:[("failed"===a.status||"expired"===a.status)&&(0,b.jsx)("button",{onClick:async b=>{b.stopPropagation(),await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:a.to_name,task:a.content,priority:a.priority})}),L()},className:"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10",children:"Retry"}),(0,b.jsx)("button",{onClick:b=>{b.stopPropagation(),J(a.task_id)},className:"text-xs text-cyan-400 hover:text-cyan-300",children:"Detail →"})]})]})]})})})]},a.task_id)})]}),I&&(0,b.jsx)(i,{taskId:I,onClose:()=>J(null)})]})}a.s(["default",0,function(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono",children:"Loading tasks..."}),children:(0,b.jsx)(r,{})})}],69474)}];
2
2
 
3
3
  //# sourceMappingURL=app_tasks_page_tsx_0z-d6mp._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../app/tasks/page.tsx","../../../../app/components/TaskDrawer.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, useCallback, Suspense } from 'react';\nimport { useSearchParams } from 'next/navigation';\nimport Link from 'next/link';\nimport { useNetworkId } from '../lib/network-context';\nimport { TaskDrawer } from '../components/TaskDrawer';\nimport { EmptyState } from '../components/EmptyState';\n\ninterface Task {\n task_id: string;\n from_name: string;\n to_name: string;\n status: string;\n priority: string;\n content: string;\n result: string;\n created_at: string;\n updated_at: string;\n delivered_at: string;\n started_at: string;\n completed_at: string;\n expires_at: string;\n}\n\nconst STATUS_OPTIONS = [\n '',\n 'created',\n 'delivered',\n 'acked',\n 'running',\n 'replied',\n 'closed',\n 'failed',\n 'cancelled',\n 'expired',\n];\n\nconst STATUS_COLORS: Record<string, string> = {\n created: 'bg-gray-500/10 text-gray-400 border-gray-500/20',\n delivered: 'bg-blue-500/10 text-blue-300 border-blue-500/20',\n acked: 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20',\n running: 'bg-green-500/10 text-green-300 border-green-500/20',\n replied: 'bg-purple-500/10 text-purple-300 border-purple-500/20',\n closed: 'bg-gray-500/10 text-gray-500 border-gray-500/20',\n failed: 'bg-red-500/10 text-red-300 border-red-500/20',\n cancelled: 'bg-yellow-500/10 text-yellow-300 border-yellow-500/20',\n expired: 'bg-orange-500/10 text-orange-300 border-orange-500/20',\n};\n\n/** Small colored dot per status — visible on every tab (active + inactive)\n * so users can scan the row at a glance. Hex inlined to avoid Tailwind\n * purging dynamic `bg-${family}-400` class names. */\nconst STATUS_DOTS: Record<string, string> = {\n created: '#9ca3af',\n delivered: '#60a5fa',\n acked: '#22d3ee',\n running: '#4ade80',\n replied: '#a78bfa',\n closed: '#6b7280',\n failed: '#f87171',\n cancelled: '#facc15',\n expired: '#fb923c',\n};\n\nfunction statusBadge(status: string) {\n const color = STATUS_COLORS[status] || 'bg-gray-500/10 text-gray-400 border-gray-500/20';\n return `text-xs px-2 py-0.5 rounded-md border ${color}`;\n}\n\nfunction priorityBadge(priority: string) {\n if (priority === 'high') return 'text-red-400';\n if (priority === 'low') return 'text-gray-600';\n return 'text-gray-400';\n}\n\nfunction timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nfunction TasksContent() {\n const searchParams = useSearchParams();\n const { networkId } = useNetworkId();\n const [tasks, setTasks] = useState<Task[]>([]);\n const [count, setCount] = useState(0);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState('');\n const [expanded, setExpanded] = useState<Set<string>>(new Set());\n\n const [filterStatus, setFilterStatus] = useState(searchParams.get('status') || '');\n const [filterFrom, setFilterFrom] = useState('');\n const [filterTo, setFilterTo] = useState('');\n const [drawerTaskId, setDrawerTaskId] = useState<string | null>(null);\n\n const toggleExpand = (taskId: string) => {\n setExpanded(prev => {\n const next = new Set(prev);\n if (next.has(taskId)) next.delete(taskId);\n else next.add(taskId);\n return next;\n });\n };\n\n const fetchTasks = useCallback(async () => {\n try {\n const params = new URLSearchParams();\n if (networkId) params.set('network_id', networkId);\n if (filterStatus) params.set('status', filterStatus);\n if (filterFrom) params.set('from_name', filterFrom);\n if (filterTo) params.set('to_name', filterTo);\n params.set('limit', '100');\n\n const res = await fetch(`/api/hub/tasks?${params.toString()}`);\n if (res.status === 401) {\n window.location.assign('/login');\n return;\n }\n const data = await res.json();\n setTasks(data.tasks || []);\n setCount(data.count ?? (data.tasks?.length || 0));\n setError('');\n } catch (e: unknown) {\n setError(e instanceof Error ? e.message : 'fetch failed');\n } finally {\n setLoading(false);\n }\n }, [filterStatus, filterFrom, filterTo, networkId]);\n\n useEffect(() => {\n setLoading(true);\n fetchTasks();\n const interval = setInterval(fetchTasks, 5000);\n return () => clearInterval(interval);\n }, [fetchTasks]);\n\n return (\n <div className=\"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono\">\n {/* Header */}\n <div className=\"flex items-center gap-4 mb-6\">\n <h1 className=\"text-2xl font-bold text-white lg:ml-0 ml-10\">Tasks</h1>\n <span className=\"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30\">\n {count}\n </span>\n </div>\n\n {/* Status Tabs — color-coded dots per status family so users can\n scan the row at a glance. Active tab gets full chip styling\n (bg + border + text color), inactive tabs only carry the dot\n + neutral label so the active state remains the strong cue.\n On narrow viewports (<sm) the row scrolls horizontally with\n subtle gradient fade-edges (via .anet-tabstrip-wrap pseudo\n elements) hinting more content. */}\n <div className=\"anet-tabstrip-wrap mb-4\">\n <div className=\"anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin\">\n {['', ...STATUS_OPTIONS.filter(Boolean)].map(s => (\n <button key={s} onClick={() => setFilterStatus(s)}\n className={`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap ${\n filterStatus === s\n ? `${STATUS_COLORS[s] || 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20'} border`\n : 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40'\n }`}>\n {s && (\n <span\n aria-hidden\n className=\"inline-block w-1.5 h-1.5 rounded-full shrink-0\"\n style={{ backgroundColor: STATUS_DOTS[s] || '#6b7280' }}\n />\n )}\n <span>{s || 'All'}</span>\n </button>\n ))}\n </div>\n </div>\n\n {/* From/To Filters */}\n <div className=\"flex flex-wrap gap-3 mb-6\">\n <input\n type=\"text\"\n value={filterFrom}\n onChange={e => setFilterFrom(e.target.value)}\n placeholder=\"From node...\"\n className=\"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40\"\n />\n <input\n type=\"text\"\n value={filterTo}\n onChange={e => setFilterTo(e.target.value)}\n placeholder=\"To node...\"\n className=\"bg-[#111128] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-blue-500/50 focus:outline-none w-40\"\n />\n </div>\n\n {/* Status distribution */}\n {tasks.length > 0 && !filterStatus && (() => {\n const stats: Record<string, number> = {};\n tasks.forEach(t => { stats[t.status] = (stats[t.status] || 0) + 1; });\n const total = tasks.length || 1;\n const bars = [\n { key: 'running', color: 'bg-green-500', text: 'text-green-400' },\n { key: 'delivered', color: 'bg-blue-500', text: 'text-blue-400' },\n { key: 'replied', color: 'bg-purple-500', text: 'text-purple-400' },\n { key: 'failed', color: 'bg-red-500', text: 'text-red-400' },\n { key: 'expired', color: 'bg-orange-500', text: 'text-orange-400' },\n ].filter(b => stats[b.key]);\n if (!bars.length) return null;\n return (\n <div className=\"mb-6\">\n <div className=\"flex h-2 rounded-full overflow-hidden bg-gray-800\">\n {bars.map(b => <div key={b.key} className={b.color} style={{ width: `${(stats[b.key]/total)*100}%` }} />)}\n </div>\n <div className=\"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500\">\n {bars.map(b => <span key={b.key}><span className={`inline-block w-2 h-2 rounded-full ${b.color} mr-1`} />{stats[b.key]} {b.key}</span>)}\n </div>\n </div>\n );\n })()}\n\n {error && (\n <div className=\"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm\">{error}</div>\n )}\n\n {loading ? (\n <div className=\"animate-pulse space-y-3\">\n {[1, 2, 3, 4, 5].map(i => (\n <div key={i} className=\"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40\" />\n ))}\n </div>\n ) : tasks.length === 0 ? (\n <EmptyState\n variant=\"tasks\"\n sub={(filterStatus || filterFrom || filterTo)\n ? 'No tasks match the current filters. Try clearing them.'\n : 'Tasks will appear here when agents send them via CommHub.'}\n />\n ) : (\n <div className=\"space-y-2\">\n {/* Table header */}\n <div className=\"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase\">\n <div className=\"col-span-1\">Status</div>\n <div className=\"col-span-2\">From</div>\n <div className=\"col-span-2\">To</div>\n <div className=\"col-span-4\">Content</div>\n <div className=\"col-span-1\">Priority</div>\n <div className=\"col-span-2\">Time</div>\n </div>\n\n {tasks.map(t => {\n const isOpen = expanded.has(t.task_id);\n return (\n <div\n key={t.task_id}\n className={`anet-task-row group bg-[#111128] border rounded-lg px-4 py-3 transition-all duration-200 cursor-pointer ${\n isOpen\n ? 'border-[#3a3a5a] shadow-lg shadow-black/20'\n : 'border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]'\n }`}\n onClick={() => toggleExpand(t.task_id)}\n role=\"button\"\n tabIndex={0}\n aria-expanded={isOpen}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggleExpand(t.task_id);\n }\n }}\n >\n {/* Desktop row */}\n <div className=\"hidden sm:grid sm:grid-cols-12 gap-2 items-center\">\n <div className=\"col-span-1\">\n <span className={statusBadge(t.status)}>{t.status}</span>\n </div>\n <div className=\"col-span-2 text-sm text-blue-400 truncate\" title={t.from_name}>\n {t.from_name || '--'}\n </div>\n <div className=\"col-span-2 text-sm text-cyan-400 truncate\" title={t.to_name}>\n {t.to_name || '--'}\n </div>\n <div className=\"col-span-4 text-xs text-gray-400 truncate\" title={t.content}>\n {t.content || '--'}\n </div>\n <div className=\"col-span-1\">\n <span className={`text-xs ${priorityBadge(t.priority)}`}>{t.priority || 'normal'}</span>\n </div>\n <div className=\"col-span-2 text-xs text-gray-500 flex items-center justify-between gap-2\" title={t.created_at}>\n <span className=\"truncate\">{timeAgo(t.created_at)}</span>\n <svg\n aria-hidden\n className={`shrink-0 text-gray-600 group-hover:text-gray-400 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 9l6 6 6-6\" />\n </svg>\n </div>\n </div>\n\n {/* Mobile layout */}\n <div className=\"sm:hidden space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className={statusBadge(t.status)}>{t.status}</span>\n <div className=\"flex items-center gap-2\">\n <span className={`text-xs ${priorityBadge(t.priority)}`}>{t.priority || 'normal'}</span>\n <svg\n aria-hidden\n className={`text-gray-600 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 9l6 6 6-6\" />\n </svg>\n </div>\n </div>\n <div className=\"text-xs text-gray-500\">\n <span className=\"text-blue-400\">{t.from_name || '--'}</span>\n <span className=\"text-gray-600 mx-1\">&rarr;</span>\n <span className=\"text-cyan-400\">{t.to_name || '--'}</span>\n </div>\n <div className=\"text-xs text-gray-400 line-clamp-1\">{t.content || '--'}</div>\n <div className=\"text-xs text-gray-600\">{timeAgo(t.created_at)}</div>\n </div>\n\n {/* Expanded detail — always mounted; grid-rows 0fr↔1fr trick gives\n content-aware smooth max-height animation without measuring DOM. */}\n <div\n className={`grid transition-all duration-300 ease-out ${\n isOpen ? 'grid-rows-[1fr] opacity-100 mt-3' : 'grid-rows-[0fr] opacity-0'\n }`}\n aria-hidden={!isOpen}\n >\n <div className=\"overflow-hidden\">\n <div className=\"pt-3 border-t border-[#2a2a4a] space-y-3\">\n {t.content && (\n <div>\n <div className=\"text-xs text-gray-600 mb-1\">Content</div>\n <div className=\"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]\">{t.content}</div>\n </div>\n )}\n {t.result && (\n <div>\n <div className=\"text-xs text-gray-600 mb-1\">Result</div>\n <div className=\"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto\">{t.result}</div>\n </div>\n )}\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs\">\n {[\n ['Created', t.created_at],\n ['Delivered', t.delivered_at],\n ['Started', t.started_at],\n ['Completed', t.completed_at],\n ].map(([label, val]) => (\n <div key={label as string}>\n <span className=\"text-gray-600\">{label}: </span>\n <span className=\"text-gray-400\">{val ? timeAgo(val as string) : '--'}</span>\n </div>\n ))}\n </div>\n {t.expires_at && (\n <div className=\"text-xs\">\n <span className=\"text-gray-600\">Expires: </span>\n <span className=\"text-orange-400\">{t.expires_at}</span>\n </div>\n )}\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"text-xs text-gray-600 truncate\" title={t.task_id}>\n ID: {t.task_id}\n </div>\n <div className=\"flex gap-2 shrink-0\">\n {(t.status === 'failed' || t.status === 'expired') && (\n <button\n onClick={async (e) => {\n e.stopPropagation();\n await fetch('/api/hub/send', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ alias: t.to_name, task: t.content, priority: t.priority }),\n });\n fetchTasks();\n }}\n className=\"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10\"\n >\n Retry\n </button>\n )}\n <button\n onClick={e => { e.stopPropagation(); setDrawerTaskId(t.task_id); }}\n className=\"text-xs text-cyan-400 hover:text-cyan-300\"\n >\n Detail &rarr;\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {drawerTaskId && <TaskDrawer taskId={drawerTaskId} onClose={() => setDrawerTaskId(null)} />}\n </div>\n );\n}\n\nexport default function TasksPage() {\n return (\n <Suspense fallback={<div className=\"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono\">Loading tasks...</div>}>\n <TasksContent />\n </Suspense>\n );\n}\n","'use client';\n\nimport { useEffect, useState } from 'react';\nimport { timeAgo } from './utils';\nimport Link from 'next/link';\n\ninterface TaskDetail {\n task_id: string;\n from_name: string;\n to_name: string;\n status: string;\n priority: string;\n content: string;\n result: string;\n created_at: string;\n delivered_at: string;\n started_at: string;\n completed_at: string;\n expires_at: string;\n}\n\ninterface TaskEvent {\n id: number;\n event_type: string;\n from_status: string;\n to_status: string;\n detail: string;\n created_at: string;\n}\n\nconst STATUS_COLORS: Record<string, string> = {\n created: 'text-gray-400', delivered: 'text-blue-400', running: 'text-green-400',\n replied: 'text-purple-400', failed: 'text-red-400', closed: 'text-gray-500',\n};\n\ninterface TaskDrawerProps {\n taskId: string;\n onClose: () => void;\n}\n\nexport function TaskDrawer({ taskId, onClose }: TaskDrawerProps) {\n const [task, setTask] = useState<TaskDetail | null>(null);\n const [events, setEvents] = useState<TaskEvent[]>([]);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n (async () => {\n try {\n const [taskRes, eventsRes] = await Promise.all([\n fetch(`/api/hub/tasks?task_id=${encodeURIComponent(taskId)}`),\n fetch(`/api/hub/task-events?task_id=${encodeURIComponent(taskId)}&limit=50`),\n ]);\n const taskData = await taskRes.json();\n const eventsData = await eventsRes.json();\n if (taskData.tasks?.[0]) setTask(taskData.tasks[0]);\n setEvents(eventsData.events || []);\n } catch {} finally { setLoading(false); }\n })();\n }, [taskId]);\n\n const timeline = task ? [\n { label: 'Created', time: task.created_at, color: 'bg-gray-400' },\n { label: 'Delivered', time: task.delivered_at, color: 'bg-blue-400' },\n { label: 'Started', time: task.started_at, color: 'bg-green-400' },\n { label: 'Completed', time: task.completed_at, color: 'bg-purple-400' },\n ] : [];\n\n const duration = task?.started_at && task?.completed_at\n ? Math.round((new Date(task.completed_at).getTime() - new Date(task.started_at).getTime()) / 1000)\n : null;\n\n return (\n <>\n <div className=\"fixed inset-0 bg-black/30 z-40\" onClick={onClose} />\n <div className=\"fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in\">\n {/* Header */}\n <div className=\"flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0\">\n <div>\n <div className=\"text-sm font-semibold text-white\">Task Detail</div>\n <div className=\"text-[10px] text-gray-500 mt-0.5\">{taskId.slice(0, 16)}...</div>\n </div>\n <button onClick={onClose} className=\"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]\">\n <svg className=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </div>\n\n {loading ? (\n <div className=\"flex justify-center py-16\">\n <div className=\"w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin\" />\n </div>\n ) : !task ? (\n <div className=\"text-center py-16 text-gray-500\">Task not found</div>\n ) : (\n <div className=\"px-5 py-5 space-y-5\">\n {/* Status + Priority */}\n <div className=\"flex items-center gap-3\">\n <span className={`text-lg font-bold ${STATUS_COLORS[task.status] || 'text-gray-400'}`}>{task.status}</span>\n {task.priority !== 'normal' && (\n <span className={`text-xs px-2 py-0.5 rounded border ${task.priority === 'high' ? 'text-red-300 border-red-500/20' : 'text-gray-400 border-gray-600/20'}`}>{task.priority}</span>\n )}\n {duration !== null && (\n <span className=\"text-xs text-gray-500\">⏱ {duration < 60 ? `${duration}s` : `${Math.floor(duration/60)}m ${duration%60}s`}</span>\n )}\n </div>\n\n {/* From → To */}\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"text-blue-400 font-medium\">{task.from_name || '--'}</span>\n <span className=\"text-gray-600\">→</span>\n <span className=\"text-cyan-400 font-medium\">{task.to_name || '--'}</span>\n </div>\n\n {/* Timeline */}\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-3\">Timeline</div>\n <div className=\"space-y-3\">\n {timeline.map((step, i) => (\n <div key={step.label} className=\"flex items-center gap-3\">\n <div className=\"flex flex-col items-center\">\n <div className={`w-3 h-3 rounded-full ${step.time ? step.color : 'bg-gray-700'}`} />\n {i < timeline.length - 1 && <div className={`w-0.5 h-4 mt-1 ${step.time && timeline[i+1]?.time ? 'bg-gray-600' : 'bg-gray-800'}`} />}\n </div>\n <div className=\"flex-1\">\n <div className={`text-xs font-medium ${step.time ? 'text-gray-300' : 'text-gray-600'}`}>{step.label}</div>\n <div className=\"text-[10px] text-gray-500\">{step.time || 'Pending'}</div>\n </div>\n </div>\n ))}\n </div>\n </div>\n\n {/* Content */}\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Input</div>\n <div className=\"text-sm text-gray-300 whitespace-pre-wrap\">{task.content || '--'}</div>\n </div>\n\n {/* Result */}\n {task.result && (\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Output</div>\n <div className=\"text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto\">{task.result}</div>\n </div>\n )}\n\n {/* Events */}\n {events.length > 0 && (\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Events ({events.length})</div>\n <div className=\"space-y-1.5 max-h-40 overflow-y-auto\">\n {events.map(e => (\n <div key={e.id} className=\"flex items-center gap-2 text-[11px]\">\n <span className={`w-1.5 h-1.5 rounded-full shrink-0 ${\n e.to_status === 'running' ? 'bg-green-400' : e.to_status === 'replied' ? 'bg-purple-400' : e.to_status === 'failed' ? 'bg-red-400' : 'bg-blue-400'\n }`} />\n <span className=\"text-gray-400\">{e.event_type}</span>\n {e.from_status && <span className=\"text-gray-600\">{e.from_status}→{e.to_status}</span>}\n <span className=\"text-gray-600 ml-auto\">{timeAgo(e.created_at)}</span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Metadata */}\n <div className=\"text-[10px] text-gray-600 space-y-1\">\n <div>Task ID: {task.task_id}</div>\n {task.expires_at && <div>Expires: {task.expires_at}</div>}\n </div>\n </div>\n )}\n </div>\n <style jsx global>{`\n @keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }\n .animate-slide-in { animation: slide-in 0.2s ease-out; }\n `}</style>\n </>\n );\n}\n"],"names":["STATUS_COLORS","created","delivered","running","replied","failed","closed","TaskDrawer","taskId","onClose","task","setTask","events","setEvents","loading","setLoading","taskRes","eventsRes","Promise","all","fetch","encodeURIComponent","taskData","json","eventsData","tasks","timeline","label","time","created_at","color","delivered_at","started_at","completed_at","duration","Math","round","Date","getTime","onClick","slice","fill","viewBox","stroke","strokeWidth","strokeLinecap","strokeLinejoin","d","status","priority","floor","from_name","to_name","map","step","i","length","content","result","e","to_status","event_type","from_status","id","task_id","expires_at"],"mappings":"wDAEA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OACR,QAAS,CAAE,eAAgB,kBAAmB,EAC9C,KAAM,KAAK,SAAS,CAAC,CAAE,MAAO,EAAE,OAAO,CAAE,KAAM,EAAE,OAAO,CAAE,SAAU,EAAE,QAAQ,AAAC,EACjF,GACA,GACF,EACA,UAAU,gIACX,UAIH,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACC,QAAS,IAAO,EAAE,eAAe,GAAI,EAAgB,EAAE,OAAO,CAAG,EACjE,UAAU,qDACX,4BAvIJ,EAAE,OAAO,CAiJlB,MAIH,GAAgB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAW,OAAQ,EAAc,QAAS,IAAM,EAAgB,UAGxF,kBAEe,SAAS,EACtB,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,QAAQ,CAAA,CAAC,SAAU,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,iEAAwD,8BACzF,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAA,IAGP"}
1
+ {"version":3,"sources":["../../../../app/tasks/page.tsx","../../../../app/components/TaskDrawer.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useState, useCallback, Suspense } from 'react';\nimport { useSearchParams } from 'next/navigation';\nimport Link from 'next/link';\nimport { useNetworkId } from '../lib/network-context';\nimport { TaskDrawer } from '../components/TaskDrawer';\nimport { EmptyState } from '../components/EmptyState';\nimport { AliasAvatar } from '../components/AliasAvatar';\n\ninterface Task {\n task_id: string;\n from_name: string;\n to_name: string;\n status: string;\n priority: string;\n content: string;\n result: string;\n created_at: string;\n updated_at: string;\n delivered_at: string;\n started_at: string;\n completed_at: string;\n expires_at: string;\n}\n\nconst STATUS_OPTIONS = [\n '',\n 'created',\n 'delivered',\n 'acked',\n 'running',\n 'replied',\n 'closed',\n 'failed',\n 'cancelled',\n 'expired',\n];\n\nconst STATUS_COLORS: Record<string, string> = {\n created: 'bg-gray-500/10 text-gray-400 border-gray-500/20',\n delivered: 'bg-blue-500/10 text-blue-300 border-blue-500/20',\n acked: 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20',\n running: 'bg-green-500/10 text-green-300 border-green-500/20',\n replied: 'bg-purple-500/10 text-purple-300 border-purple-500/20',\n closed: 'bg-gray-500/10 text-gray-500 border-gray-500/20',\n failed: 'bg-red-500/10 text-red-300 border-red-500/20',\n cancelled: 'bg-yellow-500/10 text-yellow-300 border-yellow-500/20',\n expired: 'bg-orange-500/10 text-orange-300 border-orange-500/20',\n};\n\n/** Small colored dot per status — visible on every tab (active + inactive)\n * so users can scan the row at a glance. Hex inlined to avoid Tailwind\n * purging dynamic `bg-${family}-400` class names. */\nconst STATUS_DOTS: Record<string, string> = {\n created: '#9ca3af',\n delivered: '#60a5fa',\n acked: '#22d3ee',\n running: '#4ade80',\n replied: '#a78bfa',\n closed: '#6b7280',\n failed: '#f87171',\n cancelled: '#facc15',\n expired: '#fb923c',\n};\n\nfunction statusBadge(status: string) {\n const color = STATUS_COLORS[status] || 'bg-gray-500/10 text-gray-400 border-gray-500/20';\n return `text-xs px-2 py-0.5 rounded-md border ${color}`;\n}\n\nfunction priorityBadge(priority: string) {\n if (priority === 'high') return 'text-red-400';\n if (priority === 'low') return 'text-gray-600';\n return 'text-gray-400';\n}\n\nfunction timeAgo(dateStr: string): string {\n if (!dateStr) return '--';\n const diff = Date.now() - new Date(dateStr.replace(' ', 'T') + 'Z').getTime();\n const s = Math.floor(diff / 1000);\n if (s < 60) return `${s}s ago`;\n if (s < 3600) return `${Math.floor(s / 60)}m ago`;\n if (s < 86400) return `${Math.floor(s / 3600)}h ago`;\n return `${Math.floor(s / 86400)}d ago`;\n}\n\nfunction TasksContent() {\n const searchParams = useSearchParams();\n const { networkId } = useNetworkId();\n const [tasks, setTasks] = useState<Task[]>([]);\n const [count, setCount] = useState(0);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState('');\n const [expanded, setExpanded] = useState<Set<string>>(new Set());\n\n const [filterStatus, setFilterStatus] = useState(searchParams.get('status') || '');\n const [filterFrom, setFilterFrom] = useState('');\n const [filterTo, setFilterTo] = useState('');\n const [drawerTaskId, setDrawerTaskId] = useState<string | null>(null);\n\n const toggleExpand = (taskId: string) => {\n setExpanded(prev => {\n const next = new Set(prev);\n if (next.has(taskId)) next.delete(taskId);\n else next.add(taskId);\n return next;\n });\n };\n\n const fetchTasks = useCallback(async () => {\n try {\n const params = new URLSearchParams();\n if (networkId) params.set('network_id', networkId);\n if (filterStatus) params.set('status', filterStatus);\n if (filterFrom) params.set('from_name', filterFrom);\n if (filterTo) params.set('to_name', filterTo);\n params.set('limit', '100');\n\n const res = await fetch(`/api/hub/tasks?${params.toString()}`);\n if (res.status === 401) {\n window.location.assign('/login');\n return;\n }\n const data = await res.json();\n setTasks(data.tasks || []);\n setCount(data.count ?? (data.tasks?.length || 0));\n setError('');\n } catch (e: unknown) {\n setError(e instanceof Error ? e.message : 'fetch failed');\n } finally {\n setLoading(false);\n }\n }, [filterStatus, filterFrom, filterTo, networkId]);\n\n useEffect(() => {\n setLoading(true);\n fetchTasks();\n const interval = setInterval(fetchTasks, 5000);\n return () => clearInterval(interval);\n }, [fetchTasks]);\n\n return (\n <div className=\"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono\">\n {/* Header */}\n <div className=\"flex items-center gap-4 mb-6\">\n <h1 className=\"text-2xl font-bold text-white lg:ml-0 ml-10\">Tasks</h1>\n <span className=\"text-xs bg-blue-900/30 text-blue-400 px-2 py-0.5 rounded-full border border-blue-800/30\">\n {count}\n </span>\n </div>\n\n {/* Status Tabs — color-coded dots per status family so users can\n scan the row at a glance. Active tab gets full chip styling\n (bg + border + text color), inactive tabs only carry the dot\n + neutral label so the active state remains the strong cue.\n On narrow viewports (<sm) the row scrolls horizontally with\n subtle gradient fade-edges (via .anet-tabstrip-wrap pseudo\n elements) hinting more content. */}\n <div className=\"anet-tabstrip-wrap mb-4\">\n <div className=\"anet-tabstrip flex sm:flex-wrap gap-1 bg-[#111128] rounded-lg border border-[#2a2a4a] p-1 overflow-x-auto sm:overflow-x-visible scrollbar-thin\">\n {['', ...STATUS_OPTIONS.filter(Boolean)].map(s => (\n <button key={s} onClick={() => setFilterStatus(s)}\n className={`px-3 py-1.5 rounded-md text-xs transition-colors flex items-center gap-1.5 shrink-0 whitespace-nowrap ${\n filterStatus === s\n ? `${STATUS_COLORS[s] || 'bg-cyan-500/10 text-cyan-300 border-cyan-500/20'} border`\n : 'text-gray-500 hover:text-gray-300 hover:bg-[#1a1a2a]/40'\n }`}>\n {s && (\n <span\n aria-hidden\n className=\"inline-block w-1.5 h-1.5 rounded-full shrink-0\"\n style={{ backgroundColor: STATUS_DOTS[s] || '#6b7280' }}\n />\n )}\n <span>{s || 'All'}</span>\n </button>\n ))}\n </div>\n </div>\n\n {/* From/To Filters — same visual block as the status tabs above. */}\n <div className=\"flex flex-wrap items-center gap-2 mb-6\">\n <div className=\"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40\">\n <span className=\"text-[10px] uppercase tracking-wide text-gray-600\">From</span>\n <input\n type=\"text\"\n value={filterFrom}\n onChange={e => setFilterFrom(e.target.value)}\n placeholder=\"any node\"\n className=\"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none\"\n />\n </div>\n <div className=\"flex items-center gap-1.5 rounded-lg border border-[#2a2a4a] bg-[#111128] px-2.5 py-1.5 focus-within:border-blue-500/40\">\n <span className=\"text-[10px] uppercase tracking-wide text-gray-600\">To</span>\n <input\n type=\"text\"\n value={filterTo}\n onChange={e => setFilterTo(e.target.value)}\n placeholder=\"any node\"\n className=\"w-28 bg-transparent text-sm text-white placeholder-gray-700 focus:outline-none\"\n />\n </div>\n {(filterStatus || filterFrom || filterTo) && (\n <button\n type=\"button\"\n onClick={() => { setFilterStatus(''); setFilterFrom(''); setFilterTo(''); }}\n className=\"rounded-lg border border-gray-700 px-2.5 py-1.5 text-[11px] text-gray-500 hover:text-gray-200 hover:border-gray-600\"\n >\n Clear filters\n </button>\n )}\n </div>\n\n {/* Status distribution */}\n {tasks.length > 0 && !filterStatus && (() => {\n const stats: Record<string, number> = {};\n tasks.forEach(t => { stats[t.status] = (stats[t.status] || 0) + 1; });\n const total = tasks.length || 1;\n const bars = [\n { key: 'running', color: 'bg-green-500', text: 'text-green-400' },\n { key: 'delivered', color: 'bg-blue-500', text: 'text-blue-400' },\n { key: 'replied', color: 'bg-purple-500', text: 'text-purple-400' },\n { key: 'failed', color: 'bg-red-500', text: 'text-red-400' },\n { key: 'expired', color: 'bg-orange-500', text: 'text-orange-400' },\n ].filter(b => stats[b.key]);\n if (!bars.length) return null;\n return (\n <div className=\"mb-6\">\n <div className=\"flex h-2 rounded-full overflow-hidden bg-gray-800\">\n {bars.map(b => <div key={b.key} className={b.color} style={{ width: `${(stats[b.key]/total)*100}%` }} />)}\n </div>\n <div className=\"flex flex-wrap gap-3 mt-1.5 text-[10px] text-gray-500\">\n {bars.map(b => <span key={b.key}><span className={`inline-block w-2 h-2 rounded-full ${b.color} mr-1`} />{stats[b.key]} {b.key}</span>)}\n </div>\n </div>\n );\n })()}\n\n {error && (\n <div className=\"bg-red-900/20 border border-red-800/40 text-red-300 px-4 py-2 rounded-lg mb-6 text-sm\">{error}</div>\n )}\n\n {loading ? (\n <div className=\"animate-pulse space-y-3\">\n {[1, 2, 3, 4, 5].map(i => (\n <div key={i} className=\"h-20 bg-gray-800/20 rounded-lg border border-gray-800/40\" />\n ))}\n </div>\n ) : tasks.length === 0 ? (\n <EmptyState\n variant=\"tasks\"\n sub={(filterStatus || filterFrom || filterTo)\n ? 'No tasks match the current filters. Try clearing them.'\n : 'Tasks will appear here when agents send them via CommHub.'}\n />\n ) : (\n <div className=\"space-y-2\">\n {/* Table header */}\n <div className=\"hidden sm:grid sm:grid-cols-12 gap-2 px-4 py-2 text-xs text-gray-600 uppercase\">\n <div className=\"col-span-1\">Status</div>\n <div className=\"col-span-2\">From</div>\n <div className=\"col-span-2\">To</div>\n <div className=\"col-span-4\">Content</div>\n <div className=\"col-span-1\">Priority</div>\n <div className=\"col-span-2\">Time</div>\n </div>\n\n {tasks.map(t => {\n const isOpen = expanded.has(t.task_id);\n return (\n <div\n key={t.task_id}\n className={`anet-task-row group bg-[#111128] border rounded-lg px-4 py-3 transition-all duration-200 cursor-pointer ${\n isOpen\n ? 'border-[#3a3a5a] shadow-lg shadow-black/20'\n : 'border-[#2a2a4a] hover:border-[#3a3a5a] hover:bg-[#15152e]'\n }`}\n onClick={() => toggleExpand(t.task_id)}\n role=\"button\"\n tabIndex={0}\n aria-expanded={isOpen}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggleExpand(t.task_id);\n }\n }}\n >\n {/* Desktop row */}\n <div className=\"hidden sm:grid sm:grid-cols-12 gap-2 items-center\">\n <div className=\"col-span-1\">\n <span className={statusBadge(t.status)}>{t.status}</span>\n </div>\n <div className=\"col-span-2 flex items-center gap-1.5 min-w-0\" title={t.from_name}>\n {t.from_name && <AliasAvatar alias={t.from_name} size={18} />}\n <span className=\"truncate text-sm text-gray-200\">{t.from_name || '--'}</span>\n </div>\n <div className=\"col-span-2 flex items-center gap-1.5 min-w-0\" title={t.to_name}>\n {t.to_name && <AliasAvatar alias={t.to_name} size={18} />}\n <span className=\"truncate text-sm text-gray-200\">{t.to_name || '--'}</span>\n </div>\n <div className=\"col-span-4 text-xs text-gray-400 truncate\" title={t.content}>\n {t.content || '--'}\n </div>\n <div className=\"col-span-1\">\n <span className={`text-xs ${priorityBadge(t.priority)}`}>{t.priority || 'normal'}</span>\n </div>\n <div className=\"col-span-2 text-xs text-gray-500 flex items-center justify-between gap-2\" title={t.created_at}>\n <span className=\"truncate\">{timeAgo(t.created_at)}</span>\n <svg\n aria-hidden\n className={`shrink-0 text-gray-600 group-hover:text-gray-400 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 9l6 6 6-6\" />\n </svg>\n </div>\n </div>\n\n {/* Mobile layout */}\n <div className=\"sm:hidden space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className={statusBadge(t.status)}>{t.status}</span>\n <div className=\"flex items-center gap-2\">\n <span className={`text-xs ${priorityBadge(t.priority)}`}>{t.priority || 'normal'}</span>\n <svg\n aria-hidden\n className={`text-gray-600 transition-transform duration-200 ${isOpen ? 'rotate-180' : ''}`}\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 9l6 6 6-6\" />\n </svg>\n </div>\n </div>\n <div className=\"flex items-center gap-1.5 text-xs text-gray-300 min-w-0\">\n {t.from_name && <AliasAvatar alias={t.from_name} size={16} />}\n <span className=\"truncate max-w-[40%]\">{t.from_name || '--'}</span>\n <span className=\"text-gray-600\">&rarr;</span>\n {t.to_name && <AliasAvatar alias={t.to_name} size={16} />}\n <span className=\"truncate max-w-[40%]\">{t.to_name || '--'}</span>\n </div>\n <div className=\"text-xs text-gray-400 line-clamp-1\">{t.content || '--'}</div>\n <div className=\"text-xs text-gray-600\">{timeAgo(t.created_at)}</div>\n </div>\n\n {/* Expanded detail — always mounted; grid-rows 0fr↔1fr trick gives\n content-aware smooth max-height animation without measuring DOM. */}\n <div\n className={`grid transition-all duration-300 ease-out ${\n isOpen ? 'grid-rows-[1fr] opacity-100 mt-3' : 'grid-rows-[0fr] opacity-0'\n }`}\n aria-hidden={!isOpen}\n >\n <div className=\"overflow-hidden\">\n <div className=\"pt-3 border-t border-[#2a2a4a] space-y-3\">\n {t.content && (\n <div>\n <div className=\"text-xs text-gray-600 mb-1\">Content</div>\n <div className=\"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a]\">{t.content}</div>\n </div>\n )}\n {t.result && (\n <div>\n <div className=\"text-xs text-gray-600 mb-1\">Result</div>\n <div className=\"text-xs text-gray-300 whitespace-pre-wrap bg-[#0a0a15] rounded-lg px-3 py-2 border border-[#1a1a2a] max-h-48 overflow-y-auto\">{t.result}</div>\n </div>\n )}\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs\">\n {[\n ['Created', t.created_at],\n ['Delivered', t.delivered_at],\n ['Started', t.started_at],\n ['Completed', t.completed_at],\n ].map(([label, val]) => (\n <div key={label as string}>\n <span className=\"text-gray-600\">{label}: </span>\n <span className=\"text-gray-400\">{val ? timeAgo(val as string) : '--'}</span>\n </div>\n ))}\n </div>\n {t.expires_at && (\n <div className=\"text-xs\">\n <span className=\"text-gray-600\">Expires: </span>\n <span className=\"text-orange-400\">{t.expires_at}</span>\n </div>\n )}\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"text-xs text-gray-600 truncate\" title={t.task_id}>\n ID: {t.task_id}\n </div>\n <div className=\"flex gap-2 shrink-0\">\n {(t.status === 'failed' || t.status === 'expired') && (\n <button\n onClick={async (e) => {\n e.stopPropagation();\n await fetch('/api/hub/send', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ alias: t.to_name, task: t.content, priority: t.priority }),\n });\n fetchTasks();\n }}\n className=\"text-xs text-orange-400 hover:text-orange-300 px-2 py-0.5 rounded border border-orange-500/20 hover:bg-orange-500/10\"\n >\n Retry\n </button>\n )}\n <button\n onClick={e => { e.stopPropagation(); setDrawerTaskId(t.task_id); }}\n className=\"text-xs text-cyan-400 hover:text-cyan-300\"\n >\n Detail &rarr;\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {drawerTaskId && <TaskDrawer taskId={drawerTaskId} onClose={() => setDrawerTaskId(null)} />}\n </div>\n );\n}\n\nexport default function TasksPage() {\n return (\n <Suspense fallback={<div className=\"min-h-screen bg-[#0a0a1a] text-gray-100 p-6 font-mono\">Loading tasks...</div>}>\n <TasksContent />\n </Suspense>\n );\n}\n","'use client';\n\nimport { useEffect, useState } from 'react';\nimport { timeAgo } from './utils';\nimport Link from 'next/link';\n\ninterface TaskDetail {\n task_id: string;\n from_name: string;\n to_name: string;\n status: string;\n priority: string;\n content: string;\n result: string;\n created_at: string;\n delivered_at: string;\n started_at: string;\n completed_at: string;\n expires_at: string;\n}\n\ninterface TaskEvent {\n id: number;\n event_type: string;\n from_status: string;\n to_status: string;\n detail: string;\n created_at: string;\n}\n\nconst STATUS_COLORS: Record<string, string> = {\n created: 'text-gray-400', delivered: 'text-blue-400', running: 'text-green-400',\n replied: 'text-purple-400', failed: 'text-red-400', closed: 'text-gray-500',\n};\n\ninterface TaskDrawerProps {\n taskId: string;\n onClose: () => void;\n}\n\nexport function TaskDrawer({ taskId, onClose }: TaskDrawerProps) {\n const [task, setTask] = useState<TaskDetail | null>(null);\n const [events, setEvents] = useState<TaskEvent[]>([]);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n (async () => {\n try {\n const [taskRes, eventsRes] = await Promise.all([\n fetch(`/api/hub/tasks?task_id=${encodeURIComponent(taskId)}`),\n fetch(`/api/hub/task-events?task_id=${encodeURIComponent(taskId)}&limit=50`),\n ]);\n const taskData = await taskRes.json();\n const eventsData = await eventsRes.json();\n if (taskData.tasks?.[0]) setTask(taskData.tasks[0]);\n setEvents(eventsData.events || []);\n } catch {} finally { setLoading(false); }\n })();\n }, [taskId]);\n\n const timeline = task ? [\n { label: 'Created', time: task.created_at, color: 'bg-gray-400' },\n { label: 'Delivered', time: task.delivered_at, color: 'bg-blue-400' },\n { label: 'Started', time: task.started_at, color: 'bg-green-400' },\n { label: 'Completed', time: task.completed_at, color: 'bg-purple-400' },\n ] : [];\n\n const duration = task?.started_at && task?.completed_at\n ? Math.round((new Date(task.completed_at).getTime() - new Date(task.started_at).getTime()) / 1000)\n : null;\n\n return (\n <>\n <div className=\"fixed inset-0 bg-black/30 z-40\" onClick={onClose} />\n <div className=\"fixed top-0 right-0 h-full w-full lg:w-[500px] bg-[#0a0a1a] border-l border-[#2a2a4a] z-50 flex flex-col shadow-2xl shadow-black/60 overflow-y-auto animate-slide-in\">\n {/* Header */}\n <div className=\"flex items-center justify-between px-5 py-4 border-b border-[#2a2a4a] bg-[#0d0d1a] sticky top-0\">\n <div>\n <div className=\"text-sm font-semibold text-white\">Task Detail</div>\n <div className=\"text-[10px] text-gray-500 mt-0.5\">{taskId.slice(0, 16)}...</div>\n </div>\n <button onClick={onClose} className=\"text-gray-500 hover:text-white p-1.5 rounded-lg hover:bg-[#1a1a2a]\">\n <svg className=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </div>\n\n {loading ? (\n <div className=\"flex justify-center py-16\">\n <div className=\"w-6 h-6 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin\" />\n </div>\n ) : !task ? (\n <div className=\"text-center py-16 text-gray-500\">Task not found</div>\n ) : (\n <div className=\"px-5 py-5 space-y-5\">\n {/* Status + Priority */}\n <div className=\"flex items-center gap-3\">\n <span className={`text-lg font-bold ${STATUS_COLORS[task.status] || 'text-gray-400'}`}>{task.status}</span>\n {task.priority !== 'normal' && (\n <span className={`text-xs px-2 py-0.5 rounded border ${task.priority === 'high' ? 'text-red-300 border-red-500/20' : 'text-gray-400 border-gray-600/20'}`}>{task.priority}</span>\n )}\n {duration !== null && (\n <span className=\"text-xs text-gray-500\">⏱ {duration < 60 ? `${duration}s` : `${Math.floor(duration/60)}m ${duration%60}s`}</span>\n )}\n </div>\n\n {/* From → To */}\n <div className=\"flex items-center gap-2 text-sm\">\n <span className=\"text-blue-400 font-medium\">{task.from_name || '--'}</span>\n <span className=\"text-gray-600\">→</span>\n <span className=\"text-cyan-400 font-medium\">{task.to_name || '--'}</span>\n </div>\n\n {/* Timeline */}\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-3\">Timeline</div>\n <div className=\"space-y-3\">\n {timeline.map((step, i) => (\n <div key={step.label} className=\"flex items-center gap-3\">\n <div className=\"flex flex-col items-center\">\n <div className={`w-3 h-3 rounded-full ${step.time ? step.color : 'bg-gray-700'}`} />\n {i < timeline.length - 1 && <div className={`w-0.5 h-4 mt-1 ${step.time && timeline[i+1]?.time ? 'bg-gray-600' : 'bg-gray-800'}`} />}\n </div>\n <div className=\"flex-1\">\n <div className={`text-xs font-medium ${step.time ? 'text-gray-300' : 'text-gray-600'}`}>{step.label}</div>\n <div className=\"text-[10px] text-gray-500\">{step.time || 'Pending'}</div>\n </div>\n </div>\n ))}\n </div>\n </div>\n\n {/* Content */}\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Input</div>\n <div className=\"text-sm text-gray-300 whitespace-pre-wrap\">{task.content || '--'}</div>\n </div>\n\n {/* Result */}\n {task.result && (\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Output</div>\n <div className=\"text-sm text-gray-300 whitespace-pre-wrap max-h-64 overflow-y-auto\">{task.result}</div>\n </div>\n )}\n\n {/* Events */}\n {events.length > 0 && (\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-xl p-4\">\n <div className=\"text-xs text-gray-500 uppercase mb-2\">Events ({events.length})</div>\n <div className=\"space-y-1.5 max-h-40 overflow-y-auto\">\n {events.map(e => (\n <div key={e.id} className=\"flex items-center gap-2 text-[11px]\">\n <span className={`w-1.5 h-1.5 rounded-full shrink-0 ${\n e.to_status === 'running' ? 'bg-green-400' : e.to_status === 'replied' ? 'bg-purple-400' : e.to_status === 'failed' ? 'bg-red-400' : 'bg-blue-400'\n }`} />\n <span className=\"text-gray-400\">{e.event_type}</span>\n {e.from_status && <span className=\"text-gray-600\">{e.from_status}→{e.to_status}</span>}\n <span className=\"text-gray-600 ml-auto\">{timeAgo(e.created_at)}</span>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Metadata */}\n <div className=\"text-[10px] text-gray-600 space-y-1\">\n <div>Task ID: {task.task_id}</div>\n {task.expires_at && <div>Expires: {task.expires_at}</div>}\n </div>\n </div>\n )}\n </div>\n <style jsx global>{`\n @keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }\n .animate-slide-in { animation: slide-in 0.2s ease-out; }\n `}</style>\n </>\n );\n}\n"],"names":["STATUS_COLORS","created","delivered","running","replied","failed","closed","TaskDrawer","taskId","onClose","task","setTask","events","setEvents","loading","setLoading","taskRes","eventsRes","Promise","all","fetch","encodeURIComponent","taskData","json","eventsData","tasks","timeline","label","time","created_at","color","delivered_at","started_at","completed_at","duration","Math","round","Date","getTime","onClick","slice","fill","viewBox","stroke","strokeWidth","strokeLinecap","strokeLinejoin","d","status","priority","floor","from_name","to_name","map","step","i","length","content","result","e","to_status","event_type","from_status","id","task_id","expires_at"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBCFA,EAAA,EAAA,CAAA,CAAA,OA2BA,IAAMA,EAAwC,CAC5CC,QAAS,gBAAiBC,UAAW,gBAAiBC,QAAS,iBAC/DC,QAAS,kBAAmBC,OAAQ,eAAgBC,OAAQ,eAC9D,EAOO,SAASC,EAAW,QAAEC,CAAM,SAAEC,CAAO,CAAmB,EAC7D,GAAM,CAACC,EAAMC,EAAQ,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAoB,MAC9C,CAACC,EAAQC,EAAU,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAc,EAAE,EAC9C,CAACC,EAASC,EAAW,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ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js",
11
- "static/aliOmgYOuDD7xT9T9MLOA/_ssgManifest.js",
12
- "static/aliOmgYOuDD7xT9T9MLOA/_clientMiddlewareManifest.js"
10
+ "static/kyIvxswGu-u-KGQRAaXfV/_buildManifest.js",
11
+ "static/kyIvxswGu-u-KGQRAaXfV/_ssgManifest.js",
12
+ "static/kyIvxswGu-u-KGQRAaXfV/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0e-.zgw81gela.js",