@sleep2agi/agent-network-dashboard 0.1.0-preview.2 → 0.1.0-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +6 -6
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.html +1 -1
- package/.next/server/app/admin.rsc +1 -1
- package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +1 -1
- package/.next/server/app/docs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +1 -1
- package/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs.html +1 -1
- package/.next/server/app/logs.rsc +1 -1
- package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages.html +1 -1
- package/.next/server/app/messages.rsc +1 -1
- package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node/page_client-reference-manifest.js +1 -1
- package/.next/server/app/node.html +2 -2
- package/.next/server/app/node.rsc +2 -2
- package/.next/server/app/node.segments/_full.segment.rsc +2 -2
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +1 -1
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/nodes.html +2 -2
- package/.next/server/app/nodes.rsc +2 -2
- package/.next/server/app/nodes.segments/_full.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/networks.html +1 -1
- package/.next/server/app/settings/networks.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.html +1 -1
- package/.next/server/app/settings/tokens.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +1 -1
- package/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks.html +1 -1
- package/.next/server/app/tasks.rsc +1 -1
- package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nl3akl._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nl3akl._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0swcbs5._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0swcbs5._.js.map +1 -1
- package/.next/server/chunks/ssr/_0s2kgzl._.js +1 -1
- package/.next/server/chunks/ssr/_0s2kgzl._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{00lj3.so.3xcl.js → 03qq_1ze1j3x_.js} +1 -1
- package/.next/static/chunks/{11tov78a0ymt9.js → 0e4dwg687ga5q.js} +1 -1
- package/.next/static/chunks/{0gjidgcgd2ibn.js → 0ga7wt1a18fpq.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/api/hub/events/route.ts +10 -3
- package/app/api/hub/send/route.ts +6 -2
- package/app/components/TaskChatPanel.tsx +4 -2
- package/package.json +1 -1
- /package/.next/static/{zVDeG-cp6fcKuUs2y1LJi → lgag_dfMO-AGdtcyMHSLe}/_buildManifest.js +0 -0
- /package/.next/static/{zVDeG-cp6fcKuUs2y1LJi → lgag_dfMO-AGdtcyMHSLe}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{zVDeG-cp6fcKuUs2y1LJi → lgag_dfMO-AGdtcyMHSLe}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../app/api/hub/events/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { requireDashboardAuth } from '@/app/lib/dashboard-auth';\n\nconst HUB_URL = process.env.COMMHUB_URL || 'http://47.77.216.1:9200';\nconst AUTH_TOKEN = process.env.COMMHUB_AUTH_TOKEN || '';\n\n/**\n * SSE proxy: forwards CommHub /events/Dashboard to the browser.\n * This lets the Dashboard receive real-time events without exposing CommHub URL.\n */\nexport async function GET() {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const headers: Record<string, string> = {};\n if (AUTH_TOKEN) headers['Authorization'] = `Bearer ${AUTH_TOKEN}`;\n\n try {\n const upstream = await fetch(`${HUB_URL}/events/Dashboard`, {\n headers,\n // @ts-expect-error - Next.js fetch doesn't type duplex\n duplex: 'half',\n });\n\n if (!upstream.ok || !upstream.body) {\n return new Response('SSE upstream unavailable', { status: 502 });\n }\n\n return new Response(upstream.body, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n Connection: 'keep-alive',\n 'X-Accel-Buffering': 'no',\n },\n });\n } catch {\n return new Response('SSE connection failed', { status: 502 });\n }\n}\n\nexport async function HEAD(req: Request) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { searchParams } = new URL(req.url);\n if (searchParams.get('probe') !== '1') {\n return new Response(null, { status: 405 });\n }\n\n // P0 fix: probe /health instead of opening real SSE upstream.\n // Opening /events/:session keeps an upstream connection hanging, which\n // exhausts the browser's HTTP/1.1 connection pool and blocks RSC fetches.\n const headers: Record<string, string> = {};\n if (AUTH_TOKEN) headers['Authorization'] = `Bearer ${AUTH_TOKEN}`;\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 3000);\n\n try {\n const res = await fetch(`${HUB_URL}/health`, {\n headers,\n signal: controller.signal,\n });\n clearTimeout(timeout);\n return new Response(null, {\n status: 204,\n headers: { 'x-anet-sse-available': res.ok ? 'true' : 'false' },\n });\n } catch {\n clearTimeout(timeout);\n return new Response(null, {\n status: 204,\n headers: { 'x-anet-sse-available': 'false' },\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/events/route\",\n pathname: \"/api/hub/events\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/app/api/hub/events/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/hub/events/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["HUB_URL","process","env","COMMHUB_URL","AUTH_TOKEN","COMMHUB_AUTH_TOKEN","GET","authFailure","headers","upstream","fetch","duplex","ok","body","Response","status","Connection","clearTimeout","HEAD","req","searchParams","URL","url","get","controller","AbortController","timeout","setTimeout","abort","res","signal"],"mappings":"m/BCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,KDhBA,EAAA,EAAA,CAAA,CAAA,KAEA,IAAMA,EAAUC,QAAQC,GAAG,CAACC,WAAW,EAAI,0BACrCC,EAAaH,QAAQC,GAAG,CAACG,kBAAkB,EAAI,GAM9C,eAAeC,IACpB,IAAMC,EAAc,MAAM,CAAA,EAAA,EAAA,oBAAA,AAAoB,IAC9C,GAAIA,EAAa,OAAOA,EAExB,IAAMC,EAAkC,CAAC,EACrCJ,GAAYI,GAAQ,IAAD,SAAiB,CAAG,CAAC,OAAO,EAAEJ,EAAAA,CAAAA,AAAY,EAEjE,GAAI,CACF,IAAMK,EAAW,MAAMC,MAAM,CAAA,EAAGV,EAAQ,iBAAiB,CAAC,CAAE,SAC1DQ,EAEAG,OAAQ,MACV,GAEA,GAAI,CAACF,EAASG,EAAE,EAAI,CAACH,EAASI,IAAI,CAChC,CADkC,MAC3B,IAAIC,SAAS,2BAA4B,CAAEC,OAAQ,GAAI,GAGhE,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AAK,SAAS,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAA,AAAW,EAAC,kBACf,uBACA,CACJ,EACJ","ignoreList":[1]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../app/api/hub/events/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta, setRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/hub/events/route\",\n pathname: \"/api/hub/events\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/app/api/hub/events/route.ts\",\n nextConfigOutput,\n // The static import is used for initialization (methods, dynamic, etc.).\n userland: userland,\n // In Turbopack dev mode, also provide a getter that calls require() on every\n // request. This re-reads from devModuleCache so HMR updates are picked up,\n // and the async wrapper unwraps async-module Promises (ESM-only\n // serverExternalPackages) automatically.\n ...process.env.TURBOPACK && process.env.__NEXT_DEV_SERVER ? {\n getUserland: ()=>import(\"INNER_APP_ROUTE\")\n } : {}\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (ctx.requestMeta) {\n setRequestMeta(req, ctx.requestMeta);\n }\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/hub/events/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);\n const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'));\n const incrementalCache = getRequestMeta(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, prerenderManifest, isMinimalMode);\n incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();\n globalThis.__incrementalCache = incrementalCache;\n const context = {\n params,\n previewProps: prerenderManifest.preview,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache,\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n let parentSpan;\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n // Propagate http.route to the parent span if one exists (e.g.\n // a platform-created HTTP span in adapter deployments).\n if (parentSpan && parentSpan !== span) {\n parentSpan.setAttribute('http.route', route);\n parentSpan.updateName(name);\n }\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (isWrappedByNextServer && activeSpan) {\n await handleResponse(activeSpan);\n } else {\n parentSpan = tracer.getActiveScopeSpan();\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse), undefined, !isWrappedByNextServer);\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { requireDashboardAuth, getV3UserToken } from '@/app/lib/dashboard-auth';\n\nconst HUB_URL = process.env.COMMHUB_URL || 'http://47.77.216.1:9200';\nconst AUTH_TOKEN = process.env.COMMHUB_AUTH_TOKEN || '';\n\n/**\n * SSE proxy: forwards CommHub /events/Dashboard to the browser.\n * This lets the Dashboard receive real-time events without exposing CommHub URL.\n */\nexport async function GET() {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n // Prefer the logged-in user's utok_ (V3) over the legacy global token.\n // Without this, Dashboards started without COMMHUB_AUTH_TOKEN env get 502\n // because the hub rejects the unauthenticated SSE upstream.\n const userToken = await getV3UserToken();\n const bearer = userToken || AUTH_TOKEN;\n const headers: Record<string, string> = {};\n if (bearer) headers['Authorization'] = `Bearer ${bearer}`;\n\n try {\n const upstream = await fetch(`${HUB_URL}/events/Dashboard`, {\n headers,\n // @ts-expect-error - Next.js fetch doesn't type duplex\n duplex: 'half',\n });\n\n if (!upstream.ok || !upstream.body) {\n return new Response('SSE upstream unavailable', { status: 502 });\n }\n\n return new Response(upstream.body, {\n headers: {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache, no-transform',\n Connection: 'keep-alive',\n 'X-Accel-Buffering': 'no',\n },\n });\n } catch {\n return new Response('SSE connection failed', { status: 502 });\n }\n}\n\nexport async function HEAD(req: Request) {\n const authFailure = await requireDashboardAuth();\n if (authFailure) return authFailure;\n\n const { searchParams } = new URL(req.url);\n if (searchParams.get('probe') !== '1') {\n return new Response(null, { status: 405 });\n }\n\n // P0 fix: probe /health instead of opening real SSE upstream.\n // Opening /events/:session keeps an upstream connection hanging, which\n // exhausts the browser's HTTP/1.1 connection pool and blocks RSC fetches.\n const userToken = await getV3UserToken();\n const bearer = userToken || AUTH_TOKEN;\n const headers: Record<string, string> = {};\n if (bearer) headers['Authorization'] = `Bearer ${bearer}`;\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), 3000);\n\n try {\n const res = await fetch(`${HUB_URL}/health`, {\n headers,\n signal: controller.signal,\n });\n clearTimeout(timeout);\n return new Response(null, {\n status: 204,\n headers: { 'x-anet-sse-available': res.ok ? 'true' : 'false' },\n });\n } catch {\n clearTimeout(timeout);\n return new Response(null, {\n status: 204,\n headers: { 'x-anet-sse-available': 'false' },\n });\n }\n}\n"],"names":["HUB_URL","process","env","COMMHUB_URL","AUTH_TOKEN","COMMHUB_AUTH_TOKEN","GET","authFailure","userToken","bearer","headers","upstream","fetch","searchParams","duplex","status","ok","body","Response","Connection","controller","HEAD","req","URL","url","get","AbortController","timeout","setTimeout","abort","res","signal","clearTimeout"],"mappings":"m/BAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA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W,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,GAAyB,EACzB,MAAM,EAAe,EADgB,EAGrC,EAAa,EAAO,kBAAkB,GACtC,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,QAAiB,EAAW,CAAC,GAE5C,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,CAClC,0CACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,mCA3TA,SAAS,EACL,MAAO,CAAA,EAAA,EAAA,UAAW,AAAX,EAAY,kBACf,uBACA,CACJ,EACJ","ignoreList":[0]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[54826,(a,b,c)=>{},15299,(a,b,c)=>{a.r(54826);var d=a.r(72131),e=d&&"object"==typeof d&&"default"in d?d:{default:d},f="u">typeof process&&process.env&&!0,g=function(a){return"[object String]"===Object.prototype.toString.call(a)},h=function(){function a(a){var b=void 0===a?{}:a,c=b.name,d=void 0===c?"stylesheet":c,e=b.optimizeForSpeed,h=void 0===e?f:e;i(g(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",i("boolean"==typeof h,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=h,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var b,c=a.prototype;return c.setOptimizeForSpeed=function(a){i("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),i(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},c.isOptimizeForSpeed=function(){return this._optimizeForSpeed},c.inject=function(){var a=this;i(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(b,c){return"number"==typeof c?a._serverSheet.cssRules[c]={cssText:b}:a._serverSheet.cssRules.push({cssText:b}),c},deleteRule:function(b){a._serverSheet.cssRules[b]=null}}},c.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].ownerNode===a)return document.styleSheets[b]},c.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},c.insertRule=function(a,b){return i(g(a),"`insertRule` accepts only strings"),"number"!=typeof b&&(b=this._serverSheet.cssRules.length),this._serverSheet.insertRule(a,b),this._rulesCount++},c.replaceRule=function(a,b){this._optimizeForSpeed;var c=this._serverSheet;if(b.trim()||(b=this._deletedRulePlaceholder),!c.cssRules[a])return a;c.deleteRule(a);try{c.insertRule(b,a)}catch(d){f||console.warn("StyleSheet: illegal rule: \n\n"+b+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),c.insertRule(this._deletedRulePlaceholder,a)}return a},c.deleteRule=function(a){this._serverSheet.deleteRule(a)},c.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},c.cssRules=function(){return this._serverSheet.cssRules},c.makeStyleTag=function(a,b,c){b&&i(g(b),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),b&&d.appendChild(document.createTextNode(b));var e=document.head||document.getElementsByTagName("head")[0];return c?e.insertBefore(d,c):e.appendChild(d),d},b=[{key:"length",get:function(){return this._rulesCount}}],function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}(a.prototype,b),a}();function i(a,b){if(!a)throw Error("StyleSheet: "+b+".")}var j=function(a){for(var b=5381,c=a.length;c;)b=33*b^a.charCodeAt(--c);return b>>>0},k={};function l(a,b){if(!b)return"jsx-"+a;var c=String(b),d=a+c;return k[d]||(k[d]="jsx-"+j(a+"-"+c)),k[d]}function m(a,b){var c=a+(b=b.replace(/\/style/gi,"\\/style"));return k[c]||(k[c]=b.replace(/__jsx-style-dynamic-selector/g,a)),k[c]}var n=function(){function a(a){var b=void 0===a?{}:a,c=b.styleSheet,d=void 0===c?null:c,e=b.optimizeForSpeed,f=void 0!==e&&e;this._sheet=d||new h({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var b=a.prototype;return b.add=function(a){var b=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var c=this.getIdAndRules(a),d=c.styleId,e=c.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=e.map(function(a){return b._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},b.remove=function(a){var b=this,c=this.getIdAndRules(a).styleId;if(function(a,b){if(!a)throw Error("StyleSheetRegistry: "+b+".")}(c in this._instancesCounts,"styleId: `"+c+"` not found"),this._instancesCounts[c]-=1,this._instancesCounts[c]<1){var d=this._fromServer&&this._fromServer[c];d?(d.parentNode.removeChild(d),delete this._fromServer[c]):(this._indices[c].forEach(function(a){return b._sheet.deleteRule(a)}),delete this._indices[c]),delete this._instancesCounts[c]}},b.update=function(a,b){this.add(b),this.remove(a)},b.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},b.cssRules=function(){var a=this,b=this._fromServer?Object.keys(this._fromServer).map(function(b){return[b,a._fromServer[b]]}):[],c=this._sheet.cssRules();return b.concat(Object.keys(this._indices).map(function(b){return[b,a._indices[b].map(function(a){return c[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},b.styles=function(a){var b,c;return b=this.cssRules(),void 0===(c=a)&&(c={}),b.map(function(a){var b=a[0],d=a[1];return e.default.createElement("style",{id:"__"+b,key:"__"+b,nonce:c.nonce?c.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},b.getIdAndRules=function(a){var b=a.children,c=a.dynamic,d=a.id;if(c){var e=l(d,c);return{styleId:e,rules:Array.isArray(b)?b.map(function(a){return m(e,a)}):[m(e,b)]}}return{styleId:l(d),rules:Array.isArray(b)?b:[b]}},b.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,b){return a[b.id.slice(2)]=b,a},{})},a}(),o=d.createContext(null);function p(){return new n}function q(){return d.useContext(o)}function r(a){var b=q();return b&&b.add(a),null}o.displayName="StyleSheetContext",e.default.useInsertionEffect||e.default.useLayoutEffect,r.dynamic=function(a){return a.map(function(a){return l(a[0],a[1])}).join(" ")},c.StyleRegistry=function(a){var b=a.registry,c=a.children,f=d.useContext(o),g=d.useState(function(){return f||b||p()})[0];return e.default.createElement(o.Provider,{value:g},c)},c.createStyleRegistry=p,c.style=r,c.useStyleRegistry=q},31626,(a,b,c)=>{b.exports=a.r(15299).style},15261,a=>{"use strict";var b=a.i(87924),c=a.i(31626),d=a.i(72131),e=a.i(43515);let f=["created","delivered","running","replied"],g={created:"bg-gray-400",delivered:"bg-blue-400",running:"bg-green-400",replied:"bg-purple-400",failed:"bg-red-400",closed:"bg-gray-500"};function h({status:a}){let c=f.indexOf(a),d="failed"===a;return(0,b.jsxs)("div",{className:"flex items-center gap-1 mt-1.5",children:[f.map((a,e)=>(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("div",{className:`w-2 h-2 rounded-full transition-all duration-700 ${d?0===e?"bg-red-400":"bg-gray-700":e<=c?g[a]||"bg-gray-600":"bg-gray-700"}`}),e<f.length-1&&(0,b.jsx)("div",{className:`w-4 h-px transition-colors duration-700 ${d?"bg-red-800":e<c?"bg-gray-500":"bg-gray-800"}`})]},a)),(0,b.jsx)("span",{className:`text-[10px] ml-1.5 font-medium ${d?"text-red-400":"replied"===a?"text-purple-400":"running"===a?"text-green-400":"text-gray-500"}`,children:a}),("running"===a||"delivered"===a)&&(0,b.jsxs)("span",{className:"ml-1",children:[(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse"}),(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5",style:{animationDelay:"0.2s"}}),(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5",style:{animationDelay:"0.4s"}})]})]})}function i({text:a}){if(!a)return(0,b.jsx)("span",{className:"text-gray-600 italic",children:"No content"});let c=a.split(/(```[\s\S]*?```|`[^`\n]+`|\*\*[^*]+\*\*)/g);return(0,b.jsx)("div",{className:"whitespace-pre-wrap break-words leading-relaxed",children:c.map((a,c)=>{if(a.startsWith("```")&&a.endsWith("```")){let d=a.slice(3,-3),e=d.match(/^(\w+)\n/)?.[1]||"",f=e?d.slice(e.length+1):d;return(0,b.jsxs)("div",{className:"my-2 rounded-lg overflow-hidden border border-[#1a1a2a]",children:[e&&(0,b.jsx)("div",{className:"bg-[#0a0a15] px-3 py-1 text-[10px] text-gray-500 border-b border-[#1a1a2a]",children:e}),(0,b.jsx)("pre",{className:"bg-[#050510] px-3 py-2 text-[11px] text-green-300 overflow-x-auto",children:f})]},c)}return a.startsWith("`")&&a.endsWith("`")?(0,b.jsx)("code",{className:"bg-[#0a0a15] rounded px-1.5 py-0.5 text-cyan-300 text-[11px] border border-[#1a1a2a]",children:a.slice(1,-1)},c):a.startsWith("**")&&a.endsWith("**")?(0,b.jsx)("strong",{className:"text-white font-semibold",children:a.slice(2,-2)},c):(0,b.jsx)("span",{children:a},c)})})}a.s(["TaskChatPanel",0,function({alias:a,onClose:f,inline:g,availableNodes:j}){let[k,l]=(0,d.useState)([]),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)("normal"),[q,r]=(0,d.useState)(!1),[s,t]=(0,d.useState)(new Set),[u,v]=(0,d.useState)(!1),[w,x]=(0,d.useState)(a),[y,z]=(0,d.useState)(!1),[A,B]=(0,d.useState)(""),[C,D]=(0,d.useState)([]),E=(0,d.useRef)(null),F=(0,d.useRef)(null);(0,d.useEffect)(()=>{j?D(j):fetch("/api/hub/status").then(a=>a.json()).then(a=>{D((a.sessions||[]).filter(a=>"offline"!==a.status).map(a=>a.alias))}).catch(()=>{})},[j]),(0,d.useEffect)(()=>{x(a)},[a]);let G=(0,d.useCallback)(async()=>{try{let b=await fetch(`/api/hub/tasks?to_name=${encodeURIComponent(a)}&limit=30`),c=await b.json();c.tasks&&l(c.tasks.reverse())}catch{}finally{v(!0)}},[a]);(0,d.useEffect)(()=>{l([]),v(!1),G(),setTimeout(()=>F.current?.focus(),300)},[a,G]),(0,d.useEffect)(()=>{E.current?.scrollIntoView({behavior:"smooth"})},[k]),(0,d.useEffect)(()=>{if(0===s.size)return;let a=Date.now(),b=setInterval(async()=>{if(Date.now()-a>12e4){t(new Set),clearInterval(b);return}for(let a of s)try{let b=await fetch(`/api/hub/tasks?task_id=${encodeURIComponent(a)}`),c=await b.json();if(c.tasks?.[0]){let b=c.tasks[0];l(c=>c.map(c=>c.task_id===a?{...c,...b}:c)),["replied","failed","closed","expired","cancelled"].includes(b.status)&&t(b=>{let c=new Set(b);return c.delete(a),c})}}catch{}},2e3);return()=>clearInterval(b)},[s]);let H=async()=>{if(!m.trim()||q)return;let a=m.trim(),b=w,c=a.match(/^@(\S+)\s+([\s\S]+)/);if(c){let d=C.find(a=>a.toLowerCase()===c[1].toLowerCase());d&&(b=d,a=c[2])}r(!0),n(""),z(!1),F.current&&(F.current.style.height="auto");try{let c=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:b,task:a,priority:o})}),d=await c.json();if(d.ok){let c={task_id:d.message_id||`tmp-${Date.now()}`,from_name:"Dashboard",to_name:b,status:"created",priority:o,content:a,result:"",created_at:new Date().toISOString()};l(a=>[...a,c]),d.message_id&&t(a=>new Set(a).add(d.message_id))}}catch{}r(!1),F.current?.focus()},I=C.filter(b=>b!==a&&b.toLowerCase().includes(A)).slice(0,8),J=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[!u&&(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)("div",{className:"w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}),u&&0===k.length&&(0,b.jsxs)("div",{className:"text-center py-12",children:[(0,b.jsx)("div",{className:"text-3xl mb-3",children:"💬"}),(0,b.jsx)("div",{className:"text-gray-500 text-sm",children:"Start a conversation"}),(0,b.jsxs)("div",{className:"text-gray-600 text-xs mt-1",children:["Send a task to ",a]})]}),k.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)("div",{className:"max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-4 py-2.5 shadow-sm",children:[(0,b.jsx)("div",{className:"text-[13px] text-gray-200",children:(0,b.jsx)(i,{text:a.content})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1.5 gap-3",children:[(0,b.jsx)(h,{status:a.status}),(0,b.jsx)("span",{className:"text-[9px] text-gray-600 shrink-0",children:(0,e.timeAgo)(a.created_at)})]})]})}),a.result&&(0,b.jsx)("div",{className:"flex justify-start",children:(0,b.jsxs)("div",{className:"max-w-[85%] bg-green-500/8 border border-green-500/15 rounded-2xl rounded-bl-md px-4 py-2.5 shadow-sm",children:[(0,b.jsx)("div",{className:"text-[10px] text-green-400 font-medium mb-1.5",children:a.to_name}),(0,b.jsx)("div",{className:"text-[13px] text-gray-200",children:(0,b.jsx)(i,{text:a.result})})]})}),"running"===a.status&&!a.result&&(0,b.jsx)("div",{className:"flex justify-start",children:(0,b.jsx)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-2xl rounded-bl-md px-4 py-3",children:(0,b.jsxs)("div",{className:"flex gap-1",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0s"}}),(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0.15s"}}),(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0.3s"}})]})})})]},a.task_id)),(0,b.jsx)("div",{ref:E})]}),(0,b.jsxs)("div",{className:"border-t border-[#2a2a4a] bg-[#0d0d1a] px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-end gap-2",children:[(0,b.jsxs)("div",{className:"flex-1 relative",children:[y&&I.length>0&&(0,b.jsx)("div",{className:"absolute bottom-full left-0 right-0 mb-1 bg-[#111128] border border-[#2a2a4a] rounded-lg shadow-xl shadow-black/50 overflow-hidden z-10 max-h-48 overflow-y-auto",children:I.map(a=>(0,b.jsxs)("button",{onClick:()=>{let b,c;return b=m.lastIndexOf("@"),c=m.slice(0,b),void(n(`${c}@${a} `),z(!1),F.current?.focus())},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-left hover:bg-cyan-500/10 transition-colors",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-cyan-400 shrink-0"}),(0,b.jsx)("span",{className:"text-gray-300",children:a})]},a))}),(0,b.jsx)("textarea",{ref:F,value:m,onChange:a=>{var b;(a=>{n(a);let b=a.lastIndexOf("@");if(b>=0&&(0===b||" "===a[b-1]||"\n"===a[b-1])){let c=a.slice(b+1);if(!c.includes(" ")&&!c.includes("\n")){B(c.toLowerCase()),z(!0);return}}z(!1)})(a.target.value),(b=a.target).style.height="auto",b.style.height=Math.min(b.scrollHeight,150)+"px"},onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&(a.preventDefault(),H()),"Escape"===a.key&&z(!1)},placeholder:`Message ${a}...`,rows:1,className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-2.5 pr-16 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none transition-colors"}),(0,b.jsx)("div",{className:"absolute right-2 bottom-1.5 flex items-center gap-1",children:(0,b.jsxs)("select",{value:o,onChange:a=>p(a.target.value),className:"bg-transparent text-[9px] text-gray-600 focus:outline-none cursor-pointer",children:[(0,b.jsx)("option",{value:"normal",children:"N"}),(0,b.jsx)("option",{value:"high",children:"H"}),(0,b.jsx)("option",{value:"low",children:"L"})]})})]}),(0,b.jsx)("button",{onClick:H,disabled:q||!m.trim(),className:"p-2.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded-xl transition-all shrink-0 active:scale-95",children:q?(0,b.jsx)("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})})]}),(0,b.jsxs)("div",{className:"flex justify-between text-[9px] text-gray-700 mt-1.5",children:[(0,b.jsx)("span",{children:m.includes("@")?`Sending to: ${w}`:"Type @ to mention another node"}),(0,b.jsx)("span",{children:"⌘+Enter"})]})]})]});return g?(0,b.jsx)("div",{className:"flex flex-col h-full",children:J}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:f,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40 lg:hidden"}),(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 animate-slide-in",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-4 py-3 border-b border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500/30 to-blue-500/30 flex items-center justify-center text-xs font-bold text-cyan-300",children:a.slice(0,2)}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:a}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:s.size>0?"Processing...":"Ready"})]})]}),(0,b.jsx)("button",{onClick:f,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"})})})]}),J]}),(0,b.jsx)(c.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}])}];
|
|
1
|
+
module.exports=[54826,(a,b,c)=>{},15299,(a,b,c)=>{a.r(54826);var d=a.r(72131),e=d&&"object"==typeof d&&"default"in d?d:{default:d},f="u">typeof process&&process.env&&!0,g=function(a){return"[object String]"===Object.prototype.toString.call(a)},h=function(){function a(a){var b=void 0===a?{}:a,c=b.name,d=void 0===c?"stylesheet":c,e=b.optimizeForSpeed,h=void 0===e?f:e;i(g(d),"`name` must be a string"),this._name=d,this._deletedRulePlaceholder="#"+d+"-deleted-rule____{}",i("boolean"==typeof h,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=h,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var b,c=a.prototype;return c.setOptimizeForSpeed=function(a){i("boolean"==typeof a,"`setOptimizeForSpeed` accepts a boolean"),i(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=a,this.inject()},c.isOptimizeForSpeed=function(){return this._optimizeForSpeed},c.inject=function(){var a=this;i(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(b,c){return"number"==typeof c?a._serverSheet.cssRules[c]={cssText:b}:a._serverSheet.cssRules.push({cssText:b}),c},deleteRule:function(b){a._serverSheet.cssRules[b]=null}}},c.getSheetForTag=function(a){if(a.sheet)return a.sheet;for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].ownerNode===a)return document.styleSheets[b]},c.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},c.insertRule=function(a,b){return i(g(a),"`insertRule` accepts only strings"),"number"!=typeof b&&(b=this._serverSheet.cssRules.length),this._serverSheet.insertRule(a,b),this._rulesCount++},c.replaceRule=function(a,b){this._optimizeForSpeed;var c=this._serverSheet;if(b.trim()||(b=this._deletedRulePlaceholder),!c.cssRules[a])return a;c.deleteRule(a);try{c.insertRule(b,a)}catch(d){f||console.warn("StyleSheet: illegal rule: \n\n"+b+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),c.insertRule(this._deletedRulePlaceholder,a)}return a},c.deleteRule=function(a){this._serverSheet.deleteRule(a)},c.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},c.cssRules=function(){return this._serverSheet.cssRules},c.makeStyleTag=function(a,b,c){b&&i(g(b),"makeStyleTag accepts only strings as second parameter");var d=document.createElement("style");this._nonce&&d.setAttribute("nonce",this._nonce),d.type="text/css",d.setAttribute("data-"+a,""),b&&d.appendChild(document.createTextNode(b));var e=document.head||document.getElementsByTagName("head")[0];return c?e.insertBefore(d,c):e.appendChild(d),d},b=[{key:"length",get:function(){return this._rulesCount}}],function(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}(a.prototype,b),a}();function i(a,b){if(!a)throw Error("StyleSheet: "+b+".")}var j=function(a){for(var b=5381,c=a.length;c;)b=33*b^a.charCodeAt(--c);return b>>>0},k={};function l(a,b){if(!b)return"jsx-"+a;var c=String(b),d=a+c;return k[d]||(k[d]="jsx-"+j(a+"-"+c)),k[d]}function m(a,b){var c=a+(b=b.replace(/\/style/gi,"\\/style"));return k[c]||(k[c]=b.replace(/__jsx-style-dynamic-selector/g,a)),k[c]}var n=function(){function a(a){var b=void 0===a?{}:a,c=b.styleSheet,d=void 0===c?null:c,e=b.optimizeForSpeed,f=void 0!==e&&e;this._sheet=d||new h({name:"styled-jsx",optimizeForSpeed:f}),this._sheet.inject(),d&&"boolean"==typeof f&&(this._sheet.setOptimizeForSpeed(f),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var b=a.prototype;return b.add=function(a){var b=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(a.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var c=this.getIdAndRules(a),d=c.styleId,e=c.rules;if(d in this._instancesCounts){this._instancesCounts[d]+=1;return}var f=e.map(function(a){return b._sheet.insertRule(a)}).filter(function(a){return -1!==a});this._indices[d]=f,this._instancesCounts[d]=1},b.remove=function(a){var b=this,c=this.getIdAndRules(a).styleId;if(function(a,b){if(!a)throw Error("StyleSheetRegistry: "+b+".")}(c in this._instancesCounts,"styleId: `"+c+"` not found"),this._instancesCounts[c]-=1,this._instancesCounts[c]<1){var d=this._fromServer&&this._fromServer[c];d?(d.parentNode.removeChild(d),delete this._fromServer[c]):(this._indices[c].forEach(function(a){return b._sheet.deleteRule(a)}),delete this._indices[c]),delete this._instancesCounts[c]}},b.update=function(a,b){this.add(b),this.remove(a)},b.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},b.cssRules=function(){var a=this,b=this._fromServer?Object.keys(this._fromServer).map(function(b){return[b,a._fromServer[b]]}):[],c=this._sheet.cssRules();return b.concat(Object.keys(this._indices).map(function(b){return[b,a._indices[b].map(function(a){return c[a].cssText}).join(a._optimizeForSpeed?"":"\n")]}).filter(function(a){return!!a[1]}))},b.styles=function(a){var b,c;return b=this.cssRules(),void 0===(c=a)&&(c={}),b.map(function(a){var b=a[0],d=a[1];return e.default.createElement("style",{id:"__"+b,key:"__"+b,nonce:c.nonce?c.nonce:void 0,dangerouslySetInnerHTML:{__html:d}})})},b.getIdAndRules=function(a){var b=a.children,c=a.dynamic,d=a.id;if(c){var e=l(d,c);return{styleId:e,rules:Array.isArray(b)?b.map(function(a){return m(e,a)}):[m(e,b)]}}return{styleId:l(d),rules:Array.isArray(b)?b:[b]}},b.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(a,b){return a[b.id.slice(2)]=b,a},{})},a}(),o=d.createContext(null);function p(){return new n}function q(){return d.useContext(o)}function r(a){var b=q();return b&&b.add(a),null}o.displayName="StyleSheetContext",e.default.useInsertionEffect||e.default.useLayoutEffect,r.dynamic=function(a){return a.map(function(a){return l(a[0],a[1])}).join(" ")},c.StyleRegistry=function(a){var b=a.registry,c=a.children,f=d.useContext(o),g=d.useState(function(){return f||b||p()})[0];return e.default.createElement(o.Provider,{value:g},c)},c.createStyleRegistry=p,c.style=r,c.useStyleRegistry=q},31626,(a,b,c)=>{b.exports=a.r(15299).style},15261,a=>{"use strict";var b=a.i(87924),c=a.i(31626),d=a.i(72131),e=a.i(43515);let f=["created","delivered","running","replied"],g={created:"bg-gray-400",delivered:"bg-blue-400",running:"bg-green-400",replied:"bg-purple-400",failed:"bg-red-400",closed:"bg-gray-500"};function h({status:a}){let c=f.indexOf(a),d="failed"===a;return(0,b.jsxs)("div",{className:"flex items-center gap-1 mt-1.5",children:[f.map((a,e)=>(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("div",{className:`w-2 h-2 rounded-full transition-all duration-700 ${d?0===e?"bg-red-400":"bg-gray-700":e<=c?g[a]||"bg-gray-600":"bg-gray-700"}`}),e<f.length-1&&(0,b.jsx)("div",{className:`w-4 h-px transition-colors duration-700 ${d?"bg-red-800":e<c?"bg-gray-500":"bg-gray-800"}`})]},a)),(0,b.jsx)("span",{className:`text-[10px] ml-1.5 font-medium ${d?"text-red-400":"replied"===a?"text-purple-400":"running"===a?"text-green-400":"text-gray-500"}`,children:a}),("running"===a||"delivered"===a)&&(0,b.jsxs)("span",{className:"ml-1",children:[(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse"}),(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5",style:{animationDelay:"0.2s"}}),(0,b.jsx)("span",{className:"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5",style:{animationDelay:"0.4s"}})]})]})}function i({text:a}){if(!a)return(0,b.jsx)("span",{className:"text-gray-600 italic",children:"No content"});let c=a.split(/(```[\s\S]*?```|`[^`\n]+`|\*\*[^*]+\*\*)/g);return(0,b.jsx)("div",{className:"whitespace-pre-wrap break-words leading-relaxed",children:c.map((a,c)=>{if(a.startsWith("```")&&a.endsWith("```")){let d=a.slice(3,-3),e=d.match(/^(\w+)\n/)?.[1]||"",f=e?d.slice(e.length+1):d;return(0,b.jsxs)("div",{className:"my-2 rounded-lg overflow-hidden border border-[#1a1a2a]",children:[e&&(0,b.jsx)("div",{className:"bg-[#0a0a15] px-3 py-1 text-[10px] text-gray-500 border-b border-[#1a1a2a]",children:e}),(0,b.jsx)("pre",{className:"bg-[#050510] px-3 py-2 text-[11px] text-green-300 overflow-x-auto",children:f})]},c)}return a.startsWith("`")&&a.endsWith("`")?(0,b.jsx)("code",{className:"bg-[#0a0a15] rounded px-1.5 py-0.5 text-cyan-300 text-[11px] border border-[#1a1a2a]",children:a.slice(1,-1)},c):a.startsWith("**")&&a.endsWith("**")?(0,b.jsx)("strong",{className:"text-white font-semibold",children:a.slice(2,-2)},c):(0,b.jsx)("span",{children:a},c)})})}a.s(["TaskChatPanel",0,function({alias:a,onClose:f,inline:g,availableNodes:j}){let[k,l]=(0,d.useState)([]),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)("normal"),[q,r]=(0,d.useState)(!1),[s,t]=(0,d.useState)(new Set),[u,v]=(0,d.useState)(!1),[w,x]=(0,d.useState)(a),[y,z]=(0,d.useState)(!1),[A,B]=(0,d.useState)(""),[C,D]=(0,d.useState)([]),E=(0,d.useRef)(null),F=(0,d.useRef)(null);(0,d.useEffect)(()=>{j?D(j):fetch("/api/hub/status").then(a=>a.json()).then(a=>{D((a.sessions||[]).filter(a=>"offline"!==a.status).map(a=>a.alias))}).catch(()=>{})},[j]),(0,d.useEffect)(()=>{x(a)},[a]);let G=(0,d.useCallback)(async()=>{try{let b=await fetch(`/api/hub/tasks?to_name=${encodeURIComponent(a)}&limit=30`),c=await b.json();c.tasks&&l(c.tasks.reverse())}catch{}finally{v(!0)}},[a]);(0,d.useEffect)(()=>{l([]),v(!1),G(),setTimeout(()=>F.current?.focus(),300)},[a,G]),(0,d.useEffect)(()=>{E.current?.scrollIntoView({behavior:"smooth"})},[k]),(0,d.useEffect)(()=>{if(0===s.size)return;let a=Date.now(),b=setInterval(async()=>{if(Date.now()-a>12e4){t(new Set),clearInterval(b);return}for(let a of s)try{let b=await fetch(`/api/hub/tasks?task_id=${encodeURIComponent(a)}`),c=await b.json();if(c.tasks?.[0]){let b=c.tasks[0];l(c=>c.map(c=>c.task_id===a?{...c,...b}:c)),["replied","failed","closed","expired","cancelled"].includes(b.status)&&t(b=>{let c=new Set(b);return c.delete(a),c})}}catch{}},2e3);return()=>clearInterval(b)},[s]);let H=async()=>{if(!m.trim()||q)return;let a=m.trim(),b=w,c=a.match(/^@(\S+)\s+([\s\S]+)/);if(c){let d=C.find(a=>a.toLowerCase()===c[1].toLowerCase());d&&(b=d,a=c[2])}r(!0),n(""),z(!1),F.current&&(F.current.style.height="auto");try{let c=await fetch("/api/hub/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({alias:b,task:a,priority:o})}),d=await c.json();if(d.ok){let c={task_id:d.message_id||`tmp-${Date.now()}`,from_name:"Dashboard",to_name:b,status:"created",priority:o,content:a,result:"",created_at:new Date().toISOString()};l(a=>[...a,c]),d.message_id&&t(a=>new Set(a).add(d.message_id))}}catch{}r(!1),F.current?.focus()},I=C.filter(b=>b!==a&&b.toLowerCase().includes(A)).slice(0,8),J=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[!u&&(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)("div",{className:"w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"})}),u&&0===k.length&&(0,b.jsxs)("div",{className:"text-center py-12",children:[(0,b.jsx)("div",{className:"text-3xl mb-3",children:"💬"}),(0,b.jsx)("div",{className:"text-gray-500 text-sm",children:"Start a conversation"}),(0,b.jsxs)("div",{className:"text-gray-600 text-xs mt-1",children:["Send a task to ",a]})]}),k.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)("div",{className:"max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-4 py-2.5 shadow-sm",children:[(0,b.jsx)("div",{className:"text-[13px] text-gray-200",children:(0,b.jsx)(i,{text:a.content})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-1.5 gap-3",children:[(0,b.jsx)(h,{status:a.status}),(0,b.jsx)("span",{className:"text-[9px] text-gray-600 shrink-0",children:(0,e.timeAgo)(a.created_at)})]})]})}),a.result&&(0,b.jsx)("div",{className:"flex justify-start",children:(0,b.jsxs)("div",{className:"max-w-[85%] bg-green-500/8 border border-green-500/15 rounded-2xl rounded-bl-md px-4 py-2.5 shadow-sm",children:[(0,b.jsx)("div",{className:"text-[10px] text-green-400 font-medium mb-1.5",children:a.to_name}),(0,b.jsx)("div",{className:"text-[13px] text-gray-200",children:(0,b.jsx)(i,{text:a.result})})]})}),"running"===a.status&&!a.result&&(0,b.jsx)("div",{className:"flex justify-start",children:(0,b.jsx)("div",{className:"bg-[#111128] border border-[#2a2a4a] rounded-2xl rounded-bl-md px-4 py-3",children:(0,b.jsxs)("div",{className:"flex gap-1",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0s"}}),(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0.15s"}}),(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-500 animate-bounce",style:{animationDelay:"0.3s"}})]})})})]},a.task_id)),(0,b.jsx)("div",{ref:E})]}),(0,b.jsxs)("div",{className:"border-t border-[#2a2a4a] bg-[#0d0d1a] px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-end gap-2",children:[(0,b.jsxs)("div",{className:"flex-1 relative",children:[y&&I.length>0&&(0,b.jsx)("div",{className:"absolute bottom-full left-0 right-0 mb-1 bg-[#111128] border border-[#2a2a4a] rounded-lg shadow-xl shadow-black/50 overflow-hidden z-10 max-h-48 overflow-y-auto",children:I.map(a=>(0,b.jsxs)("button",{onClick:()=>{let b,c;return b=m.lastIndexOf("@"),c=m.slice(0,b),void(n(`${c}@${a} `),z(!1),F.current?.focus())},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-left hover:bg-cyan-500/10 transition-colors",children:[(0,b.jsx)("span",{className:"w-2 h-2 rounded-full bg-cyan-400 shrink-0"}),(0,b.jsx)("span",{className:"text-gray-300",children:a})]},a))}),(0,b.jsx)("textarea",{ref:F,value:m,onChange:a=>{var b;(a=>{n(a);let b=a.lastIndexOf("@");if(b>=0&&(0===b||" "===a[b-1]||"\n"===a[b-1])){let c=a.slice(b+1);if(!c.includes(" ")&&!c.includes("\n")){B(c.toLowerCase()),z(!0);return}}z(!1)})(a.target.value),(b=a.target).style.height="auto",b.style.height=Math.min(b.scrollHeight,150)+"px"},onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),H()),"Escape"===a.key&&z(!1)},placeholder:`Message ${a}...`,rows:1,className:"w-full bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-2.5 pr-16 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none transition-colors"}),(0,b.jsx)("div",{className:"absolute right-2 bottom-1.5 flex items-center gap-1",children:(0,b.jsxs)("select",{value:o,onChange:a=>p(a.target.value),className:"bg-transparent text-[9px] text-gray-600 focus:outline-none cursor-pointer",children:[(0,b.jsx)("option",{value:"normal",children:"N"}),(0,b.jsx)("option",{value:"high",children:"H"}),(0,b.jsx)("option",{value:"low",children:"L"})]})})]}),(0,b.jsx)("button",{onClick:H,disabled:q||!m.trim(),className:"p-2.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded-xl transition-all shrink-0 active:scale-95",children:q?(0,b.jsx)("div",{className:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"}):(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})})]}),(0,b.jsxs)("div",{className:"flex justify-between text-[9px] text-gray-700 mt-1.5",children:[(0,b.jsx)("span",{children:m.includes("@")?`Sending to: ${w}`:"Type @ to mention another node"}),(0,b.jsx)("span",{children:"Enter to send · Shift+Enter for newline"})]})]})]});return g?(0,b.jsx)("div",{className:"flex flex-col h-full",children:J}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{onClick:f,className:"jsx-c3e56cbc81656d9 fixed inset-0 bg-black/30 z-40 lg:hidden"}),(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 animate-slide-in",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center justify-between px-4 py-3 border-b border-[#2a2a4a] bg-[#0d0d1a]",children:[(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9 flex items-center gap-3",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500/30 to-blue-500/30 flex items-center justify-center text-xs font-bold text-cyan-300",children:a.slice(0,2)}),(0,b.jsxs)("div",{className:"jsx-c3e56cbc81656d9",children:[(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-sm font-semibold text-white",children:a}),(0,b.jsx)("div",{className:"jsx-c3e56cbc81656d9 text-[10px] text-gray-500",children:s.size>0?"Processing...":"Ready"})]})]}),(0,b.jsx)("button",{onClick:f,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"})})})]}),J]}),(0,b.jsx)(c.default,{id:"c3e56cbc81656d9",children:"@keyframes slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}"})]})}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0s2kgzl._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/style.js","../../../../app/components/TaskChatPanel.tsx"],"sourcesContent":["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","'use client';\n\nimport { useState, useEffect, useRef, useCallback } from 'react';\nimport { timeAgo } from './utils';\n\ninterface ChatTask {\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}\n\nconst STATUS_STEPS = ['created', 'delivered', 'running', 'replied'];\nconst STATUS_COLORS: Record<string, string> = {\n created: 'bg-gray-400', delivered: 'bg-blue-400', running: 'bg-green-400',\n replied: 'bg-purple-400', failed: 'bg-red-400', closed: 'bg-gray-500',\n};\n\nfunction StatusBar({ status }: { status: string }) {\n const idx = STATUS_STEPS.indexOf(status);\n const isFailed = status === 'failed';\n return (\n <div className=\"flex items-center gap-1 mt-1.5\">\n {STATUS_STEPS.map((s, i) => (\n <div key={s} className=\"flex items-center gap-1\">\n <div className={`w-2 h-2 rounded-full transition-all duration-700 ${\n isFailed ? (i === 0 ? 'bg-red-400' : 'bg-gray-700')\n : i <= idx ? (STATUS_COLORS[s] || 'bg-gray-600') : 'bg-gray-700'\n }`} />\n {i < STATUS_STEPS.length - 1 && (\n <div className={`w-4 h-px transition-colors duration-700 ${\n isFailed ? 'bg-red-800' : i < idx ? 'bg-gray-500' : 'bg-gray-800'\n }`} />\n )}\n </div>\n ))}\n <span className={`text-[10px] ml-1.5 font-medium ${\n isFailed ? 'text-red-400' : status === 'replied' ? 'text-purple-400'\n : status === 'running' ? 'text-green-400' : 'text-gray-500'\n }`}>{status}</span>\n {(status === 'running' || status === 'delivered') && (\n <span className=\"ml-1\">\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse\" />\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5\" style={{ animationDelay: '0.2s' }} />\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5\" style={{ animationDelay: '0.4s' }} />\n </span>\n )}\n </div>\n );\n}\n\nfunction MarkdownContent({ text }: { text: string }) {\n if (!text) return <span className=\"text-gray-600 italic\">No content</span>;\n\n const parts = text.split(/(```[\\s\\S]*?```|`[^`\\n]+`|\\*\\*[^*]+\\*\\*)/g);\n return (\n <div className=\"whitespace-pre-wrap break-words leading-relaxed\">\n {parts.map((part, i) => {\n if (part.startsWith('```') && part.endsWith('```')) {\n const lines = part.slice(3, -3);\n const lang = lines.match(/^(\\w+)\\n/)?.[1] || '';\n const code = lang ? lines.slice(lang.length + 1) : lines;\n return (\n <div key={i} className=\"my-2 rounded-lg overflow-hidden border border-[#1a1a2a]\">\n {lang && <div className=\"bg-[#0a0a15] px-3 py-1 text-[10px] text-gray-500 border-b border-[#1a1a2a]\">{lang}</div>}\n <pre className=\"bg-[#050510] px-3 py-2 text-[11px] text-green-300 overflow-x-auto\">{code}</pre>\n </div>\n );\n }\n if (part.startsWith('`') && part.endsWith('`')) {\n return <code key={i} className=\"bg-[#0a0a15] rounded px-1.5 py-0.5 text-cyan-300 text-[11px] border border-[#1a1a2a]\">{part.slice(1, -1)}</code>;\n }\n if (part.startsWith('**') && part.endsWith('**')) {\n return <strong key={i} className=\"text-white font-semibold\">{part.slice(2, -2)}</strong>;\n }\n return <span key={i}>{part}</span>;\n })}\n </div>\n );\n}\n\ninterface TaskChatPanelProps {\n alias: string;\n onClose: () => void;\n /** When true, renders without outer panel chrome (for use inside CommandCenter) */\n inline?: boolean;\n /** Available nodes for @ mention */\n availableNodes?: string[];\n}\n\nexport function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskChatPanelProps) {\n const [messages, setMessages] = useState<ChatTask[]>([]);\n const [input, setInput] = useState('');\n const [priority, setPriority] = useState('normal');\n const [sending, setSending] = useState(false);\n const [pollingIds, setPollingIds] = useState<Set<string>>(new Set());\n const [historyLoaded, setHistoryLoaded] = useState(false);\n const [targetAlias, setTargetAlias] = useState(alias);\n const [showMentions, setShowMentions] = useState(false);\n const [mentionFilter, setMentionFilter] = useState('');\n const [mentionNodes, setMentionNodes] = useState<string[]>([]);\n const messagesEndRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n // Load available nodes for @ mention\n useEffect(() => {\n if (availableNodes) { setMentionNodes(availableNodes); return; }\n fetch('/api/hub/status').then(r => r.json()).then(d => {\n const nodes = (d.sessions || []).filter((s: { status: string }) => s.status !== 'offline').map((s: { alias: string }) => s.alias);\n setMentionNodes(nodes);\n }).catch(() => {});\n }, [availableNodes]);\n\n // Reset target when alias changes\n useEffect(() => { setTargetAlias(alias); }, [alias]);\n\n // Load task history for this node\n const loadHistory = useCallback(async () => {\n try {\n const res = await fetch(`/api/hub/tasks?to_name=${encodeURIComponent(alias)}&limit=30`);\n const data = await res.json();\n if (data.tasks) {\n // Show oldest first\n setMessages(data.tasks.reverse());\n }\n } catch {} finally {\n setHistoryLoaded(true);\n }\n }, [alias]);\n\n useEffect(() => {\n setMessages([]);\n setHistoryLoaded(false);\n loadHistory();\n // Focus textarea\n setTimeout(() => textareaRef.current?.focus(), 300);\n }, [alias, loadHistory]);\n\n // Auto-scroll to bottom\n useEffect(() => {\n messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n }, [messages]);\n\n // Poll pending tasks for status updates\n useEffect(() => {\n if (pollingIds.size === 0) return;\n const startTime = Date.now();\n const interval = setInterval(async () => {\n // Timeout after 120s\n if (Date.now() - startTime > 120000) {\n setPollingIds(new Set());\n clearInterval(interval);\n return;\n }\n for (const taskId of pollingIds) {\n try {\n const res = await fetch(`/api/hub/tasks?task_id=${encodeURIComponent(taskId)}`);\n const data = await res.json();\n if (data.tasks?.[0]) {\n const updated = data.tasks[0];\n setMessages(prev => prev.map(m => m.task_id === taskId ? { ...m, ...updated } : m));\n if (['replied', 'failed', 'closed', 'expired', 'cancelled'].includes(updated.status)) {\n setPollingIds(prev => { const n = new Set(prev); n.delete(taskId); return n; });\n }\n }\n } catch {}\n }\n }, 2000);\n return () => clearInterval(interval);\n }, [pollingIds]);\n\n const send = async () => {\n if (!input.trim() || sending) return;\n let taskContent = input.trim();\n let sendTo = targetAlias;\n\n // Parse @mention at start: \"@NodeName rest of message\"\n const atMatch = taskContent.match(/^@(\\S+)\\s+([\\s\\S]+)/);\n if (atMatch) {\n const mentioned = mentionNodes.find(n => n.toLowerCase() === atMatch[1].toLowerCase());\n if (mentioned) {\n sendTo = mentioned;\n taskContent = atMatch[2];\n }\n }\n\n setSending(true);\n setInput('');\n setShowMentions(false);\n if (textareaRef.current) textareaRef.current.style.height = 'auto';\n\n try {\n const res = await fetch('/api/hub/send', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ alias: sendTo, task: taskContent, priority }),\n });\n const data = await res.json();\n if (data.ok) {\n const newMsg: ChatTask = {\n task_id: data.message_id || `tmp-${Date.now()}`,\n from_name: 'Dashboard',\n to_name: sendTo,\n status: 'created',\n priority,\n content: taskContent,\n result: '',\n created_at: new Date().toISOString(),\n };\n setMessages(prev => [...prev, newMsg]);\n if (data.message_id) {\n setPollingIds(prev => new Set(prev).add(data.message_id));\n }\n }\n } catch {}\n setSending(false);\n textareaRef.current?.focus();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n e.preventDefault();\n send();\n }\n if (e.key === 'Escape') setShowMentions(false);\n };\n\n const handleInputChange = (value: string) => {\n setInput(value);\n // Check if user just typed @\n const lastAt = value.lastIndexOf('@');\n if (lastAt >= 0 && (lastAt === 0 || value[lastAt - 1] === ' ' || value[lastAt - 1] === '\\n')) {\n const after = value.slice(lastAt + 1);\n if (!after.includes(' ') && !after.includes('\\n')) {\n setMentionFilter(after.toLowerCase());\n setShowMentions(true);\n return;\n }\n }\n setShowMentions(false);\n };\n\n const insertMention = (nodeName: string) => {\n const lastAt = input.lastIndexOf('@');\n const before = input.slice(0, lastAt);\n setInput(`${before}@${nodeName} `);\n setShowMentions(false);\n textareaRef.current?.focus();\n };\n\n const filteredMentions = mentionNodes.filter(n =>\n n !== alias && n.toLowerCase().includes(mentionFilter)\n ).slice(0, 8);\n\n const autoResize = (el: HTMLTextAreaElement) => {\n el.style.height = 'auto';\n el.style.height = Math.min(el.scrollHeight, 150) + 'px';\n };\n\n // Inline mode: just the chat content, no panel chrome\n const chatContent = (\n <>\n {/* Messages area */}\n <div className=\"flex-1 overflow-y-auto px-4 py-4 space-y-4\">\n {!historyLoaded && (\n <div className=\"flex justify-center py-8\">\n <div className=\"w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin\" />\n </div>\n )}\n {historyLoaded && messages.length === 0 && (\n <div className=\"text-center py-12\">\n <div className=\"text-3xl mb-3\">💬</div>\n <div className=\"text-gray-500 text-sm\">Start a conversation</div>\n <div className=\"text-gray-600 text-xs mt-1\">Send a task to {alias}</div>\n </div>\n )}\n\n {messages.map((m, idx) => (\n <div key={m.task_id} className=\"space-y-2\">\n {/* Outgoing task */}\n <div className=\"flex justify-end\">\n <div className=\"max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-4 py-2.5 shadow-sm\">\n <div className=\"text-[13px] text-gray-200\">\n <MarkdownContent text={m.content} />\n </div>\n <div className=\"flex items-center justify-between mt-1.5 gap-3\">\n <StatusBar status={m.status} />\n <span className=\"text-[9px] text-gray-600 shrink-0\">{timeAgo(m.created_at)}</span>\n </div>\n </div>\n </div>\n\n {/* Incoming reply */}\n {m.result && (\n <div className=\"flex justify-start\">\n <div className=\"max-w-[85%] bg-green-500/8 border border-green-500/15 rounded-2xl rounded-bl-md px-4 py-2.5 shadow-sm\">\n <div className=\"text-[10px] text-green-400 font-medium mb-1.5\">{m.to_name}</div>\n <div className=\"text-[13px] text-gray-200\">\n <MarkdownContent text={m.result} />\n </div>\n </div>\n </div>\n )}\n\n {/* Typing indicator when running */}\n {m.status === 'running' && !m.result && (\n <div className=\"flex justify-start\">\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-2xl rounded-bl-md px-4 py-3\">\n <div className=\"flex gap-1\">\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0s' }} />\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0.15s' }} />\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0.3s' }} />\n </div>\n </div>\n </div>\n )}\n </div>\n ))}\n <div ref={messagesEndRef} />\n </div>\n\n {/* Input area */}\n <div className=\"border-t border-[#2a2a4a] bg-[#0d0d1a] px-4 py-3\">\n <div className=\"flex items-end gap-2\">\n <div className=\"flex-1 relative\">\n {/* @ mention dropdown */}\n {showMentions && filteredMentions.length > 0 && (\n <div className=\"absolute bottom-full left-0 right-0 mb-1 bg-[#111128] border border-[#2a2a4a] rounded-lg shadow-xl shadow-black/50 overflow-hidden z-10 max-h-48 overflow-y-auto\">\n {filteredMentions.map(node => (\n <button key={node} onClick={() => insertMention(node)}\n className=\"w-full flex items-center gap-2 px-3 py-2 text-xs text-left hover:bg-cyan-500/10 transition-colors\">\n <span className=\"w-2 h-2 rounded-full bg-cyan-400 shrink-0\" />\n <span className=\"text-gray-300\">{node}</span>\n </button>\n ))}\n </div>\n )}\n <textarea\n ref={textareaRef}\n value={input}\n onChange={e => { handleInputChange(e.target.value); autoResize(e.target); }}\n onKeyDown={handleKeyDown}\n placeholder={`Message ${alias}...`}\n rows={1}\n className=\"w-full bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-2.5 pr-16 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none transition-colors\"\n />\n <div className=\"absolute right-2 bottom-1.5 flex items-center gap-1\">\n <select value={priority} onChange={e => setPriority(e.target.value)}\n className=\"bg-transparent text-[9px] text-gray-600 focus:outline-none cursor-pointer\">\n <option value=\"normal\">N</option>\n <option value=\"high\">H</option>\n <option value=\"low\">L</option>\n </select>\n </div>\n </div>\n <button onClick={send} disabled={sending || !input.trim()}\n className=\"p-2.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded-xl transition-all shrink-0 active:scale-95\">\n {sending ? (\n <div className=\"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin\" />\n ) : (\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 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5\" />\n </svg>\n )}\n </button>\n </div>\n <div className=\"flex justify-between text-[9px] text-gray-700 mt-1.5\">\n <span>{input.includes('@') ? `Sending to: ${targetAlias}` : `Type @ to mention another node`}</span>\n <span>⌘+Enter</span>\n </div>\n </div>\n </>\n );\n\n if (inline) {\n return <div className=\"flex flex-col h-full\">{chatContent}</div>;\n }\n\n return (\n <>\n <div className=\"fixed inset-0 bg-black/30 z-40 lg:hidden\" 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 animate-slide-in\">\n {/* Header */}\n <div className=\"flex items-center justify-between px-4 py-3 border-b border-[#2a2a4a] bg-[#0d0d1a]\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500/30 to-blue-500/30 flex items-center justify-center text-xs font-bold text-cyan-300\">\n {alias.slice(0, 2)}\n </div>\n <div>\n <div className=\"text-sm font-semibold text-white\">{alias}</div>\n <div className=\"text-[10px] text-gray-500\">{pollingIds.size > 0 ? 'Processing...' : 'Ready'}</div>\n </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 {chatContent}\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":["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","replace","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","STATUS_STEPS","STATUS_COLORS","created","delivered","running","replied","failed","closed","StatusBar","status","idx","indexOf","isFailed","className","s","animationDelay","MarkdownContent","text","parts","split","part","startsWith","endsWith","lines","lang","match","code","TaskChatPanel","alias","onClose","inline","availableNodes","messages","setMessages","input","setInput","priority","setPriority","sending","setSending","pollingIds","setPollingIds","Set","historyLoaded","setHistoryLoaded","targetAlias","setTargetAlias","showMentions","setShowMentions","mentionFilter","setMentionFilter","mentionNodes","setMentionNodes","messagesEndRef","textareaRef","fetch","then","r","json","d","nodes","sessions","catch","loadHistory","res","encodeURIComponent","data","tasks","reverse","setTimeout","current","focus","scrollIntoView","behavior","size","startTime","Date","now","interval","setInterval","clearInterval","taskId","updated","prev","m","task_id","includes","n","delete","send","taskContent","sendTo","atMatch","mentioned","find","toLowerCase","height","method","headers","body","JSON","stringify","task","ok","newMsg","message_id","from_name","to_name","content","result","created_at","toISOString","handleKeyDown","metaKey","ctrlKey","preventDefault","handleInputChange","lastAt","lastIndexOf","after","insertMention","nodeName","before","filteredMentions","autoResize","el","Math","min","scrollHeight","chatContent","onClick","onChange","onKeyDown","placeholder","rows","disabled","fill","viewBox","stroke","strokeWidth","strokeLinecap","strokeLinejoin"],"mappings":"6DACA,IAAIA,EAAAA,EAAAA,CAAAA,CAAAA,OAIAG,EAFwCD,GAAkB,AAAb,OAAOA,KAEnC,KAAmCF,GAFkB,GAE1C,GAAEC,OAFqDC,GAAQ,CAAJA,AAAM,SAAa,EAAFA,AAqBxGmB,EAA4B,IAAnB,OAAOC,SAA2BA,QAAQC,GAAG,GAAI,EAC1DC,EAAW,SAASC,CAAC,EACrB,MAA6C,oBAAtCZ,OAAOO,EAFqE,OAE5D,CAACM,QAAQ,CAACC,IAAI,CAACF,EAC1C,EACIG,EAA2B,WAAd,AACb,SAASA,EADe,AACJC,CAAK,EACrB,IAAIC,EAAgB,KAAK,IAAfD,EAAmB,CAAC,EAAIA,EAAOE,EAAQD,EAAIE,IAAI,CAAEA,EAAiB,KAAK,IAAfD,EAAmB,aAAeA,EAAOE,EAAoBH,EAAII,gBAAgB,CAAEA,EAAyC,KAAK,IAA3BD,EAA+BZ,EAASY,EAChNE,EAAYX,EAASQ,GAAO,2BAC5B,IAAI,CAACD,KAAK,CAAGC,EACb,IAAI,CAACI,uBAAuB,CAAG,IAAMJ,EAAO,sBAC5CG,EAAwC,WAA5B,OAAOD,EAAgC,wCACnD,IAAI,CAACD,iBAAiB,CAAGC,EACzB,IAAI,CAACG,YAAY,MAAGC,EACpB,IAAI,CAACC,KAAK,CAAG,EAAE,CACf,IAAI,CAACC,SAAS,EAAG,EACjB,IAAI,CAACC,WAAW,CAAG,EAEnB,IAAI,CAACI,MAAM,CAAyC,EAAtC,EAClB,CACA,MAAIC,EAASlB,EAAWR,SAAS,CA2LjC,OA1LA0B,EAAOC,MAHkB,aAGC,CAAG,SAASA,AAAoBC,CAAI,EAC1Db,EAA4B,WAAhB,OAAOa,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A,EAAA,EAAA,GAAA,EAAC,MAAA,yCAAc,kCAAoCuD,IACnD,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,yCAAc,2BAA6BY,EAAWkC,IAAI,CAAG,EAAI,gBAAkB,gBAGxF,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CAAOwD,QAASrG,0CAAmB,oEAClC,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAwB2G,KAAK,OAAOC,QAAQ,YAAYC,OAAO,eAAeC,YAAa,0CAA7E,SACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKC,cAAc,QAAQC,eAAe,QAAQlF,EAAE,gEAI1DsE,6LAQT","ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/style.js","../../../../app/components/TaskChatPanel.tsx"],"sourcesContent":["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","'use client';\n\nimport { useState, useEffect, useRef, useCallback } from 'react';\nimport { timeAgo } from './utils';\n\ninterface ChatTask {\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}\n\nconst STATUS_STEPS = ['created', 'delivered', 'running', 'replied'];\nconst STATUS_COLORS: Record<string, string> = {\n created: 'bg-gray-400', delivered: 'bg-blue-400', running: 'bg-green-400',\n replied: 'bg-purple-400', failed: 'bg-red-400', closed: 'bg-gray-500',\n};\n\nfunction StatusBar({ status }: { status: string }) {\n const idx = STATUS_STEPS.indexOf(status);\n const isFailed = status === 'failed';\n return (\n <div className=\"flex items-center gap-1 mt-1.5\">\n {STATUS_STEPS.map((s, i) => (\n <div key={s} className=\"flex items-center gap-1\">\n <div className={`w-2 h-2 rounded-full transition-all duration-700 ${\n isFailed ? (i === 0 ? 'bg-red-400' : 'bg-gray-700')\n : i <= idx ? (STATUS_COLORS[s] || 'bg-gray-600') : 'bg-gray-700'\n }`} />\n {i < STATUS_STEPS.length - 1 && (\n <div className={`w-4 h-px transition-colors duration-700 ${\n isFailed ? 'bg-red-800' : i < idx ? 'bg-gray-500' : 'bg-gray-800'\n }`} />\n )}\n </div>\n ))}\n <span className={`text-[10px] ml-1.5 font-medium ${\n isFailed ? 'text-red-400' : status === 'replied' ? 'text-purple-400'\n : status === 'running' ? 'text-green-400' : 'text-gray-500'\n }`}>{status}</span>\n {(status === 'running' || status === 'delivered') && (\n <span className=\"ml-1\">\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse\" />\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5\" style={{ animationDelay: '0.2s' }} />\n <span className=\"inline-block w-1 h-1 rounded-full bg-green-400 animate-pulse ml-0.5\" style={{ animationDelay: '0.4s' }} />\n </span>\n )}\n </div>\n );\n}\n\nfunction MarkdownContent({ text }: { text: string }) {\n if (!text) return <span className=\"text-gray-600 italic\">No content</span>;\n\n const parts = text.split(/(```[\\s\\S]*?```|`[^`\\n]+`|\\*\\*[^*]+\\*\\*)/g);\n return (\n <div className=\"whitespace-pre-wrap break-words leading-relaxed\">\n {parts.map((part, i) => {\n if (part.startsWith('```') && part.endsWith('```')) {\n const lines = part.slice(3, -3);\n const lang = lines.match(/^(\\w+)\\n/)?.[1] || '';\n const code = lang ? lines.slice(lang.length + 1) : lines;\n return (\n <div key={i} className=\"my-2 rounded-lg overflow-hidden border border-[#1a1a2a]\">\n {lang && <div className=\"bg-[#0a0a15] px-3 py-1 text-[10px] text-gray-500 border-b border-[#1a1a2a]\">{lang}</div>}\n <pre className=\"bg-[#050510] px-3 py-2 text-[11px] text-green-300 overflow-x-auto\">{code}</pre>\n </div>\n );\n }\n if (part.startsWith('`') && part.endsWith('`')) {\n return <code key={i} className=\"bg-[#0a0a15] rounded px-1.5 py-0.5 text-cyan-300 text-[11px] border border-[#1a1a2a]\">{part.slice(1, -1)}</code>;\n }\n if (part.startsWith('**') && part.endsWith('**')) {\n return <strong key={i} className=\"text-white font-semibold\">{part.slice(2, -2)}</strong>;\n }\n return <span key={i}>{part}</span>;\n })}\n </div>\n );\n}\n\ninterface TaskChatPanelProps {\n alias: string;\n onClose: () => void;\n /** When true, renders without outer panel chrome (for use inside CommandCenter) */\n inline?: boolean;\n /** Available nodes for @ mention */\n availableNodes?: string[];\n}\n\nexport function TaskChatPanel({ alias, onClose, inline, availableNodes }: TaskChatPanelProps) {\n const [messages, setMessages] = useState<ChatTask[]>([]);\n const [input, setInput] = useState('');\n const [priority, setPriority] = useState('normal');\n const [sending, setSending] = useState(false);\n const [pollingIds, setPollingIds] = useState<Set<string>>(new Set());\n const [historyLoaded, setHistoryLoaded] = useState(false);\n const [targetAlias, setTargetAlias] = useState(alias);\n const [showMentions, setShowMentions] = useState(false);\n const [mentionFilter, setMentionFilter] = useState('');\n const [mentionNodes, setMentionNodes] = useState<string[]>([]);\n const messagesEndRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n // Load available nodes for @ mention\n useEffect(() => {\n if (availableNodes) { setMentionNodes(availableNodes); return; }\n fetch('/api/hub/status').then(r => r.json()).then(d => {\n const nodes = (d.sessions || []).filter((s: { status: string }) => s.status !== 'offline').map((s: { alias: string }) => s.alias);\n setMentionNodes(nodes);\n }).catch(() => {});\n }, [availableNodes]);\n\n // Reset target when alias changes\n useEffect(() => { setTargetAlias(alias); }, [alias]);\n\n // Load task history for this node\n const loadHistory = useCallback(async () => {\n try {\n const res = await fetch(`/api/hub/tasks?to_name=${encodeURIComponent(alias)}&limit=30`);\n const data = await res.json();\n if (data.tasks) {\n // Show oldest first\n setMessages(data.tasks.reverse());\n }\n } catch {} finally {\n setHistoryLoaded(true);\n }\n }, [alias]);\n\n useEffect(() => {\n setMessages([]);\n setHistoryLoaded(false);\n loadHistory();\n // Focus textarea\n setTimeout(() => textareaRef.current?.focus(), 300);\n }, [alias, loadHistory]);\n\n // Auto-scroll to bottom\n useEffect(() => {\n messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n }, [messages]);\n\n // Poll pending tasks for status updates\n useEffect(() => {\n if (pollingIds.size === 0) return;\n const startTime = Date.now();\n const interval = setInterval(async () => {\n // Timeout after 120s\n if (Date.now() - startTime > 120000) {\n setPollingIds(new Set());\n clearInterval(interval);\n return;\n }\n for (const taskId of pollingIds) {\n try {\n const res = await fetch(`/api/hub/tasks?task_id=${encodeURIComponent(taskId)}`);\n const data = await res.json();\n if (data.tasks?.[0]) {\n const updated = data.tasks[0];\n setMessages(prev => prev.map(m => m.task_id === taskId ? { ...m, ...updated } : m));\n if (['replied', 'failed', 'closed', 'expired', 'cancelled'].includes(updated.status)) {\n setPollingIds(prev => { const n = new Set(prev); n.delete(taskId); return n; });\n }\n }\n } catch {}\n }\n }, 2000);\n return () => clearInterval(interval);\n }, [pollingIds]);\n\n const send = async () => {\n if (!input.trim() || sending) return;\n let taskContent = input.trim();\n let sendTo = targetAlias;\n\n // Parse @mention at start: \"@NodeName rest of message\"\n const atMatch = taskContent.match(/^@(\\S+)\\s+([\\s\\S]+)/);\n if (atMatch) {\n const mentioned = mentionNodes.find(n => n.toLowerCase() === atMatch[1].toLowerCase());\n if (mentioned) {\n sendTo = mentioned;\n taskContent = atMatch[2];\n }\n }\n\n setSending(true);\n setInput('');\n setShowMentions(false);\n if (textareaRef.current) textareaRef.current.style.height = 'auto';\n\n try {\n const res = await fetch('/api/hub/send', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ alias: sendTo, task: taskContent, priority }),\n });\n const data = await res.json();\n if (data.ok) {\n const newMsg: ChatTask = {\n task_id: data.message_id || `tmp-${Date.now()}`,\n from_name: 'Dashboard',\n to_name: sendTo,\n status: 'created',\n priority,\n content: taskContent,\n result: '',\n created_at: new Date().toISOString(),\n };\n setMessages(prev => [...prev, newMsg]);\n if (data.message_id) {\n setPollingIds(prev => new Set(prev).add(data.message_id));\n }\n }\n } catch {}\n setSending(false);\n textareaRef.current?.focus();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n // Enter sends, Shift+Enter inserts newline (standard chat UX).\n // Users habit-pressed Enter expecting send and saw nothing happen.\n if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault();\n send();\n }\n if (e.key === 'Escape') setShowMentions(false);\n };\n\n const handleInputChange = (value: string) => {\n setInput(value);\n // Check if user just typed @\n const lastAt = value.lastIndexOf('@');\n if (lastAt >= 0 && (lastAt === 0 || value[lastAt - 1] === ' ' || value[lastAt - 1] === '\\n')) {\n const after = value.slice(lastAt + 1);\n if (!after.includes(' ') && !after.includes('\\n')) {\n setMentionFilter(after.toLowerCase());\n setShowMentions(true);\n return;\n }\n }\n setShowMentions(false);\n };\n\n const insertMention = (nodeName: string) => {\n const lastAt = input.lastIndexOf('@');\n const before = input.slice(0, lastAt);\n setInput(`${before}@${nodeName} `);\n setShowMentions(false);\n textareaRef.current?.focus();\n };\n\n const filteredMentions = mentionNodes.filter(n =>\n n !== alias && n.toLowerCase().includes(mentionFilter)\n ).slice(0, 8);\n\n const autoResize = (el: HTMLTextAreaElement) => {\n el.style.height = 'auto';\n el.style.height = Math.min(el.scrollHeight, 150) + 'px';\n };\n\n // Inline mode: just the chat content, no panel chrome\n const chatContent = (\n <>\n {/* Messages area */}\n <div className=\"flex-1 overflow-y-auto px-4 py-4 space-y-4\">\n {!historyLoaded && (\n <div className=\"flex justify-center py-8\">\n <div className=\"w-5 h-5 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin\" />\n </div>\n )}\n {historyLoaded && messages.length === 0 && (\n <div className=\"text-center py-12\">\n <div className=\"text-3xl mb-3\">💬</div>\n <div className=\"text-gray-500 text-sm\">Start a conversation</div>\n <div className=\"text-gray-600 text-xs mt-1\">Send a task to {alias}</div>\n </div>\n )}\n\n {messages.map((m, idx) => (\n <div key={m.task_id} className=\"space-y-2\">\n {/* Outgoing task */}\n <div className=\"flex justify-end\">\n <div className=\"max-w-[85%] bg-cyan-500/8 border border-cyan-500/15 rounded-2xl rounded-br-md px-4 py-2.5 shadow-sm\">\n <div className=\"text-[13px] text-gray-200\">\n <MarkdownContent text={m.content} />\n </div>\n <div className=\"flex items-center justify-between mt-1.5 gap-3\">\n <StatusBar status={m.status} />\n <span className=\"text-[9px] text-gray-600 shrink-0\">{timeAgo(m.created_at)}</span>\n </div>\n </div>\n </div>\n\n {/* Incoming reply */}\n {m.result && (\n <div className=\"flex justify-start\">\n <div className=\"max-w-[85%] bg-green-500/8 border border-green-500/15 rounded-2xl rounded-bl-md px-4 py-2.5 shadow-sm\">\n <div className=\"text-[10px] text-green-400 font-medium mb-1.5\">{m.to_name}</div>\n <div className=\"text-[13px] text-gray-200\">\n <MarkdownContent text={m.result} />\n </div>\n </div>\n </div>\n )}\n\n {/* Typing indicator when running */}\n {m.status === 'running' && !m.result && (\n <div className=\"flex justify-start\">\n <div className=\"bg-[#111128] border border-[#2a2a4a] rounded-2xl rounded-bl-md px-4 py-3\">\n <div className=\"flex gap-1\">\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0s' }} />\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0.15s' }} />\n <span className=\"w-2 h-2 rounded-full bg-gray-500 animate-bounce\" style={{ animationDelay: '0.3s' }} />\n </div>\n </div>\n </div>\n )}\n </div>\n ))}\n <div ref={messagesEndRef} />\n </div>\n\n {/* Input area */}\n <div className=\"border-t border-[#2a2a4a] bg-[#0d0d1a] px-4 py-3\">\n <div className=\"flex items-end gap-2\">\n <div className=\"flex-1 relative\">\n {/* @ mention dropdown */}\n {showMentions && filteredMentions.length > 0 && (\n <div className=\"absolute bottom-full left-0 right-0 mb-1 bg-[#111128] border border-[#2a2a4a] rounded-lg shadow-xl shadow-black/50 overflow-hidden z-10 max-h-48 overflow-y-auto\">\n {filteredMentions.map(node => (\n <button key={node} onClick={() => insertMention(node)}\n className=\"w-full flex items-center gap-2 px-3 py-2 text-xs text-left hover:bg-cyan-500/10 transition-colors\">\n <span className=\"w-2 h-2 rounded-full bg-cyan-400 shrink-0\" />\n <span className=\"text-gray-300\">{node}</span>\n </button>\n ))}\n </div>\n )}\n <textarea\n ref={textareaRef}\n value={input}\n onChange={e => { handleInputChange(e.target.value); autoResize(e.target); }}\n onKeyDown={handleKeyDown}\n placeholder={`Message ${alias}...`}\n rows={1}\n className=\"w-full bg-[#111128] border border-[#2a2a4a] rounded-xl px-4 py-2.5 pr-16 text-sm text-white placeholder-gray-600 focus:border-cyan-500/40 focus:outline-none resize-none transition-colors\"\n />\n <div className=\"absolute right-2 bottom-1.5 flex items-center gap-1\">\n <select value={priority} onChange={e => setPriority(e.target.value)}\n className=\"bg-transparent text-[9px] text-gray-600 focus:outline-none cursor-pointer\">\n <option value=\"normal\">N</option>\n <option value=\"high\">H</option>\n <option value=\"low\">L</option>\n </select>\n </div>\n </div>\n <button onClick={send} disabled={sending || !input.trim()}\n className=\"p-2.5 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white rounded-xl transition-all shrink-0 active:scale-95\">\n {sending ? (\n <div className=\"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin\" />\n ) : (\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 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5\" />\n </svg>\n )}\n </button>\n </div>\n <div className=\"flex justify-between text-[9px] text-gray-700 mt-1.5\">\n <span>{input.includes('@') ? `Sending to: ${targetAlias}` : `Type @ to mention another node`}</span>\n <span>Enter to send · Shift+Enter for newline</span>\n </div>\n </div>\n </>\n );\n\n if (inline) {\n return <div className=\"flex flex-col h-full\">{chatContent}</div>;\n }\n\n return (\n <>\n <div className=\"fixed inset-0 bg-black/30 z-40 lg:hidden\" 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 animate-slide-in\">\n {/* Header */}\n <div className=\"flex items-center justify-between px-4 py-3 border-b border-[#2a2a4a] bg-[#0d0d1a]\">\n <div className=\"flex items-center gap-3\">\n <div className=\"w-8 h-8 rounded-full bg-gradient-to-br from-cyan-500/30 to-blue-500/30 flex items-center justify-center text-xs font-bold text-cyan-300\">\n {alias.slice(0, 2)}\n </div>\n <div>\n <div className=\"text-sm font-semibold text-white\">{alias}</div>\n <div className=\"text-[10px] text-gray-500\">{pollingIds.size > 0 ? 'Processing...' : 'Ready'}</div>\n </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 {chatContent}\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":["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","replace","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","STATUS_STEPS","STATUS_COLORS","created","delivered","running","replied","failed","closed","StatusBar","status","idx","indexOf","isFailed","className","s","animationDelay","MarkdownContent","text","parts","split","part","startsWith","endsWith","lines","lang","match","code","TaskChatPanel","alias","onClose","inline","availableNodes","messages","setMessages","input","setInput","priority","setPriority","sending","setSending","pollingIds","setPollingIds","Set","historyLoaded","setHistoryLoaded","targetAlias","setTargetAlias","showMentions","setShowMentions","mentionFilter","setMentionFilter","mentionNodes","setMentionNodes","messagesEndRef","textareaRef","fetch","then","r","json","d","nodes","sessions","catch","loadHistory","res","encodeURIComponent","data","tasks","reverse","setTimeout","current","focus","scrollIntoView","behavior","size","startTime","Date","now","interval","setInterval","clearInterval","taskId","updated","prev","m","task_id","includes","n","delete","send","taskContent","sendTo","atMatch","mentioned","find","toLowerCase","height","method","headers","body","JSON","stringify","task","ok","newMsg","message_id","from_name","to_name","content","result","created_at","toISOString","handleKeyDown","shiftKey","nativeEvent","isComposing","preventDefault","handleInputChange","lastAt","lastIndexOf","after","insertMention","nodeName","before","filteredMentions","autoResize","el","Math","min","scrollHeight","chatContent","onClick","onChange","onKeyDown","placeholder","rows","disabled","fill","viewBox","stroke","strokeWidth","strokeLinecap","strokeLinejoin"],"mappings":"6DACA,IAAIA,EAAAA,EAAAA,CAAAA,CAAAA,OAIAG,EAFwCD,GAAkB,AAAb,OAAOA,KAEnC,KAAmCF,GAFkB,GAE1C,GAAEC,OAFqDC,GAAQ,CAAJA,AAAM,SAAa,EAqB1GmB,AArBwGnB,EAqB5E,IAAnB,OAAOoB,SAA2BA,QAAQC,GAAG,GAAI,EAC1DC,EAAW,SAASC,CAAC,EACrB,MAA6C,oBAAtCZ,OAAOO,EAFqE,OAE5D,CAACM,QAAQ,CAACC,IAAI,CAACF,EAC1C,EACIG,EAA2B,WAAd,AACb,SAASA,EADe,AACJC,CAAK,EACrB,IAAIC,EAAgB,KAAK,IAAfD,EAAmB,CAAC,EAAIA,EAAOE,EAAQD,EAAIE,IAAI,CAAEA,EAAiB,KAAK,IAAfD,EAAmB,aAAeA,EAAOE,EAAoBH,EAAII,gBAAgB,CAAEA,EAAyC,KAAK,IAA3BD,EAA+BZ,EAASY,EAChNE,EAAYX,EAASQ,GAAO,2BAC5B,IAAI,CAACD,KAAK,CAAGC,EACb,IAAI,CAACI,uBAAuB,CAAG,IAAMJ,EAAO,sBAC5CG,EAAwC,WAA5B,OAAOD,EAAgC,wCACnD,IAAI,CAACD,iBAAiB,CAAGC,EACzB,IAAI,CAACG,YAAY,MAAGC,EACpB,IAAI,CAACC,KAAK,CAAG,EAAE,CACf,IAAI,CAACC,SAAS,EAAG,EACjB,IAAI,CAACC,WAAW,CAAG,EAEnB,IAAI,CAACI,MAAM,CAAyC,EAAtC,EAClB,CACA,MAAIC,EAASlB,EAAWR,SAAS,CA2LjC,OA1LA0B,EAAO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yIACZD,EAAMvD,KAAK,CAAC,EAAG,KAElB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,2CACC,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,yCAAc,kCAAoCuD,IACnD,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,yCAAc,2BAA6BY,EAAWkC,IAAI,CAAG,EAAI,gBAAkB,gBAGxF,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CAAOyD,QAAStG,0CAAmB,oEAClC,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAwB4G,KAAK,OAAOC,QAAQ,YAAYC,OAAO,eAAeC,YAAa,0CAA7E,SACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKC,cAAc,QAAQC,eAAe,QAAQnF,EAAE,gEAI1DuE,6LAQT","ignoreList":[0,1]}
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/03~yq9q893hmn.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/lgag_dfMO-AGdtcyMHSLe/_buildManifest.js",
|
|
11
|
+
"static/lgag_dfMO-AGdtcyMHSLe/_ssgManifest.js",
|
|
12
|
+
"static/lgag_dfMO-AGdtcyMHSLe/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/0w5hxo645~s.g.js",
|