agentroam-runtime-darwin-arm64 0.2.0-preview.74 → 0.2.0-preview.76
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/manifest.json +2 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +9 -9
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +5 -5
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/routes-manifest.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +4 -4
- package/runtime/.next/server/app/api/agent/stream/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/calendar/route.js +2 -0
- package/runtime/.next/server/app/api/calendar/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +9 -9
- package/runtime/.next/server/app/api/collaboration/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
- package/runtime/.next/server/app/api/engine-threads/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/engine-threads.body +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +4 -0
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -0
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers.body +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/messaging/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/stream/route.js +4 -0
- package/runtime/.next/server/app/api/notifications/stream/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/subscribe/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/unsubscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
- package/runtime/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/vapid.body +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/session-images/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/settings/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/route.js +1 -0
- package/runtime/.next/server/app/api/todos/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/update/check/route.js +1 -1
- package/runtime/.next/server/app/api/update/install/route.js +1 -1
- package/runtime/.next/server/app/api/update/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/api/workspace-changes/route.js +1 -0
- package/runtime/.next/server/app/api/workspace-changes/route.js.nft.json +1 -0
- package/runtime/.next/server/app/web/page.js +4 -4
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +34 -21
- package/runtime/.next/server/chunks/1298.js +1 -0
- package/runtime/.next/server/chunks/1973.js +1 -0
- package/runtime/.next/server/chunks/2480.js +4 -0
- package/runtime/.next/server/chunks/3604.js +4 -0
- package/runtime/.next/server/chunks/4621.js +1 -1
- package/runtime/.next/server/chunks/5303.js +1 -1
- package/runtime/.next/server/chunks/5762.js +1 -1
- package/runtime/.next/server/chunks/5801.js +1 -0
- package/runtime/.next/server/chunks/6977.js +1 -1
- package/runtime/.next/server/chunks/732.js +1 -1
- package/runtime/.next/server/chunks/7788.js +1 -1
- package/runtime/.next/server/chunks/9119.js +15 -0
- package/runtime/.next/server/chunks/9457.js +4 -0
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/753-90c7dd1ba08be9be.js +1 -0
- package/runtime/.next/static/chunks/app/web/{error-53531bb27b3b87f8.js → error-828d278147a0619d.js} +1 -1
- package/runtime/.next/static/chunks/app/web/layout-a8b7565989c1c063.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-8ff95d45a0160843.js +1 -0
- package/runtime/.next/static/chunks/{main-93c452d518291b1c.js → main-7240085c0ba42e9a.js} +1 -1
- package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +1 -0
- package/runtime/lib/desktop-discovery.mjs +12 -3
- package/runtime/lib/service-identity.mjs +17 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
- package/runtime/node_modules/.package-lock.json +11 -11
- package/runtime/node_modules/@agent/core/dist/index.js +942 -12
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +37966 -19280
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/README.md +1 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +94 -98
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +77 -74
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-25bstexa.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-4ps8vwh1.mjs +42 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-9a7zb9bm.mjs +53 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-zg882d22.mjs → core-a8ty0dnc.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ae73vzp2.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-fxa8mwbm.mjs → core-dsa3p77h.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-9je8ee1j.mjs → core-e93r8awg.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-eqz9ara6.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-esw7xtkz.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ey906mbk.mjs +20 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-k19jejpn.mjs +16 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-x3hc9abc.mjs → core-kag24kjr.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-mhczx7zp.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-nfa6p2rw.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-v6sp3qjw.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -11
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +22 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +26 -26
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +25 -21
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +87 -88
- package/runtime/package-lock.json +35 -35
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/AIHubView-DF0D5qd2.js +1 -0
- package/runtime/webapp/dist/assets/{AgentManager-BLHvEA2d.js → AgentManager-Ccj6ZefC.js} +2 -2
- package/runtime/webapp/dist/assets/{AiHubPane-CWvL3HSl.js → AiHubPane-3PRSxzO0.js} +1 -1
- package/runtime/webapp/dist/assets/App-CtLZIOFu.css +1 -0
- package/runtime/webapp/dist/assets/App-HomcUet2.js +63 -0
- package/runtime/webapp/dist/assets/BrowserLivePanel-BZDtF0ne.js +66 -0
- package/runtime/webapp/dist/assets/CalendarPage-B8Jo-3Da.js +1 -0
- package/runtime/webapp/dist/assets/CalendarView-BD7GhA0i.js +36 -0
- package/runtime/webapp/dist/assets/CalendarView-DHi-mzjY.css +1 -0
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-CU1t0iYL.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationDashboard-BZhWQXzn.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationPage-BwRJN55v.js +6 -0
- package/runtime/webapp/dist/assets/{FilePreview-BItgMeyP.js → FilePreview-Oo8sZH0t.js} +5 -5
- package/runtime/webapp/dist/assets/FileTree-qJTRdDPQ.js +6 -0
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-D40WNAqC.js +1 -0
- package/runtime/webapp/dist/assets/FlowStudioPane-C1tgSbGo.js +5 -0
- package/runtime/webapp/dist/assets/HostProjectPicker-BEfXuqxT.js +1 -0
- package/runtime/webapp/dist/assets/{LSPServerList-CB2Cwqw_.js → LSPServerList-DQRv04aP.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-DUpgIcHk.js → MCPServerList-BmsejJC9.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-DCFueBdK.js → MemoryViewer-qZMdVrli.js} +1 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-BOCZ0mXT.css +1 -0
- package/runtime/webapp/dist/assets/NewSessionWindow-uzVK5LVS.js +1 -0
- package/runtime/webapp/dist/assets/{RemoteDesktopPage-DD9aNe8m.js → RemoteDesktopPage-Dz_6-rOL.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-CKKjZfu_.js → RunningSessionsIcon-DJxTmxZn.js} +5 -5
- package/runtime/webapp/dist/assets/SessionDashboard-DuR9r_ZP.js +16 -0
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-DG1fQUEQ.js → SessionDashboardBridge-BHVjvDHa.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-CA0Pj7qk.js → SettingsPanel-B-g919uV.js} +2 -2
- package/runtime/webapp/dist/assets/{SkillManager-BzgAJlVW.js → SkillManager-nrWIOtEO.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-Bc4cGUmA.js → TerminalPane-C4HiD2IC.js} +2 -2
- package/runtime/webapp/dist/assets/TodoPage-Bn6j6kR6.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-Dsp6XgB7.js → abnfDiagram-VCTEODGH-BXRYzdBT.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-DROGDR5M.js → arc-BeG7yjCw.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-S8c_fFRN.js → architectureDiagram-5GKGNRK7-DIQbpqn7.js} +1 -1
- package/runtime/webapp/dist/assets/{arrow-right-CUDfCOna.js → arrow-right-B03zMFiC.js} +1 -1
- package/runtime/webapp/dist/assets/artifact-links-4m1A00GO.js +2 -0
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-DrTz3v2B.js → blockDiagram-I7D4REHJ-DvgKV01C.js} +3 -3
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-wuHRphdr.js → c4Diagram-7LVT6UL2-DIr7nDIg.js} +1 -1
- package/runtime/webapp/dist/assets/calendar-days-D1OJEOKr.js +6 -0
- package/runtime/webapp/dist/assets/channel-Cchxg6Fx.js +1 -0
- package/runtime/webapp/dist/assets/check-BDiCDSY5.js +6 -0
- package/runtime/webapp/dist/assets/{chevron-down-fUU2ZKzR.js → chevron-down-DIt_NscV.js} +1 -1
- package/runtime/webapp/dist/assets/chevron-right-DVhYkZeF.js +6 -0
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-BpV5cOX0.js → chunk-2Q5K7J3B-Cykdc4to.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-1_IZosIm.js → chunk-5VM5RSS4-DL-gBU30.js} +1 -1
- package/runtime/webapp/dist/assets/chunk-F27PBJKO-z0F9O96j.js +1 -0
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-BuicwmZn.js → chunk-IMKFNOWR-DcSgatN1.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-CfNSj3eC.js → chunk-JWPE2WC7-BmG1ozp9.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-Bxryudz4.js → chunk-POPQ4Y6H-BK2jifSN.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-DSZbEEd6.js → chunk-SVP7TREG-DtInGjiG.js} +3 -3
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-CHqUfDzl.js → chunk-TICWLB2K-DWdiL4Y6.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-CPbMDiSF.js → chunk-XXDRQBXY-w8UYxZUB.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BGv4sK1I.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BGv4sK1I.js +1 -0
- package/runtime/webapp/dist/assets/{codeSyntax-BENnBdX2.js → codeSyntax-Cprr1Nm9.js} +3 -3
- package/runtime/webapp/dist/assets/{collaboration-DwgXZbHy.js → collaboration-acdqOxaY.js} +1 -1
- package/runtime/webapp/dist/assets/composer-file-routing-BsSxfxUa.js +6 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BPzEzfJw.js → cose-bilkent-JH36ORCC-BJgwy7Y5.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-BZgzPIdr.js → cynefin-OW5HDTMX-BssWa1kU.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-CyNjL-LN.js → cynefinDiagram-5FMLGOSQ-Bv_-fuG_.js} +2 -2
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-QqLmAYnp.js → dagre-GXQ25YYZ-BjA5n2Zi.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-DrIIbhV6.js → diagram-S7CK7UJ4-CCT38L0E.js} +3 -3
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-B7JON90e.js → diagram-UQ7AKVKN-4fLw8kje.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-C1Fzjcgp.js → diagram-VSXAHHWV-43_Qj0Se.js} +3 -3
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-HmkXh54q.js → diagram-VX7I27RA-BHEXgMDZ.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-Ca5jnESS.js → diagram-Z3DM3KII-BRTSiXVr.js} +2 -2
- package/runtime/webapp/dist/assets/{download-CKrjXoG9.js → download-CuYS63Ny.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-a3qnPIiF.js → ebnfDiagram-PWID7BFC-B4GImY-o.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-EZKQ4NYt.js → erDiagram-RLTQ6QDP-EmEsAxWS.js} +1 -1
- package/runtime/webapp/dist/assets/{external-link-C9AwR_tM.js → external-link-Baeyco26.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-BlRT2KnS.js → file-types-CykGmGsd.js} +2 -2
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-C4U9dCin.js → flowDiagram-HODETNUW-sky_wmbX.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-B5iyiF0_.js → ganttDiagram-EL5Y4UJY-Cc71xV1j.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-D9CfK-tl.js → gitGraphDiagram-WWUBYQGX-z7uQ8-8z.js} +7 -7
- package/runtime/webapp/dist/assets/history-C7WUwl_W.js +6 -0
- package/runtime/webapp/dist/assets/{image-plus-DsCC5WAa.js → image-plus-B2RK1ogI.js} +1 -1
- package/runtime/webapp/dist/assets/index-B_fTpc5K.css +1 -0
- package/runtime/webapp/dist/assets/index-d8fS3JdV.js +489 -0
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-DBcCijd6.js → infoDiagram-27XIBGKW-DXLEePz0.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-D_m8F4n9.js → ishikawaDiagram-5VMMS53U-DCFXm_zQ.js} +4 -4
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-4oy2R7XW.js → journeyDiagram-3NMN7TZE-DHWCpvY6.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-O6jHSf0E.js → kanban-definition-UXKFOSKX-D_uP81aw.js} +7 -7
- package/runtime/webapp/dist/assets/{layout-P82L_S-q.js → layout-Bcu83-1p.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-B-Cl5K73.js → linear-CPim5SQa.js} +1 -1
- package/runtime/webapp/dist/assets/list-todo-F1W4yBLx.js +6 -0
- package/runtime/webapp/dist/assets/{loader-circle--s-WzZxC.js → loader-circle-DesEGpVH.js} +1 -1
- package/runtime/webapp/dist/assets/locate-fixed-UXM91vCS.js +6 -0
- package/runtime/webapp/dist/assets/{mermaid.core-BEmIap6p.js → mermaid.core-CyzKk3O2.js} +6 -6
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-Bnlqql-j.js → mindmap-definition-YA3MSWOX-0MHQpQro.js} +1 -1
- package/runtime/webapp/dist/assets/new-session-window-B4BJYrds.css +1 -0
- package/runtime/webapp/dist/assets/new-session-window-fsYu53Ht.js +188 -0
- package/runtime/webapp/dist/assets/page-C2e368Dx.js +86 -0
- package/runtime/webapp/dist/assets/pause-_h6c8qPD.js +6 -0
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-AbRjuoUM.js → pegDiagram-XKGWAZYB-BNinoE-7.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-5-ms1WT0.js → pieDiagram-E7YTZNPT-CfPzV9yb.js} +3 -3
- package/runtime/webapp/dist/assets/pin-BcXr5230.js +6 -0
- package/runtime/webapp/dist/assets/play-BdB0D0rZ.js +6 -0
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-BXr5BqtQ.js → quadrantDiagram-AXDQQJYC-0qLb33lM.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-DqBC-aod.js → railroadDiagram-O6MQD6OU-DNU4eRJt.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-VOUcatZG.js → requirementDiagram-BXWQKSXE-BWJRwKX8.js} +3 -3
- package/runtime/webapp/dist/assets/{rotate-ccw-CSiD4c4O.js → rotate-ccw-BdZpOTYP.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-CclBpLSU.js → rotate-cw-D-zPMe4i.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-Bs23XmVr.js → sankeyDiagram-P5KCCOFB-CGW9pvun.js} +2 -2
- package/runtime/webapp/dist/assets/{send-CfzPXlfx.js → send-DCVOqOap.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-DO-oDX3L.js → sequenceDiagram-WJ2MYXX4-CeVAD519.js} +4 -4
- package/runtime/webapp/dist/assets/session-dashboard-BAYi5acZ.js +1 -0
- package/runtime/webapp/dist/assets/{shield-check-Dsex8w1k.js → shield-check-DrxVJwVC.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-hCQ98eA9.js → sizeCapture-INFHLROL-Dj5SukiO.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-DLODIaTQ.js → stateDiagram-D77RDMKH-UtRSslyd.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Se3lznH6.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-B3Qg_5tW.js → swimlanes-42K2YHIH-DKbrz8SF.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-C-Zsmae7.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-BdFnRV4K.js → timeline-definition-24CTP7MA-mtVdMOBL.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-CZp_yMDT.js → trash-2-Bbhd8-xd.js} +4 -9
- package/runtime/webapp/dist/assets/{types-BWTyn3Bs.js → types-CMhUwzwJ.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-CRU6BY1c.js → vennDiagram-4TSXK5OY-ZcuGEhJx.js} +5 -5
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-CXK3g3al.js → wardleyDiagram-VM6X3IG4-CnAYI2ZE.js} +1 -1
- package/runtime/webapp/dist/assets/{web-JmfGsfI_.js → web-BH9JgWsL.js} +1 -1
- package/runtime/webapp/dist/assets/{web-Den_EYDz.js → web-CBiaPgEe.js} +1 -1
- package/runtime/webapp/dist/assets/{x-CLvev0bC.js → x-1GQMVfza.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CeISrKUm.js → xychartDiagram-S5SC5T6Z-B_uJt0Bg.js} +3 -3
- package/runtime/webapp/dist/assets/zoom-out-BNKdrTFD.js +11 -0
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +12 -4
- package/runtime/.next/server/chunks/1614.js +0 -1
- package/runtime/.next/server/chunks/7519.js +0 -15
- package/runtime/.next/static/chunks/333-9881c3d2c558a28d.js +0 -1
- package/runtime/.next/static/chunks/app/web/layout-88328c61ec0589af.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-84b5f00b4c9cd4ce.js +0 -1
- package/runtime/.next/static/chunks/main-app-ba2527534563adfe.js +0 -1
- package/runtime/lib/voice-tts-gateway.mjs +0 -96
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0a66n3e7.mjs +0 -16
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0bmnpbz2.mjs +0 -45
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ds2jqcef.mjs +0 -19
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-gbbw9cgm.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-msnqqcc2.mjs +0 -42
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-wadgcjfh.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x20yarwf.mjs +0 -17
- package/runtime/webapp/dist/assets/AIHubView-DBOyOZzW.js +0 -1
- package/runtime/webapp/dist/assets/App-CrZstnCH.css +0 -1
- package/runtime/webapp/dist/assets/App-DGtdMfGk.js +0 -179
- package/runtime/webapp/dist/assets/BrowserLivePanel-Cl5kMDJF.js +0 -56
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-DPs4doOz.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationDashboard-ChUaJ5xA.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationPage-Cg22tJGB.js +0 -6
- package/runtime/webapp/dist/assets/FileTree-t-YjjCDU.js +0 -11
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-BnOoPJA6.js +0 -1
- package/runtime/webapp/dist/assets/FlowStudioPane-DHrpQpBA.js +0 -5
- package/runtime/webapp/dist/assets/SessionDashboard-CCpxslxg.js +0 -21
- package/runtime/webapp/dist/assets/artifact-links-C7zYRJaC.js +0 -7
- package/runtime/webapp/dist/assets/channel-C_3UNQvo.js +0 -1
- package/runtime/webapp/dist/assets/chunk-F27PBJKO-IZ7w-WCZ.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-j9nJ5DUm.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-j9nJ5DUm.js +0 -1
- package/runtime/webapp/dist/assets/composer-file-routing-CKLnrVkP.js +0 -11
- package/runtime/webapp/dist/assets/index-DBNVLOBM.js +0 -489
- package/runtime/webapp/dist/assets/index-DrzCwyPu.css +0 -1
- package/runtime/webapp/dist/assets/page-BtLq1udo.js +0 -91
- package/runtime/webapp/dist/assets/session-dashboard-D-0Cip5Y.js +0 -6
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-CTpD-7Re.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-v5rUeqtL.js +0 -8
- package/runtime/webapp/dist/assets/zoom-out-CSyjX26v.js +0 -21
- package/runtime/webapp/dist/pcm-audio-worklet.js +0 -126
- /package/runtime/.next/static/{5l3_g1bKM6rXvoGoMh_OC → q4ez_w8bVMUW1e57Cd7GC}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{5l3_g1bKM6rXvoGoMh_OC → q4ez_w8bVMUW1e57Cd7GC}/_ssgManifest.js +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{c as I,r as u,d as L,j as s,k as O,l as v,u as z,R as P,P as U,A}from"./index-DBNVLOBM.js";import{b as G}from"./SessionDashboardBridge-DG1fQUEQ.js";import{p as y,D as R,P as q}from"./session-dashboard-D-0Cip5Y.js";import{c as S,U as C,A as N,D as B}from"./collaboration-DwgXZbHy.js";import{X as _}from"./x-CLvev0bC.js";import{A as k}from"./arrow-right-CUDfCOna.js";import{C as E}from"./chevron-down-fUU2ZKzR.js";import{S as V}from"./shield-check-Dsex8w1k.js";/**
|
|
2
|
-
* @license lucide-react v0.468.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const T=I("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
7
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const X=I("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
12
|
-
* @license lucide-react v0.468.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Y=I("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
17
|
-
* @license lucide-react v0.468.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const H=I("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);function F({title:e,message:a,onClose:t,onRetry:i}){const c=u.useRef(null),d=u.useId();return u.useEffect(()=>{const o=c.current;return o==null||o.showModal(),()=>{o!=null&&o.open&&o.close()}},[]),L.createPortal(s.jsxs("dialog",{ref:c,className:"sidebar-delete-confirmation action-error-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":`${d}-title`,"aria-describedby":`${d}-message`,onCancel:o=>{o.preventDefault(),t()},onClick:o=>{if(o.target!==o.currentTarget)return;const l=o.currentTarget.getBoundingClientRect();(o.clientX<l.left||o.clientX>l.right||o.clientY<l.top||o.clientY>l.bottom)&&t()},children:[s.jsx("strong",{id:`${d}-title`,children:e}),s.jsx("p",{id:`${d}-message`,children:a}),s.jsxs("div",{className:"sidebar-delete-confirmation-actions",children:[s.jsx("button",{type:"button",autoFocus:!0,onClick:t,children:i?"关闭":"知道了"}),i&&s.jsx("button",{type:"button",className:"is-primary",onClick:()=>{t(),i()},children:"重试"})]})]}),document.body)}const J={notice:null,reported:{}};function K(e,a){var t;if(a.type==="dismiss")return{...e,notice:null};if(a.type==="recover"){if(!(a.source in e.reported))return e;const i={...e.reported};return delete i[a.source],{reported:i,notice:((t=e.notice)==null?void 0:t.source)===a.source?null:e.notice}}return!a.repeat&&e.reported[a.notice.source]===a.notice.message?e:{notice:a.notice,reported:{...e.reported,[a.notice.source]:a.notice.message}}}function Q(){const[e,a]=u.useReducer(K,J),t=u.useCallback((d,o=!1)=>a({type:"report",notice:d,repeat:o}),[]),i=u.useCallback(d=>a({type:"recover",source:d}),[]),c=u.useCallback(()=>a({type:"dismiss"}),[]);return{notice:e.notice,report:t,recover:i,dismiss:c}}function W(){const e=O(),[a,t]=u.useState(null),{notice:i,report:c,recover:d,dismiss:o}=Q(),[l,b]=u.useState(!0),p=u.useRef(null),g=u.useRef(!0),r=u.useCallback(async(m=!0)=>{if(p.current||!v())return;const x=Symbol();p.current=x;try{const j=await S({action:"dashboard"});g.current&&p.current===x&&v()&&(t(j),j.discoveryError?c({source:"dashboard",title:"原生会话加载失败",message:j.discoveryError,onRetry:()=>void r()},m):d("dashboard"))}catch(j){g.current&&p.current===x&&v()&&c({source:"dashboard",title:"看板加载失败",message:j instanceof Error?j.message:"无法加载看板",onRetry:()=>void r()},m)}finally{p.current===x&&(p.current=null,g.current&&b(!1))}},[c,d]);return u.useEffect(()=>{if(!e)return;g.current=!0,d("dashboard"),b(!0),r(!1);const m=setInterval(()=>{v()&&r(!1)},5e3),x=()=>{r(!1)};return window.addEventListener("focus",x),()=>{g.current=!1,p.current=null,clearInterval(m),window.removeEventListener("focus",x)}},[e,r,d]),{snapshot:a,notice:i,dismissError:o,loading:l,refresh:r}}function Z(){return s.jsx("div",{className:"session-dashboard-loading",role:"status","aria-live":"polite","aria-label":"正在加载会话总览","aria-busy":"true",children:s.jsx("div",{className:"session-dashboard-loading-cards","aria-hidden":"true",children:[0,1,2].map(e=>s.jsxs("div",{className:"session-dashboard-loading-card",children:[s.jsx("span",{className:"session-dashboard-loading-icon"}),s.jsxs("span",{className:"session-dashboard-loading-lines",children:[s.jsx("i",{}),s.jsx("i",{})]}),s.jsx("span",{className:"session-dashboard-loading-dot"})]},e))})})}function ss({incident:e,target:a,refresh:t,onOpen:i}){var c,d,o;return s.jsx(R,{text:e.message,options:((c=e.question)==null?void 0:c.options)??e.options,recommendation:e.recommendation,multiSelect:(d=e.question)==null?void 0:d.multiSelect,sourceOnly:(o=e.question)==null?void 0:o.requiresSource,onSource:()=>i(a),onAnswer:async(l,b)=>{await S({action:"answerSupervision",groupId:e.groupId,incidentId:e.id,answer:l,selectedIndices:b}),await t()}})}function D({item:e,onOpenGroup:a,onOpenSession:t,refresh:i}){var f;const[c,d]=u.useState(!1),o=u.useId(),[l,b]=u.useState(""),[p,g]=u.useState(!1),r=e.supervision,m=((r==null?void 0:r.group)??e.group).members.find(n=>{var h;return n.id===((h=((r==null?void 0:r.group)??e.group).monitoring)==null?void 0:h.supervisorId)}),x=(r==null?void 0:r.incidents.filter(n=>n.status==="waiting"))??[],j=async n=>{g(!0),b("");try{await S(n==="apply"?{action:"applySupervision",groupId:e.group.id}:{action:"pauseSupervision",groupId:e.group.id,paused:!(r!=null&&r.paused)}),await i()}catch(h){b(h instanceof Error?h.message:"操作失败")}finally{g(!1)}};return s.jsxs("article",{className:`session-dashboard-group is-${e.status}`,children:[s.jsxs("div",{className:"session-dashboard-group-summary",children:[s.jsxs("button",{className:"session-dashboard-group-open","aria-label":`进入群聊:${e.group.name}`,onClick:()=>a(e),children:[s.jsx(C,{size:20}),s.jsxs("span",{children:[s.jsx("strong",{title:e.group.name,children:e.group.name}),s.jsx("small",{title:e.group.cwd,children:e.group.cwd})]}),s.jsx("span",{className:`session-dashboard-status is-${e.status}`,children:e.decisionCount?`${e.decisionCount} 待决策`:B[e.status]})]}),s.jsx("button",{className:"session-dashboard-group-toggle","aria-label":`${c?"收起":"展开"}群聊详情:${e.group.name}`,"aria-expanded":c,"aria-controls":o,onClick:()=>d(n=>!n),children:s.jsx(E,{size:16})})]}),c&&s.jsxs("div",{id:o,className:"session-dashboard-group-details",children:[s.jsx("p",{className:"session-dashboard-progress",children:e.progress}),s.jsxs("div",{className:"session-dashboard-meta",children:[s.jsxs("span",{children:[e.runningCount," 运行中"]}),s.jsxs("span",{className:e.decisionCount?"needs-attention":"",children:[e.decisionCount," 待决策"]}),m&&s.jsxs("span",{children:[s.jsx(V,{size:13}),m.name,r!=null&&r.paused?" · 已暂停监管":" · 监工"]})]}),s.jsxs("details",{className:"session-dashboard-linked",children:[s.jsxs("summary",{children:[s.jsx("span",{children:e.sessions.length?`${e.sessions.length} 条${(f=((r==null?void 0:r.group)??e.group).monitoring)!=null&&f.targets.length?"原始":"群内"}会话`:"暂无工作会话"}),s.jsx(E,{size:15})]}),s.jsx("div",{children:e.sessions.map(n=>s.jsxs("button",{className:"session-dashboard-session",onClick:()=>t(n),children:[s.jsx(A,{agentType:n.agentType,size:17}),s.jsxs("span",{children:[s.jsx("strong",{children:n.title}),s.jsx("small",{children:N[n.agentType]})]}),s.jsx("em",{children:n.status==="running"?"运行中":n.status==="failed"?"异常":n.status==="unknown"?"待核对":"空闲"}),s.jsx(k,{size:14})]},n.id))})]}),m&&s.jsxs("details",{className:"session-dashboard-policy",children:[s.jsx("summary",{children:"监工职责"}),s.jsx("p",{children:m.role||"关注意外中断与交接断档,在原任务授权内恢复;业务选择交由你决策。"}),s.jsxs("button",{disabled:p,onClick:()=>void j("pause"),children:[r!=null&&r.paused?s.jsx(q,{size:13}):s.jsx(H,{size:13})," ",r!=null&&r.paused?"恢复监管":"暂停监管"]})]}),e.configurationChanged&&s.jsxs("p",{className:"session-dashboard-config",children:["群配置已更新,当前监工沿用原配置。",s.jsx("button",{disabled:p,onClick:()=>void j("apply"),children:"应用最新监管配置"})]}),e.questions.map(n=>s.jsx(R,{text:n.text,options:n.options,onSource:()=>a({...e,discussionId:n.discussionId}),onAnswer:async(h,w)=>{await S(n.decisionRevision!==void 0?{action:"answerDecision",discussionId:n.discussionId,expectedRevision:n.decisionRevision,answer:h,messageId:crypto.randomUUID()}:{action:"answer",discussionId:n.discussionId,questionId:n.questionId,answer:h,selectedIndices:w}),await i()}},`${n.discussionId}:${n.questionId}`)),x.map(n=>{var w;const h=(w=r==null?void 0:r.group.monitoring)==null?void 0:w.targets.find($=>$.id===n.sessionId);return h?s.jsx(ss,{incident:n,target:h,refresh:i,onOpen:t},n.id):null}),!!(r!=null&&r.incidents.length)&&s.jsxs("details",{className:"session-dashboard-history",children:[s.jsx("summary",{children:"监工记录"}),r.incidents.slice(-6).reverse().map(n=>s.jsxs("p",{children:[s.jsx("time",{children:new Date(n.updatedAt).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})})," ",n.message," ",s.jsx("small",{children:n.status==="queued"?"排队中":n.status==="verifying"?"核对新进度中":n.status==="resolved"?"已处理":n.status==="waiting"?"等你处理":n.status==="dismissed"?"已结束":"处理中"})]},n.id))]}),l&&s.jsx("p",{className:"collab-error",role:"alert",children:l}),s.jsxs("button",{onClick:()=>a(e),children:["进入群聊 ",s.jsx(k,{size:14})]})]})]})}function M({session:e,showAgent:a=!1,onOpen:t}){return s.jsxs("button",{className:"session-dashboard-agent-session",onClick:()=>t(e),children:[a?s.jsx("span",{className:"session-dashboard-session-brand",role:"img","aria-label":N[e.agentType],title:N[e.agentType],children:s.jsx(A,{agentType:e.agentType,size:20})}):s.jsx("span",{className:"session-dashboard-running-dot"}),s.jsxs("span",{children:[s.jsx("strong",{children:e.title}),s.jsx("small",{title:e.cwd,children:e.cwd})]}),s.jsx("span",{children:"运行中"}),s.jsx(k,{size:15})]})}function es(e){const a=e.groups.map(i=>({kind:"group",id:`group:${i.group.id}`,updated:i.updated,item:i,priority:i.decisionCount>0||i.status==="waiting"?2:+(i.runningCount>0||i.status==="running")})),t=e.agents.flatMap(i=>i.sessions).map(i=>({kind:"session",id:`session:${i.id}`,updated:i.updated,priority:1,item:i}));return[...a,...t].sort((i,c)=>c.priority-i.priority||c.updated.localeCompare(i.updated)||i.id.localeCompare(c.id))}function ls(e){const{snapshot:a,notice:t,dismissError:i,loading:c,refresh:d}=W(),o=z(n=>n.skin),l=z(n=>n.dashboardSessionsMerged),b=z(n=>n.setDashboardSessionsMerged);u.useEffect(()=>{document.documentElement.setAttribute("data-skin",o)},[o]),u.useEffect(()=>{window.parent!==window&&window.parent.postMessage({type:G},window.location.origin)},[]);const p=e.onOpenGroup??(n=>y({kind:"group",groupId:n.group.id,title:n.group.name,discussionId:n.discussionId})),g=e.onOpenSession??(n=>y({kind:"session",session:n})),r=e.onViewGroups??(()=>y({kind:"groups"})),m=e.onNewSession??(()=>y({kind:"new-session"})),x=(a==null?void 0:a.agents.reduce((n,h)=>n+h.sessions.length,0))??0,j=a&&l?es(a):[],f=(a==null?void 0:a.decisionTotal)??(a==null?void 0:a.groups.reduce((n,h)=>n+h.decisionCount,0))??0;return s.jsxs("main",{className:"session-dashboard",children:[s.jsxs("header",{className:"session-dashboard-heading",children:[s.jsxs("div",{children:[s.jsx("span",{className:"collab-eyebrow",children:"会话总览"}),s.jsxs("h1",{children:["Dashboard ",s.jsxs("span",{className:"session-dashboard-live",children:[s.jsx("i",{}),"实时"]})]}),s.jsx("p",{children:"在一个地方查看运行、交接与需要你决定的事。"})]}),s.jsxs("div",{className:"session-dashboard-toolbar",children:[s.jsxs("button",{onClick:()=>b(!l),"aria-pressed":l,title:l?"恢复按 Agent 分组":"合并显示群聊和所有 Agent 的运行会话",children:[l?s.jsx(X,{size:16}):s.jsx(Y,{size:16}),s.jsx("span",{children:l?"按 Agent 分组":"合并会话"})]}),s.jsx("button",{onClick:()=>void d(),"aria-label":"刷新会话看板",children:s.jsx(P,{size:16})}),s.jsxs("button",{onClick:r,children:[s.jsx(C,{size:16}),"群聊列表"]}),s.jsxs("button",{className:"session-dashboard-new-session",onClick:m,children:[s.jsx(U,{size:16}),"创建会话"]}),e.onClose&&s.jsx("button",{onClick:e.onClose,"aria-label":"关闭会话看板",children:s.jsx(_,{size:17})})]})]}),s.jsxs("div",{className:"session-dashboard-stats",children:[s.jsxs("span",{children:[s.jsx(T,{size:16}),s.jsx("strong",{children:x}),"运行中的原始会话"]}),s.jsxs("span",{className:f?"needs-attention":"",children:[s.jsx("strong",{children:f}),"待你决策"]}),s.jsxs("span",{children:[s.jsx("strong",{children:(a==null?void 0:a.groupTotal)??0}),"协作群"]}),s.jsx("small",{children:"无变化时监工保持安静"})]}),t&&s.jsx(F,{...t,onClose:i}),c&&!a&&s.jsx(Z,{}),a&&!l&&(a.groups.length?s.jsxs("section",{"aria-label":"群聊运行总览",children:[s.jsxs("div",{className:"session-dashboard-section-title",children:[s.jsxs("h2",{children:[s.jsx(C,{size:18}),"群聊 ",s.jsx("small",{children:"Top 10 · 运行中和待决策优先"})]}),s.jsxs("button",{onClick:r,children:["查看全部 ",a.groupTotal," ",s.jsx(k,{size:14})]})]}),s.jsx("div",{className:"session-dashboard-group-grid",children:a.groups.map(n=>s.jsx(D,{item:n,onOpenGroup:p,onOpenSession:g,refresh:d},n.group.id))})]}):s.jsx("div",{className:"session-dashboard-group-create",children:s.jsxs("button",{onClick:r,children:[s.jsx(C,{size:16}),"创建群聊,配置监工"]})})),a&&(l?s.jsxs("section",{className:"session-dashboard-agent","aria-label":"合并会话",children:[s.jsx("div",{className:"session-dashboard-section-title",children:s.jsxs("h2",{children:[s.jsx(T,{size:20}),"会话 ",s.jsxs("small",{children:[x," 运行中 · ",a.groupTotal," 群聊"]})]})}),j.length?s.jsx("div",{className:"session-dashboard-agent-grid",children:j.map(n=>n.kind==="group"?s.jsx(D,{item:n.item,onOpenGroup:p,onOpenSession:g,refresh:d},n.id):s.jsx(M,{session:n.item,showAgent:!0,onOpen:g},n.id))}):s.jsx("p",{className:"session-dashboard-agent-empty",children:"当前没有运行中的会话"})]}):a.agents.map(n=>s.jsxs("section",{className:"session-dashboard-agent","aria-label":`${N[n.agentType]} 运行会话`,children:[s.jsxs("div",{className:"session-dashboard-section-title",children:[s.jsxs("h2",{children:[s.jsx(A,{agentType:n.agentType,size:20}),N[n.agentType]," ",s.jsxs("small",{children:[n.sessions.length," 运行中"]})]}),s.jsxs("button",{onClick:()=>e.onViewAgent?e.onViewAgent(n.agentType):y({kind:"agent",agentType:n.agentType}),children:["查看全部 ",s.jsx(k,{size:14})]})]}),n.sessions.length?s.jsx("div",{className:"session-dashboard-agent-grid",children:n.sessions.map(h=>s.jsx(M,{session:h,onOpen:g},h.id))}):s.jsx("p",{className:"session-dashboard-agent-empty",children:"当前没有运行中的会话"})]},n.agentType)))]})}export{ss as SupervisionIncidentDecision,ls as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{c as f}from"./index-DBNVLOBM.js";/**
|
|
2
|
-
* @license lucide-react v0.468.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const g=f("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),c="agent-webapp:artifact-open:v1";function o(e){if(/[\0\r\n]/.test(e))return!1;try{const t=new URL(e);return(t.protocol==="http:"||t.protocol==="https:")&&/\.(mp4|webm|mov|m4v|mp3|wav|m4a|aac|ogg|flac|png|jpe?g|gif|webp|pdf)$/i.test(t.pathname)}catch{return!1}}function p(e){return e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\/]+[\\/][^\\/]+/.test(e)}function h(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==c||!Number.isSafeInteger(t.requestId)||Number(t.requestId)<1||typeof t.path!="string"||!(p(t.path)||t.path.startsWith("~/")||o(t.path))||t.path.includes("\0")||t.path.includes(`
|
|
7
|
-
`)||t.path.includes("\r")?null:t}function m(e,t,s){return e.origin!==t||e.source!==s?null:h(e.data)}let a=0;function l(e){return e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\/]+[\\/][^\\/]+/.test(e)}function d(e,t,s){const r=e.trim();if(!r||/[\0\r\n]/.test(r))return null;if(o(r))return r;if(r.startsWith("~/")){const n=r.slice(2);return!n||n.split(/[\\/]/).includes("..")?null:s?d(n,s):r}if(l(r))return r;if(!t||!l(t))return null;const i=r.replaceAll("\\","/").split("/").filter(n=>n&&n!==".");if(i.length===0||i.some(n=>n===".."))return null;const u=/^[A-Za-z]:[\\/]/.test(t)||t.startsWith("\\\\")?"\\":"/";return`${t.replace(/[\\/]+$/,"")}${u}${i.join(u)}`}function A(e,t=window){return t.parent===t?!1:(a+=1,t.parent.postMessage({type:c,requestId:a,path:e},t.location.origin),!0)}export{g as C,m as a,o as i,A as p,d as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,G as n}from"./mermaid.core-BEmIap6p.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as n,j as l,E as d,F as o}from"./mermaid.core-BEmIap6p.js";var x=n((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=n((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=n((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=n((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const i=o(s);a.attr("xlink:href",i)},"drawImage"),g=n((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const i=o(s);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),h=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=n(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,h as b,g as c,x as d,m as e,w as f,f as g,y as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-TICWLB2K-CHqUfDzl.js";import{_ as i}from"./mermaid.core-BEmIap6p.js";import"./chunk-5VM5RSS4-1_IZosIm.js";import"./chunk-XXDRQBXY-CPbMDiSF.js";import"./chunk-POPQ4Y6H-Bxryudz4.js";import"./chunk-F27PBJKO-IZ7w-WCZ.js";import"./index-DBNVLOBM.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-TICWLB2K-CHqUfDzl.js";import{_ as i}from"./mermaid.core-BEmIap6p.js";import"./chunk-5VM5RSS4-1_IZosIm.js";import"./chunk-XXDRQBXY-CPbMDiSF.js";import"./chunk-POPQ4Y6H-Bxryudz4.js";import"./chunk-F27PBJKO-IZ7w-WCZ.js";import"./index-DBNVLOBM.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as E,r as h,d as v,j as d}from"./index-DBNVLOBM.js";import{i as b}from"./artifact-links-C7zYRJaC.js";import{X as I}from"./x-CLvev0bC.js";/**
|
|
2
|
-
* @license lucide-react v0.468.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const F=E("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
7
|
-
* @license lucide-react v0.468.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const X=E("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),A=/!?\[([^\]\n]+)\]\((https?:\/\/[^\s)]+|[ \t]*(?:~\/|\/|[A-Za-z]:[\\/])[^)\n]+|[^():\n]+\.(?:png|jpe?g|gif|webp|bmp|ico|svg|mp4|webm|mov|m4v))\)/gi,M=/`([^`\n]+)`/g;function G(e){let o=!1;return e.split(/(^[ \t]*```[^\n]*(?:\n|$))/m).map(t=>/^[ \t]*```/.test(t)?(o=!o,t):o?t:t.replace(/(!?\[[^\]\n]+\])\(<\s*((?:https?:\/\/|~\/|\/|[A-Za-z]:[\\/])[^<>\r\n]+?)\s*>\)/g,"$1($2)")).join("")}const _=/https?:\/\/[^\s`<>"'()[\],。;!?]+|(?:~\/|\/|[A-Za-z]:[\\/])[^\s`<>"'()[\],。;!?]*\.[A-Za-z0-9]{1,10}(?::[1-9]\d*)?/gi,k=/:codex-file-citation\{([^}\n]*)\}/g,w=/([A-Za-z][\w-]*)="([^"\n]*)"/g,T=/\uE200visualize\uE202([^\uE201\n]+)\uE201/g;function f(e,o=!1){const t=o&&!/^[A-Za-z][\w+.-]*:/.test(e)&&/\.(png|jpe?g|gif|webp|bmp|ico|svg|mp4|webm|mov|m4v)$/i.test(e);if(!(e.startsWith("/")||e.startsWith("~/")||/^[A-Za-z]:[\\/]/.test(e)||t)||e.includes("?")||e.includes("#")||/[\0\r\n]/.test(e))return null;const r=e.match(/^(.*):([1-9]\d*)$/);return r?{path:r[1],line:Number(r[2])}:{path:e}}function L(e){const o={};for(const c of e.matchAll(w)){const n=c[1];if(n!=="path"&&n!=="purpose"&&n!=="artifact_kind"||o[n]!==void 0)return null;o[n]=c[2]}if(e.replace(w,"").trim())return null;const t=f(o.path??"");if(!t||t.line!==void 0)return null;const r=t.path.slice(t.path.lastIndexOf("/")+1)||t.path;return{path:t.path,label:r}}function R(e){try{const o=JSON.parse(e);if(!o||typeof o!="object"||Array.isArray(o))return null;const{path:t,title:r,mode:c}=o;if(typeof t!="string"||r!==void 0&&typeof r!="string"||c!==void 0&&typeof c!="string")return null;const n=f(t);if(!n||n.line!==void 0)return null;const s=(r==null?void 0:r.trim())||n.path.slice(n.path.lastIndexOf("/")+1)||n.path;return{path:n.path,label:s}}catch{return null}}function C(e,o){const t=[];let r=0;const c=[...[...e.matchAll(A)].map(n=>({kind:"markdown",match:n})),...[...e.matchAll(k)].map(n=>({kind:"citation",match:n})),...[...e.matchAll(T)].map(n=>({kind:"visualize",match:n})),...[...e.matchAll(M)].map(n=>({kind:"code",match:n})),...[...e.matchAll(_)].filter(n=>/^https?:\/\//i.test(n[0])||!/[\w:/\\]/.test(e[(n.index??0)-1]??"")).map(n=>({kind:"bare",match:n}))].sort((n,s)=>(n.match.index??0)-(s.match.index??0));for(const n of c){const{match:s}=n,u=s.index??0;if(u<r)continue;if(u>r&&t.push({type:"text",value:e.slice(r,u)}),n.kind==="code"){const i=s[1],l=/\.[A-Za-z0-9]{1,10}(?::[1-9]\d*)?$/.test(i)?f(i):null;t.push(l||b(i)?{type:"artifact",label:i,path:(l==null?void 0:l.path)??i,...l!=null&&l.line?{line:l.line}:{},raw:s[0]}:{type:"code",value:i}),r=u+s[0].length;continue}if(n.kind==="bare"){const i=s[0],l=f(i);t.push(l||b(i)?{type:"artifact",label:i,path:(l==null?void 0:l.path)??i,...l!=null&&l.line?{line:l.line}:{},raw:i}:/^https?:\/\//i.test(i)?{type:"link",label:i,href:i}:{type:"text",value:i}),r=u+i.length;continue}if(n.kind==="citation"){const i=L(s[1]);t.push(i?{type:"artifact",label:i.label,path:i.path,raw:s[0]}:{type:"text",value:s[0]}),r=u+s[0].length;continue}if(n.kind==="visualize"){const i=R(s[1]);t.push(i?{type:"artifact",label:i.label,path:i.path,raw:s[0]}:{type:"text",value:s[0]}),r=u+s[0].length;continue}const a=s[2];if(b(a))t.push({type:"artifact",label:s[1],path:a,raw:s[0]});else if(/^https?:\/\//i.test(a))t.push({type:"link",label:s[1],href:a});else{const i=f(a.trim(),!0);i?t.push({type:"artifact",label:s[1],path:i.path,...i.line?{line:i.line}:{},raw:s[0]}):t.push({type:"text",value:s[0]})}r=u+s[0].length}return r<e.length&&t.push({type:"text",value:e.slice(r)}),t.length>0?t:[{type:"text",value:e}]}function H(e){return C(e)}const g=()=>({scale:1,x:0,y:0});function y(e,o,t={x:0,y:0}){const r=Math.min(6,Math.max(1,o));if(r===1)return g();const c=r/e.scale;return{scale:r,x:t.x-(t.x-e.x)*c,y:t.y-(t.y-e.y)*c}}function z(e,o,t){if(!o.length||o.length!==t.length)return e;const r=u=>({x:u.reduce((a,i)=>a+i.x,0)/u.length,y:u.reduce((a,i)=>a+i.y,0)/u.length}),c=r(o),n=r(t);let s=e;if(o.length===2){const u=i=>Math.hypot(i[1].x-i[0].x,i[1].y-i[0].y),a=u(o);a>0&&(s=y(e,e.scale*u(t)/a,c))}return s.scale===1?s:{...s,x:s.x+n.x-c.x,y:s.y+n.y-c.y}}function W({image:e,onClose:o}){const[t,r]=h.useState(g),c=h.useRef(null),n=h.useRef(new Map),s=h.useRef(!1),u=(a,i)=>{const l=c.current.getBoundingClientRect();return{x:a-l.left-l.width/2,y:i-l.top-l.height/2}};return h.useEffect(()=>{r(g()),n.current.clear()},[e==null?void 0:e.src]),h.useEffect(()=>{const a=c.current;if(!e||!a)return;const i=p=>{p.preventDefault();const x=u(p.clientX,p.clientY);r(m=>y(m,m.scale*Math.exp(-p.deltaY*.002),x))},l=p=>p.preventDefault();return a.addEventListener("wheel",i,{passive:!1}),a.addEventListener("gesturestart",l,{passive:!1}),a.addEventListener("gesturechange",l,{passive:!1}),()=>{a.removeEventListener("wheel",i),a.removeEventListener("gesturestart",l),a.removeEventListener("gesturechange",l)}},[e==null?void 0:e.src]),h.useEffect(()=>{if(!e)return;const a=document.body.style.overflow,i=l=>{l.key==="Escape"&&o()};return document.body.style.overflow="hidden",window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i),document.body.style.overflow=a}},[e,o]),e?v.createPortal(d.jsxs("div",{ref:c,className:"message-image-lightbox",role:"dialog","aria-modal":"true","aria-label":"图片预览",onClick:a=>{a.target===a.currentTarget&&!s.current&&o()},onPointerDown:a=>{a.target.closest("button")||a.button!==0||(n.current.size||(s.current=!1),n.current.set(a.pointerId,u(a.clientX,a.clientY)),a.target.setPointerCapture(a.pointerId))},onPointerMove:a=>{if(!n.current.has(a.pointerId))return;const i=[...n.current.values()].slice(0,2),l=n.current.get(a.pointerId),p=u(a.clientX,a.clientY);Math.hypot(p.x-l.x,p.y-l.y)>2&&(s.current=!0),n.current.set(a.pointerId,p);const x=[...n.current.values()].slice(0,2);r(m=>z(m,i,x))},onPointerUp:a=>n.current.delete(a.pointerId),onPointerCancel:a=>n.current.delete(a.pointerId),onLostPointerCapture:a=>n.current.delete(a.pointerId),children:[d.jsx("img",{className:"message-image-lightbox__image",src:e.src,alt:e.alt,draggable:!1,style:{transform:`translate(${t.x}px, ${t.y}px) scale(${t.scale})`}}),d.jsxs("div",{className:"message-image-lightbox__toolbar",children:[d.jsx("button",{type:"button","aria-label":"缩小图片",disabled:t.scale<=1,onClick:()=>r(a=>y(a,a.scale/1.5)),children:"−"}),d.jsxs("span",{"aria-live":"polite",children:[Math.round(t.scale*100),"%"]}),d.jsx("button",{type:"button","aria-label":"放大图片",disabled:t.scale>=6,onClick:()=>r(a=>y(a,a.scale*1.5)),children:"+"}),d.jsx("button",{type:"button",onClick:()=>r(g()),children:"恢复"})]}),d.jsx("button",{type:"button",className:"message-image-lightbox__close",onClick:o,"aria-label":"关闭图片预览",title:"关闭",autoFocus:!0,children:d.jsx(I,{size:22,"aria-hidden":"true"})})]}),document.body):null}const P=2048,j=2*1024*1024,O=.85;function N(e,o,t=P){const r=Math.max(e,o);if(r<=t)return{width:e,height:o};const c=t/r;return{width:Math.max(1,Math.round(e*c)),height:Math.max(1,Math.round(o*c))}}async function Y(e,o=U){if(e.type.toLowerCase()==="image/gif")return e;let t=null;try{t=await o.decode(e);const r=N(t.width,t.height);if(!(r.width!==t.width||r.height!==t.height)&&e.size<=j)return e;const n=e.type.toLowerCase()==="image/jpeg"?"image/jpeg":"image/webp",s=await o.encode(t,r.width,r.height,n,O);return s&&s.size<e.size?s:e}catch{return e}finally{t==null||t.dispose()}}const U={decode(e){return new Promise((o,t)=>{const r=URL.createObjectURL(e),c=new Image;let n=!1;const s=()=>URL.revokeObjectURL(r);c.onload=()=>{n=!0,o({source:c,width:c.naturalWidth,height:c.naturalHeight,dispose:s})},c.onerror=()=>{n||s(),t(new Error("无法解码图片"))},c.src=r})},encode(e,o,t,r,c){const n=document.createElement("canvas");n.width=o,n.height=t;const s=n.getContext("2d");return s?(s.drawImage(e.source,0,0,o,t),new Promise(u=>n.toBlob(u,r,c))):Promise.resolve(null)}},S=new Set(["image/jpeg","image/png","image/gif","image/webp"]);async function B(e,o){const t=[],r=[],c=[];for(const s of e){const u=s.type.trim().toLowerCase();u.startsWith("image/")?S.has(u)?t.push(s):c.push(s):r.push(s)}const n=await Promise.all(t.map(async s=>{try{return{file:s,dataUrl:await o(s)}}catch{return{file:s,dataUrl:null}}}));return{images:n.flatMap(s=>s.dataUrl?[s.dataUrl]:[]),attachments:r,unsupportedImages:c,failedImages:n.flatMap(s=>s.dataUrl?[]:[s.file])}}export{F as H,W as M,X as S,B as a,G as b,Y as n,H as p};
|