@runfusion/fusion 0.77.0-beta.6 → 0.77.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +42309 -39335
- package/dist/child-process-worker.js +7394 -4875
- package/dist/client/.vite/manifest.json +267 -330
- package/dist/client/assets/{AgentDetailView-oyY72uSo.js → AgentDetailView-C1eh_vXv.js} +4 -4
- package/dist/client/assets/{AgentPermissionPolicyEditor-C3Qo9p1M.js → AgentPermissionPolicyEditor-CeKsO1LR.js} +2 -2
- package/dist/client/assets/{AgentsView-M2MhTIGW.js → AgentsView-BNe2ABOc.js} +4 -4
- package/dist/client/assets/{CommandCenter-CpcAt6jt.js → CommandCenter-BuREM-G1.js} +18 -18
- package/dist/client/assets/DevServerView-D0i1b-QO.js +1 -0
- package/dist/client/assets/DirectoryPicker-VOx91hQt.js +1 -0
- package/dist/client/assets/DocumentsView-CO5W_WVb.js +1 -0
- package/dist/client/assets/EvalsView-BqSINSrZ.js +1 -0
- package/dist/client/assets/ExperimentalAgentOnboardingModal-DEcFgONi.js +1 -0
- package/dist/client/assets/{GoalsView-DPj59B3l.js → GoalsView-DZ57wXmJ.js} +1 -1
- package/dist/client/assets/{InsightsView-QLJNkKJp.js → InsightsView-DSWfXG7Q.js} +3 -3
- package/dist/client/assets/{MemoryView-CDCS-1ig.js → MemoryView-BEX10uhl.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-DktXXrmF.js → PiExtensionsManager-DcAmXXoR.js} +2 -2
- package/dist/client/assets/PluginManager-BU0omQUv.js +1 -0
- package/dist/client/assets/{PullRequestView-CkObT6e3.js → PullRequestView-B-JL_8Kk.js} +2 -2
- package/dist/client/assets/{ReportModal-B5LTdDgi.js → ReportModal-DxggF_RH.js} +5 -5
- package/dist/client/assets/{ResearchView-CryFrV8l.js → ResearchView-CnwTXfQO.js} +1 -1
- package/dist/client/assets/{SecretsView-9YcNW_fo.js → SecretsView-BDvzsLFz.js} +1 -1
- package/dist/client/assets/SettingsModal-801eFQ9u.js +21 -0
- package/dist/client/assets/{SettingsModal-llkoaJev.js → SettingsModal-BZHeQ3ED.js} +1 -1
- package/dist/client/assets/{SettingsTextareaRow-B_Legu-A.js → SettingsTextareaRow-B0rTuelr.js} +1 -1
- package/dist/client/assets/SetupWizardModal-CoExPwIn.js +2 -0
- package/dist/client/assets/{SkillsView-CSeauwIw.js → SkillsView-WVP25LPj.js} +1 -1
- package/dist/client/assets/WorkflowNodeEditor-pCMyKcnS.js +8 -0
- package/dist/client/assets/{agent-import-generation-CttglSmZ.js → agent-import-generation-M_hKtjgN.js} +1 -1
- package/dist/client/assets/{agentsOrgChartLayout-f-9mwRbD.js → agentsOrgChartLayout-DjvIMhFD.js} +1 -1
- package/dist/client/assets/{app-C_PTWuI1.js → app-BOvA34XN.js} +3 -3
- package/dist/client/assets/{app-BBSLJDbV.js → app-Bic4iWXQ.js} +3 -3
- package/dist/client/assets/{app-Bvr57EZQ.js → app-BlbH7Tir.js} +2 -2
- package/dist/client/assets/{app-DwvelD-n.js → app-C6TctczU.js} +3 -3
- package/dist/client/assets/{app-DRW5hIgr.js → app-D3qZmEIu.js} +3 -3
- package/dist/client/assets/{app-BKwOvuxE.js → app-DLnMkUt5.js} +2 -2
- package/dist/client/assets/{app-DKx18PHE.js → app-mNy0DeDM.js} +3 -3
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-DA_Hm_di.js → architectureDiagram-3BPJPVTR-CkzEm8i9.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-JF7K8CcV.js → blockDiagram-GPEHLZMM-Dc-dUMjY.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-DN-wklCP.js → c4Diagram-AAUBKEIU-DnYjsrR0.js} +1 -1
- package/dist/client/assets/channel-CxQ40s_U.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-ChtjU8Cu.js → chunk-2J33WTMH-0E1GEFEr.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-dJL0n3nn.js → chunk-4BX2VUAB-Dj5oZd51.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-Bfg-QB9A.js → chunk-55IACEB6-DfNT0s8E.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-BHPPwYUS.js → chunk-727SXJPM-BnFjhiIQ.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-DIIpPUQN.js → chunk-AQP2D5EJ-DR84wSqR.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-D230R32b.js → chunk-FMBD7UC4-IjByNOrR.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-0Lhp5CRv.js → chunk-ND2GUHAM-By0q_jZm.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-BxbHBfKJ.js → chunk-QZHKN3VN-BELcl3N5.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-C2ARdiRL.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C2ARdiRL.js +1 -0
- package/dist/client/assets/{common-13IRj_PO.js → common-BsNuuNOe.js} +1 -1
- package/dist/client/assets/{common-BBynATth.js → common-CASsTuSW.js} +1 -1
- package/dist/client/assets/{common-BG-vw0tL.js → common-CfyFt5OG.js} +1 -1
- package/dist/client/assets/{common-DSo46rnH.js → common-DS98trLj.js} +1 -1
- package/dist/client/assets/common-DeoHWJCq.js +1 -0
- package/dist/client/assets/common-PpMdoH5r.js +1 -0
- package/dist/client/assets/{common-vpHuuvkd.js → common-cN--mrmm.js} +1 -1
- package/dist/client/assets/{cose-bilkent-S5V4N54A-3vEwhfYz.js → cose-bilkent-S5V4N54A-D4cCw9-_.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-Br44UsdY.js → dagre-BM42HDAG-JJp5dVeY.js} +1 -1
- package/dist/client/assets/dashboard-view-6zPJm9zC.js +1 -0
- package/dist/client/assets/{dashboard-view-_EglxMDl.js → dashboard-view-Bl9CPhxE.js} +1 -1
- package/dist/client/assets/{dashboard-view-BldxxYfz.js → dashboard-view-C5Nt8cvY.js} +1 -1
- package/dist/client/assets/{dashboard-view-CcPcELPx.js → dashboard-view-MAC_LHDX.js} +2 -2
- package/dist/client/assets/{diagram-2AECGRRQ-CLNxbHUP.js → diagram-2AECGRRQ-D4L7j_t_.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-D3cNAeQH.js → diagram-5GNKFQAL-VAGFaXqG.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-DkX7h6to.js → diagram-KO2AKTUF-hqXSggfW.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-6iQIiYUr.js → diagram-LMA3HP47-B3eAIuy8.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-Caje3229.js → diagram-OG6HWLK6-BGufp0RK.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BkU-1HB1.js → erDiagram-TEJ5UH35-DplXdx8w.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-BRx3V6RE.js → flowDiagram-I6XJVG4X-C1Ms2bko.js} +1 -1
- package/dist/client/assets/{folder-open-BaSOBfk2.js → folder-open-nMraSDXu.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-D9f1kH3t.js → ganttDiagram-6RSMTGT7-DVgxMtXb.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CQwmZcRd.js → gitGraphDiagram-PVQCEYII-DH2_n0J8.js} +1 -1
- package/dist/client/assets/index-BJc-A7eB.css +1 -0
- package/dist/client/assets/index-CBFPgFTp.js +2787 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-DYWBkGjG.js → infoDiagram-5YYISTIA-DmZdWVcU.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-Df0Nzvh4.js → ishikawaDiagram-YF4QCWOH-DsEIHSXr.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-bSvrZSyZ.js → journeyDiagram-JHISSGLW-CsfIWmu1.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-yHJ101M8.js → kanban-definition-UN3LZRKU-CQKqeZvc.js} +1 -1
- package/dist/client/assets/{mermaid.core-Bc_0VLJw.js → mermaid.core-DkC_dr4-.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DWRnMguM.js → mindmap-definition-RKZ34NQL-RnmE-NUe.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-Ds-DEOqr.js → pieDiagram-4H26LBE5-DPu6FPc4.js} +1 -1
- package/dist/client/assets/{puzzle-CdYF81IT.js → puzzle-DwhHOf32.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Bz-j2fkf.js → quadrantDiagram-W4KKPZXB-CYbypO2p.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BaQ_PaZ-.js → requirementDiagram-4Y6WPE33-DFk1vK_N.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-pUCz8V4-.js → sankeyDiagram-5OEKKPKP-CkUY1Zzu.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-CFwUMspe.js → sequenceDiagram-3UESZ5HK-CFivaLOO.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-Crocrob7.js → standing-instructions-template-BbqKGAC1.js} +2 -2
- package/dist/client/assets/{stateDiagram-AJRCARHV-CHZwo-vd.js → stateDiagram-AJRCARHV-BPeD5PwG.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BTvKaIZR.js → stateDiagram-v2-BHNVJYJU-DduiCPMb.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-Cn3XIoz2.js → timeline-definition-PNZ67QCA-CGUNNVro.js} +1 -1
- package/dist/client/assets/{upload--GqImz6h.js → upload-BS96H1o7.js} +1 -1
- package/dist/client/assets/{users-B0h1q4x6.js → users--irrWoyU.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-CS0FNVU_.js → vennDiagram-CIIHVFJN-CybTaJJH.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-DdYkfF5d.js → wardley-L42UT6IY-DSxaSCGi.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-B_rFmPCh.js → wardleyDiagram-YWT4CUSO-YFb0AxNt.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-CCoaCgmc.js → xychartDiagram-2RQKCTM6-Cv6zlMJC.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/droid-cli/package.json +1 -1
- package/dist/extension.js +23565 -20733
- package/dist/migrations/0065_fn_149_review_convergence_stage.sql +3 -0
- package/dist/pi-claude-cli/package.json +1 -1
- package/dist/plugin-sdk/index.d.ts +57 -10
- package/dist/plugin-sdk/index.js +103 -33
- package/dist/plugins/fusion-plugin-acp-runtime/bundled.js +158 -36
- package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-claude-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-claude-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-cli-printing-press/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
- package/dist/plugins/fusion-plugin-compound-engineering/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
- package/dist/plugins/fusion-plugin-cursor-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-dependency-graph/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
- package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-grok-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-grok-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-hermes-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-linear-import/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-linear-import/package.json +1 -1
- package/dist/plugins/fusion-plugin-omp-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-omp-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-openclaw-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-paperclip-runtime/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
- package/dist/plugins/fusion-plugin-quality/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-quality/package.json +1 -1
- package/dist/plugins/fusion-plugin-reports/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-reports/package.json +1 -1
- package/dist/plugins/fusion-plugin-roadmap/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
- package/dist/plugins/fusion-plugin-todos/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-todos/package.json +1 -1
- package/dist/plugins/fusion-plugin-whatsapp-chat/bundled.js +103 -33
- package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
- package/package.json +1 -1
- package/skill/fusion/references/engine-tools.md +5 -5
- package/dist/client/assets/ChatView-DS4XiCm_.css +0 -1
- package/dist/client/assets/ChatView-zKrUSqiQ.js +0 -13
- package/dist/client/assets/DevServerView-CjTneoG7.js +0 -1
- package/dist/client/assets/DirectoryPicker-BY6V5HLV.js +0 -1
- package/dist/client/assets/DocumentsView-RDK56-qg.js +0 -1
- package/dist/client/assets/EvalsView-DKK4ceUW.js +0 -1
- package/dist/client/assets/ExperimentalAgentOnboardingModal-DiBPZVwC.js +0 -1
- package/dist/client/assets/PluginManager-CQ3iEFMq.js +0 -1
- package/dist/client/assets/SessionTerminal-2ZSXmOkG.css +0 -1
- package/dist/client/assets/SessionTerminal-BWsA9puD.js +0 -2
- package/dist/client/assets/SettingsModal-CL6aiXiI.js +0 -21
- package/dist/client/assets/SetupWizardModal-DLA4UAGp.js +0 -2
- package/dist/client/assets/WorkflowNodeEditor-CGgMiiWy.js +0 -8
- package/dist/client/assets/channel-CwFfFSI9.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-C8dZsxxX.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C8dZsxxX.js +0 -1
- package/dist/client/assets/common-DbOCE-0i.js +0 -1
- package/dist/client/assets/common-DnXF4Jmj.js +0 -1
- package/dist/client/assets/dashboard-view-B0OM3KYC.js +0 -1
- package/dist/client/assets/index-B8PcG8AJ.js +0 -2774
- package/dist/client/assets/index-Dki2LBAp.css +0 -1
- package/dist/client/assets/shield-alert-4qeU3_Rm.js +0 -6
- package/dist/client/assets/useDiscoveredSkillsCache-BEHgTFai.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={send:"Send"},n={ratings:{trendDeclining:"↓ Declining",trendImproving:"↑ Improving",trendInsufficient:"Insufficient data",trendStable:"→ Stable"},reflections:{triggerManual:"Manual",triggerPeriodic:"Periodic",triggerPostTask:"Post-Task",triggerUserRequested:"User Requested"},time:{daysAgo_one:"{{count}}d ago",daysAgo_other:"{{count}}d ago",hoursAgo_one:"{{count}}h ago",hoursAgo_other:"{{count}}h ago",inAMoment:"in a moment",inDays_one:"in {{count}}d",inDays_other:"in {{count}}d",inHours_one:"in {{count}}h",inHours_other:"in {{count}}h",inMinutes_one:"in {{count}}m",inMinutes_other:"in {{count}}m",justNow:"just now",minutesAgo_one:"{{count}}m ago",minutesAgo_other:"{{count}}m ago"}},o={rejection:{capacityExhausted:"That column is at capacity. Try again when a slot frees up.",guardRejected:"This move is not allowed by the workflow.",mergeBlocked:"This task is blocked from completing until its merge step finishes.",unknownColumn:"That column doesn't exist in this task's workflow.",unplannedForExecution:"This task isn't ready for execution yet — planning or plan review is still outstanding.",workflowMismatch:"Drag can't move a card between workflows. Use the workflow switcher instead."}},t={failedToGetResponse:"Failed to get response",failureReferenceId:"ID",failureReferenceKind:"Kind",failureReferenceLabel:"Reference",failureReferenceMetaLabel:"Label",openMailboxMessage:"Open mailbox message",toolCallArgsPrefix:"args",toolCallResultPrefix:"result",toolCallsCount_one:"{{count}} tool calls",toolCallsCount_other:"{{count}} tool calls",toolCallsHeader:"Tool calls",toolCallStatusCompleted:"completed",toolCallStatusError:"error",toolCallStatusErrors:"errors",toolCallStatusRunning:"running",viewFailureDetails:"View failure details"},i={range:{allTime:"All time",last24h:"Last 24h",last30d:"Last 30 days",last7d:"Last 7 days"}},a={anomaly:{duplicateActiveId:"Duplicate active task ID",idInBothStorages:"Task ID present in active and archived storage",sequenceOverlap:"Allocator next sequence overlaps an existing task ID",unknownPrefix:"Task row uses a prefix outside allocator state"}},r={connecting:"Connecting",error:"Error",offline:"Offline",online:"Online"},s={name:"Name"},l={unknown:"Unknown"},u={autopilotStateActivating:"Activating slice",autopilotStateCompleting:"Completing",autopilotStateInactive:"Off",autopilotStateUnknown:"Unknown",autopilotStateWatching:"Watching",interviewStatusAwaitingInput:"Awaiting input",interviewStatusComplete:"Plan ready",interviewStatusError:"Needs retry",interviewStatusGenerating:"Generating plan",runHelperActive:"Stopping pauses linked tasks and marks the mission blocked.",runHelperBlocked:"Resuming re-activates the mission and continues execution.",runHelperPlanning:"Starting activates the first slice so work can begin."},c={messages:{modelSetTo:"{{label}} model set to {{provider}}/{{modelId}}",modelSetToDefault:"{{label}} model set to default"}},m={auth:{differ:"Auth credentials differ",differProviders:"Auth credentials differ: {{providers}}",match:"Auth credentials match",notSynced:"Auth not synced"},status:{connecting:"Connecting",creating:"Creating",deleting:"Deleting",error:"Error",exited:"Exited",offline:"Offline",online:"Online",recreating:"Recreating",running:"Running",stopped:"Stopped"}},d={connecting:"Connecting",error:"Error",offline:"Offline",online:"Online",unknown:"Unknown"},g={providerGitHub:"GitHub",providerLlmSynthesis:"LLM Synthesis",providerLocalDocs:"Local Docs",providerPageFetch:"Page Fetch",providerWebSearch:"Web Search"},p={policyLabel:{block:"Block execution",fallback:"Fall back to local",notConfigured:"Not configured"}},f={nodeRouting:{statusConnecting:"Connecting",statusError:"Error",statusOffline:"Offline",statusOnline:"Online"}},h={apiKeyFormatError:"{{providerName}} keys should follow this format: {{hint}} (e.g. {{example}})",apiKeyLabel:{fallback:"API Key",kimiCoding:"Kimi API Key",minimax:"MiniMax API Key",ollama:"Ollama Endpoint",openai:"OpenAI API Key",openrouter:"OpenRouter API Key",zai:"Zhipu AI API Key"},apiKeyPlaceholder:{fallback:"Enter API key",kimiCoding:"Enter your Kimi API key",minimax:"Enter your MiniMax API key",zai:"Enter your Zhipu AI API key"},apiKeyRequired:"API key is required",apiKeySetup:{fallback:"Enter your API key for this provider.",kimiCoding:"Create your API key in the Moonshot platform account settings.",minimax:"Generate an API key from the MiniMax platform developer console.",ollama:"Enter your Ollama endpoint URL (for example http://localhost:11434).",openai:"Create an API key from your OpenAI dashboard under API keys.",openrouter:"Create an API key from your OpenRouter account key management page.",zai:"Create an API key in the Zhipu AI open platform account settings."},apiKeyUsage:{fallback:"Used by Fusion to authenticate requests to this provider",kimiCoding:"Used for Kimi/Moonshot AI models in task execution and planning",minimax:"Used for MiniMax models in task execution",ollama:"Connects to your local Ollama instance",openai:"Used for GPT models in task execution and planning",openrouter:"Routes to multiple AI model providers through a single key",zai:"Used for GLM models in task execution"},providerDesc:{anthropic:"Claude models — strong at reasoning, analysis, and code",fallback:"AI provider — connect to start using AI models",gemini:"Gemini models — multimodal with strong reasoning",google:"Gemini models — multimodal with strong reasoning",kimi:"Kimi by Moonshot AI — long-context capabilities",kimiCoding:"Kimi by Moonshot AI — long-context capabilities",minimax:"MiniMax models — cost-effective for high-volume usage",moonshot:"Kimi by Moonshot AI — long-context capabilities",ollama:"Run open-source models locally on your machine",openai:"GPT models — versatile for a wide range of tasks",openaiCodex:"Codex models by OpenAI — optimized for coding tasks",openrouter:"OpenRouter — route requests across multiple AI providers",zai:"GLM models by Zhipu AI — strong multilingual support"}},y={nodeStatusConnecting:"Connecting",nodeStatusError:"Error",nodeStatusOffline:"Offline",nodeStatusOnline:"Online"},k={never:"Never",refreshSourceBackground:"Background",refreshSourceInitialLoad:"Initial load",refreshSourceManual:"Manual"},A={summaryAwaitInput:"Waits for user input",summaryCodeDefault:"TypeScript",summaryDefaultModel:"Default model",summaryGateAdvisory:"Advisory",summaryGateBlocks:"Gate (blocks)",summaryHoldRelease:"Release: {{release}}",summaryLoopIterations_one:"{{count}}x",summaryLoopIterations_other:"{{count}}x",summaryLoopUntilContains:'until contains "{{value}}"',summaryLoopUntilMatches:"until matches /{{pattern}}/",summaryNotConfigured:"Not configured",summaryReviewType:"{{type}} review",summarySeamExecute:"Execute (engine)",summarySeamMerge:"Merge boundary",summarySeamPlanning:"Plan (engine)",summarySeamReview:"Review (engine)",summarySeamStepExecute:"Step execute (engine)",summarySeamUnknown:"Seam: {{seam}}"},I={actions:e,agents:n,board:o,chat:t,commandCenter:i,health:a,inline:r,labels:s,merge:l,missions:u,models:c,nodes:m,nodeStatus:d,research:g,routing:p,settings:f,setup:h,taskForm:y,taskReview:k,workflowNodes:A};export{e as actions,n as agents,o as board,t as chat,i as commandCenter,I as default,a as health,r as inline,s as labels,l as merge,u as missions,c as models,d as nodeStatus,m as nodes,g as research,p as routing,f as settings,h as setup,y as taskForm,k as taskReview,A as workflowNodes};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as I}from"./vendor-react-SZ_qB27O.js";import{ef as Ae,du as ve,dw as Xe,dv as Ye}from"./index-B8PcG8AJ.js";import{Z as _e,a as je,M as $e,R as Ge}from"./zoom-out-DzDzWQt1.js";import"./vendor-i18n-Duky4gdQ.js";import"./vendor-codemirror-CcrtqoCy.js";import"./vendor-reactflow-BlIeoTu4.js";import"./vendor-xterm-BNq00GSj.js";import"./createLucideIcon-CshVyKO4.js";const xe=4,we=300,We=24;function Fe({taskId:n,position:s,scale:r,canDrag:i,onPositionChange:p,onDragStateChange:a,onDragEnd:k,onDoubleTap:b}){const[R,H]=t.useState(!1),M=t.useRef(null),C=t.useRef(s),v=t.useRef(!1),o=t.useRef(null),c=t.useRef(!1);C.current=s,c.current=R;const d=t.useCallback(()=>{o.current=null},[]),g=t.useCallback(l=>{M.current=null,H(!1),c.current=!1,l&&(a?.(!1),k?.(),v.current=!0,d())},[k,a,d]),Y=t.useCallback(l=>{if(!l.isPrimary)return;if(l.defaultPrevented){d();return}const f=Date.now();o.current&&f-o.current.timeStamp>we&&d(),i&&l.stopPropagation();const N=l.currentTarget;i&&typeof N.setPointerCapture=="function"&&N.setPointerCapture(l.pointerId),M.current={pointerId:l.pointerId,pointerType:l.pointerType,startPointer:{x:l.clientX,y:l.clientY},startPosition:C.current,defaultPrevented:l.defaultPrevented,movedBeyondThreshold:!1}},[i,d]),O=t.useCallback(l=>{const f=M.current;if(!f||f.pointerId!==l.pointerId)return;i&&l.stopPropagation();const N=l.clientX-f.startPointer.x,E=l.clientY-f.startPointer.y,J=Math.hypot(N,E);if(J>=xe&&(f.movedBeyondThreshold=!0),!i){f.movedBeyondThreshold&&d();return}if(!c.current&&J>=xe&&(H(!0),c.current=!0,a?.(!0),d()),J<xe)return;const U=r>0?r:1;p(n,{x:f.startPosition.x+N/U,y:f.startPosition.y+E/U})},[i,a,p,d,r,n]),L=t.useCallback((l,f)=>{if(!b||f.defaultPrevented||f.movedBeyondThreshold)return Date.now()-(o.current?.timeStamp??0)>we&&d(),!1;if(f.pointerType==="mouse")return d(),!1;const N={timeStamp:Date.now(),point:{x:f.startPointer.x,y:f.startPointer.y}},E=o.current;return!E||N.timeStamp-E.timeStamp>we||Math.hypot(N.point.x-E.point.x,N.point.y-E.point.y)>We?(o.current=N,!1):(v.current=!0,d(),b(),!0)},[b,d]),B=t.useCallback(l=>{const f=M.current;if(!f||f.pointerId!==l.pointerId)return;i&&l.stopPropagation(),i&&typeof l.currentTarget.hasPointerCapture=="function"&&l.currentTarget.hasPointerCapture(l.pointerId)&&typeof l.currentTarget.releasePointerCapture=="function"&&l.currentTarget.releasePointerCapture(l.pointerId);const N=c.current;!N&&L(l,f)&&l.preventDefault(),g(N)},[i,g,L]),X=t.useCallback(l=>{const f=M.current;!f||f.pointerId!==l.pointerId||(i&&l.stopPropagation(),i&&typeof l.currentTarget.hasPointerCapture=="function"&&l.currentTarget.hasPointerCapture(l.pointerId)&&typeof l.currentTarget.releasePointerCapture=="function"&&l.currentTarget.releasePointerCapture(l.pointerId),d(),g(c.current))},[i,g,d]),G=t.useCallback(l=>{v.current&&(v.current=!1,l.preventDefault(),l.stopPropagation())},[]);return t.useMemo(()=>({isDragging:R,onPointerDown:Y,onPointerMove:O,onPointerUp:B,onPointerCancel:X,onClickCapture:G}),[R,G,X,Y,O,B])}const Le=new Set(["planning","researching","executing","finalizing","merging","merging-fix"]);function Ue(n){return n?n.charAt(0).toUpperCase()+n.slice(1):"Executing"}function Be({taskColumnFlags:n,style:s,position:r,scale:i,isSelected:p=!1,isHighlighted:a=!1,isDimmed:k=!1,onMouseEnter:b,onMouseLeave:R,onClick:H,onNodePositionChange:M,onNodeDragStateChange:C,onNodeDragEnd:v,...o}){const{task:c,globalPaused:d,onOpenDetail:g}=o,Y=c.status==="failed",O=c.paused===!0,L=c.column==="in-progress"||Le.has(c.status),B=c.status==="awaiting-approval"&&!L,X=!d&&!Y&&!O&&!B&&L,G=typeof c.currentStep=="number"&&c.currentStep>=0&&Array.isArray(c.steps)&&c.currentStep<c.steps.length,l=c.column==="in-review",f=Fe({taskId:c.id,position:r,scale:i,canDrag:p,onPositionChange:M,onDragStateChange:C,onDragEnd:v,onDoubleTap:()=>g(c)});return I.jsxs("div",{className:`graph-task-node${p?" graph-node--draggable graph-task-node--selected":""}${f.isDragging?" graph-node--dragging":""}${a?" graph-task-node--highlighted graph-node--highlighted":""}${k?" graph-task-node--dimmed graph-node--dimmed":""}${X?" graph-task-node--active":""}${l?" graph-task-node--in-review":""}`,style:s,draggable:!1,"data-testid":`graph-task-node-${c.id}`,"data-current-step":X&&G?String(c.currentStep):void 0,onMouseEnter:b,onMouseLeave:R,onClick:H,onDoubleClick:N=>{N.defaultPrevented||g(c)},onClickCapture:f.onClickCapture,onPointerDown:f.onPointerDown,onPointerMove:f.onPointerMove,onPointerUp:f.onPointerUp,onPointerCancel:f.onPointerCancel,children:[X?I.jsx("div",{className:"graph-task-active-indicator",children:I.jsx("span",{className:"graph-task-active-indicator-text",children:Ue(c.status)})}):null,I.jsx(Ae,{...o,taskColumnFlags:n,onOpenDetail:()=>{},disableDrag:!0})]})}function Ze({zoom:n,onZoomIn:s,onZoomOut:r,onFitToGraph:i,onResetView:p}){return I.jsxs("div",{className:"graph-toolbar","data-testid":"graph-toolbar",children:[I.jsx("button",{className:"btn btn-icon",title:"Zoom in (Ctrl+=)","aria-label":"Zoom in",onClick:s,children:I.jsx(_e,{size:16})}),I.jsx("button",{className:"btn btn-icon",title:"Zoom out (Ctrl+-)","aria-label":"Zoom out",onClick:r,children:I.jsx(je,{size:16})}),I.jsxs("div",{className:"graph-toolbar__zoom-label","aria-live":"polite",children:[Math.round(n*100),"%"]}),I.jsx("button",{className:"btn btn-icon",title:"Fit to graph (Ctrl+Shift+F)","aria-label":"Fit to graph",onClick:i,children:I.jsx($e,{size:16})}),I.jsx("button",{className:"btn btn-icon",title:"Reset view (Ctrl+0)","aria-label":"Reset view",onClick:p,children:I.jsx(Ge,{size:16})})]})}const Ke=280,Ve=100;function qe({edges:n,positions:s,nodeWidth:r=Ke,nodeHeight:i=Ve,nodeHeights:p,highlightedEdgeIds:a}){const k=!!(a&&a.size>0);return I.jsxs("svg",{className:"dependency-graph-edges","aria-hidden":"true",children:[I.jsx("defs",{children:I.jsx("marker",{id:"dependency-graph-arrowhead",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",markerUnits:"strokeWidth",children:I.jsx("path",{d:"M 0 0 L 10 3.5 L 0 7 z",style:{fill:"var(--border)"}})})}),n.map(b=>{const R=s.get(b.source),H=s.get(b.target);if(!R||!H)return null;const M=`${b.source}->${b.target}`,C=k&&(a?.has(M)??!1),v=R.x+r/2,o=R.y+(p?.get(b.source)??i),c=H.x+r/2,d=H.y,g=o+(d-o)/2;return I.jsx("path",{"data-testid":"dependency-edge","data-edge-id":M,className:`dependency-graph-edge${C?" graph-edge--highlighted":""}${k&&!C?" graph-edge--dimmed":""}`,d:`M ${v} ${o} C ${v} ${g}, ${c} ${g}, ${c} ${d}`,fill:"none",markerEnd:"url(#dependency-graph-arrowhead)",style:{opacity:k&&!C?.15:1,stroke:C?"var(--todo)":"var(--border)",strokeWidth:C?"var(--space-xs)":"var(--btn-border-width)",transition:"opacity var(--transition-fast), stroke var(--transition-fast), stroke-width var(--transition-fast)"}},M)})]})}const Je=new Set(["done","archived"]);function Qe(n){return n.filter(s=>typeof s.column=="string"&&s.column.length>0&&!Je.has(s.column))}const et={nodeWidth:280,nodeHeight:100,horizontalGap:40,verticalGap:80,orientation:"vertical"};function ke(n,s){const r={...et,...s},i=n.nodes.map(o=>o.task.id);if(i.length===0)return new Map;const p=new Map,a=new Map;for(const o of i)a.set(o,0),p.set(o,[]);for(const o of n.edges)!a.has(o.source)||!a.has(o.target)||(p.get(o.target)?.push(o.source),a.set(o.source,(a.get(o.source)??0)+1));const k=i.filter(o=>(a.get(o)??0)===0),b=[];for(;k.length>0;){const o=k.shift();b.push(o);for(const c of p.get(o)??[]){const d=(a.get(c)??0)-1;a.set(c,d),d===0&&k.push(c)}}for(const o of i)b.includes(o)||b.push(o);const R=new Map;for(const o of b){const c=n.edges.filter(g=>g.source===o).map(g=>g.target);let d=0;for(const g of c)d=Math.max(d,(R.get(g)??0)+1);R.set(o,d)}const H=new Map;for(const o of i){const c=R.get(o)??0,d=H.get(c)??[];d.push(o),H.set(c,d)}const M=new Map,C=Array.from(H.keys()).sort((o,c)=>o-c),v=new Map;if(r.orientation==="vertical"){let o=0;for(const c of C){v.set(c,o);const d=H.get(c)??[],g=Math.max(r.nodeHeight,...d.map(Y=>r.measuredHeights?.get(Y)??r.nodeHeight));o+=g+r.verticalGap}}for(const o of C){const c=H.get(o)??[];if(c.sort(),r.orientation==="horizontal"){const L=-(c.reduce((G,l)=>G+(r.measuredHeights?.get(l)??r.nodeHeight),0)+Math.max(0,c.length-1)*r.verticalGap)/2,B=o*(r.nodeWidth+r.horizontalGap);let X=L;for(const G of c)M.set(G,{x:B,y:X}),X+=(r.measuredHeights?.get(G)??r.nodeHeight)+r.verticalGap;continue}const Y=-(c.length*r.nodeWidth+Math.max(0,c.length-1)*r.horizontalGap)/2;c.forEach((O,L)=>{const B=Y+L*(r.nodeWidth+r.horizontalGap),X=v.get(o)??o*(r.nodeHeight+r.verticalGap);M.set(O,{x:B,y:X})})}return M}function tt(n){return t.useMemo(()=>{const s=n.map(p=>({task:p})),r=new Set(n.map(p=>p.id)),i=n.flatMap(p=>(p.dependencies??[]).filter(a=>r.has(a)).map(a=>({source:p.id,target:a})));return{nodes:s,edges:i}},[n])}const ue=.1,le=3,De=40,nt=200;function ne(n,s,r){return Math.min(r,Math.max(s,n))}function rt(n){if(!(n instanceof HTMLElement))return!1;const s=n.tagName.toLowerCase();return n.isContentEditable||s==="input"||s==="textarea"||s==="select"}function ot(){const[n,s]=t.useState({x:0,y:0}),[r,i]=t.useState(1),[p,a]=t.useState(!1),k=t.useRef(n),b=t.useRef(r),R=t.useRef(null),H=t.useRef(null),M=t.useRef(new Map),C=t.useRef(null),v=t.useRef({minX:0,minY:0,maxX:0,maxY:0});t.useEffect(()=>{k.current=n},[n]),t.useEffect(()=>{b.current=r},[r]),t.useEffect(()=>()=>{R.current!==null&&window.clearTimeout(R.current)},[]);const o=t.useMemo(()=>`translate(${n.x}px, ${n.y}px) scale(${r})`,[n.x,n.y,r]),c=t.useMemo(()=>Math.round(r*100),[r]),d=t.useCallback(u=>{if(!u){R.current!==null&&(window.clearTimeout(R.current),R.current=null),a(!1);return}a(!0),R.current!==null&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>{a(!1),R.current=null},nt)},[]),g=t.useCallback((u,m,y,T=b.current)=>{const P=v.current;if(P.maxX<=P.minX||P.maxY<=P.minY)return{x:ne(u.x,-m,m),y:ne(u.y,-y,y)};const W=m-P.maxX*T,A=-P.minX*T,_=y-P.maxY*T,K=-P.minY*T,oe=W>A?(W+A)/2:ne(u.x,W,A),$=_>K?(_+K)/2:ne(u.y,_,K);return{x:oe,y:$}},[]),Y=t.useCallback((u,m,y,T)=>{const P=b.current,W=k.current,A=ne(u,ue,le),_=A/P,K=g({x:m.x-(m.x-W.x)*_,y:m.y-(m.y-W.y)*_},y,T,A);i(A),s(K)},[g]),O=t.useCallback((u,m,y,T)=>{d(!1);const P=T??{x:m/2,y:y/2};Y(b.current*u,P,m,y)},[d,Y]),L=t.useCallback((u,m)=>{if(u&&m){O(1.2,u,m);return}i(y=>ne(y+.1,ue,le))},[O]),B=t.useCallback((u,m)=>{if(u&&m){O(1/1.2,u,m);return}i(y=>ne(y-.1,ue,le))},[O]),X=t.useCallback(()=>{d(!0),s({x:0,y:0}),i(1)},[d]),G=t.useCallback((u,m,y,T)=>{if(d(!0),u.size===0){s({x:0,y:0}),i(1);return}const P=T?.nodeWidth??280,W=T?.nodeHeight??100,A=Array.from(u.entries()),_=Math.min(...A.map(([,te])=>te.x)),K=Math.min(...A.map(([,te])=>te.y)),oe=Math.max(...A.map(([,te])=>te.x+P)),$=Math.max(...A.map(([te,me])=>me.y+(T?.measuredHeights?.get(te)??W))),Q=Math.max(1,oe-_),V=Math.max(1,$-K),ce=Math.max(1,m-De*2),fe=Math.max(1,y-De*2),ee=ne(Math.min(ce/Q,fe/V),ue,le),pe=(m-Q*ee)/2-_*ee,he=(y-V*ee)/2-K*ee;i(ee),s(g({x:pe,y:he},m,y,ee))},[g,d]),l=t.useCallback((u,m)=>{if(M.current.set(u,m),M.current.size===2){const[y,T]=Array.from(M.current.values());C.current={distance:Math.hypot(y.x-T.x,y.y-T.y),zoom:b.current,pan:k.current,midpoint:{x:(y.x+T.x)/2,y:(y.y+T.y)/2}},H.current=null;return}H.current={start:m,panStart:k.current}},[]),f=t.useCallback((u,m,y,T)=>{if(M.current.has(u)&&M.current.set(u,m),M.current.size===2&&C.current){d(!1);const[A,_]=Array.from(M.current.values()),oe=Math.hypot(A.x-_.x,A.y-_.y)/Math.max(1,C.current.distance),$={x:(A.x+_.x)/2,y:(A.y+_.y)/2},Q=ne(C.current.zoom*oe,ue,le),V=Q/C.current.zoom,ce=g({x:$.x-(C.current.midpoint.x-C.current.pan.x)*V,y:$.y-(C.current.midpoint.y-C.current.pan.y)*V},y,T);i(Q),s(ce);return}const P=H.current;if(!P)return;d(!1);const W={x:P.panStart.x+(m.x-P.start.x),y:P.panStart.y+(m.y-P.start.y)};s(g(W,y,T))},[g,d]),N=t.useCallback(u=>{if(M.current.delete(u),M.current.size<2&&(C.current=null),M.current.size===1){const[m]=Array.from(M.current.values());H.current={start:m,panStart:k.current};return}M.current.size===0&&(H.current=null)},[]),E=t.useCallback((u,m,y,T)=>{d(!1);const P={x:k.current.x-u,y:k.current.y-m};s(g(P,y,T))},[g,d]),J=t.useCallback((u,m,y,T)=>{const P=u<0?1.1:.9;d(!1),Y(b.current*P,m,y,T)},[d,Y]),U=t.useCallback(u=>{v.current=u},[]),Z=t.useCallback((u,m,y,T,P)=>{if(rt(u.target))return;const W=u.metaKey||u.ctrlKey;if(u.key==="Escape"){u.preventDefault(),X();return}if(W){if(u.key==="="||u.key==="+"){u.preventDefault(),O(1.2,m,y);return}if(u.key==="-"){u.preventDefault(),O(1/1.2,m,y);return}if(u.key==="0"){u.preventDefault(),X();return}(u.key==="f"||u.key==="F")&&u.shiftKey&&(u.preventDefault(),G(T,m,y,P))}},[G,X,O]);return{pan:n,zoom:r,zoomPercent:c,transform:o,transitioning:p,zoomIn:L,zoomOut:B,resetView:X,fitToGraph:G,setAnimate:d,onPointerDown:l,onPointerMove:f,onPointerUp:N,onWheelPan:E,onWheelZoom:J,handleKeyDown:Z,setGraphBounds:U}}function st(n){const{upstreamMap:s,downstreamMap:r}=t.useMemo(()=>{const p=new Map,a=new Map;for(const k of n)p.set(k.id,new Set(k.dependencies??[])),a.has(k.id)||a.set(k.id,new Set);for(const k of n)for(const b of k.dependencies??[])a.has(b)||a.set(b,new Set),a.get(b)?.add(k.id);return{upstreamMap:p,downstreamMap:a}},[n]);return{getChain:t.useCallback(p=>{if(!s.has(p)&&!r.has(p))return new Set;const a=new Set([p]),k=(b,R)=>{const H=[b],M=new Set([b]);for(;H.length>0;){const C=H.shift();if(!C)continue;const v=R.get(C);if(v)for(const o of v)M.has(o)||(M.add(o),a.add(o),H.push(o))}};return k(p,s),k(p,r),a},[r,s])}}const Me="fusion-plugin-dependency-graph:positions";function de(n){if(!n||typeof n!="object")return!1;const s=n;return typeof s.x=="number"&&Number.isFinite(s.x)&&typeof s.y=="number"&&Number.isFinite(s.y)}function it(n){const s=ve(Me,n);if(!s)return{};try{const r=JSON.parse(s);if(!r||typeof r!="object")return{};const i={};for(const[p,a]of Object.entries(r))de(a)&&(i[p]=a);return i}catch{return{}}}function at(n,s,r){const i={};for(const[p,a]of Object.entries(n))s.has(p)&&de(a)&&(i[p]=a);Xe(Me,JSON.stringify(i),r)}function ct(n){Ye(Me,n)}function ut(n,s,r){const i={};for(const[p,a]of Object.entries(n))r.has(p)&&de(a)&&(i[p]=a);for(const[p,a]of Object.entries(s))r.has(p)&&de(a)&&(i[p]=a);return i}function lt(n,s){const r={};for(const[i,p]of Object.entries(n))s.has(i)&&(r[i]=p);return r}function dt({projectId:n,visibleTaskIds:s}){const[r,i]=t.useState(null);t.useEffect(()=>{i(it(n))},[n]);const p=t.useCallback(k=>{at(k,s,n),i(lt(k,s))},[n,s]),a=t.useCallback(()=>{ct(n),i(null)},[n]);return{savedPositions:r,persistPositions:p,clearSavedPositions:a}}const ae=280,re=100,ft=768,Re=4;function pt({tasks:n,projectId:s,columnFlagsByTaskId:r,onOpenTaskDetail:i,onOpenDetail:p,addToast:a,globalPaused:k,onUpdateTask:b,onArchiveTask:R,onUnarchiveTask:H,onDeleteTask:M,onRetryTask:C,onOpenDetailWithTab:v,onOpenMission:o,onMoveTask:c,lastFetchTimeMs:d}){const g=t.useRef(null),Y=t.useRef(null),O=t.useRef(!1),L=t.useRef(new Map),[B,X]=t.useState(null),[G,l]=t.useState(null),[f,N]=t.useState({width:0,height:0}),[E,J]=t.useState(new Map),U=t.useMemo(()=>Qe(n),[n]),Z=tt(U),{getChain:u}=st(U),m=B??G,y=t.useMemo(()=>m?u(m):new Set,[m,u]),T=t.useMemo(()=>{const e=f.width||(typeof window<"u"?window.innerWidth:0);return(f.height||(typeof window<"u"?window.innerHeight:0))>e||e<ft?"horizontal":"vertical"},[f.height,f.width]),P=t.useMemo(()=>({nodeWidth:ae,nodeHeight:re,horizontalGap:40,verticalGap:80,orientation:T,measuredHeights:E}),[E,T]),W=t.useMemo(()=>ke(Z,P),[Z,P]),A=t.useMemo(()=>new Set(U.map(e=>e.id)),[U]),{savedPositions:_,persistPositions:K,clearSavedPositions:oe}=dt({projectId:s,visibleTaskIds:A}),[$,Q]=t.useState(W),[V,ce]=t.useState(!1);t.useEffect(()=>{const e={};for(const[x,S]of W.entries())e[x]=S;const h=_?ut(e,_,A):e;Q(new Map(Object.entries(h)))},[W,_,A]),t.useEffect(()=>{const e=g.current;if(!e)return;const h=(S,z)=>{N(w=>w.width===S&&w.height===z?w:{width:S,height:z})};if(typeof ResizeObserver>"u"){h(e.clientWidth||(typeof window<"u"?window.innerWidth:0),e.clientHeight||(typeof window<"u"?window.innerHeight:0));return}h(e.clientWidth,e.clientHeight);const x=new ResizeObserver(S=>{const z=S[0];z&&h(z.contentRect.width,z.contentRect.height)});return x.observe(e),()=>x.disconnect()},[]),t.useEffect(()=>{const e=g.current;if(!e)return;const h=new Set(Z.nodes.map(w=>w.task.id)),x=new Map;for(const w of h){const D=e.querySelector(`[data-testid="graph-task-node-${w}"]`);D&&x.set(w,D)}L.current=x,J(w=>{let D=!1;const j=new Map;for(const[q,ie]of w.entries()){if(!h.has(q)){D=!0;continue}j.set(q,ie)}return D?j:w});const S=(w,D)=>{J(j=>{const q=j.get(w);if(q!==void 0&&Math.abs(q-D)<1)return j;const ie=new Map(j);return ie.set(w,D),ie})};for(const[w,D]of x.entries())S(w,D.offsetHeight||re);if(typeof ResizeObserver>"u")return;const z=new ResizeObserver(w=>{for(const D of w){const j=D.target,q=Array.from(x.entries()).find(([,ie])=>ie===j)?.[0];q&&S(q,j.offsetHeight||re)}});for(const w of x.values())z.observe(w);return()=>z.disconnect()},[Z.nodes,$,f.height,f.width]);const{transform:fe,zoom:ee,transitioning:pe,zoomIn:he,zoomOut:te,resetView:me,fitToGraph:ge,onPointerDown:Ie,onPointerMove:He,onPointerUp:be,onWheelPan:ze,onWheelZoom:Ee,handleKeyDown:Oe,setGraphBounds:Pe}=ot(),F=t.useMemo(()=>{const e=Array.from($.values());if(e.length===0)return{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};const h=Math.min(...e.map(w=>w.x)),x=Math.min(...e.map(w=>w.y)),S=Math.max(...e.map(w=>w.x+ae)),z=Math.max(...Array.from($.entries()).map(([w,D])=>D.y+(E.get(w)??re)));return{minX:h,minY:x,maxX:S,maxY:z,width:Math.max(0,S-h),height:Math.max(0,z-x)}},[E,$]),se=t.useMemo(()=>{if($.size===0)return $;const e=new Map;for(const[h,x]of $.entries())e.set(h,{x:x.x-F.minX,y:x.y-F.minY});return e},[F.minX,F.minY,$]);t.useEffect(()=>{Pe({minX:0,minY:0,maxX:F.width,maxY:F.height})},[F.height,F.width,Pe]);const Ce=t.useMemo(()=>Array.from(se.keys()).sort().join("|"),[se]),ye=t.useMemo(()=>[Ce,f.width,f.height,F.width,F.height,Array.from(E.entries()).sort(([e],[h])=>e.localeCompare(h)).map(([e,h])=>`${e}:${Math.round(h)}`).join("|")].join("::"),[F.height,F.width,Ce,E,f.height,f.width]),Te=t.useRef(null);t.useEffect(()=>{if(U.length===0||se.size===0)return;const e=g.current;if(!e)return;const h=e.clientWidth||f.width,x=e.clientHeight||f.height;if(h===0||x===0||Te.current===ye)return;let S=0,z=0;const w=()=>{const D=g.current;if(!D)return;const j=D.clientWidth||f.width,q=D.clientHeight||f.height;j===0||q===0||(ge(se,j,q,{nodeWidth:ae,nodeHeight:re,measuredHeights:E}),Te.current=ye)};return typeof requestAnimationFrame=="function"?S=requestAnimationFrame(()=>{z=requestAnimationFrame(w)}):w(),()=>{S&&cancelAnimationFrame(S),z&&cancelAnimationFrame(z)}},[U.length,ye,ge,E,se,f.height,f.width]);const Se=t.useCallback(()=>{oe();const e=ke(Z,P);Q(e)},[oe,Z,P]),Ne=t.useCallback(()=>{const e={};for(const[h,x]of $.entries())e[h]=x;K(e)},[K,$]);return I.jsxs("section",{className:"dependency-graph","data-testid":"dependency-graph",children:[I.jsx("div",{ref:g,className:"dependency-graph__viewport",onPointerDown:e=>{V||(Y.current={x:e.clientX,y:e.clientY},O.current=!1,Ie(e.pointerId,{x:e.clientX,y:e.clientY}))},onPointerMove:e=>{if(V)return;const h=g.current;if(!h)return;const x=Y.current;if(x){const S=Math.abs(e.clientX-x.x),z=Math.abs(e.clientY-x.y);(S>Re||z>Re)&&(O.current=!0)}He(e.pointerId,{x:e.clientX,y:e.clientY},h.clientWidth,h.clientHeight)},onPointerUp:e=>{V||be(e.pointerId),Y.current=null},onPointerCancel:e=>{V||be(e.pointerId),Y.current=null,O.current=!1},onWheel:e=>{e.preventDefault();const h=g.current;if(h){if(e.ctrlKey||e.metaKey){const x=h.getBoundingClientRect();Ee(e.deltaY,{x:e.clientX-x.left,y:e.clientY-x.top},h.clientWidth,h.clientHeight);return}ze(e.deltaX,e.deltaY,h.clientWidth,h.clientHeight)}},onKeyDown:e=>{const h=g.current;h&&Oe(e,h.clientWidth,h.clientHeight,se,{nodeWidth:ae,nodeHeight:re,measuredHeights:E})},tabIndex:0,onClick:()=>{O.current||V||l(null)},children:U.length===0?I.jsx("div",{className:"dependency-graph__empty",children:"No active tasks to display in graph view."}):I.jsxs("div",{className:`graph-canvas-transform${pe?" graph-canvas-transform--animate":""}`,style:{transform:fe,width:`${F.width}px`,height:`${F.height}px`},children:[I.jsx(qe,{edges:Z.edges,positions:se,nodeWidth:ae,nodeHeight:re,nodeHeights:E,highlightedEdgeIds:y.size>0?new Set(Z.edges.filter(e=>y.has(e.source)&&y.has(e.target)).map(e=>`${e.source}->${e.target}`)):void 0}),I.jsx("div",{className:"dependency-graph__nodes-layer",children:Z.nodes.map(e=>{const h=se.get(e.task.id);return h?I.jsx(Be,{task:e.task,projectId:s,taskColumnFlags:r?.get(e.task.id),isSelected:G===e.task.id,style:{minHeight:`${re}px`,left:`${h.x}px`,top:`${h.y}px`},position:h,scale:ee,onNodePositionChange:(x,S)=>{Q(z=>{const w={x:S.x+F.minX,y:S.y+F.minY},D=z.get(x);if(D&&D.x===w.x&&D.y===w.y)return z;const j=new Map(z);return j.set(x,w),j})},onNodeDragStateChange:ce,onNodeDragEnd:Ne,isHighlighted:y.size>0&&y.has(e.task.id),isDimmed:y.size>0&&!y.has(e.task.id),onOpenDetail:p??(x=>i?.(x.id)),addToast:a??(()=>{}),globalPaused:k,onUpdateTask:b,onArchiveTask:R,onUnarchiveTask:H,onDeleteTask:M,onRetryTask:C,onOpenDetailWithTab:v,onOpenMission:o,onMoveTask:c,lastFetchTimeMs:d,onMouseEnter:()=>X(e.task.id),onMouseLeave:()=>X(null),onClick:x=>{x.stopPropagation(),O.current=!1,l(S=>S===e.task.id?null:e.task.id)}},e.task.id):null})})]})}),I.jsx(Ze,{zoom:ee,onZoomIn:()=>{const e=g.current;e&&he(e.clientWidth,e.clientHeight)},onZoomOut:()=>{const e=g.current;e&&te(e.clientWidth,e.clientHeight)},onFitToGraph:()=>{Se();const e=g.current;if(!e)return;const h=ke(Z,P),x=new Map,S=Array.from(h.values()),z=S.length>0?Math.min(...S.map(D=>D.x)):0,w=S.length>0?Math.min(...S.map(D=>D.y)):0;for(const[D,j]of h.entries())x.set(D,{x:j.x-z,y:j.y-w});ge(x,e.clientWidth,e.clientHeight,{nodeWidth:ae,nodeHeight:re,measuredHeights:E})},onResetView:()=>{Se(),me()}})]})}function bt({context:n}){return t.createElement(pt,{tasks:n?.tasks??[],projectId:n?.projectId,columnFlagsByTaskId:n?.columnFlagsByTaskId,onOpenDetail:n?.openTaskDetail})}export{pt as DependencyGraph,bt as DependencyGraphDashboardView,bt as default};
|