@open-mercato/cezar 0.19.0-pr1908.4332 → 0.19.0-pr1908.4683
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/README.md +3 -2
- package/dist/agent-config/account-identity.js +3 -0
- package/dist/agent-config/account-identity.js.map +1 -1
- package/dist/agent-config/catalog.d.ts +7 -1
- package/dist/agent-config/catalog.js +174 -4
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/model-settings/gemini.d.ts +8 -0
- package/dist/agent-config/model-settings/gemini.js +16 -0
- package/dist/agent-config/model-settings/gemini.js.map +1 -0
- package/dist/agent-config/model-settings/kimi.d.ts +7 -0
- package/dist/agent-config/model-settings/kimi.js +13 -0
- package/dist/agent-config/model-settings/kimi.js.map +1 -0
- package/dist/agent-config/model-settings/omp.d.ts +11 -0
- package/dist/agent-config/model-settings/omp.js +17 -0
- package/dist/agent-config/model-settings/omp.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +6 -0
- package/dist/agent-config/model-settings/shared.js +17 -3
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/agent-config/models.js +6 -0
- package/dist/agent-config/models.js.map +1 -1
- package/dist/agent-config/validate.js +15 -0
- package/dist/agent-config/validate.js.map +1 -1
- package/dist/automations/automation-cli.d.ts +2 -0
- package/dist/automations/automation-cli.js +82 -2
- package/dist/automations/automation-cli.js.map +1 -1
- package/dist/automations/deferred-start.d.ts +5 -4
- package/dist/automations/deferred-start.js +5 -1
- package/dist/automations/deferred-start.js.map +1 -1
- package/dist/automations/paused-work.d.ts +24 -0
- package/dist/automations/paused-work.js +61 -0
- package/dist/automations/paused-work.js.map +1 -0
- package/dist/automations/pr-head.d.ts +3 -0
- package/dist/automations/pr-head.js +8 -4
- package/dist/automations/pr-head.js.map +1 -1
- package/dist/automations/prompts.js +1 -0
- package/dist/automations/prompts.js.map +1 -1
- package/dist/automations/store.d.ts +16 -0
- package/dist/automations/store.js +44 -0
- package/dist/automations/store.js.map +1 -1
- package/dist/automations/task-template.js +1 -0
- package/dist/automations/task-template.js.map +1 -1
- package/dist/automations/templates.js +1 -0
- package/dist/automations/templates.js.map +1 -1
- package/dist/automations/types.d.ts +24 -0
- package/dist/automations/types.js +2 -0
- package/dist/automations/types.js.map +1 -1
- package/dist/automations/validate-input.d.ts +188 -0
- package/dist/automations/validate-input.js +85 -0
- package/dist/automations/validate-input.js.map +1 -0
- package/dist/config.d.ts +12 -5
- package/dist/config.js +4 -12
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +9 -0
- package/dist/contract/agent-profiles.d.ts +74 -20
- package/dist/contract/agent.d.ts +12 -0
- package/dist/contract/artifacts.d.ts +138 -0
- package/dist/contract/assets.d.ts +83 -0
- package/dist/contract/automations.d.ts +158 -0
- package/dist/contract/dashboard-costs.d.ts +2 -0
- package/dist/contract/dashboard.d.ts +8 -0
- package/dist/contract/deferred-start.d.ts +33 -0
- package/dist/contract/dispatch.d.ts +9 -0
- package/dist/contract/events.d.ts +6 -0
- package/dist/contract/github.d.ts +13 -0
- package/dist/contract/health.d.ts +12 -0
- package/dist/contract/impact.d.ts +134 -0
- package/dist/contract/index.d.ts +6 -0
- package/dist/contract/index.js +2955 -2547
- package/dist/contract/managers.d.ts +79 -0
- package/dist/contract/runners.d.ts +15 -0
- package/dist/contract/runs.d.ts +292 -0
- package/dist/contract/skills.d.ts +67 -0
- package/dist/contract/telemetry.d.ts +5 -1
- package/dist/contract/transfer.d.ts +1932 -0
- package/dist/contract/workflows.d.ts +87 -0
- package/dist/contract/workspace-layouts.d.ts +6 -0
- package/dist/contract/workspace.d.ts +111 -37
- package/dist/core/agent-env.js +43 -1
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-errors.d.ts +3 -0
- package/dist/core/agent-errors.js +13 -0
- package/dist/core/agent-errors.js.map +1 -1
- package/dist/core/agent-model-policy.d.ts +1 -1
- package/dist/core/agent-model-policy.js +1 -1
- package/dist/core/agent-model-policy.js.map +1 -1
- package/dist/core/agent-profiles.d.ts +19 -3
- package/dist/core/agent-profiles.js +27 -3
- package/dist/core/agent-profiles.js.map +1 -1
- package/dist/core/agent-runner.d.ts +44 -10
- package/dist/core/agent-runner.js +21 -7
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/antigravity-runner.js +2 -1
- package/dist/core/antigravity-runner.js.map +1 -1
- package/dist/core/backend-detect.d.ts +3 -2
- package/dist/core/backend-detect.js +80 -1
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.js +30 -3
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-model-catalog.d.ts +6 -1
- package/dist/core/claude-model-catalog.js +20 -0
- package/dist/core/claude-model-catalog.js.map +1 -1
- package/dist/core/claude-usage-status.d.ts +8 -0
- package/dist/core/claude-usage-status.js +48 -0
- package/dist/core/claude-usage-status.js.map +1 -0
- package/dist/core/codex-app-server-runner.d.ts +8 -0
- package/dist/core/codex-app-server-runner.js +84 -13
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-model-catalog.js +42 -0
- package/dist/core/codex-model-catalog.js.map +1 -1
- package/dist/core/codex-ui-mapper.d.ts +7 -0
- package/dist/core/codex-ui-mapper.js +12 -2
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/copilot-acp-runner.js +5 -1
- package/dist/core/copilot-acp-runner.js.map +1 -1
- package/dist/core/cursor-agent-runner.js +5 -1
- package/dist/core/cursor-agent-runner.js.map +1 -1
- package/dist/core/gemini-acp-runner.d.ts +37 -0
- package/dist/core/gemini-acp-runner.js +537 -0
- package/dist/core/gemini-acp-runner.js.map +1 -0
- package/dist/core/gemini-credentials.d.ts +21 -0
- package/dist/core/gemini-credentials.js +80 -0
- package/dist/core/gemini-credentials.js.map +1 -0
- package/dist/core/gemini-sessions.d.ts +18 -0
- package/dist/core/gemini-sessions.js +41 -0
- package/dist/core/gemini-sessions.js.map +1 -0
- package/dist/core/gemini-ui-mapper.d.ts +30 -0
- package/dist/core/gemini-ui-mapper.js +80 -0
- package/dist/core/gemini-ui-mapper.js.map +1 -0
- package/dist/core/junie-runner.js +2 -1
- package/dist/core/junie-runner.js.map +1 -1
- package/dist/core/kimi-home.d.ts +7 -0
- package/dist/core/kimi-home.js +13 -0
- package/dist/core/kimi-home.js.map +1 -0
- package/dist/core/kimi-model-catalog.d.ts +17 -0
- package/dist/core/kimi-model-catalog.js +45 -0
- package/dist/core/kimi-model-catalog.js.map +1 -0
- package/dist/core/kimi-runner.d.ts +90 -0
- package/dist/core/kimi-runner.js +874 -0
- package/dist/core/kimi-runner.js.map +1 -0
- package/dist/core/kimi-ui-mapper.d.ts +71 -0
- package/dist/core/kimi-ui-mapper.js +399 -0
- package/dist/core/kimi-ui-mapper.js.map +1 -0
- package/dist/core/model-identity.js +11 -0
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.js +10 -0
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/omp-rpc-runner.d.ts +41 -0
- package/dist/core/omp-rpc-runner.js +451 -0
- package/dist/core/omp-rpc-runner.js.map +1 -0
- package/dist/core/omp-ui-mapper.d.ts +56 -0
- package/dist/core/omp-ui-mapper.js +468 -0
- package/dist/core/omp-ui-mapper.js.map +1 -0
- package/dist/core/opencode-http.d.ts +2 -0
- package/dist/core/opencode-http.js +2 -2
- package/dist/core/opencode-http.js.map +1 -1
- package/dist/core/opencode-server-runner.d.ts +3 -1
- package/dist/core/opencode-server-runner.js +197 -25
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/opencode-v2-events.d.ts +11 -0
- package/dist/core/opencode-v2-events.js +105 -0
- package/dist/core/opencode-v2-events.js.map +1 -0
- package/dist/core/pi-runner.js +5 -1
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/private-mcp.d.ts +1 -1
- package/dist/core/private-mcp.js +2 -2
- package/dist/core/private-mcp.js.map +1 -1
- package/dist/core/process-signals.d.ts +29 -0
- package/dist/core/process-signals.js +85 -0
- package/dist/core/process-signals.js.map +1 -0
- package/dist/core/provider-auth.d.ts +25 -2
- package/dist/core/provider-auth.js +132 -12
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/runner-factory.d.ts +1 -0
- package/dist/core/runner-factory.js +38 -1
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/runner-model-catalog.d.ts +8 -0
- package/dist/core/runner-model-catalog.js +3 -0
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/core/tool-display.js +2 -0
- package/dist/core/tool-display.js.map +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/usage-limit.d.ts +2 -2
- package/dist/core/usage-limit.js +5 -3
- package/dist/core/usage-limit.js.map +1 -1
- package/dist/data-gitignore.d.ts +1 -1
- package/dist/data-gitignore.js +1 -0
- package/dist/data-gitignore.js.map +1 -1
- package/dist/dispatch/engine.d.ts +4 -0
- package/dist/dispatch/engine.js +9 -0
- package/dist/dispatch/engine.js.map +1 -1
- package/dist/e2e-setup.d.ts +8 -3
- package/dist/e2e-setup.js +31 -16
- package/dist/e2e-setup.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +5 -5
- package/dist/handoff.js.map +1 -1
- package/dist/impact/demo-review.json +781 -0
- package/dist/impact/diff.d.ts +21 -0
- package/dist/impact/diff.js +81 -0
- package/dist/impact/diff.js.map +1 -0
- package/dist/impact/evidence.d.ts +67 -0
- package/dist/impact/evidence.js +238 -0
- package/dist/impact/evidence.js.map +1 -0
- package/dist/impact/impact-cli.d.ts +12 -0
- package/dist/impact/impact-cli.js +141 -0
- package/dist/impact/impact-cli.js.map +1 -0
- package/dist/impact/launch.d.ts +46 -0
- package/dist/impact/launch.js +145 -0
- package/dist/impact/launch.js.map +1 -0
- package/dist/impact/model.d.ts +551 -0
- package/dist/impact/model.js +188 -0
- package/dist/impact/model.js.map +1 -0
- package/dist/impact/publish.d.ts +30 -0
- package/dist/impact/publish.js +119 -0
- package/dist/impact/publish.js.map +1 -0
- package/dist/impact/render.d.ts +41 -0
- package/dist/impact/render.js +109 -0
- package/dist/impact/render.js.map +1 -0
- package/dist/impact/template.html +670 -0
- package/dist/impact/validate.d.ts +25 -0
- package/dist/impact/validate.js +273 -0
- package/dist/impact/validate.js.map +1 -0
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/managers/engine.js +5 -2
- package/dist/managers/engine.js.map +1 -1
- package/dist/pack-check.d.ts +1 -0
- package/dist/pack-check.js +14 -0
- package/dist/pack-check.js.map +1 -1
- package/dist/paths.d.ts +6 -0
- package/dist/paths.js +19 -1
- package/dist/paths.js.map +1 -1
- package/dist/runs/agent-error-telemetry.js +7 -4
- package/dist/runs/agent-error-telemetry.js.map +1 -1
- package/dist/runs/agent-tmpdir.d.ts +25 -6
- package/dist/runs/agent-tmpdir.js +136 -25
- package/dist/runs/agent-tmpdir.js.map +1 -1
- package/dist/runs/artifacts.d.ts +52 -0
- package/dist/runs/artifacts.js +243 -0
- package/dist/runs/artifacts.js.map +1 -0
- package/dist/runs/event-history.d.ts +12 -0
- package/dist/runs/event-history.js +61 -0
- package/dist/runs/event-history.js.map +1 -1
- package/dist/runs/project-assets.d.ts +9 -0
- package/dist/runs/project-assets.js +57 -0
- package/dist/runs/project-assets.js.map +1 -0
- package/dist/runs/review-gate.d.ts +10 -0
- package/dist/runs/review-gate.js +12 -0
- package/dist/runs/review-gate.js.map +1 -1
- package/dist/runs/store.d.ts +70 -4
- package/dist/runs/store.js +139 -26
- package/dist/runs/store.js.map +1 -1
- package/dist/server/agent-setup.d.ts +1 -1
- package/dist/server/agent-setup.js +2 -1
- package/dist/server/agent-setup.js.map +1 -1
- package/dist/server/artifacts.d.ts +33 -0
- package/dist/server/artifacts.js +133 -0
- package/dist/server/artifacts.js.map +1 -0
- package/dist/server/dashboard.d.ts +5 -0
- package/dist/server/forge/github-assets.d.ts +7 -0
- package/dist/server/forge/github-assets.js +100 -0
- package/dist/server/forge/github-assets.js.map +1 -0
- package/dist/server/forge/github.d.ts +11 -0
- package/dist/server/forge/github.js +42 -0
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/open-in-app.js +3 -0
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/provider-action-gate.js +12 -4
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/server.d.ts +10012 -6701
- package/dist/server/server.js +353 -193
- package/dist/server/server.js.map +1 -1
- package/dist/server/star-count.d.ts +5 -5
- package/dist/server/star-count.js +5 -5
- package/dist/server/star-count.js.map +1 -1
- package/dist/server-install/steps.js +1 -0
- package/dist/server-install/steps.js.map +1 -1
- package/dist/skills-provision.js +7 -1
- package/dist/skills-provision.js.map +1 -1
- package/dist/skills.d.ts +10 -6
- package/dist/skills.js +11 -6
- package/dist/skills.js.map +1 -1
- package/dist/transfer/automations-file.d.ts +46 -0
- package/dist/transfer/automations-file.js +172 -0
- package/dist/transfer/automations-file.js.map +1 -0
- package/dist/transfer/config-bundle.d.ts +100 -0
- package/dist/transfer/config-bundle.js +430 -0
- package/dist/transfer/config-bundle.js.map +1 -0
- package/dist/webhooks/outbox.js +83 -63
- package/dist/webhooks/outbox.js.map +1 -1
- package/dist/workflows/graph.d.ts +27 -0
- package/dist/workflows/load.js +2 -2
- package/dist/workflows/load.js.map +1 -1
- package/dist/workflows/resume-fallback.d.ts +13 -6
- package/dist/workflows/resume-fallback.js +26 -6
- package/dist/workflows/resume-fallback.js.map +1 -1
- package/dist/workflows/run.d.ts +121 -10
- package/dist/workflows/run.js +363 -61
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/templates.d.ts +27 -16
- package/dist/workflows/templates.js +17 -0
- package/dist/workflows/templates.js.map +1 -1
- package/dist/workflows/types.d.ts +21 -0
- package/dist/workflows/types.js +3 -1
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +27 -15
- package/dist/workspace/agent-accounts.js +4 -14
- package/dist/workspace/agent-accounts.js.map +1 -1
- package/dist/workspace/agent-profiles.js +3 -0
- package/dist/workspace/agent-profiles.js.map +1 -1
- package/dist/workspace/config.d.ts +12 -6
- package/dist/workspace/config.js +3 -13
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/dashboard-costs.d.ts +1 -0
- package/dist/workspace/dashboard-costs.js +1 -0
- package/dist/workspace/dashboard-costs.js.map +1 -1
- package/dist/workspace/dashboard-insights.d.ts +1 -0
- package/dist/workspace/dashboard-insights.js +5 -2
- package/dist/workspace/dashboard-insights.js.map +1 -1
- package/dist/workspace/dashboard-overview.js +2 -0
- package/dist/workspace/dashboard-overview.js.map +1 -1
- package/dist/workspace/dashboard.d.ts +1 -0
- package/package.json +5 -4
- package/scripts/check-pack.mjs +3 -2
- package/scripts/copy-assets.mjs +17 -0
- package/scripts/mock-claude.mjs +106 -1
- package/scripts/mock-gemini-acp.mjs +195 -0
- package/scripts/mock-kimi-acp.mjs +126 -0
- package/scripts/mock-omp-rpc.mjs +194 -0
- package/skills/change-impact/SKILL.md +117 -0
- package/skills/change-impact/references/analysis-contract.md +141 -0
- package/skills/change-impact/references/public-api.md +92 -0
- package/skills/change-impact/references/visual-contract.md +71 -0
- package/web/dist/assets/{active-forge-DEmP_h4r.js → active-forge-DO2AaQ-s.js} +1 -1
- package/web/dist/assets/agent-task-pickers-CZpw4vcZ.js +1 -0
- package/web/dist/assets/{alert-dialog-BZkKvKiu.js → alert-dialog-BihfE0uZ.js} +1 -1
- package/web/dist/assets/arrow-down-DACdHKjc.js +1 -0
- package/web/dist/assets/arrow-left-BtT8zuL0.js +1 -0
- package/web/dist/assets/arrow-up-BAPSgozC.js +1 -0
- package/web/dist/assets/ask-answer-Co3javaA.js +1 -0
- package/web/dist/assets/{ask-card-CfNUHYt9.js → ask-card-DLtNyMH_.js} +2 -2
- package/web/dist/assets/assets-view-CLCckPll.js +1 -0
- package/web/dist/assets/{automation-format-BPrWgGBz.js → automation-format-BXwiLf2G.js} +1 -1
- package/web/dist/assets/automations-route-JizzZrRf.js +1 -0
- package/web/dist/assets/blink-1oEUjxch.webp +0 -0
- package/web/dist/assets/blink-B4Y4PYCR.webp +0 -0
- package/web/dist/assets/blink-BpqW08tf.webp +0 -0
- package/web/dist/assets/blink-C380t2a5.webp +0 -0
- package/web/dist/assets/blink-CLn5VMYQ.webp +0 -0
- package/web/dist/assets/blink-Cn_tI5Yd.webp +0 -0
- package/web/dist/assets/blink-D4EaTnc2.webp +0 -0
- package/web/dist/assets/blink-DY4Sm5aw.webp +0 -0
- package/web/dist/assets/blink-mcM10OfP.webp +0 -0
- package/web/dist/assets/body-CXEwT_gR.webp +0 -0
- package/web/dist/assets/body-D-UrLURv.webp +0 -0
- package/web/dist/assets/body-D7Q8eJDv.webp +0 -0
- package/web/dist/assets/body-DdNSx4-d.webp +0 -0
- package/web/dist/assets/body-DlFNtp32.webp +0 -0
- package/web/dist/assets/body-EreQeu3g.webp +0 -0
- package/web/dist/assets/body-Goc64z5o.webp +0 -0
- package/web/dist/assets/body-_FLmHm_q.webp +0 -0
- package/web/dist/assets/body-v5xTmq5E.webp +0 -0
- package/web/dist/assets/{bot-qZRkHkDp.js → bot-Cm-PLA1M.js} +1 -1
- package/web/dist/assets/{button-BrxohNcK.js → button-BqkA8Ovk.js} +1 -1
- package/web/dist/assets/{centered-state-CSW_o4N7.js → centered-state-CquGIOsq.js} +1 -1
- package/web/dist/assets/check-B1z-_MCO.js +1 -0
- package/web/dist/assets/chevron-left-CDAxCC2p.js +1 -0
- package/web/dist/assets/chevron-right-DPaV033p.js +1 -0
- package/web/dist/assets/chunk-KS7C4IRE-DtL2Gzw3.js +3 -0
- package/web/dist/assets/{circle-alert-COKQc-87.js → circle-alert-B7VNkPC2.js} +1 -1
- package/web/dist/assets/circle-check-LWKCYKhA.js +1 -0
- package/web/dist/assets/{collapsible-BJ0sxcz9.js → collapsible-BuSDxSYs.js} +1 -1
- package/web/dist/assets/command-CfdVVS0V.js +1 -0
- package/web/dist/assets/{commit-list-HXZj01RO.js → commit-list-D5Nuv2HC.js} +1 -1
- package/web/dist/assets/compare-variants-BBOnUKfp.js +1 -0
- package/web/dist/assets/composer-BPIW4tmM.js +18 -0
- package/web/dist/assets/composer-attachments-DyC9yyGs.js +3 -0
- package/web/dist/assets/concerned-BIuYysOA.webp +0 -0
- package/web/dist/assets/concerned-BWTrkjRS.webp +0 -0
- package/web/dist/assets/concerned-BW_ywmzK.webp +0 -0
- package/web/dist/assets/concerned-CXQVACqJ.webp +0 -0
- package/web/dist/assets/concerned-DdsJa1t2.webp +0 -0
- package/web/dist/assets/concerned-Dlln-1nu.webp +0 -0
- package/web/dist/assets/concerned-DrSCYUQV.webp +0 -0
- package/web/dist/assets/concerned-TOjmS1qX.webp +0 -0
- package/web/dist/assets/concerned-tIx9dV3J.webp +0 -0
- package/web/dist/assets/dashboard-B_ytEQ_y.js +44 -0
- package/web/dist/assets/diff-BQScRHXz.js +3 -0
- package/web/dist/assets/diff-stat-CxDTnfya.js +1 -0
- package/web/dist/assets/diff-view-8m9Rnct7.js +13 -0
- package/web/dist/assets/{directional-usage-BtjgT5nc.js → directional-usage-BerE4wJK.js} +1 -1
- package/web/dist/assets/dist-Br4Ra_c5.js +1 -0
- package/web/dist/assets/{download-DH68Y5Vz.js → download-HBguClwD.js} +1 -1
- package/web/dist/assets/dropdown-menu-CDv5Teql.js +1 -0
- package/web/dist/assets/excited-8dK2gfAF.webp +0 -0
- package/web/dist/assets/excited-B-w6ozXs.webp +0 -0
- package/web/dist/assets/excited-B4Sch7Ub.webp +0 -0
- package/web/dist/assets/excited-BPQk8ECE.webp +0 -0
- package/web/dist/assets/excited-BRFi0cue.webp +0 -0
- package/web/dist/assets/excited-BvbUAHvw.webp +0 -0
- package/web/dist/assets/excited-CCH-VUDr.webp +0 -0
- package/web/dist/assets/excited-TMExhEMj.webp +0 -0
- package/web/dist/assets/excited-cSRbau5J.webp +0 -0
- package/web/dist/assets/{external-link-BVYdhpSK.js → external-link-Bclznsu3.js} +1 -1
- package/web/dist/assets/file-preview-DQ7iQhe0.js +2 -0
- package/web/dist/assets/{file-DYpKJvYs.js → file-rCLi_p-R.js} +1 -1
- package/web/dist/assets/file-tree-Bm38qEZP.js +1 -0
- package/web/dist/assets/focused-XMnI1Trp.webp +0 -0
- package/web/dist/assets/{folder-CeFUSrsO.js → folder-leteY9jH.js} +1 -1
- package/web/dist/assets/follow-up-engine-Q1EcpRpB.js +1 -0
- package/web/dist/assets/git-pull-request-CURFMFaU.js +1 -0
- package/web/dist/assets/{git-pull-request-draft-DL1VMp1L.js → git-pull-request-draft-BZgJrUou.js} +1 -1
- package/web/dist/assets/git-tab-loading-CF0flOMS.js +1 -0
- package/web/dist/assets/github-DcvXvc4J.js +1 -0
- package/web/dist/assets/happy-B7LJPne_.webp +0 -0
- package/web/dist/assets/happy-CCpAho8w.webp +0 -0
- package/web/dist/assets/happy-Ch9wxHii.webp +0 -0
- package/web/dist/assets/happy-CnoCjXOf.webp +0 -0
- package/web/dist/assets/happy-DVeEwiyo.webp +0 -0
- package/web/dist/assets/happy-URIT6hFl.webp +0 -0
- package/web/dist/assets/happy-ZufSdCLm.webp +0 -0
- package/web/dist/assets/happy-kfLwwDLp.webp +0 -0
- package/web/dist/assets/happy-nVffy2Sx.webp +0 -0
- package/web/dist/assets/{host-usage-o1rC0TiP.js → host-usage-CX8OXl8q.js} +1 -1
- package/web/dist/assets/icon-tooltip-BMkyRHLt.js +1 -0
- package/web/dist/assets/impact-control-Deh1F44q.js +1 -0
- package/web/dist/assets/impact-model-Dj6tIycu.js +1 -0
- package/web/dist/assets/index-DuW72uFI.js +33 -0
- package/web/dist/assets/index-jRkTI5kE.css +2 -0
- package/web/dist/assets/{input-BxjGaO_P.js → input-BO795Un9.js} +1 -1
- package/web/dist/assets/laptop-D2EKUOdE.webp +0 -0
- package/web/dist/assets/layers-YoqiEcNh.js +1 -0
- package/web/dist/assets/layout-cards-Cvq2XaJL.js +1 -0
- package/web/dist/assets/{layout-grid-C4d5rrDE.js → layout-grid-CSvbdC6i.js} +1 -1
- package/web/dist/assets/left-BBmAC9hS.webp +0 -0
- package/web/dist/assets/left-BUX98ijg.webp +0 -0
- package/web/dist/assets/left-CCrTs359.webp +0 -0
- package/web/dist/assets/left-CxWtAZHp.webp +0 -0
- package/web/dist/assets/left-DDCoVDRG.webp +0 -0
- package/web/dist/assets/left-DFGwPnRL.webp +0 -0
- package/web/dist/assets/left-D_qxT7z_.webp +0 -0
- package/web/dist/assets/left-QXVHT2zO.webp +0 -0
- package/web/dist/assets/left-S_rwAL-X.webp +0 -0
- package/web/dist/assets/leg-left-0EW5L4pu.webp +0 -0
- package/web/dist/assets/leg-left-BGo9dZbQ.webp +0 -0
- package/web/dist/assets/leg-left-BZ8ETYLj.webp +0 -0
- package/web/dist/assets/leg-left-BahG1x_b.webp +0 -0
- package/web/dist/assets/leg-left-C-DJQ3Pt.webp +0 -0
- package/web/dist/assets/leg-left-C6ZvH8fW.webp +0 -0
- package/web/dist/assets/leg-left-DsfFyCf7.webp +0 -0
- package/web/dist/assets/leg-left-Iq6VC-OZ.webp +0 -0
- package/web/dist/assets/leg-left-rVU9cV-d.webp +0 -0
- package/web/dist/assets/leg-right-2MnCGKHj.webp +0 -0
- package/web/dist/assets/leg-right-BCgv_Tjj.webp +0 -0
- package/web/dist/assets/leg-right-BOxKTHZ9.webp +0 -0
- package/web/dist/assets/leg-right-BeDSbUV7.webp +0 -0
- package/web/dist/assets/leg-right-BwrF93s6.webp +0 -0
- package/web/dist/assets/leg-right-CU-y_n5h.webp +0 -0
- package/web/dist/assets/leg-right-DKSfNi2y.webp +0 -0
- package/web/dist/assets/leg-right-Dq0ze2e4.webp +0 -0
- package/web/dist/assets/leg-right-t34e1CvD.webp +0 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/loader-circle-DjzuGw6j.js +1 -0
- package/web/dist/assets/manager-chat-C4QqN-w6.js +1 -0
- package/web/dist/assets/manager-index-BGNDfiIy.js +1 -0
- package/web/dist/assets/manager-new-Dek6H9Bg.js +2 -0
- package/web/dist/assets/managers-Dufza9IX.js +1 -0
- package/web/dist/assets/{markdown-Di8pirEb.js → markdown-CP2EQDsL.js} +1 -1
- package/web/dist/assets/{markdown-rDA5iFAU.js → markdown-YWy3FUHK.js} +2 -2
- package/web/dist/assets/mascot-picker-0_LGzV_f.js +1 -0
- package/web/dist/assets/{message-square-CstvkIHe.js → message-square-beq8DjLH.js} +1 -1
- package/web/dist/assets/new-task-form-BgMiEphZ.js +2 -0
- package/web/dist/assets/pencil-RUM53auZ.js +1 -0
- package/web/dist/assets/picker-pill-BO6YUs1F.js +1 -0
- package/web/dist/assets/play-Cj3p2Q5t.js +1 -0
- package/web/dist/assets/plus-Bdmhj8CR.js +1 -0
- package/web/dist/assets/portrait-BJ2e30PF.webp +0 -0
- package/web/dist/assets/portrait-BeDbYw8Z.webp +0 -0
- package/web/dist/assets/portrait-Bq7D7LzX.webp +0 -0
- package/web/dist/assets/portrait-C6HtaggP.webp +0 -0
- package/web/dist/assets/portrait-CcOzDXGs.webp +0 -0
- package/web/dist/assets/portrait-D44z6yep.webp +0 -0
- package/web/dist/assets/portrait-DHLQRy13.webp +0 -0
- package/web/dist/assets/portrait-DU3qlTxc.webp +0 -0
- package/web/dist/assets/portrait-q94U_uD6.webp +0 -0
- package/web/dist/assets/project-router-xmadY-N9.js +1 -0
- package/web/dist/assets/queries-ba5qZ3kd.js +1 -0
- package/web/dist/assets/reasoning-effort-pill-B8Z1RaXL.js +1 -0
- package/web/dist/assets/reference-chip-C9pVQk05.js +1 -0
- package/web/dist/assets/reference-conflict-action-DxUm18aD.js +1 -0
- package/web/dist/assets/repo-git-DFf8ZGZv.js +1 -0
- package/web/dist/assets/right-BFOa1Ihi.webp +0 -0
- package/web/dist/assets/right-BLsBZrK1.webp +0 -0
- package/web/dist/assets/right-BVU3rYuj.webp +0 -0
- package/web/dist/assets/right-BbES4jIG.webp +0 -0
- package/web/dist/assets/right-C2klSA-G.webp +0 -0
- package/web/dist/assets/right-Cte2BTL5.webp +0 -0
- package/web/dist/assets/right-Dz7jYN17.webp +0 -0
- package/web/dist/assets/right-W2oGaUHb.webp +0 -0
- package/web/dist/assets/right-XJjUU0AU.webp +0 -0
- package/web/dist/assets/run-actions-CLIUiXwS.js +1 -0
- package/web/dist/assets/{run-diff-CFHlmgGA.js → run-diff-CxS_a1EO.js} +2 -2
- package/web/dist/assets/{save-C4TDysfG.js → save-zfKVAo2Y.js} +1 -1
- package/web/dist/assets/{scroll-within-D3mqUngk.js → scroll-within-DhWf-4MN.js} +1 -1
- package/web/dist/assets/search-CCE2KMtX.js +1 -0
- package/web/dist/assets/{search-x-BkezzsKh.js → search-x-BxcYdvqm.js} +1 -1
- package/web/dist/assets/{settings-2-DIHmg7wZ.js → settings-2-B0yYRU0q.js} +1 -1
- package/web/dist/assets/sheet-DxqNqi5S.js +1 -0
- package/web/dist/assets/skills-BmQ9hZ2c.js +1 -0
- package/web/dist/assets/sortable.esm-Dj7Kk-Wk.js +5 -0
- package/web/dist/assets/square--LrBHma0.js +1 -0
- package/web/dist/assets/standing-C42GacCE.webp +0 -0
- package/web/dist/assets/standing-C5Tul1Nv.webp +0 -0
- package/web/dist/assets/standing-CUU2Jka6.webp +0 -0
- package/web/dist/assets/standing-Ca5nprIS.webp +0 -0
- package/web/dist/assets/standing-CgOaMKRT.webp +0 -0
- package/web/dist/assets/standing-ClF4PE2-.webp +0 -0
- package/web/dist/assets/standing-CoS9fBjb.webp +0 -0
- package/web/dist/assets/standing-DZrhVTuG.webp +0 -0
- package/web/dist/assets/standing-MhG0Chks.webp +0 -0
- package/web/dist/assets/status-dot-Dxb9pPsK.js +1 -0
- package/web/dist/assets/tabs-CmEFauE4.js +1 -0
- package/web/dist/assets/{tag-B56iP2zA.js → tag-TWBVKabJ.js} +1 -1
- package/web/dist/assets/task-commits-sdhrDSta.js +1 -0
- package/web/dist/assets/{task-graph-ZjFyDrAV.js → task-graph-DqXUw-PM.js} +1 -1
- package/web/dist/assets/task-notes-ur3eZYQs.js +1 -0
- package/web/dist/assets/task-workspace-BvamqKbw.js +28 -0
- package/web/dist/assets/terminal-CmRAOyqu.js +1 -0
- package/web/dist/assets/terminal-drawer-BiRjtnip.js +1 -0
- package/web/dist/assets/{terminal-pane-CeYi-FvS.js → terminal-pane-YnSc_Vhs.js} +2 -2
- package/web/dist/assets/{textarea-BXN4nZ0d.js → textarea-C58jseO-.js} +1 -1
- package/web/dist/assets/toaster-5ad4wwJ9.js +1 -0
- package/web/dist/assets/tooltip-45rfBiq8.js +1 -0
- package/web/dist/assets/tracker-CcyqVPEo.js +4 -0
- package/web/dist/assets/triangle-alert-C1mTIqxM.js +1 -0
- package/web/dist/assets/typing-left-BWPbVi7e.webp +0 -0
- package/web/dist/assets/typing-right-HDY0V90O.webp +0 -0
- package/web/dist/assets/{upload-D_kW6AjR.js → upload-C2gxSnMR.js} +1 -1
- package/web/dist/assets/use-now-DD2atNhs.js +1 -0
- package/web/dist/assets/utils-Br_dqwn-.js +60 -0
- package/web/dist/assets/{workflow-j8scU63W.js → workflow-WvO4bTRt.js} +1 -1
- package/web/dist/assets/workflow-graph-B2oESW5u.js +13 -0
- package/web/dist/assets/worktree-lifecycle-BxYvSKsA.js +1 -0
- package/web/dist/assets/{worktree-lifecycle-operation-mYB7KCpQ.js → worktree-lifecycle-operation-BRID04bW.js} +1 -1
- package/web/dist/assets/x-CZSnHsZ4.js +1 -0
- package/web/dist/assets/{zoomable-image-CW-pQ6ZO.js → zoomable-image-DCITEnK-.js} +1 -1
- package/web/dist/index.html +70 -60
- package/web/dist/assets/agent-task-pickers-8skJH9bS.js +0 -1
- package/web/dist/assets/arrow-down-cBTb_EjO.js +0 -1
- package/web/dist/assets/arrow-left-BvR1Oqhc.js +0 -1
- package/web/dist/assets/arrow-up-Cn0IS81u.js +0 -1
- package/web/dist/assets/ask-answer-Cfb0vEFv.js +0 -1
- package/web/dist/assets/automations-route-B4axw9eb.js +0 -1
- package/web/dist/assets/check-B5omShEO.js +0 -1
- package/web/dist/assets/chevron-left-D74_-PJ_.js +0 -1
- package/web/dist/assets/chevron-right-C3fLn_fF.js +0 -1
- package/web/dist/assets/circle-check-j6r9xbE5.js +0 -1
- package/web/dist/assets/compare-variants-CDrFR7P_.js +0 -1
- package/web/dist/assets/composer-GntpkeQD.js +0 -18
- package/web/dist/assets/composer-attachments-Xa-qW8Eq.js +0 -3
- package/web/dist/assets/dashboard-CJW-Xk7f.js +0 -44
- package/web/dist/assets/diff-RPASOQVF.js +0 -3
- package/web/dist/assets/diff-view-Ckaab4uQ.js +0 -13
- package/web/dist/assets/file-preview-DOSEbcqV.js +0 -2
- package/web/dist/assets/git-tab-loading-DhclV71X.js +0 -1
- package/web/dist/assets/git-toolbar-Bk-3i42V.js +0 -1
- package/web/dist/assets/github-TdBnzj-H.js +0 -1
- package/web/dist/assets/icon-tooltip-CUJLXOxf.js +0 -1
- package/web/dist/assets/index-CDhEdFaZ.js +0 -33
- package/web/dist/assets/index-Dk1VTlxY.css +0 -2
- package/web/dist/assets/layout-cards-BYOEsNbu.js +0 -1
- package/web/dist/assets/lib-D2__YoPr.js +0 -1
- package/web/dist/assets/loader-circle-DCpZCAyT.js +0 -1
- package/web/dist/assets/manager-chat-B1Taq3Eg.js +0 -1
- package/web/dist/assets/manager-index-COwisKDf.js +0 -1
- package/web/dist/assets/manager-new-BdJPiBs2.js +0 -2
- package/web/dist/assets/manager-pickers-CvYpd5cU.js +0 -1
- package/web/dist/assets/managers-CDiETPHi.js +0 -1
- package/web/dist/assets/pencil-DWtoOm2f.js +0 -1
- package/web/dist/assets/picker-pill-DQICTO2N.js +0 -1
- package/web/dist/assets/play-BYwEI1EA.js +0 -1
- package/web/dist/assets/plus-BPopgSYQ.js +0 -1
- package/web/dist/assets/popover-DzdYqnHw.js +0 -1
- package/web/dist/assets/project-router-CmpQcVZp.js +0 -1
- package/web/dist/assets/queries-DOHu2y2B.js +0 -1
- package/web/dist/assets/reference-chip-ty5g_OLC.js +0 -1
- package/web/dist/assets/reference-conflict-action-B2LrO-o3.js +0 -1
- package/web/dist/assets/repo-git-CyoBxHfP.js +0 -1
- package/web/dist/assets/sheet-7RYAcp_E.js +0 -1
- package/web/dist/assets/skills-BBqk5FoM.js +0 -1
- package/web/dist/assets/sortable.esm-O2daV3YI.js +0 -5
- package/web/dist/assets/square-BPbl10lx.js +0 -1
- package/web/dist/assets/status-dot-C_5ryAFi.js +0 -1
- package/web/dist/assets/tabs-EEnYYrJF.js +0 -1
- package/web/dist/assets/task-commits-DFalvqkF.js +0 -1
- package/web/dist/assets/task-notes-DRDKGsIw.js +0 -1
- package/web/dist/assets/task-workspace-D2ak5sTE.js +0 -28
- package/web/dist/assets/terminal-B-JX8x9P.js +0 -1
- package/web/dist/assets/terminal-drawer-S0cBMANF.js +0 -1
- package/web/dist/assets/toaster-DrFdGtNN.js +0 -3
- package/web/dist/assets/tooltip-p6YPEpXC.js +0 -1
- package/web/dist/assets/tracker-CFDEuaFt.js +0 -4
- package/web/dist/assets/triangle-alert-Crbc2knA.js +0 -1
- package/web/dist/assets/use-now-DQpgbshl.js +0 -1
- package/web/dist/assets/utils-Df_1kJEk.js +0 -60
- package/web/dist/assets/workflow-graph-Cye5SBdg.js +0 -13
- package/web/dist/assets/worktree-lifecycle-Da61xsLH.js +0 -1
- package/web/dist/assets/x-sQR-jRBj.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,S as i,T as a,b as o,j as s,w as c,x as l,y as u}from"./button-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,S as i,T as a,b as o,j as s,w as c,x as l,y as u}from"./button-BqkA8Ovk.js";var d=e(t(),1),f=n(),p=`Collapsible`,[m,h]=c(p),[g,_]=m(p),v=d.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...c}=e,[m,h]=l({prop:r,defaultProp:i??!1,onChange:s,caller:p});return(0,f.jsx)(g,{scope:n,disabled:o,contentId:u(),open:m,onOpenToggle:d.useCallback(()=>h(e=>!e),[h]),children:(0,f.jsx)(a.div,{"data-state":w(m),"data-disabled":o?``:void 0,...c,ref:t})})});v.displayName=p;var y=`CollapsibleTrigger`,b=d.forwardRef((e,t)=>{let{__scopeCollapsible:n,...i}=e,o=_(y,n);return(0,f.jsx)(a.button,{type:`button`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":w(o.open),"data-disabled":o.disabled?``:void 0,disabled:o.disabled,...i,ref:t,onClick:r(e.onClick,o.onOpenToggle)})});b.displayName=y;var x=`CollapsibleContent`,S=d.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=_(x,e.__scopeCollapsible);return(0,f.jsx)(o,{present:n||i.open,children:({present:e})=>(0,f.jsx)(C,{...r,ref:t,present:e})})});S.displayName=x;var C=d.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:o,...c}=e,l=_(x,n),[u,p]=d.useState(r),m=d.useRef(null),h=s(t,m),g=d.useRef(0),v=g.current,y=d.useRef(0),b=y.current,S=l.open||u,C=d.useRef(S),T=d.useRef(void 0);return d.useEffect(()=>{let e=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(e)},[]),i(()=>{let e=m.current;if(e){T.current=T.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();g.current=t.height,y.current=t.width,C.current||(e.style.transitionDuration=T.current.transitionDuration,e.style.animationName=T.current.animationName),p(r)}},[l.open,r]),(0,f.jsx)(a.div,{"data-state":w(l.open),"data-disabled":l.disabled?``:void 0,id:l.contentId,hidden:!S,...c,ref:h,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:S&&o})});function w(e){return e?`open`:`closed`}var T=v;function E({...e}){return(0,f.jsx)(T,{"data-slot":`collapsible`,...e})}function D({...e}){return(0,f.jsx)(b,{"data-slot":`collapsible-trigger`,...e})}function O({...e}){return(0,f.jsx)(S,{"data-slot":`collapsible-content`,...e})}export{O as n,D as r,E as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{A as i,T as a,a as o,c as s,r as c,s as l,y as u}from"./button-BqkA8Ovk.js";import{t as d}from"./search-CCE2KMtX.js";import{A as f,D as p,E as m,T as h,k as g}from"./use-now-DD2atNhs.js";var _=e(t(),1),v=1,y=.9,b=.8,x=.17,S=.1,C=.999,w=.9999,T=.99,E=/[\\\/_+.#"@\[\(\{&]/,D=/[\\\/_+.#"@\[\(\{&]/g,O=/[\s-]/,k=/[\s-]/g;function A(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?v:T;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=A(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=v:E.test(e.charAt(l-1))?(d*=b,p=e.slice(i,l-1).match(D),p&&i>0&&(d*=C**+p.length)):O.test(e.charAt(l-1))?(d*=y,m=e.slice(i,l-1).match(k),m&&i>0&&(d*=C**+m.length)):(d*=x,i>0&&(d*=C**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=w)),(d<S&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=A(e,t,n,r,l+1,a+2,o),f*S>d&&(d=f*S)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function j(e){return e.toLowerCase().replace(k,` `)}function M(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,A(e,t,j(e),j(t),0,0,{})}var N=`[cmdk-group=""]`,P=`[cmdk-group-items=""]`,ee=`[cmdk-group-heading=""]`,F=`[cmdk-item=""]`,te=`${F}:not([aria-disabled="true"])`,I=`cmdk-item-select`,L=`data-value`,ne=(e,t,n)=>M(e,t,n),R=_.createContext(void 0),z=()=>_.useContext(R),re=_.createContext(void 0),B=()=>_.useContext(re),V=_.createContext(void 0),H=_.forwardRef((e,t)=>{let n=X(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=X(()=>new Set),i=X(()=>new Map),o=X(()=>new Map),s=X(()=>new Set),c=J(e),{label:l,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:v=!1,vimBindings:y=!0,...b}=e,x=u(),S=u(),C=u(),w=_.useRef(null),T=de();Y(()=>{if(f!==void 0){let e=f.trim();n.current.value=e,E.emit()}},[f]),Y(()=>{T(6,M)},[]);let E=_.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)j(),k(),T(1,A);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(C);e?e.focus():(i=document.getElementById(x))==null||i.focus()}if(T(7,()=>{n.current.selectedItemId=z()?.id,E.emit()}),r||T(5,M),c.current?.value!==void 0){let e=t??``;(o=(a=c.current).onValueChange)==null||o.call(a,e);return}}E.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),D=_.useMemo(()=>({value:(e,t,r)=>{t!==o.current.get(e)?.value&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,O(t,r)),T(2,()=>{k(),E.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),T(3,()=>{j(),k(),n.current.value||A(),E.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=z();T(4,()=>{j(),t?.getAttribute(`id`)===e&&A(),E.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{o.current.delete(e),i.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:x,inputId:C,labelId:S,listInnerRef:w}),[]);function O(e,t){let r=c.current?.filter??ne;return e?r(e,n.current.search,t):0}function k(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=w.current;B().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(P);t?t.appendChild(e.parentElement===t?e:e.closest(`${P} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${P} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=w.current?.querySelector(`${N}[${L}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function A(){let e=B().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(L);E.setState(`value`,e||void 0)}function j(){if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=O(o.current.get(t)?.value??``,o.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function M(){var e;let t=z();t&&(t.parentElement?.firstChild===t&&((e=t.closest(N)?.querySelector(ee))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function z(){return w.current?.querySelector(`${F}[aria-selected="true"]`)}function B(){return Array.from(w.current?.querySelectorAll(te)||[])}function V(e){let t=B()[e];t&&E.setState(`value`,t.getAttribute(L))}function H(e){var t;let n=z(),r=B(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&E.setState(`value`,a.getAttribute(L))}function U(e){let t=z()?.closest(N),n;for(;t&&!n;)t=e>0?ce(t,N):le(t,N),n=t?.querySelector(te);n?E.setState(`value`,n.getAttribute(L)):H(e)}let W=()=>V(B().length-1),G=e=>{e.preventDefault(),e.metaKey?W():e.altKey?U(1):H(1)},K=e=>{e.preventDefault(),e.metaKey?V(0):e.altKey?U(-1):H(-1)};return _.createElement(a.div,{ref:t,tabIndex:-1,...b,"cmdk-root":``,onKeyDown:e=>{var t;(t=b.onKeyDown)==null||t.call(b,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:y&&e.ctrlKey&&G(e);break;case`ArrowDown`:G(e);break;case`p`:case`k`:y&&e.ctrlKey&&K(e);break;case`ArrowUp`:K(e);break;case`Home`:e.preventDefault(),V(0);break;case`End`:e.preventDefault(),W();break;case`Enter`:{e.preventDefault();let t=z();if(t){let e=new Event(I);t.dispatchEvent(e)}}}}},_.createElement(`label`,{"cmdk-label":``,htmlFor:D.inputId,id:D.labelId,style:pe},l),Q(e,e=>_.createElement(re.Provider,{value:E},_.createElement(R.Provider,{value:D},e))))}),U=_.forwardRef((e,t)=>{let n=u(),r=_.useRef(null),o=_.useContext(V),s=z(),c=J(e),l=c.current?.forceMount??o?.forceMount;Y(()=>{if(!l)return s.item(n,o?.id)},[l]);let d=ue(n,r,[e.value,e.children,r],e.keywords),f=B(),p=Z(e=>e.value&&e.value===d.current),m=Z(e=>l||s.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);_.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(I,h),()=>t.removeEventListener(I,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=c.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:v,value:y,onSelect:b,forceMount:x,keywords:S,...C}=e;return _.createElement(a.div,{ref:i(r,t),...C,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:h},e.children)}),W=_.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,c=u(),l=_.useRef(null),d=_.useRef(null),f=u(),p=z(),m=Z(e=>o||p.filter()===!1?!0:!e.search||e.filtered.groups.has(c));Y(()=>p.group(c),[]),ue(c,l,[e.value,e.heading,d]);let h=_.useMemo(()=>({id:c,forceMount:o}),[o]);return _.createElement(a.div,{ref:i(l,t),...s,"cmdk-group":``,role:`presentation`,hidden:!m||void 0},n&&_.createElement(`div`,{ref:d,"cmdk-group-heading":``,"aria-hidden":!0,id:f},n),Q(e,e=>_.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?f:void 0},_.createElement(V.Provider,{value:h},e))))}),G=_.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=_.useRef(null),s=Z(e=>!e.search);return!n&&!s?null:_.createElement(a.div,{ref:i(o,t),...r,"cmdk-separator":``,role:`separator`})}),K=_.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=B(),s=Z(e=>e.search),c=Z(e=>e.selectedItemId),l=z();return _.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),_.createElement(a.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),ie=_.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...o}=e,s=_.useRef(null),c=_.useRef(null),l=Z(e=>e.selectedItemId),u=z();return _.useEffect(()=>{if(c.current&&s.current){let e=c.current,t=s.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),_.createElement(a.div,{ref:i(s,t),...o,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},Q(e,e=>_.createElement(`div`,{ref:i(c,u.listInnerRef),"cmdk-list-sizer":``},e)))}),ae=_.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:u,...d}=e;return _.createElement(c,{open:n,onOpenChange:r},_.createElement(s,{container:u},_.createElement(l,{"cmdk-overlay":``,className:i}),_.createElement(o,{"aria-label":e.label,"cmdk-dialog":``,className:a},_.createElement(H,{ref:t,...d}))))}),oe=_.forwardRef((e,t)=>Z(e=>e.filtered.count===0)?_.createElement(a.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),se=_.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...o}=e;return _.createElement(a.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Q(e,e=>_.createElement(`div`,{"aria-hidden":!0},e)))}),q=Object.assign(H,{List:ie,Item:U,Input:K,Group:W,Separator:G,Dialog:ae,Empty:oe,Loading:se});function ce(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function le(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function J(e){let t=_.useRef(e);return Y(()=>{t.current=e}),t}var Y=typeof window>`u`?_.useEffect:_.useLayoutEffect;function X(e){let t=_.useRef();return t.current===void 0&&(t.current=e()),t}function Z(e){let t=B(),n=()=>e(t.snapshot());return _.useSyncExternalStore(t.subscribe,n,n)}function ue(e,t,n,r=[]){let i=_.useRef(),a=z();return Y(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(L,s),i.current=s}),i}var de=()=>{let[e,t]=_.useState(),n=X(()=>new Map);return Y(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function fe(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Q({asChild:e,children:t},n){return e&&_.isValidElement(t)?_.cloneElement(fe(t),{ref:t.ref},n(t.props.children)):n(t)}var pe={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=n();function me({className:e,...t}){return(0,$.jsx)(q,{"data-slot":`command`,className:r(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function he({title:e=`Command Palette`,description:t=`Search for a command to run...`,children:n,className:i,showCloseButton:a=!0,filter:o,commandProps:s,onOpenAutoFocus:c,onCloseAutoFocus:l,onEscapeKeyDown:u,...d}){return(0,$.jsxs)(h,{...d,children:[(0,$.jsxs)(g,{className:`sr-only`,children:[(0,$.jsx)(f,{children:e}),(0,$.jsx)(p,{children:t})]}),(0,$.jsx)(m,{className:r(`overflow-hidden p-0`,i),showCloseButton:a,onOpenAutoFocus:c,onCloseAutoFocus:l,onEscapeKeyDown:u,children:(0,$.jsx)(me,{filter:o,...s,className:`**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:n})})]})}function ge({className:e,...t}){return(0,$.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,$.jsx)(d,{className:`size-4 shrink-0 opacity-50`}),(0,$.jsx)(q.Input,{"data-slot":`command-input`,className:r(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function _e({className:e,...t}){return(0,$.jsx)(q.List,{"data-slot":`command-list`,className:r(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function ve({...e}){return(0,$.jsx)(q.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function ye({className:e,...t}){return(0,$.jsx)(q.Group,{"data-slot":`command-group`,className:r(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function be({className:e,...t}){return(0,$.jsx)(q.Separator,{"data-slot":`command-separator`,className:r(`-mx-1 h-px bg-border`,e),...t})}function xe({className:e,...t}){return(0,$.jsx)(q.Item,{"data-slot":`command-item`,className:r(`relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function Se({className:e,...t}){return(0,$.jsx)(`span`,{"data-slot":`command-shortcut`,className:r(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}export{ge as a,be as c,ye as i,Se as l,he as n,xe as o,ve as r,_e as s,me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{t as i}from"./project-router-xmadY-N9.js";import{t as a}from"./lib-BQXq3kEf.js";var o=e(t(),1),s=n(),c=41;function l({slot:e,commits:t,className:n,onSelect:i}){let l=t.length>150,d=(0,o.useRef)(null),f=(0,o.useRef)(null),[p,m]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{if(!l)return;let e=()=>{let e=d.current,t=f.current;!e||!t||m(Math.max(0,Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l]);let h=t.map(e=>(0,s.jsx)(u,{commit:e,onSelect:i},e.sha));return(0,s.jsx)(`div`,{ref:e=>{d.current=e,e&&(f.current=e.closest(`[data-slot="main"]`))},"data-slot":e,"data-virtualized":l,className:r(`flex flex-col divide-y divide-border px-2 py-1 md:px-4`,n),children:l?(0,s.jsx)(a,{scrollRef:f,startMargin:p,itemSize:c,children:h}):h})}function u({commit:e,onSelect:t}){return(0,s.jsx)(`div`,{className:`[contain-intrinsic-block-size:auto_41px] [content-visibility:auto]`,children:(0,s.jsxs)(i,{"data-slot":`commit-row`,"data-sha":e.sha,to:e.href,onClick:t?n=>{n.metaKey||n.ctrlKey||n.shiftKey||n.button!==0||(n.preventDefault(),t(e.sha))}:void 0,className:`flex min-w-0 items-baseline gap-3 rounded-sm px-2 py-2.5 hover:bg-muted`,children:[(0,s.jsx)(`span`,{className:`shrink-0 font-mono text-meta text-muted-foreground`,children:e.shaLabel}),(0,s.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-ui font-medium`,children:e.subject}),e.sync?(0,s.jsx)(`span`,{"data-slot":`commit-sync`,"data-sync":e.sync,title:e.sync===`outgoing`?`Not pushed yet`:`On the remote, not pulled yet`,className:r(`shrink-0 rounded-sm border px-1 font-mono text-micro`,e.sync===`outgoing`?`border-primary/40 text-primary`:`border-border text-muted-foreground`),children:e.sync===`outgoing`?`↑ local`:`↓ incoming`}):null,(0,s.jsxs)(`span`,{className:`hidden shrink-0 text-meta text-soft-foreground sm:inline`,children:[e.author,` · `,e.when]})]})})}export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r,F as i,It as a,P as o,Sn as s,Wi as c,pr as l,r as u,so as d,uo as f,vn as p,zn as m}from"./queries-ba5qZ3kd.js";import{t as h}from"./utils-Br_dqwn-.js";import{f as g}from"./chunk-KS7C4IRE-DtL2Gzw3.js";import{t as _}from"./button-BqkA8Ovk.js";import{t as v}from"./check-B1z-_MCO.js";import{t as y}from"./chevron-right-DPaV033p.js";import{t as b}from"./search-x-BxcYdvqm.js";import{n as x,r as S,t as C}from"./collapsible-BuSDxSYs.js";import{a as w,c as T,i as E,n as D,o as O,r as k,s as A,t as j}from"./alert-dialog-BihfE0uZ.js";import{r as M}from"./toaster-5ad4wwJ9.js";import{c as N,t as P}from"./project-router-xmadY-N9.js";import{r as F,t as I}from"./directional-usage-BerE4wJK.js";import{t as L}from"./token-metrics-DXeuToH8.js";import{t as R}from"./centered-state-CquGIOsq.js";import{t as z}from"./markdown-YWy3FUHK.js";import{S as B,ht as V}from"./index-DuW72uFI.js";import{t as H}from"./run-diff-CxS_a1EO.js";var U=e(t(),1),W=n();function G(){let{groupId:e}=g(),t=o(e),n=L(i().data),r=f();if((0,U.useEffect)(()=>{e&&r.invalidateQueries({queryKey:u.groups.detail(e)})},[r,e,(a().data??[]).filter(t=>t.groupId===e).map(e=>`${e.id}:${e.status}:${e.archived}`).sort().join(`,`)]),t.isPending)return(0,W.jsx)(B,{});if(t.isError){let e=t.error instanceof l&&t.error.status===404;return(0,W.jsx)(`div`,{"data-route":`compare`,className:`flex min-h-full flex-col`,children:(0,W.jsx)(R,{icon:e?(0,W.jsx)(b,{}):(0,W.jsx)(V,{}),tone:e?`neutral`:`danger`,title:e?`No such variant group`:`Could not load the variants`,subtitle:e?`No runs share this group id. The group may have been deleted, or a winner was already picked and the others removed.`:t.error.message,actions:(0,W.jsx)(_,{asChild:!0,variant:`outline`,children:(0,W.jsx)(P,{to:`/`,children:`Back to tasks`})})})})}return(0,W.jsx)(K,{groupId:e,variants:t.data.runs,showTokens:n.tokens,showCost:n.cost})}function K({groupId:e,variants:t,showTokens:n,showCost:r}){let i=N(),a=f(),[o,s]=(0,U.useState)(null),l=t.every(e=>p.has(e.status)),g=t[0]?m(t[0]):``,_=d({mutationFn:t=>c(e,t),onSuccess:(t,n)=>{a.invalidateQueries({queryKey:u.runs.all}),a.invalidateQueries({queryKey:u.groups.detail(e)}),i(`/tasks/${t.winner?.id??n}`)},onError:e=>M(e.message,{tone:`danger`})});return(0,W.jsxs)(`div`,{"data-route":`compare`,className:`mx-auto flex w-full max-w-6xl flex-col gap-4 px-4 py-5 md:px-6`,children:[(0,W.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,W.jsxs)(`h1`,{className:`flex items-center gap-2 text-xl font-semibold`,children:[(0,W.jsx)(V,{className:`size-5 shrink-0 text-violet`,"aria-hidden":`true`}),(0,W.jsx)(`span`,{className:`min-w-0 truncate`,title:g,children:g})]}),(0,W.jsxs)(`p`,{className:`text-ui text-muted-foreground`,children:[t.length,` variants of the same task, each in its own worktree — pick the diff you want to keep. The others are cancelled and archived, their worktrees and branches removed.`]})]}),(0,W.jsx)(`div`,{"data-slot":`compare-columns`,className:h(`grid grid-cols-1 gap-3`,t.length>=3?`md:grid-cols-3`:`md:grid-cols-2`),children:t.map(e=>(0,W.jsx)(q,{variant:e,allTerminal:l,pickPending:_.isPending,onPick:()=>s(e),showTokens:n,showCost:r},e.id))}),(0,W.jsx)(`section`,{"aria-label":`Full diffs`,className:`flex flex-col gap-2`,children:t.map(e=>(0,W.jsx)(J,{variant:e},e.id))}),(0,W.jsx)(j,{open:o!==null,onOpenChange:e=>!e&&s(null),children:(0,W.jsxs)(E,{children:[(0,W.jsxs)(A,{children:[(0,W.jsxs)(T,{children:[`Pick variant `,o?.variant,`?`]}),(0,W.jsxs)(w,{children:[`Variant `,o?.variant,`'s changes go to the review gate. The other`,` `,t.length-1==1?`variant is`:`${t.length-1} variants are`,` `,`cancelled if still open, archived, and their worktrees and branches removed. There is no undo.`]})]}),(0,W.jsxs)(O,{children:[(0,W.jsx)(k,{children:`Keep comparing`}),(0,W.jsxs)(D,{"data-slot":`confirm-pick`,onClick:()=>{o&&_.mutate(o.id),s(null)},children:[(0,W.jsx)(v,{"aria-hidden":`true`}),`Pick variant `,o?.variant]})]})]})})]})}function q({variant:e,allTerminal:t,pickPending:n,onPick:i,showTokens:a,showCost:o}){let c=r(e),l=s(e.costUsd),u=e.inputTokens!==void 0||e.outputTokens!==void 0;return(0,W.jsxs)(`article`,{"data-slot":`variant-column`,"data-variant":e.variant,className:`flex min-w-0 flex-col gap-3 rounded-lg border border-border bg-card p-3.5 shadow-xs`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`span`,{"data-slot":`variant-letter`,"aria-label":`Variant ${e.variant}`,className:`inline-flex size-6 shrink-0 items-center justify-center rounded-full bg-violet/15 font-mono text-xs font-semibold text-violet`,children:e.variant}),(0,W.jsx)(F,{dot:c.tone,pulse:c.pulse,children:c.label}),a&&u||o&&l?(0,W.jsxs)(`span`,{"data-slot":`variant-token-metrics`,className:`ml-auto flex shrink-0 items-center gap-1.5 text-meta text-soft-foreground`,children:[a?(0,W.jsx)(I,{inputTokens:e.inputTokens,outputTokens:e.outputTokens}):null,a&&u&&o&&l?(0,W.jsx)(`span`,{"aria-hidden":`true`,children:`·`}):null,o&&l?(0,W.jsx)(`span`,{className:`font-mono tabular-nums`,children:l}):null]}):null]}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`eyebrow text-soft-foreground`,children:`git diff --stat`}),(0,W.jsx)(`pre`,{"data-slot":`variant-diffstat`,className:`max-h-36 overflow-auto rounded-md bg-muted/60 px-2.5 py-2 font-mono text-meta leading-[1.6] whitespace-pre text-muted-foreground`,children:e.diffStat.trimEnd()||`(no changes)`})]}),(0,W.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,W.jsx)(`span`,{className:`eyebrow text-soft-foreground`,children:`Progress`}),e.handoffExcerpt?(0,W.jsx)(`div`,{"data-slot":`variant-progress`,className:`max-h-28 min-w-0 overflow-hidden text-label text-muted-foreground [mask-image:linear-gradient(to_bottom,black_75%,transparent)]`,children:(0,W.jsx)(z,{children:e.handoffExcerpt})}):(0,W.jsx)(`p`,{"data-slot":`variant-progress`,className:`text-xs text-soft-foreground`,children:`(no progress notes)`})]}),(0,W.jsxs)(_,{"data-slot":`variant-pick`,title:t?`Keep variant ${e.variant}'s changes and archive the others`:`Every variant must finish before you can pick`,disabled:!t||n,onClick:i,children:[(0,W.jsx)(v,{"aria-hidden":`true`}),`Pick this one`]})]})}function J({variant:e}){let[t,n]=(0,U.useState)(!1);return(0,W.jsxs)(C,{open:t,onOpenChange:n,"data-slot":`variant-diff`,"data-variant":e.variant,className:`min-w-0 overflow-hidden rounded-lg border border-border bg-card`,children:[(0,W.jsxs)(S,{className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-left text-ui font-medium hover:bg-muted/50`,children:[(0,W.jsx)(y,{className:h(`size-3.5 shrink-0 text-soft-foreground transition-transform`,t&&`rotate-90`),"aria-hidden":`true`}),`Variant `,e.variant,` — full diff`]}),(0,W.jsx)(x,{children:(0,W.jsx)(`div`,{className:`border-t border-border/50 px-3 py-3`,children:(0,W.jsx)(H,{runId:e.id})})})]})}export{G as CompareVariantsRoute};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Hr as r,Kt as i,Ma as a,in as o,na as s,r as c,uo as ee}from"./queries-ba5qZ3kd.js";import{Y as te,t as l}from"./utils-Br_dqwn-.js";import{N as u,t as d}from"./button-BqkA8Ovk.js";import{t as ne}from"./arrow-up-BAPSgozC.js";import{t as re}from"./check-B1z-_MCO.js";import{t as f}from"./plus-Bdmhj8CR.js";import{t as ie}from"./square--LrBHma0.js";import{t as ae}from"./x-CZSnHsZ4.js";import{i as oe,l as se,n as ce,r as le,t as ue}from"./use-now-DD2atNhs.js";import{r as p}from"./toaster-5ad4wwJ9.js";import{F as m,I as de,M as fe,j as h}from"./new-task-form-BgMiEphZ.js";import{o as pe,s as me,t as he}from"./command-CfdVVS0V.js";import{a as ge,n as _e,o as ve,r as ye,s as g}from"./composer-attachments-DyC9yyGs.js";import{t as be}from"./use-submit-shortcut-BJ10ZshV.js";import{t as xe}from"./icon-tooltip-BMkyRHLt.js";var Se=u(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Ce=u(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),_=e(t(),1),v=new Set([`ai`,`cezar`,`agents`,`team`]);function y(e){return v.has(e.source)}function b(e){return[...e].sort((e,t)=>Number(!y(e))-Number(!y(t)))}var x=5;function we(e,t,{mostUsedLimit:n=x}={}){let r=e.map((e,n)=>({skill:e,index:n,count:C(t,e.name)})).filter(e=>e.count>0).sort((e,t)=>t.count-e.count||Number(!y(e.skill))-Number(!y(t.skill))||e.index-t.index).slice(0,n).map(e=>e.skill),i=new Set(r),a=e.filter(e=>!i.has(e));return{mostUsed:r,project:a.filter(y),global:a.filter(e=>!y(e))}}function S(e,t){let n=we(e,t);return[...n.mostUsed,...n.project,...n.global]}function C(e,t){if(!e||!Object.hasOwn(e,t))return 0;let n=e[t];return typeof n==`number`?n:0}function Te(e,t){return{...e,[t]:C(e,t)+1}}function Ee(e,t){if(t===``)return!0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0;for(let e of r){if(i=n.indexOf(e,i),i===-1)return!1;i+=1}return!0}function De(e,t){let n=[];for(let r of e)for(let e of r.steps??[])e.skill===t&&n.push(`${r.name} › ${e.name??e.id}`);return n}var w=/[\s\-/_.]/;function T(e,t){let n=0;for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+1)){let i=1,a=e[r-1];if(r===0||a!==void 0&&w.test(a)){let n=e[r+t.length];i=n===void 0||w.test(n)?3:2}if(i>n&&(n=i),n===3)break}return n}function E(e,t,n){let r=t.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=[e,...n??[]].join(` `).toLowerCase(),a=0;for(let e of r){let t=T(i,e);if(t===0)return 0;a+=t}return a/(r.length*3)}function D(e,t){if(t===``)return 1;let n=e.toLowerCase(),r=t.toLowerCase();if(n===r)return 6;if(n.startsWith(r))return 5;let i=n.indexOf(r);if(i>0){let e=n[i-1];return e!==void 0&&w.test(e)?4:3}return+!!Ee(n,r)}function Oe(e,t){let n=e.split(`-`).filter(Boolean);return t?[...n,t]:n}var O=10;function ke(e,t,n){let r=n.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=0;for(let n of r){let r=D(e,n),a=t?D(t,n):0;if(r===0&&a===0)return 0;i+=r>0?r+O:a}return i}var Ae=.5;function k(e,t,n){return t.trim()===``?[...e]:e.map((e,r)=>{let i=ke(e.name,e.description,t),a=C(n,e.name),o=Math.min(a,x)*Ae;return{item:e,index:r,count:a,score:i>0?i+o:0}}).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||t.count-e.count||e.index-t.index).map(e=>e.item)}function A(e,t,n){return k(e,t,n)}function j(e,t){return k(e,t)}function je(e,t,n){return k(S(e,n),t,n)}function Me(e){let t=new Map;for(let n of e){let e=n.team?.repo??``,r=t.get(e)??{key:e,label:e===``?`This project & machine`:e,skills:[]};r.skills.push(n),t.set(e,r)}return[...t.values()].sort((e,t)=>Number(e.key!==``)-Number(t.key!==``))}var M=80,Ne=te,Pe=50,N=200,P=50,F=[{id:`add-tests`,label:`Add tests`,text:`Also add or update tests covering this change.`},{id:`explain-change`,label:`Explain the change`,text:`Explain what changed and why before finishing.`},{id:`keep-minimal`,label:`Keep it minimal`,text:`Keep the change as small and targeted as possible — no unrelated refactors.`},{id:`update-docs`,label:`Update docs`,text:`Also update any relevant documentation or comments.`},{id:`check-edge-cases`,label:`Double-check edge cases`,text:`Double-check edge cases and error handling before finishing.`},{id:`review-open-prs`,label:`Review open PRs`,text:'Check this repository\'s open pull requests that still need a review (use `gh pr list --state open --json number,title,headRefName,isDraft,reviewDecision` and skip drafts and PRs already approved). For each one, dispatch a separate review task with `cez task create --kind review --review-of <headRefName> --title "Review PR #<number>" "Review pull request #<number> (<title>) on branch <headRefName>: read the diff, run the tests, and report a verdict with findings."`, at most 4 at a time. Then end your turn with CEZ:MONITORING and, when their reports arrive, summarise every verdict in one message. If `cez task create` is refused or unavailable, stop and report that dispatch is disabled on this cockpit — do not review the PRs yourself and do not use sub-agents instead.'},{id:`create-automation`,label:`Create an automation`,skills:[`create-cezar-automation`],text:`Create an automation for this repository.
|
|
2
|
+
Trigger: <when — e.g. every new pull request; every issue labelled \`needs-agent\`; every day at 04:00; weekdays at 07:30; every 6 hours>.
|
|
3
|
+
Task for each run: <what the launched task must do — e.g. review the diff, run the tests and post findings as a review comment>.
|
|
4
|
+
Leave it paused and, for a GitHub trigger, preview its matches so I can check the filter before enabling it.`}],I=new Set([`review-open-prs`]),L=new Set([`create-automation`]);function Fe(e,t){return e.filter(e=>(t?.dispatch===!0||!I.has(e.id))&&(t?.automations===!0||!L.has(e.id)))}function R(e){return!!e&&typeof e==`object`}function z(e){if(e===void 0||!Array.isArray(e))return F.map(e=>({...e}));let t=new Set,n=[];for(let r of e){if(!R(r))continue;let e=typeof r.id==`string`?r.id.trim():``,i=typeof r.label==`string`?r.label.trim():``,a=typeof r.text==`string`?r.text.trim():``;if(!e||!i||!a||t.has(e))continue;t.add(e);let o=Ie(r.skills);if(n.push({id:e,label:i.slice(0,M),text:a.slice(0,Ne),...o.length>0?{skills:o}:{}}),n.length>=Pe)break}return n}function Ie(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){if(typeof n!=`string`)continue;let e=n.trim();if(!(!e||t.has(e))&&(t.add(e.slice(0,N)),t.size>=P))break}return[...t]}function Le(e,t){if(t.length===0)return[];let n=new Set(t);return e.filter(e=>e.skills?.some(e=>n.has(e)))}function Re(e,t){return Le(e,t).map(e=>e.text).join(`
|
|
5
|
+
|
|
6
|
+
`)}function ze(e,t,n,r=``){if(e===``||e===r||e===t){let e=r&&n?`${r}\n\n${n}`:r||n;return{text:e,applied:n?e:``}}return{text:e,applied:t}}function B(){return`tpl-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Be(e,t,n){let r=Math.max(0,Math.min(t,e.length)),i=e.slice(0,r),a=e.slice(r),o=``;i.length>0&&(o=i.endsWith(`
|
|
7
|
+
|
|
8
|
+
`)?``:i.endsWith(`
|
|
9
|
+
`)?`
|
|
10
|
+
`:`
|
|
11
|
+
|
|
12
|
+
`);let s=a.replace(/^[ \t]+/,``),c=``;return s.length>0&&(c=s.startsWith(`
|
|
13
|
+
|
|
14
|
+
`)?``:s.startsWith(`
|
|
15
|
+
`)?`
|
|
16
|
+
`:`
|
|
17
|
+
|
|
18
|
+
`),{text:i+o+n+c+s,caret:i.length+o.length+n.length}}var V=new Map,H=new Map;function U(e){return e instanceof Error&&e.status===413}function Ve(e){let t=V.get(e.data);return t||(t=a(g(e)).then(e=>typeof e?.uploadId==`string`?e.uploadId:null,t=>(U(t)&&H.set(e.data,t),h(t),null)),V.set(e.data,t),t.then(n=>{n===null&&V.get(e.data)===t&&V.delete(e.data)})),t}async function W(e){let t=await Ve(e),n=H.get(e.data);if(t===null&&n)throw n;return t===null?g(e):{uploadId:t,...e.originalName?{name:e.originalName}:{}}}function He(e){for(let t of e){let e=V.get(t.data);e&&(V.delete(t.data),H.delete(t.data),e.then(e=>e===null?void 0:r(e)).catch(()=>{}))}}function G(e){for(let t of e)V.delete(t.data),H.delete(t.data)}function Ue(e){return e instanceof Error&&e.message.includes(`attachment upload expired — attach the file again`)}async function We(e,t){if(e.length===0)return t([]);try{return await t(await Promise.all(e.map(W)))}catch(n){if(!Ue(n))throw n;G(e);try{let n=await t(await Promise.all(e.map(W)));return m(`recovered`),n}catch(e){throw m(`failed`),e}}}var K=new Set([`/`,`@`]);function Ge(e,t){for(let n=t-1;n>=0;--n){let r=e[n];if(/\s/.test(r))return null;if(K.has(r))return n>0&&!/\s/.test(e[n-1])?null:{trigger:r,start:n,query:e.slice(n+1,t)}}return null}function Ke(e,t,n,r){let i=`${t.trigger}${r} `;return{text:e.slice(0,t.start)+i+e.slice(n),caret:t.start+i.length}}function qe(){let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition}function q(e,t){let n=e,r=``;for(let e=t.resultIndex;e<t.results.length;e+=1){let i=t.results[e],a=i[0]?.transcript??``;i.isFinal?n+=a:r+=a}return{finalText:n,interim:r}}var J=`Dictation needs https or localhost`,Y=`Dictation is not available in this browser`,X=`Dictation needs a newer Cezar app — update it to use the microphone`;function Je(){let e=window.__CEZ_DESKTOP__;return e?.platform!==`macos`&&document.documentElement.dataset.cezDesktop!==`macos`?null:{microphone:e?.microphone===!0}}function Z(){return window.isSecureContext===!1?J:Xe?Y:Je()?.microphone===!1?X:null}function Ye(e){switch(e){case`aborted`:return null;case`no-speech`:return{message:`Dictation heard nothing — try again`,failure:null};case`not-allowed`:return{message:Je()?`Microphone blocked — allow Cezar in System Settings → Privacy & Security → Microphone and Speech Recognition`:`Microphone blocked — allow it for this site in the browser's site settings`,failure:null};case`service-not-allowed`:return{message:Y,failure:null};case`audio-capture`:return{message:`Dictation failed — no microphone was found`,failure:e};case`network`:return{message:`Dictation failed — the speech service could not be reached`,failure:e};default:return{message:`Dictation failed${e?` — ${e}`:``}`,failure:e||`unknown`}}}var Xe=!1;function Ze(e){let[t,n]=_.useState(null),r=_.useRef(null),i=_.useRef(``),[a]=_.useState(()=>qe()!==void 0),[o,s]=_.useState(Z),c=_.useCallback(()=>{let e=r.current;r.current=null,i.current=``,n(null),e&&(e.onresult=null,e.onerror=null,e.onend=null,e.abort())},[]);return _.useEffect(()=>c,[c]),{supported:a,unavailable:o,recording:t,start:_.useCallback(()=>{if(r.current||o)return;let t=qe();if(!t)return;let a;try{a=new t,a.lang=navigator.language||`en-US`,a.continuous=!0,a.interimResults=!0;let o=Date.now();a.onresult=e=>{let t=q(i.current,e);i.current=t.finalText,n({transcript:t.finalText+t.interim,startedAt:o})},a.onerror=t=>{c(),t.error===`service-not-allowed`&&(Xe=!0,s(Y));let n=Ye(t.error);n&&e(n)},a.start(),r.current=a,n({transcript:``,startedAt:o})}catch{e({message:`Dictation failed — the microphone could not be started`,failure:`start-threw`}),c()}},[e,c,o]),cancel:_.useCallback(()=>c(),[c]),finish:_.useCallback(()=>{let e=r.current,a=(i.current+``).trim()===``?``:i.current,o=t?.transcript??a;return e&&(e.onresult=null,e.onerror=null,e.onend=null,e.stop()),r.current=null,i.current=``,n(null),o.trim()},[t])}}function Q(e,t){let n=Math.max(0,Math.floor((t-e)/1e3));return`${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`}var $=n(),Qe={KeyA:`Yes, approved.`,KeyC:`Continue.`};function $e(e){let t=[];for(let n=e.parentElement;n;n=n.parentElement)n.scrollTop>0&&t.push([n,n.scrollTop]);return t}function et({onSubmit:e,value:t,onValueChange:n,images:r,onImagesChange:a,autoFocus:te=!1,draftItems:u,footerStart:re,footerEnd:f,sendAriaLabel:ue=`Send`,sendLabel:m,sendMenu:h,sendShortcut:g,stop:v,disabled:b=!1,submitDisabled:x=!1,disabledReason:we=`Session closed — Continue to reopen.`,allowEmptySubmit:S=!1,placeholder:C=`Reply — / for skills, @ for files…`,ariaLabel:De=`Reply to the agent`,autocompleteSkills:w=!0,slashCommands:T,attachments:E=!0,compact:D=!1,quickReplies:Oe=!1,getMentionCandidates:O,ref:ke}){let[Ae,k]=(0,_.useState)(``),A=t??Ae,j=(0,_.useRef)(A);j.current=A;let Me=(0,_.useRef)(n);Me.current=n;let M=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(j.current):e;k(t),Me.current?.(t)},[]),[Ne,Pe]=(0,_.useState)([]),N=r??Ne,P=(0,_.useRef)(N);P.current=N;let F=(0,_.useRef)(a);F.current=a;let I=(0,_.useCallback)((e,t=`edit`)=>{let n=typeof e==`function`?e(P.current):e;P.current=n,Pe(n),F.current?.(n,t)},[]),[L,Fe]=(0,_.useState)(!1),[R,z]=(0,_.useState)(null),[Ie,Le]=(0,_.useState)(``),[Re,ze]=(0,_.useState)(!1),B=(0,_.useRef)(null),V=(0,_.useRef)(null),H=(0,_.useRef)(null),U=(0,_.useRef)(new Map),W=i(w&&T===void 0&&Re),G=o(),Ue=ee(),K=Ze(({message:e,failure:t})=>{t&&fe(t),p(e,t?{tone:`danger`,reported:!0}:{})});(0,_.useEffect)(()=>{te&&B.current?.focus()},[]),(0,_.useImperativeHandle)(ke,()=>({insertAtCaret:e=>{let t=B.current,n=Be(j.current,t?.selectionStart??j.current.length,e);M(n.text),H.current=n.caret,t?.focus()}}),[M]);let qe=(0,_.useCallback)(()=>{let e=B.current;if(!e||b){z(null);return}let t=Ge(e.value,e.selectionStart??e.value.length);if(t?.trigger===`/`&&!w&&T===void 0||t?.trigger===`@`&&O===void 0)return z(null);t?.trigger===`/`&&ze(!0),z(t)},[w,b,O,T]),q=(0,_.useMemo)(()=>R===null?[]:R.trigger===`/`&&T?T.filter(e=>Ee(e.name,R.query)).map(e=>({value:e.name,insert:e.name,label:`/${e.name}`,description:e.description,emphasized:!1})):R.trigger===`/`?je(W.data??[],R.query,G.data?.skillUsage).map(e=>({value:`${e.name} ${e.path}`,insert:e.name,label:e.name,description:e.description,emphasized:y(e)})):(O?.()??[]).filter(e=>Ee(e,R.query)).map(e=>({value:e,insert:e,label:e,emphasized:!1})),[O,W.data,T,R,G.data?.skillUsage]),J=q.some(e=>e.value===Ie)?Ie:q[0]?.value,Y=R!==null,X=(0,_.useCallback)(()=>z(null),[]),Je=e=>{let t=B.current;if(!t||R===null)return;let n=t.selectionStart??t.value.length,r=Ke(t.value,R,n,e.insert);R.trigger===`/`&&T===void 0&&G.data!==void 0&&s({skillUsage:Te(G.data.skillUsage,e.insert)}).then(()=>Ue.invalidateQueries({queryKey:c.uiState})).catch(()=>{}),M(r.text),H.current=r.caret,z(null),t.focus()};(0,_.useEffect)(()=>{!Y||J==null||U.current.get(J)?.scrollIntoView({block:`nearest`})},[J,Y]),(0,_.useLayoutEffect)(()=>{let e=H.current,t=B.current;e!==null&&t&&(t.setSelectionRange(e,e),H.current=null)},[A]),(0,_.useLayoutEffect)(()=>{let e=B.current;if(!e)return;let t=$e(e);e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,220)}px`;for(let[e,n]of t)e.scrollTop!==n&&(e.scrollTop=n)},[A]);let Z=(0,_.useCallback)((e,t=`file`)=>{if(b||!E)return;let n=ve(e,P.current.length,ye(P.current));for(let e of n.rejected)p(e,{tone:`danger`,expected:!0});for(let e of n.accepted)ge(e,t).then(e=>{let t=_e(P.current,e);t&&(Ve(e),I(t))},t=>{let n=t instanceof DOMException&&t.name===`NotFoundError`;p(`“${e.name}” could not be read${n?` — a folder, or a file that no longer exists`:``}`,{tone:`danger`,expected:n})})},[E,b]),Ye=e=>{if(!E)return;let t=[...e.clipboardData?.items??[]].filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e!==null);t.length!==0&&(e.preventDefault(),Z(t,`clipboard`))},Xe=e=>{let t=[...e.dataTransfer?.files??[]];t.length!==0&&(e.preventDefault(),Z(t))},Q=(0,_.useCallback)(async(t,n,r,i)=>{let a=t.trim();if(!(b||x||L)&&!(a===``&&n.length===0&&!S)){Fe(!0);try{await We(n,t=>i?e(a,t,i):e(a,t)),He(n),de(n.length)}catch(e){if(p(e instanceof Error?e.message:String(e),{tone:`danger`}),r){M(e=>e===``?t:`${t}\n${e}`);let e=[],r=P.current.reduce((t,n)=>{let r=_e(t,n);return r||e.push(n),r??t},n);for(let t of e)p(`“${t.name}” removed — the restored message fills the attachment limit`,{tone:`danger`});I(r)}}finally{Fe(!1)}}},[S,L,b,x,e]),et=(0,_.useCallback)(()=>{if(b||x||L||A.trim()===``&&N.length===0&&!S)return;let e=A,t=N;M(``),I([],`submit`),z(null),Q(e,t,!0)},[S,L,b,x,N,Q,A]),rt=e=>{if(Y){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),q.length===0)return;let t=q.findIndex(e=>e.value===J),n=e.key===`ArrowDown`?1:-1,r=q[(t+n+q.length)%q.length];Le(r.value);return}if(e.key===`Escape`){e.preventDefault(),X();return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){let t=q.find(e=>e.value===J);if(t&&T&&e.key===`Enter`&&R?.query===t.insert)X();else if(t){e.preventDefault(),Je(t);return}X()}}if(e.key===`Escape`&&!e.nativeEvent.isComposing&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.currentTarget.blur();return}be({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.preventDefault(),et())};(0,_.useEffect)(()=>{if(!Oe||b)return;let e=e=>{if(!e.altKey||e.metaKey||e.ctrlKey||e.repeat||se(e.target))return;let t=Qe[e.code];t!==void 0&&(e.preventDefault(),Q(t,[],!1,{quickReply:!0}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[b,Oe,Q]);let it=e=>{let t=K.finish();if(t===``)return;let n=A.trim()===``?t:`${A.replace(/\s*$/,``)} ${t}`;if(e){M(``),I([],`submit`),Q(n,N,!0);return}M(n),H.current=n.length,B.current?.focus()},at=K.recording,ot=A.trim()!==``||N.length>0||S,st=b||x||L||!ot,ct=(0,$.jsxs)(d,{type:`button`,size:m?`sm`:`icon-sm`,variant:D?`contrast`:void 0,"aria-label":ue,disabled:st,className:l(D?`h-10 w-auto gap-1.5 rounded-full px-4 pointer-coarse:max-md:h-11 md:size-8 md:rounded-md md:px-0`:m?`h-8`:`size-8`,h&&`rounded-r-none`),onClick:et,children:[(0,$.jsx)(ne,{"aria-hidden":`true`}),m,D?(0,$.jsx)(`span`,{className:`md:hidden`,children:`Send`}):null]}),lt=g?(0,$.jsx)(xe,{side:`top`,label:(0,$.jsxs)(`span`,{"data-slot":`composer-send-shortcut`,className:`flex items-center gap-2`,children:[m??ue,(0,$.jsx)(`kbd`,{className:`font-sans opacity-70`,children:g})]}),children:ct}):ct,ut=D?`size-10 rounded-full bg-muted text-muted-foreground pointer-coarse:max-md:size-11 md:size-8 md:rounded-md md:bg-transparent`:`h-8 gap-1.5 px-2.5 text-xs font-medium text-muted-foreground`,dt=(0,$.jsx)(Se,{"aria-hidden":`true`,className:D?`size-4`:`size-3.5`}),ft=D?`icon-sm`:`sm`,pt=K.supported&&K.unavailable?(0,$.jsx)(xe,{label:K.unavailable,side:`top`,children:(0,$.jsxs)(d,{type:`button`,variant:`ghost`,size:ft,"aria-disabled":`true`,"aria-label":`Start dictation`,className:l(ut,`cursor-not-allowed opacity-50 hover:bg-transparent`),children:[dt,D?null:`Dictation`]})}):K.supported?(0,$.jsxs)(d,{type:`button`,variant:`ghost`,size:ft,disabled:b,"aria-label":`Start dictation`,title:`Dictation`,className:ut,onClick:K.start,children:[dt,D?null:`Dictation`]}):null,mt=v?(0,$.jsx)(xe,{label:v.label,side:`top`,children:(0,$.jsx)(d,{type:`button`,size:`icon-sm`,variant:`contrast`,"data-slot":`composer-stop`,"aria-label":v.label,disabled:v.pending,className:D?`size-10 rounded-full pointer-coarse:max-md:size-11 md:size-8 md:rounded-md`:`size-8`,onClick:v.onStop,children:(0,$.jsx)(ie,{"aria-hidden":`true`,className:`size-3 fill-current`})})}):null,ht=h?(0,$.jsxs)(`div`,{"data-slot":`composer-send`,className:`flex transform-gpu items-center`,children:[lt,(0,$.jsx)(`div`,{"data-slot":`composer-send-menu`,className:l(`flex`,st&&`opacity-50 hover:opacity-100 focus-within:opacity-100`),children:h})]}):lt,gt=(0,$.jsx)(`textarea`,{ref:B,rows:1,value:A,disabled:b,"aria-label":De,placeholder:b?we:C,className:l(`block max-h-[220px] w-full resize-none bg-transparent text-base leading-normal outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed md:text-sm`,D?`order-first min-h-11 min-w-0 basis-full px-2 py-1.5 max-md:max-h-[calc((100dvh-var(--kb,0px))*0.35)] md:order-none md:min-h-9 md:flex-1 md:basis-auto md:px-1.5`:`min-h-11 px-3 pt-2.5 pb-1 md:min-h-[54px] md:px-4 md:pt-3`),onChange:e=>{M(e.target.value),qe()},onKeyDown:rt,onSelect:qe,onPaste:Ye});return(0,$.jsxs)(ce,{open:Y,onOpenChange:e=>e?void 0:X(),children:[(0,$.jsx)(le,{asChild:!0,children:(0,$.jsxs)(`div`,{ref:V,"data-slot":`composer`,"data-disabled":b||void 0,onDrop:Xe,onDragOver:e=>e.preventDefault(),className:l(D?`rounded-[1.75rem] md:rounded-xl`:`rounded-xl`,`border border-border bg-card shadow-xs transition-[border-color,box-shadow]`,`focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/15`,b&&`opacity-80`),children:[N.length>0||u?(0,$.jsxs)(`div`,{"data-slot":`composer-thumbs`,className:`flex flex-wrap items-center gap-2 px-4 pt-3`,children:[u,N.map((e,t)=>(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,title:`Click to remove`,className:l(`group relative overflow-hidden rounded-md border border-border`,e.isImage?`size-12`:`flex h-12 max-w-[200px] items-center gap-1.5 bg-muted/40 px-2.5 text-xs text-muted-foreground`),onClick:()=>{He([e]),I(e=>e.filter((e,n)=>n!==t))},children:[e.isImage?(0,$.jsx)(`img`,{src:e.preview,alt:``,className:`size-full object-cover`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Ce,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,$.jsx)(`span`,{className:`absolute inset-0 hidden items-center justify-center bg-background/70 group-hover:flex group-focus-visible:flex`,children:(0,$.jsx)(ae,{"aria-hidden":`true`,className:`size-4`})})]},`${e.name}-${t}`))]}):null,D?(0,$.jsxs)(`div`,{"data-slot":`composer-compact-row`,className:`flex flex-wrap items-end gap-1.5 p-2 md:flex-nowrap md:gap-1 md:px-1.5 md:py-1`,children:[E?(0,$.jsx)(tt,{disabled:b,onFiles:Z,compact:!0}):null,re,f?(0,$.jsx)(`div`,{className:`min-w-0 md:hidden`,children:f}):null,gt,at?null:(0,$.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 md:ml-0 md:gap-1 md:pb-0.5`,children:[pt,mt,(0,$.jsx)(`div`,{"data-slot":`composer-compact-send`,className:ot?`contents`:v?`hidden`:`contents md:hidden`,children:ht})]})]}):gt,at?(0,$.jsx)(nt,{transcript:at.transcript,startedAt:at.startedAt,onCancel:K.cancel,onInsert:()=>it(!1),onInsertAndSend:()=>it(!0)}):D?null:(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 gap-y-1 px-1.5 pt-1 pb-1.5 md:gap-y-1.5 md:px-2 md:pt-1.5 md:pb-2`,children:[(0,$.jsxs)(`div`,{"data-slot":`composer-footer-start`,className:`flex min-w-0 flex-wrap items-center gap-1`,children:[E?(0,$.jsx)(tt,{disabled:b,onFiles:Z}):null,re]}),(0,$.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[pt,f?(0,$.jsx)(`div`,{"data-slot":`composer-footer-end`,className:`flex items-center gap-1.5`,children:f}):null,mt,!v||ot?ht:null]})]})]})}),(0,$.jsx)(oe,{side:`top`,align:`start`,sideOffset:8,className:`w-80 max-w-[calc(100vw-2rem)] p-0`,onOpenAutoFocus:e=>e.preventDefault(),onInteractOutside:e=>{V.current?.contains(e.target)&&e.preventDefault()},children:(0,$.jsx)(he,{shouldFilter:!1,value:J??``,onValueChange:Le,children:(0,$.jsx)(me,{"data-slot":`composer-menu`,"data-trigger":R?.trigger,className:`max-h-[min(16rem,var(--radix-popover-content-available-height))] p-1`,children:q.length===0?(0,$.jsx)(`p`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:R?.trigger===`@`?`No files seen in this session yet — full file search arrives with the Files tab.`:T?`No matching commands.`:W.isPending?`Loading skills…`:`No matching skills.`}):q.map(e=>(0,$.jsxs)(pe,{ref:t=>{t?U.current.set(e.value,t):U.current.delete(e.value)},value:e.value,"data-slot":`composer-menu-item`,"data-emphasized":e.emphasized||void 0,onSelect:()=>Je(e),children:[(0,$.jsx)(`span`,{className:l(`shrink-0 truncate`,e.emphasized&&`font-semibold`,R?.trigger===`@`&&`font-mono text-xs`),children:e.label}),e.description?(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null]},e.value))})})})]})}function tt({disabled:e,onFiles:t,compact:n=!1}){let r=(0,_.useRef)(null);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Attach files`,title:`Attach images or files (or paste a screenshot)`,disabled:e,className:n?`size-10 shrink-0 rounded-full bg-muted text-muted-foreground md:mb-0.5 md:size-8 md:rounded-md md:bg-transparent`:`size-8 text-muted-foreground`,onClick:()=>r.current?.click(),children:n?(0,$.jsx)(f,{"aria-hidden":`true`,className:`size-4`}):(0,$.jsx)(Ce,{"aria-hidden":`true`,className:`size-[15px]`})}),(0,$.jsx)(`input`,{ref:r,type:`file`,multiple:!0,className:`hidden`,"aria-hidden":`true`,tabIndex:-1,onChange:e=>{t([...e.target.files??[]]),e.target.value=``}})]})}function nt({transcript:e,startedAt:t,onCancel:n,onInsert:r,onInsertAndSend:i}){let a=ue(1e3);return(0,$.jsxs)(`div`,{"data-slot":`dictation-overlay`,role:`status`,"aria-label":`Dictation in progress`,className:`flex items-center gap-2.5 rounded-b-xl border-t border-border bg-muted/60 px-3 py-2`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 flex-none animate-pulse rounded-full bg-danger motion-reduce:animate-none`}),(0,$.jsx)(`span`,{"data-slot":`dictation-timer`,className:`text-xs font-medium text-muted-foreground tabular-nums`,children:Q(t,a)}),(0,$.jsx)(`span`,{"data-slot":`dictation-transcript`,"aria-live":`polite`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:e===``?(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Listening…`}):e}),(0,$.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Cancel dictation`,className:`size-8 text-muted-foreground`,onClick:n,children:(0,$.jsx)(ae,{"aria-hidden":`true`})}),(0,$.jsx)(d,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":`Insert transcription`,className:`size-8`,onClick:r,children:(0,$.jsx)(re,{"aria-hidden":`true`})}),(0,$.jsx)(d,{type:`button`,size:`icon-sm`,"aria-label":`Insert transcription and send`,className:`size-8`,onClick:i,children:(0,$.jsx)(ne,{"aria-hidden":`true`})})]})}export{Ce as C,De as S,we as _,Fe as a,j as b,z as c,je as d,Me as f,S as g,b as h,Re as i,ze as l,E as m,F as n,Be as o,y as p,Ne as r,B as s,et as t,Te as u,ke as v,Oe as x,A as y};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{gt as e,ht as t,pt as n,vt as r}from"./utils-Br_dqwn-.js";function i(e){return e===`/manager`||e.startsWith(`/manager/`)}var a=/\[\[(task|pr|issue):([^\]/\s]+)\/([^\]\s]+)\]\]/g,o=/^\s*(?:[-*]\s+)?((?:\[\[task:[^\]/\s]+\/[^\]\s]+\]\]\s*)+)$/,s=/\[\[?(?:(?:task|pr|issue)(?::[^\]\n]*)?\]?)?$/,c=`#cez-task/`,l=`#cez-pr/`,u=`#cez-issue/`,d=/(?<![\w/#&[])#(\d{1,7})\b/g,f=/\b(?:PRs?|pull requests?)\s*$/i,p=/(?<![("<[])(https:\/\/github\.com\/[^\s/]+\/[^\s/]+)\/(pull|issues)\/(\d+)(?![\w/])/g,m=/(`[^`]*`)/;function h(e){return e.replace(a,(e,t,n,r)=>{let i=`${encodeURIComponent(n)}/${encodeURIComponent(r)}`;return t===`task`?`[task](${c}${i})`:`[#${r}](${t===`pr`?l:u}${i})`})}function g(e,t){return[...e.matchAll(a)][0]?.[2]??(t.length===1?t[0].id:`_`)}function _(e,t,n){return e.split(m).map((e,r)=>r%2==1?e:e.replace(p,(e,t,r,i)=>{let a=n.find(e=>e.repoUrl===t);return a?`[#${i}](${r===`pull`?l:u}${encodeURIComponent(a.id)}/${i})`:e}).replace(d,(e,n,r,i)=>`[${e}](${f.test(i.slice(0,r))?l:u}${encodeURIComponent(t)}/${n})`)).join(``)}function v(e){try{return decodeURIComponent(e)}catch{return null}}function y(e){let t=new Map;for(let n of e)if(n.kind===`markdown`)for(let e of n.text.matchAll(/\(#cez-(pr|issue)\/([^/)]+)\/(\d+)\)/g)){let n=v(e[2]);if(n===null||n===`_`)continue;let r=e[1]===`pr`?`PR`:`Issue`;t.set(`${n} ${r} ${e[3]}`,{projectId:n,kind:r,number:Number(e[3])})}return[...t.values()]}var b=/^\[\[task:([^\]/\s]+)\/([^\]\s]+)\]\]$/gm;function x(e){return e.filter(e=>!e.isError&&/\btask create\b/.test(e.summary)).flatMap(e=>[...(e.output??``).matchAll(b)]).map(e=>({projectId:e[1],runId:e[2]}))}function S(e,t=[],n=[]){let r=g(e,n),i=[],c=new Set,l=[],u=[],d=!1,f=(e,t)=>{c.has(`${e}/${t}`)||(c.add(`${e}/${t}`),i.push({kind:`task`,projectId:e,runId:t}))},p=()=>{let e=u.join(`
|
|
2
|
+
`).trim();e!==``&&i.push({kind:`markdown`,text:e}),u=[];for(let e of l)f(e.projectId,e.runId);l=[]};for(let t of e.replace(s,``).split(`
|
|
3
|
+
`)){if(/^\s*(```|~~~)/.test(t)){d=!d,u.push(t);continue}if(d){u.push(t);continue}let e=o.exec(t);if(!e){l.length>0&&t.trim()===``&&p();for(let e of t.matchAll(a))e[1]===`task`&&l.push({projectId:e[2],runId:e[3]});u.push(h(_(t,r,n)));continue}p();for(let t of e[1].matchAll(a))f(t[2],t[3])}p();for(let e of x(t))f(e.projectId,e.runId);return i}function C(e,t){if(!e?.startsWith(t))return null;let[n,r]=e.slice(t.length).split(`/`),i=n?v(n):null,a=r?v(r):null;return i&&a?{projectId:i,id:a}:null}var w=[{name:`status`,description:`Where things stand`,prompt:`Give me a short status of my connected projects.`},{name:`attention`,description:`What needs me`,prompt:`What needs my attention right now?`},{name:`tasks`,description:`Running and recent tasks`,prompt:`List the running and recently finished tasks.`},{name:`prs`,description:`Open pull requests`,prompt:`List the open pull requests and what each one is waiting for.`},{name:`check`,description:`Run the watch check now`},{name:`stop`,description:`Stop the current turn`}];function T(e){let t=/^\/([a-z]+)\s*$/.exec(e.trim());return t?w.find(e=>e.name===t[1])??null:null}function E(e){return e===0?`Off`:e<60?`${e} min`:e===60?`1 hour`:e<1440?`${e/60} hours`:e===1440?`1 day`:`${e/1440} days`}function D(e){let t=e.filter(e=>e===`read`).length;return t===0?``:t===e.length?`Read-only`:`${t} read-only`}function O(e,t){return e===`all`?`All projects access`:e.length===1?t(e[0])??e[0]:`${e.length} projects`}function k(e){return e?`${e[0].toUpperCase()}${e.slice(1)}`:``}function A(e,t=new Date){let n=new Date(e);if(Number.isNaN(n.getTime()))return``;let r=n.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`});return n.toDateString()===t.toDateString()?r:`${n.toLocaleDateString([],{month:`short`,day:`numeric`})}, ${r}`}function j(e,t=new Date){if(!e)return``;let n=new Date(e);if(Number.isNaN(n.getTime()))return``;let r=Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())/864e5);return r<=0?n.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}):r===1?`Yesterday`:r<7?n.toLocaleDateString([],{weekday:`long`}):n.toLocaleDateString([],{month:`short`,day:`numeric`})}function M(e){return e.type===`merge-pr`?`Merge #${e.number}${e.title?` — ${e.title}`:``}`:e.type===`enable-automation`?`Enable automation ${e.name??e.automationId}`:`Add job ${e.name}`}var N=[`merge-pr`,`enable-automation`,`add-job`];function P(e,t){let n=N.find(e=>e===t);return n===void 0||e?.[n]!==!1}var F=new Map;function I(e,t){let n=t?.manager;return typeof n?.id==`string`&&typeof n.name==`string`&&F.set(e,{id:n.id,name:n.name}),F.get(e)}function L(e){return e.pendingQuestions>0?`${e.pendingQuestions} ${e.pendingQuestions===1?`question`:`questions`} for you`:e.pendingActions>0?`${e.pendingActions} ${e.pendingActions===1?`approval`:`approvals`} waiting`:e.preview??(e.status===`working`?`Working…`:`No messages yet`)}var R=20;function z(e){return e.reduce((e,t)=>r(t.mediaType)?e+Math.floor(t.data.length*3/4):e,0)}function B(e,t){return e.length>=R||z(e)+z([t])>20971520?null:[...e,t]}var V=new Map([[`md`,`text/markdown`],[`markdown`,`text/markdown`],[`txt`,`text/plain`],[`log`,`text/plain`],[`pdf`,`application/pdf`],[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`gif`,`image/gif`],[`webp`,`image/webp`]]),H=new Set(`html.htm.xml.css.scss.less.csv.tsv.json.jsonl.ndjson.yaml.yml.toml.ini.env.conf.cfg.sql.graphql.gql.diff.patch.js.mjs.cjs.jsx.ts.mts.cts.tsx.vue.svelte.astro.php.py.rb.go.rs.java.kt.swift.c.h.cc.cpp.hpp.cs.sh.bash.zsh.ps1.bat.lua.pl.r.dart.scala.ex.exs.erl.hs.twig.rst.adoc.tex.srt.vtt`.split(`.`)),U=new Set([`application/json`,`application/xml`,`application/javascript`,`application/x-yaml`,`application/yaml`,`application/sql`,`application/x-sh`]);function W(t){if(e(t.type)&&t.type!==`application/octet-stream`)return t.type;let r=t.name.includes(`.`)?t.name.split(`.`).pop()?.toLowerCase()??``:``;return V.get(r)||(H.has(r)||t.type.startsWith(`text/`)||U.has(t.type)?`text/plain`:n)}function G(e,n){return n?`pasted image`:`pasted.${t(e)}`}async function K(e,t=`file`){let n=new Uint8Array(await e.arrayBuffer()),i=``;for(let e=0;e<n.length;e+=32768)i+=String.fromCharCode(...n.subarray(e,e+32768));let a=btoa(i),o=W(e),s=r(o),c=t===`clipboard`&&s?void 0:e.name;return{mediaType:o,data:a,...s?{preview:`data:${o};base64,${a}`}:{},name:c||G(o,s),...c?{originalName:c}:{},isImage:s}}function q({mediaType:e,data:t,originalName:n}){return{mediaType:e,data:t,...n?{name:n}:{}}}function J(e,t,n=0){let i=[],a=[],o=t,s=n;for(let t of e){let e=t.name?`“${t.name}”`:`attachment`;if(t.size>5242880){a.push(`${e} is too large (max 5 MB)`);continue}if(o>=R){a.push(`${e} skipped — max ${R} attachments per message`);continue}let n=r(W(t));if(n&&s+t.size>20971520){a.push(`${e} skipped — max 20 MB of images per message`);continue}i.push(t),o+=1,n&&(s+=t.size)}return{accepted:i,rejected:a}}export{T as C,I as D,O as E,j as S,C as T,k as _,K as a,y as b,u as c,l as d,c as f,E as g,M as h,G as i,w as l,P as m,B as n,J as o,D as p,z as r,q as s,R as t,N as u,i as v,S as w,L as x,A as y};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$ as r,$n as i,F as a,Mn as o,Oi as s,Ra as c,Tr as l,co as u,dn as d,ia as f,nr as p,pn as m,pr as h,tr as g,uo as _}from"./queries-ba5qZ3kd.js";import{A as v,D as y,E as b,N as x,O as S,X as C,j as w,k as T}from"./utils-Br_dqwn-.js";import{l as ee,n as E,p as te}from"./chunk-KS7C4IRE-DtL2Gzw3.js";import{D as ne,E as re,O as D,T as O,a as ie,c as k,d as A,f as ae,g as oe,i as se,k as ce,l as le,m as ue,n as de,r as fe,s as pe,t as me,u as he}from"./sortable.esm-Dj7Kk-Wk.js";import{a as ge,i as _e,o as ve,r as ye,t as be}from"./sheet-DxqNqi5S.js";import{N as xe,t as j}from"./button-BqkA8Ovk.js";import{t as Se,u as Ce}from"./reference-chip-C9pVQk05.js";import{a as we,f as M,m as Te,p as Ee,r as De}from"./automation-format-BXwiLf2G.js";import{s as Oe}from"./dist-Br4Ra_c5.js";import{t as ke}from"./chevron-right-DPaV033p.js";import{t as Ae}from"./circle-alert-B7VNkPC2.js";import{t as je}from"./download-HBguClwD.js";import{i as Me,n as Ne,r as Pe,t as Fe}from"./tooltip-45rfBiq8.js";import{a as Ie,i as Le,n as Re,t as ze}from"./use-now-DD2atNhs.js";import{t as N}from"./status-dot-Dxb9pPsK.js";import{n as P,t as Be}from"./format-DHK74MwW.js";import{t as Ve}from"./token-metrics-DXeuToH8.js";import{K as He,ft as Ue,r as We,t as Ge,xt as Ke,yt as qe}from"./index-DuW72uFI.js";var Je=xe(`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`}]]),Ye=xe(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),Xe=xe(`grip-horizontal`,[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]),Ze=xe(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),F=e(t(),1);function Qe(e){let t=Date.parse(e.nextRunAt??``),n=Date.parse(e.state?.backoffUntil??``);return Number.isFinite(t)?Math.max(t,Number.isFinite(n)?n:t):null}function $e(e){return e.flatMap(e=>(e.data?.automations??[]).filter(e=>e.enabled).map(t=>({project:e,automation:t,at:Qe(t)}))).sort((e,t)=>(e.at??1/0)-(t.at??1/0)||e.project.id.localeCompare(t.project.id)||e.automation.id.localeCompare(t.automation.id))}function et(e){let t=r(),n=_(),i=t.data?.projects??[],a=t.data?.bootProject,o=a&&!i.some(e=>e.id===a)?[...i,{id:a,name:a,status:`ok`}]:i,s=u({queryKey:[...m.dashboard,`automations`,o.map(e=>[e.id,e.name,e.status])],enabled:e&&!!t.data,queryFn:async({signal:e})=>{let t=0,n=[];return await Promise.all([0,1].map(async()=>{for(;t<o.length&&!e.aborted;){let r=o[t++];if(r.status===`missing`){n.push({...r,error:`Project folder unavailable`});continue}try{let t=x.parse(await c(await l.api.v1.workspace.dashboard.automations.$get({query:{projectId:r.id}},{init:{signal:e}}),`/workspace/dashboard/automations`));n.push({id:r.id,name:r.name,data:t})}catch{n.push({id:r.id,name:r.name,error:`Could not load automations`})}}})),n}});return(0,F.useEffect)(()=>{if(e)return oe(e=>{e===`automation-change`&&n.invalidateQueries({queryKey:[...m.dashboard,`automations`]})})},[n,e]),{...s,registry:t,retry:()=>{t.refetch(),s.refetch()}}}var I=n();function L({rows:e}){return(0,I.jsx)(`span`,{hidden:!0,"data-dashboard-export":JSON.stringify(e)})}var R=`section-mark eyebrow text-muted-foreground`,z=`flex min-h-12 flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b px-4 py-2.5`,tt=`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden`;function B(){return(0,I.jsx)(ke,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-soft-foreground transition-transform duration-150 motion-reduce:transition-none [details[open]>summary>&]:rotate-90`})}var nt=`flex items-center gap-2 text-xs text-muted-foreground`;function rt({className:e=``,...t}){return(0,I.jsxs)(`span`,{className:`relative inline-flex`,children:[(0,I.jsx)(`select`,{...t,className:`h-9 cursor-pointer appearance-none rounded-md border bg-card-2 pr-8 pl-3 font-mono text-xs text-foreground outline-none transition-colors hover:border-foreground/20 hover:bg-muted focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 no-hover:min-h-11 ${e}`}),(0,I.jsx)(Oe,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 right-2.5 size-3.5 -translate-y-1/2 text-soft-foreground`})]})}var it=`relative min-w-0 overflow-hidden rounded-lg border bg-card-2 p-4 transition-colors before:absolute before:inset-x-0 before:top-0 before:h-px before:opacity-80 hover:border-foreground/20 hover:bg-muted/40 sm:p-5`,V={violet:`before:bg-violet`,info:`before:bg-info`,success:`before:bg-success`,danger:`before:bg-danger`,primary:`before:bg-primary`,neutral:`before:bg-border`};function at({label:e,value:t,icon:n,children:r}){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,I.jsx)(`span`,{className:`eyebrow text-muted-foreground`,children:e}),(0,I.jsx)(`span`,{className:`text-soft-foreground`,"aria-hidden":`true`,children:n})]}),(0,I.jsx)(`span`,{className:`mt-4 block text-4xl font-semibold leading-none tracking-tight tabular-nums`,children:t}),(0,I.jsx)(`span`,{className:`mt-3 block text-xs text-soft-foreground`,children:r})]})}function ot({at:e}){return(0,I.jsxs)(`time`,{dateTime:e,title:new Date(e).toLocaleString(),children:[`Updated `,P(e),` ago`]})}function st(){let e=He(),t=et(e.known&&!e.off),n=ze(3e4),[r,i]=(0,F.useState)(!1),a=$e(t.data??[]),o=r?a:a.slice(0,3),s=t.data?.filter(e=>e.error)??[],c=!e.known||!t.registry.isError&&(t.registry.isPending||t.isPending),l=t.isError||t.registry.isError||s.length>0;return(0,I.jsxs)(M,{"data-export-context":`Enabled automations · showing ${o.length} of ${a.length} loaded · ${l?`partial coverage`:`available projects`}`,className:`min-w-0 gap-0 py-0`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsxs)(`h2`,{className:`flex items-center ${R}`,children:[`Automations`,(0,I.jsx)(Te,{className:`ml-2 size-3.5 text-soft-foreground`,"aria-hidden":`true`})]}),!e.off&&t.data&&(0,I.jsxs)(`span`,{className:`font-mono text-meta text-soft-foreground`,children:[a.length,` enabled`,l?` · partial`:``]})]}),!e.off&&t.data&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{rows:[{section:`automations`,metric:`enabled`,value:a.length,unit:`automations`,note:l?`Partial project coverage`:`Loaded projects`}]}),t.dataUpdatedAt>0&&(0,I.jsx)(`p`,{className:`px-4 pt-3 text-xs text-muted-foreground`,children:(0,I.jsx)(ot,{at:new Date(t.dataUpdatedAt).toISOString()})})]}),e.off?(0,I.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`Automations are disabled in this workspace.`}):(0,I.jsxs)(I.Fragment,{children:[c&&(0,I.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`Loading automations…`}),l&&(0,I.jsxs)(`div`,{role:`alert`,className:`p-4 text-sm`,children:[(0,I.jsx)(`p`,{children:`Some automation data could not be refreshed. Available results are shown.`}),s.map(e=>(0,I.jsxs)(`p`,{children:[e.name,`: `,e.error]},e.id)),(0,I.jsx)(j,{variant:`ghost`,onClick:t.retry,children:`Retry automations`})]}),!c&&!l&&a.length===0&&(0,I.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No enabled automations. Enable one in a project's Automations page.`}),o.map(({project:e,automation:t,at:r})=>{let i=(t.state?.consecutiveFailures??0)>0?`Recent checks failed`:void 0,a=r===null?`Next time not available`:r<=n?`Due — awaiting scheduler`:we(r,n),o=t.kind===`schedule`?`Next run`:`Next check`;return(0,I.jsxs)(`div`,{"data-export-row":!0,className:`border-b px-4 py-3 transition-colors last:border-0 hover:bg-muted/30`,children:[(0,I.jsx)(E,{className:`block min-h-11 text-sm font-medium hover:underline`,to:`/p/${encodeURIComponent(e.id)}/automations/${encodeURIComponent(t.id)}`,children:t.name}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.name,` · `,o,`: `,a]}),r!==null&&(0,I.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:(0,I.jsxs)(`time`,{dateTime:new Date(r).toISOString(),children:[De(r,e.data.timeZone),` · `,e.data.timeZone]})}),t.kind!==`schedule`&&(0,I.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Checks for matching events; a task may not be started.`}),i&&(0,I.jsx)(`p`,{className:`mt-1 text-xs text-warning`,children:i}),(0,I.jsx)(L,{rows:[{section:`automation`,entity:`${e.id}:${t.id}`,metric:`name`,value:t.name},{section:`automation`,entity:`${e.id}:${t.id}`,metric:t.kind===`schedule`?`nextRunAt`:`nextCheckAt`,value:r===null?null:new Date(r).toISOString(),note:[a,i].filter(Boolean).join(` · `)}]})]},`${e.id}:${t.id}`)}),a.length>3&&(0,I.jsx)(j,{variant:`ghost`,className:`m-2 min-h-11`,onClick:()=>i(!r),children:r?`Show fewer`:`Show all ${a.length} enabled`}),!c&&(0,I.jsxs)(`details`,{className:`border-t px-4 py-2 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`summary`,{className:`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden min-h-11`,"data-export-heading":`Project automations`,children:[(0,I.jsx)(B,{}),`Manage automations by project`]}),t.data?.map(e=>(0,I.jsx)(E,{className:`block min-h-11 py-3 hover:underline`,to:`/p/${encodeURIComponent(e.id)}/automations`,children:e.name},e.id))]})]})]})}function ct(e,t,n){let r=new Set,i=new Map(e.map((e,t)=>[n(e),{r:e,i:t}]));return t.forEach((e,t)=>{let a=i.get(n(e));(!a||a.i!==t||JSON.stringify(a.r)!==JSON.stringify(e))&&r.add(n(e)),i.delete(n(e))}),i.forEach((e,t)=>r.add(t)),r}function lt(e,t,n){let r=new Map(t.map(e=>[n(e),e]));return e.map(e=>({row:r.get(n(e))??e,removed:!r.has(n(e))}))}var ut=(0,F.createContext)(``),dt=(0,F.createContext)(!0),H=new Map;function ft(e,t,n=``,r=0,i){let a=(0,F.useContext)(ut),o=`${a}:${n}`,[s,c]=(0,F.useState)(()=>H.get(o)),[l,u]=(0,F.useState)(o),d=(0,F.useRef)(r),f=(0,F.useRef)(!1);l!==o&&(u(o),c(H.get(o)),d.current=r,f.current=!1),d.current!==r&&(d.current=r,f.current=!0),(0,F.useEffect)(()=>{e&&(!s||f.current)&&(c(e),f.current=!1)},[s,e]);let p=(0,F.useMemo)(()=>({current:s}),[o]);p.current=s,(0,F.useEffect)(()=>()=>{!a||!p.current||(H.delete(o),H.set(o,p.current),H.size>60&&H.delete(H.keys().next().value))},[a,o,p]);let m=s??e??[],h=new Set((e??m).map(t)),g=i?m.filter(e=>h.has(t(e))||i(e)):m;return{rows:lt(g,e??m,t),updates:e?ct(g,e,t).size:0,show:()=>c(e)}}var pt=new Map;function mt(e){return pt.get(e)}function ht(e,t){pt.delete(e),pt.set(e,t),pt.size>20&&pt.delete(pt.keys().next().value)}var U=new Map;function gt(e,t){return U.get(e)?.[t]}function _t(e,t,n){let r=U.get(e)??{};r[t]=n,U.delete(e),U.set(e,r),U.size>20&&U.delete(U.keys().next().value)}var W=e=>`${e.projectId}:${e.id}`;function vt({row:e,removed:t=!1,queue:n=!1,checking:r=!1,checkFailed:a=!1,kicker:s}){let c=(0,F.useContext)(dt)&&!r&&!a,l=ce(e);t=t||l===null||n&&l?.archived===!0,l&&(e={...e,status:l.status,awaitingAnswerSince:l.awaitingAnswerSince,idleClosedAt:l.idleClosedAt});let u=i(e),d=n&&!p(e),f=t||d||!c;return(0,I.jsxs)(`div`,{"data-dashboard-row":W(e),className:`min-w-0 border-b px-4 py-3 transition-colors last:border-0 hover:bg-muted/30`,children:[(0,I.jsx)(L,{rows:[{section:`task`,entity:W(e),metric:`title`,value:e.titleSummary||e.title},{section:`task`,entity:W(e),metric:`status`,value:f?`Not currently actionable`:e.status},{section:`task`,entity:W(e),metric:`createdAt`,value:e.createdAt}]}),s&&(0,I.jsx)(`p`,{className:`mb-1 pl-[15px] eyebrow text-soft-foreground`,children:s}),(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(N,{tone:u.tone,className:`mt-[7px]`}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(E,{tabIndex:f?-1:void 0,"aria-disabled":f||void 0,onClick:e=>{f&&e.preventDefault()},to:`/p/${encodeURIComponent(e.projectId)}/tasks/${encodeURIComponent(e.id)}`,className:`block break-words text-sm font-medium leading-relaxed hover:underline no-hover:min-h-11`,children:e.titleSummary||e.title}),(0,I.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground`,children:[(0,I.jsx)(`span`,{className:`font-mono text-meta text-soft-foreground`,children:e.projectId}),(0,I.jsx)(`span`,{children:a?`Could not check current state`:c?t?n&&l!==null?`No longer needs you`:`Task removed`:d?`No longer needs you`:u.label:`Checking current state…`}),(0,I.jsx)(`span`,{children:P(e.createdAt)}),e.dispatch&&(0,I.jsx)(`span`,{children:`Subtask`}),!f&&o(e).map(t=>(0,I.jsx)(Se,{reference:t,taskTitle:e.title,projectId:e.projectId,className:`no-hover:min-h-11`},`${t.kind}:${t.number}`))]})]})]})]})}function G({coverage:e,count:t,retry:n}){let r=e.projects.filter(e=>e.state!==`complete`);return r.length?(0,I.jsxs)(`div`,{className:`rounded-lg border border-pending/40 bg-card-2 p-3 text-sm`,role:`status`,children:[(0,I.jsxs)(`p`,{children:[t===void 0?``:`${t} tasks need you in the available data. Complete coverage: ${e.projects.length-r.length} of ${e.projects.length} projects. `,r.length===1?r[0].state===`unavailable`?`One project is unavailable.`:`One project has incomplete coverage.`:`${r.length} projects have incomplete coverage.`]}),(0,I.jsxs)(`details`,{className:`mt-2`,children:[(0,I.jsxs)(`summary`,{className:`${tt} min-h-11`,children:[(0,I.jsx)(B,{}),`View unavailable `,r.length===1?`project`:`projects`]}),r.map(e=>(0,I.jsxs)(`p`,{children:[e.projectId,`: `,e.reason??e.state,e.omittedRuns>0?` · ${e.omittedRuns} omitted tasks`:``]},e.projectId))]}),(0,I.jsx)(j,{variant:`outline`,onClick:n,className:`min-h-11`,children:`Retry`})]}):null}function yt(e,t=!1){return e==null?`Unavailable`:t?`$${e.toFixed(e===0||e>=1?2:Math.min(20,Math.max(4,Math.ceil(-Math.log10(e))+1)))}`:e.toLocaleString(`en-US`)}function K(e){return e===null?`Unavailable`:e<1?`${Math.round(e*60)}m`:e<48?`${e.toFixed(1)}h`:`${(e/24).toFixed(1)}d`}function bt(e,t,n){let r=ee(),i=r.state?.dashboardEntry??r.key,[a,o]=te(),s=a.get(e);return[s!==null&&t.includes(s)?s:n,t=>o(n=>{let r=new URLSearchParams(n);return r.set(e,t),r},{replace:!0,state:{...r.state,dashboardEntry:i}})]}var xt=e=>`Last ${e===`7d`?7:30} calendar days`,St=`eyebrow text-muted-foreground`,Ct=`min-w-0 rounded-lg border bg-card-2 p-4`,q=`whitespace-nowrap px-3 py-2 eyebrow text-soft-foreground`;function wt(){let e=r().data?.projects;return t=>e?.find(e=>e.id===t)?.name??t}var Tt=(e,t)=>`/p/${encodeURIComponent(e)}/tasks/${encodeURIComponent(t)}`;function Et({label:e,value:t,onChange:n}){return(0,I.jsxs)(`label`,{className:nt,children:[e,(0,I.jsxs)(rt,{value:t,onChange:e=>n(e.target.value===`30d`?`30d`:`7d`),children:[(0,I.jsx)(`option`,{value:`7d`,children:`Last 7 days`}),(0,I.jsx)(`option`,{value:`30d`,children:`Last 30 days`})]})]})}function Dt({query:e}){return e.isPending?(0,I.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:`Loading insights…`}):e.isError?(0,I.jsxs)(`p`,{role:`alert`,className:`text-sm`,children:[e.data?`Showing previous results. `:``,`Could not refresh insights.`,` `,(0,I.jsx)(j,{variant:`outline`,onClick:()=>void e.refetch(),children:`Retry insights`})]}):null}function Ot({period:e,active:t}){let n=Ge(e,t),r=n.data;return(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(Dt,{query:n}),r&&(0,I.jsx)(G,{coverage:r.coverage,retry:()=>void n.refetch()}),r&&(0,I.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,I.jsx)(At,{data:r}),(0,I.jsx)(jt,{data:r})]})]})}function kt({value:e,prefix:t=``,className:n}){let r=`${t}${e.toLocaleString(`en-US`)}`;return e<1e4?(0,I.jsx)(`span`,{className:n,children:r}):(0,I.jsxs)(`span`,{className:n,title:r,children:[t,Be(e)]})}function At({data:e}){let t=e.delivered,n=[{label:`PRs opened`,value:t.prsOpened,note:`${t.prsTouched} touched`},{label:`Lines`,value:(0,I.jsxs)(`span`,{className:`flex flex-wrap gap-x-1.5`,children:[(0,I.jsx)(kt,{value:t.additions,prefix:`+`,className:`text-success`}),(0,I.jsx)(kt,{value:t.deletions,prefix:`−`,className:`text-danger`})]})},{label:`Files`,value:(0,I.jsx)(kt,{value:t.files})},{label:`Issues`,value:(0,I.jsx)(kt,{value:t.issues})}];return(0,I.jsxs)(`section`,{className:Ct,"aria-label":`Delivered`,children:[(0,I.jsx)(L,{rows:Object.entries(t).map(([t,n])=>({section:`delivered`,metric:t,value:n,unit:[`additions`,`deletions`].includes(t)?`lines`:t===`files`?`files`:`count`,asOf:e.asOf,note:`Completed since ${e.windowStart}`}))}),(0,I.jsx)(`h3`,{className:St,children:`Delivered`}),(0,I.jsx)(`dl`,{className:`mt-3 grid grid-cols-2 gap-x-4 gap-y-3 sm:grid-cols-4`,children:n.map(e=>(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`dt`,{className:`text-xs text-soft-foreground`,children:e.label}),(0,I.jsx)(`dd`,{className:`mt-1 truncate text-xl font-semibold tracking-tight tabular-nums`,children:e.value}),e.note&&(0,I.jsx)(`dd`,{className:`text-xs text-soft-foreground`,children:e.note})]},e.label))}),(0,I.jsxs)(`span`,{className:`mt-3 block text-xs text-soft-foreground`,children:[`From `,t.completedTasks,` completed `,t.completedTasks===1?`task`:`tasks`,` ·`,` `,t.measuredTasks,` with a stored diff`]})]})}function jt({data:e}){let t=wt(),{total:n,reasons:r}=e.failures;return(0,I.jsxs)(`section`,{className:Ct,"aria-label":`Why tasks failed`,children:[(0,I.jsx)(L,{rows:r.map(t=>({section:`failures`,entity:t.label,metric:t.category,value:t.count,unit:`tasks`,asOf:e.asOf,note:t.latest.message}))}),(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,I.jsx)(`h3`,{className:St,children:`Why tasks failed`}),n>0&&(0,I.jsxs)(`span`,{className:`font-mono text-meta text-soft-foreground`,children:[n,` failed`]})]}),n===0?(0,I.jsxs)(`span`,{className:`mt-4 flex items-center gap-2.5 text-sm text-muted-foreground`,children:[(0,I.jsx)(N,{tone:`success`}),`No failed outcomes in this period`]}):(0,I.jsx)(`ul`,{className:`mt-3 space-y-3`,children:r.map(e=>(0,I.jsx)(Mt,{reason:e,total:n,projectName:t},`${e.category}:${e.label}`))})]})}function Mt({reason:e,total:t,projectName:n}){let{latest:r}=e;return(0,I.jsxs)(`li`,{className:`min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-sm`,children:[(0,I.jsx)(`span`,{className:`min-w-0 truncate font-medium`,title:e.label,children:e.label}),(0,I.jsx)(`span`,{className:`font-mono text-xs tabular-nums text-muted-foreground`,children:e.count})]}),(0,I.jsx)(`div`,{className:`mt-1.5 h-1 overflow-hidden rounded-full bg-muted`,"aria-hidden":`true`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full bg-danger/70`,style:{width:`${e.count/t*100}%`}})}),(0,I.jsxs)(`span`,{className:`mt-1.5 block truncate text-xs text-soft-foreground`,title:r.message,children:[`Latest:`,` `,(0,I.jsx)(E,{className:`text-muted-foreground hover:text-foreground hover:underline`,to:Tt(r.projectId,r.id),children:r.title}),` `,`· `,n(r.projectId),r.step?` · ${r.step}`:``,` · `,P(r.at),` ago`]})]})}var Nt={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,cursor:`Cursor`,pi:`Pi`,unknown:`Unknown backend`,mixed:`Mixed backends`},Pt=e=>Nt[e]??e,Ft=(e,t)=>t?Math.round(e/t*100):0;function It(){let[e,t]=bt(`backends`,[`7d`,`30d`],`7d`),n=Ge(e),r=n.data,i=r?.visibility.cost;return(0,I.jsx)(`section`,{"data-dashboard-module":`backends`,className:`min-w-0`,children:(0,I.jsxs)(M,{className:`gap-0 py-0`,"data-export-context":`Backends: ${xt(e)}; finished tasks`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsx)(`h2`,{className:R,children:`Backends & models`}),(0,I.jsx)(Et,{label:`Finished`,value:e,onChange:t})]}),(0,I.jsxs)(`div`,{className:`space-y-3 p-4`,children:[(0,I.jsx)(Dt,{query:n}),r&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Tasks that finished done or failed in the period, by the backend and model their steps ran on. Includes subtasks. Cost is reported USD only.`}),(0,I.jsx)(G,{coverage:r.coverage,retry:()=>void n.refetch()}),r.backends.length?(0,I.jsx)(`div`,{className:`overflow-x-auto`,role:`region`,"aria-label":`Backend comparison`,tabIndex:0,children:(0,I.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{className:q,children:`Backend`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Finished`}),(0,I.jsx)(`th`,{className:q,children:`Success`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Median cycle`}),i&&(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Reported USD`}),i&&(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Per completed`})]})}),(0,I.jsx)(`tbody`,{children:r.backends.map(e=>(0,I.jsx)(Lt,{stat:e,cost:!!i},`${e.backend}:${e.model??``}`))})]})}):(0,I.jsx)(`p`,{className:`py-4 text-sm text-muted-foreground`,children:`No finished tasks in this period.`}),(0,I.jsx)(`span`,{className:`block font-mono text-meta text-soft-foreground`,children:(0,I.jsx)(ot,{at:r.asOf})}),(0,I.jsx)(L,{rows:r.backends.flatMap(e=>[`finished`,`done`,`failed`,`medianCycleHours`].map(t=>({section:`backends`,entity:`${e.backend}${e.model?`:${e.model}`:``}`,metric:t,value:e[t],unit:t===`medianCycleHours`?`hours`:`tasks`,asOf:r.asOf})))})]})]})]})})}function Lt({stat:e,cost:t}){let n=Ft(e.done,e.finished),r=e.costUsd?.value;return(0,I.jsxs)(`tr`,{className:`border-t transition-colors hover:bg-muted/30`,children:[(0,I.jsxs)(`td`,{className:`px-3 py-2.5`,children:[(0,I.jsx)(`span`,{className:`block font-medium`,children:Pt(e.backend)}),(0,I.jsx)(`span`,{className:`block font-mono text-meta text-soft-foreground`,children:e.backend===`mixed`?`steps ran on different backends`:e.model??`default model`})]}),(0,I.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums`,children:e.finished}),(0,I.jsxs)(`td`,{className:`min-w-40 px-3 py-2.5`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`h-1.5 flex-1 overflow-hidden rounded-full bg-danger/40`,"aria-hidden":`true`,children:(0,I.jsx)(`span`,{className:`block h-full rounded-full bg-success`,style:{width:`${n}%`}})}),(0,I.jsxs)(`span`,{className:`w-10 text-right font-mono text-xs tabular-nums`,children:[n,`%`]})]}),(0,I.jsxs)(`span`,{className:`block text-xs text-soft-foreground`,children:[e.done,` done · `,e.failed,` failed`]})]}),(0,I.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums`,children:e.timedTasks?K(e.medianCycleHours):`—`}),t&&(0,I.jsxs)(`td`,{className:`px-3 py-2.5 text-right tabular-nums`,children:[r==null?`—`:yt(r,!0),(0,I.jsxs)(`span`,{className:`block text-xs text-soft-foreground`,children:[e.costUsd?.reportedTasks??0,`/`,e.finished,` reported`]})]}),t&&(0,I.jsx)(`td`,{className:`px-3 py-2.5 text-right tabular-nums`,children:r==null||!e.done?`—`:yt(r/e.done,!0)})]})}function Rt(){let[e,t]=bt(`automations`,[`7d`,`30d`],`7d`),n=He(),r=Ge(e),i=et(n.known&&!n.off),a=wt(),o=r.data,s=o?.visibility.cost,c=new Map;for(let e of i.data??[])for(let t of e.data?.automations??[])c.set(`${e.id}\u0000${t.id}`,{projectId:e.id,automationId:t.id,name:t.name,enabled:t.enabled,definition:`known`});let l=new Set((i.data??[]).flatMap(e=>e.data&&!e.error?[e.id]:[])),u=i.isError||i.registry.isError||(i.data??[]).some(e=>e.error);for(let e of o?.automations??[]){let t=`${e.projectId}\u0000${e.automationId}`,n=c.get(t);c.set(t,n?{...n,stat:e}:{...e,name:e.automationId,definition:l.has(e.projectId)?`removed`:`unknown`,stat:e})}let d=[...c.values()].sort((e,t)=>(t.stat?.tasks??0)-(e.stat?.tasks??0)||Number(t.enabled??!1)-Number(e.enabled??!1)||e.name.localeCompare(t.name));return(0,I.jsx)(`section`,{"data-dashboard-module":`automation-outcomes`,className:`min-w-0`,children:(0,I.jsxs)(M,{className:`gap-0 py-0`,"data-export-context":`Automation outcomes: tasks created in ${xt(e)}`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsx)(`h2`,{className:R,children:`Automation outcomes`}),(0,I.jsx)(Et,{label:`Launched`,value:e,onChange:t})]}),(0,I.jsx)(`div`,{className:`space-y-3 p-4`,children:n.off?(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Automations are disabled in this workspace.`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Dt,{query:r}),o&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Tasks each automation created in the period and how they ended. Active means still running, queued, waiting on you, or waiting to resume after a usage limit.`}),(0,I.jsx)(G,{coverage:o.coverage,retry:()=>void r.refetch()}),u&&(0,I.jsxs)(`p`,{role:`alert`,className:`text-sm`,children:[`Some automation details could not be loaded. Their outcomes are shown by id.`,` `,(0,I.jsx)(j,{variant:`ghost`,onClick:i.retry,children:`Retry automations`})]}),d.length?(0,I.jsx)(`div`,{className:`overflow-x-auto`,role:`region`,"aria-label":`Automation outcomes`,tabIndex:0,children:(0,I.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{className:q,children:`Automation`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Tasks`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Done`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Failed`}),(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Active`}),(0,I.jsx)(`th`,{className:q,children:`Last run`}),s&&(0,I.jsx)(`th`,{className:`${q} text-right`,children:`Reported USD`})]})}),(0,I.jsx)(`tbody`,{children:d.map(e=>(0,I.jsx)(zt,{row:e,cost:!!s,projectName:a},`${e.projectId}:${e.automationId}`))})]})}):(0,I.jsx)(`p`,{className:`py-4 text-sm text-muted-foreground`,children:`No automations yet. Create one in a project's Automations page.`}),(0,I.jsx)(`span`,{className:`block font-mono text-meta text-soft-foreground`,children:(0,I.jsx)(ot,{at:o.asOf})}),(0,I.jsx)(L,{rows:d.flatMap(e=>[`tasks`,`done`,`failed`,`active`].map(t=>({section:`automation-outcomes`,entity:`${e.projectId}:${e.automationId}`,metric:t,value:e.stat?.[t]??0,unit:`tasks`,asOf:o.asOf,note:e.name})))})]})]})})]})})}function zt({row:e,cost:t,projectName:n}){let r=e.stat,i=`px-3 py-2.5 text-right tabular-nums`,a=e=>e||(0,I.jsx)(`span`,{className:`text-soft-foreground`,children:`0`});return(0,I.jsxs)(`tr`,{className:`border-t transition-colors hover:bg-muted/30`,children:[(0,I.jsxs)(`td`,{className:`px-3 py-2.5`,children:[e.definition===`removed`?(0,I.jsx)(`span`,{className:`block font-medium`,children:e.name}):(0,I.jsx)(E,{className:`block font-medium hover:underline`,to:`/p/${encodeURIComponent(e.projectId)}/automations/${encodeURIComponent(e.automationId)}`,children:e.name}),(0,I.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-soft-foreground`,children:[(0,I.jsx)(N,{tone:e.enabled?`success`:`neutral`}),n(e.projectId),` ·`,` `,e.definition===`removed`?`Removed`:e.definition===`unknown`?`Details unavailable`:e.enabled?`Enabled`:`Disabled`]})]}),(0,I.jsx)(`td`,{className:i,children:a(r?.tasks)}),(0,I.jsx)(`td`,{className:i,children:a(r?.done)}),(0,I.jsx)(`td`,{className:`${i} ${r?.failed?`text-danger`:``}`,children:a(r?.failed)}),(0,I.jsx)(`td`,{className:i,children:a(r?.active)}),(0,I.jsx)(`td`,{className:`whitespace-nowrap px-3 py-2.5 text-xs text-muted-foreground`,children:r?.lastRunAt?(0,I.jsxs)(`time`,{dateTime:r.lastRunAt,title:new Date(r.lastRunAt).toLocaleString(),children:[P(r.lastRunAt),` ago · `,r.lastStatus]}):`—`}),t&&(0,I.jsx)(`td`,{className:i,children:r?.costUsd?.value==null?`—`:yt(r.costUsd.value,!0)})]})}var Bt=0,Vt=()=>++Bt,J=new Map;function Y(e,t){let n=(0,F.useContext)(ut),r=()=>{let r=n?J.get(n):void 0;return r?.has(e)?r.get(e):typeof t==`function`?t():t},[i,a]=(0,F.useState)(r),o=`${n}:${e}`,[s,c]=(0,F.useState)(o);o!==s&&(c(o),a(()=>r()));let l=(0,F.useMemo)(()=>({value:i}),[n,e]);return l.value=i,(0,F.useEffect)(()=>()=>{if(!n)return;let t=J.get(n)??new Map;t.set(e,l.value),t.size>80&&t.delete(t.keys().next().value),J.delete(n),J.set(n,t),J.size>20&&J.delete(J.keys().next().value)},[n,e,l]),[i,a]}var Ht=`a[href], button, select, input, [tabindex]`;function Ut(e){let[t]=Y(`${e}:position`,()=>({scroll:0})),n=(0,F.useCallback)(e=>{let n=[...e.querySelectorAll(Ht)],r=t.href?n.find(e=>e.getAttribute(`href`)===t.href):t.index===void 0?void 0:n[t.index];return r&&r.getAttribute(`aria-disabled`)!==`true`&&r.focus({preventScroll:!0}),e.scrollTop=t.scroll,!!r&&r.getAttribute(`aria-disabled`)!==`true`},[t]),r=(0,F.useMemo)(()=>({restore:()=>!1}),[t]);return{ref:(0,F.useCallback)(e=>{if(!e)return;let i=t.href!==void 0||t.index!==void 0,a=()=>{if(!i)return!1;let r=n(e);return r?(i=!1,o.disconnect()):e.querySelector(`[data-sheet-loading="false"]`)&&(i=!1,o.disconnect(),e.querySelector(`button:not([disabled]), select, [tabindex="0"]`)?.focus({preventScroll:!0}),e.scrollTop=t.scroll),r};r.restore=a;let o=new MutationObserver(a);i&&o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-sheet-loading`]});let s=()=>{i=!1,o.disconnect()},c=()=>{i||(t.scroll=e.scrollTop)},l=n=>{i||!(n.target instanceof HTMLElement)||(t.href=n.target.getAttribute(`href`)??void 0,t.index=[...e.querySelectorAll(Ht)].indexOf(n.target))};return e.addEventListener(`pointerdown`,s),e.addEventListener(`keydown`,s),e.addEventListener(`wheel`,s,{passive:!0}),e.addEventListener(`scroll`,c),e.addEventListener(`focusin`,l),()=>{o.disconnect(),e.removeEventListener(`pointerdown`,s),e.removeEventListener(`keydown`,s),e.removeEventListener(`wheel`,s),e.removeEventListener(`scroll`,c),e.removeEventListener(`focusin`,l)}},[t,n,r]),onOpenAutoFocus:e=>{(t.href!==void 0||t.index!==void 0)&&(e.preventDefault(),r.restore())}}}function Wt(e,t){let n=(0,F.useRef)(null),[r,i]=Y(`${e}:trigger`,null);return{capture:()=>{let e=document.activeElement;n.current=e instanceof HTMLElement&&e!==document.body?e:null,i(n.current?{label:n.current.getAttribute(`aria-label`),text:n.current.textContent}:null)},restore:()=>{((n.current?.isConnected?n.current:r?[...document.querySelectorAll(`button`)].find(e=>!e.closest(`[role="dialog"]`)&&!e.hasAttribute(`disabled`)&&(r.label?e.getAttribute(`aria-label`)===r.label:e.textContent===r.text)):void 0)??document.querySelector(t))?.focus({preventScroll:!0})}}}function Gt(e,t=!0){return u({queryKey:[...m.dashboard,`overview`,e],enabled:t,staleTime:5e3,refetchInterval:t&&!e.snapshotId?15e3:!1,refetchIntervalInBackground:!1,retry:!1,queryFn:async({signal:t})=>b.parse(await c(await l.api.v1.workspace.dashboard.overview.$get({query:{period:e.period??`7d`,group:e.group??`completed`,tzOffsetMinutes:String(e.tzOffsetMinutes??new Date().getTimezoneOffset()),...e.snapshotId?{snapshotId:e.snapshotId}:{},...e.projectId?{projectId:e.projectId}:{},offset:String(e.offset??0),limit:`20`}},{init:{signal:t}}),`/workspace/dashboard/overview`))})}var Kt={running:`Running now`,"needs-you":`Needs you`,completed:`Completed`,failed:`Failed outcomes`},qt={"needs-you":V.violet,running:V.info,completed:V.success,failed:V.danger},Jt={"needs-you":Ee,running:Je,completed:Ke,failed:Ae};function Yt({active:e,children:t,onCurrent:n}){let[i,a]=bt(`period`,[`7d`,`30d`],`7d`),o=Wt(`outcome`,`[data-outcome-trigger]`),s=r().data?.projects,c=e=>s?.find(t=>t.id===e)?.name??e,l=Gt({period:i},e),[u,d]=Y(`outcome:selection`,null),f=Ut(`outcome:${u?.identity??`closed`}`),p=re();if((0,F.useEffect)(()=>{e||d(null)},[e]),!e)return t({});let m=l.data,h=(e,t)=>{o.capture(),m&&d({identity:Vt(),snapshot:m,group:e,projectId:t})},g=m?.coverage.projects.every(e=>e.state===`complete`);return(0,I.jsxs)(I.Fragment,{children:[t({overview:(0,I.jsxs)(M,{className:`gap-0 py-0`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsx)(`h2`,{className:R,children:`Workspace overview`}),(0,I.jsxs)(`label`,{className:nt,children:[`Outcomes period`,(0,I.jsxs)(rt,{value:i,onChange:e=>{a(e.target.value===`30d`?`30d`:`7d`),d(null)},children:[(0,I.jsx)(`option`,{value:`7d`,children:`Last 7 days`}),(0,I.jsx)(`option`,{value:`30d`,children:`Last 30 days`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4 p-4`,children:[l.isPending&&(0,I.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:`Loading overview…`}),l.isError&&(0,I.jsxs)(`p`,{role:`alert`,children:[m?`Showing previous results. `:``,`Could not refresh overview.`,` `,(0,I.jsx)(j,{variant:`outline`,onClick:()=>void l.refetch(),children:`Retry overview`})]}),m&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[m.metrics.needsYou?`${m.metrics.needsYou} tasks require your input or review.`:g&&p.connected&&!l.isError?`No tasks currently require your input or review.`:`No waiting tasks found in the available data.`,` `,m.metrics.failed,` failed `,m.metrics.failed===1?`outcome`:`outcomes`,` `,`in this period. Includes subtasks; completed does not mean accepted or deployed.`]}),(0,I.jsx)(G,{coverage:m.coverage,retry:()=>void l.refetch()}),(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[`needs-you`,`running`,`completed`,`failed`].map(e=>{let t=m.metrics[e===`needs-you`?`needsYou`:e],r=Jt[e];return(0,I.jsxs)(j,{"data-outcome-trigger":!0,"data-export-keep":!0,variant:`outline`,className:`relative min-w-0 overflow-hidden rounded-lg border bg-card-2 p-4 transition-colors before:absolute before:inset-x-0 before:top-0 before:h-px before:opacity-80 hover:border-foreground/20 hover:bg-muted/40 sm:p-5 group/metric h-auto min-h-24 flex-col items-start gap-0 whitespace-normal text-left font-normal ${t===0?V.neutral:qt[e]}`,onClick:t=>{n&&(e===`running`||e===`needs-you`)?n(e,t.currentTarget):h(e)},"aria-label":`${Kt[e]}: ${t}`,children:[(0,I.jsx)(at,{label:Kt[e],value:t,icon:(0,I.jsx)(r,{className:`size-4`}),children:e===`running`||e===`needs-you`?`Current state`:`Last ${i===`7d`?7:30} calendar days`}),(0,I.jsxs)(`span`,{"data-export-exclude":!0,className:`mt-4 flex items-center gap-1 text-xs font-medium text-muted-foreground transition-colors group-hover/metric:text-foreground`,children:[`View tasks`,` `,(0,I.jsx)(ke,{className:`size-3 transition-transform group-hover/metric:translate-x-0.5 motion-reduce:transition-none`,"aria-hidden":`true`})]})]},e)})}),(0,I.jsx)(Ot,{period:i,active:e}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-1 border-t pt-3`,children:[(0,I.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Median cycle time`,` `,(0,I.jsx)(`strong`,{className:`font-mono font-semibold text-foreground`,children:K(m.metrics.medianCycleHours)}),` `,`· `,m.metrics.timedTasks,`/`,m.metrics.completed,` completed tasks have valid timings.`,` `,(0,I.jsx)(j,{variant:`ghost`,className:`h-auto px-1.5 py-1 text-sm text-foreground underline-offset-4 hover:underline`,onClick:()=>h(`completed`),children:`Inspect completed tasks`})]}),(0,I.jsx)(`p`,{className:`font-mono text-meta text-soft-foreground`,children:(0,I.jsxs)(`time`,{dateTime:m.asOf,title:new Date(m.asOf).toLocaleString(),children:[`Updated `,P(m.asOf),` ago`]})})]}),(0,I.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,I.jsxs)(`summary`,{"data-export-heading":`Metric definitions`,className:`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden py-1`,children:[(0,I.jsx)(B,{}),`How these metrics work`]}),(0,I.jsx)(`p`,{className:`mt-1 max-w-prose pl-5 leading-relaxed`,children:`Outcomes use finish dates, including archived tasks. Scheduled retries are excluded from failed outcomes. Period includes today at your current fixed UTC offset.`})]}),(0,I.jsx)(L,{rows:Object.entries(m.metrics).map(([e,t])=>({section:`overview`,metric:e,value:t,unit:e===`medianCycleHours`?`hours`:`tasks`,asOf:m.asOf,note:e===`running`||e===`needsYou`?`Current non-archived state`:`Finished since ${m.windowStart}`}))})]})]})]}),portfolio:m&&(0,I.jsx)(`div`,{children:(0,I.jsxs)(M,{className:`gap-0 py-0`,"data-export-context":`Outcomes: Last ${i===`7d`?7:30} calendar days; workload: current state`,children:[(0,I.jsx)(`div`,{className:`flex min-h-12 flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b px-4 py-2.5`,children:(0,I.jsx)(`h2`,{className:`section-mark eyebrow text-muted-foreground`,children:`Projects`})}),(0,I.jsx)(`p`,{className:`px-4 pt-3 text-xs text-muted-foreground`,children:`Current workload and outcomes for the selected period. Sorted by tasks needing you, then running tasks. Counts include subtasks.`}),(0,I.jsxs)(`div`,{className:`overflow-x-auto px-1 pb-2`,role:`region`,"aria-label":`Project outcomes`,tabIndex:0,children:[(0,I.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsx)(`tr`,{children:[`Project`,`Needs you`,`Running`,`Completed`,`Failed`,`Median cycle`].map(e=>(0,I.jsx)(`th`,{className:`whitespace-nowrap px-3 py-2 eyebrow text-soft-foreground ${e===`Project`?``:`text-right`}`,children:e},e))})}),(0,I.jsx)(`tbody`,{children:m.projects.map(e=>{let t=m.coverage.projects.find(t=>t.projectId===e.projectId);return(0,I.jsxs)(`tr`,{className:`border-t transition-colors hover:bg-muted/30`,children:[(0,I.jsxs)(`td`,{className:`px-3 py-2`,children:[(0,I.jsx)(E,{className:`font-medium hover:underline`,to:`/p/${encodeURIComponent(e.projectId)}`,children:c(e.projectId)}),t?.state!==`complete`&&(0,I.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:`Incomplete data`})]}),[`needs-you`,`running`,`completed`,`failed`].map(n=>(0,I.jsx)(`td`,{className:`px-3 py-1 text-right`,children:(0,I.jsx)(j,{"data-export-keep":!0,variant:`ghost`,className:`min-h-11 tabular-nums`,"aria-label":`${c(e.projectId)}: ${Kt[n]}: ${t?.state===`unavailable`?`Unavailable`:e[n===`needs-you`?`needsYou`:n]}`,disabled:t?.state===`unavailable`,onClick:()=>h(n,e.projectId),children:t?.state===`unavailable`?`Unavailable`:e[n===`needs-you`?`needsYou`:n]})},n)),(0,I.jsxs)(`td`,{className:`px-3 py-2 text-right tabular-nums`,children:[K(e.medianCycleHours),(0,I.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[e.timedTasks,`/`,e.completed,` timed`]})]})]},e.projectId)})})]}),!m.projects.length&&(0,I.jsx)(`p`,{className:`py-4`,children:`No projects to compare yet.`})]}),(0,I.jsx)(L,{rows:m.projects.flatMap(({projectId:e,...t})=>Object.entries(t).map(([t,n])=>({section:`portfolio`,entity:e,metric:t,value:m.coverage.projects.find(t=>t.projectId===e)?.state===`unavailable`?null:n,unit:t===`medianCycleHours`?`hours`:`tasks`,asOf:m.asOf,note:`Outcomes since ${m.windowStart}; running and needsYou are current state`})))})]})})}),(0,I.jsx)(be,{open:!!u,onOpenChange:e=>{e||d(null)},children:(0,I.jsxs)(ye,{...f,className:`w-full overflow-y-auto sm:max-w-xl`,onCloseAutoFocus:e=>{e.preventDefault(),o.restore()},children:[(0,I.jsxs)(ge,{children:[(0,I.jsxs)(ve,{children:[u?Kt[u.group]:`Tasks`,u?.projectId?` · ${u.projectId}`:``]}),(0,I.jsx)(_e,{children:`Tasks behind the selected metric. Includes subtasks. Snapshot keeps counts and rows consistent.`})]}),u&&(0,I.jsx)(Xt,{selection:u,projectName:c,refresh:()=>{d(null),l.refetch()}},u.identity)]})})]})}function Xt({selection:e,refresh:t,projectName:n}){let[r,i]=Y(`outcome:${e.identity}:offset`,0),a=Gt({period:e.snapshot.period,snapshotId:e.snapshot.snapshotId,group:e.group,projectId:e.projectId,offset:r}),o=(0,F.useRef)(null),s=(0,F.useRef)(null);(0,F.useEffect)(()=>{a.data&&s.current===r&&(o.current?.focus(),s.current=null)},[a.data,r]);let c=e=>{s.current=e,i(e)};return(0,I.jsxs)(`div`,{className:`space-y-3 p-4`,"data-sheet-loading":a.isFetching,children:[a.isPending&&(0,I.jsx)(`p`,{children:`Loading tasks…`}),a.isError&&(0,I.jsxs)(`p`,{role:`alert`,children:[`This snapshot may have expired or become unavailable.`,` `,(0,I.jsx)(j,{onClick:t,children:`Refresh overview`})]}),a.data&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{ref:o,tabIndex:-1,className:`text-xs text-muted-foreground`,children:[a.data.page.total,` tasks · Snapshot from`,` `,(0,I.jsxs)(`time`,{dateTime:a.data.asOf,title:new Date(a.data.asOf).toLocaleString(),children:[P(a.data.asOf),` ago`]})]}),a.data.page.rows.map(t=>(0,I.jsx)(Zt,{row:t,group:e.group,projectName:n},`${t.projectId}:${t.id}`)),!a.data.page.rows.length&&(0,I.jsx)(`p`,{children:`No tasks in this group.`})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(j,{variant:`outline`,disabled:!r||a.isFetching,onClick:()=>c(Math.max(0,r-20)),children:`Previous`}),(0,I.jsx)(j,{variant:`outline`,disabled:!a.data||a.data.page.nextOffset===null||a.isFetching,onClick:()=>c(a.data.page.nextOffset),children:`Next`})]})]})}function Zt({row:e,group:t,projectName:n}){let r=ce(e),a=t===`running`||t===`needs-you`;a&&r&&(e={...e,...r});let o=r===null,s=a&&(e.archived||(t===`running`?e.status!==`running`:!p(e))),c=o||s,l=i(e),u=a&&o?`Task removed`:s?t===`running`?`No longer running`:`No longer needs you`:l.label;return(0,I.jsxs)(`div`,{className:`border-b py-3`,children:[(0,I.jsx)(E,{"aria-disabled":c||void 0,tabIndex:c?-1:void 0,onClick:e=>{c&&e.preventDefault()},className:`block min-h-11 font-medium hover:underline`,to:`/p/${encodeURIComponent(e.projectId)}/tasks/${encodeURIComponent(e.id)}`,children:e.titleSummary||e.title}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,I.jsx)(N,{tone:l.tone}),` `,n(e.projectId),` ·`,` `,u,` · `,e.archived?`Archived · `:``,(0,I.jsxs)(`time`,{dateTime:e.finishedAt??e.createdAt,title:new Date(e.finishedAt??e.createdAt).toLocaleString(),children:[e.finishedAt?`Finished`:`Created`,` `,P(e.finishedAt??e.createdAt),` ago`]})]})]})}var X={snapshot:[...m.dashboard,`snapshot`],feed:e=>[...m.dashboard,`feed`,e],telemetry:[...m.dashboard,`telemetry`]},Qt=new Map;async function $t(e){let t=ne(),n=T.parse(await c(await l.api.v1.workspace.dashboard.$get({},{init:{signal:e}}),`/workspace/dashboard`));return Qt.has(n.snapshotId)||Qt.set(n.snapshotId,t),Qt.size>60&&Qt.delete(Qt.keys().next().value),D(t,[...n.questions.rows,...n.reviews.rows]),n}async function en(e,t,n=0,r=20,i){let a=v.parse(await c(await l.api.v1.workspace.dashboard.tasks.$get({query:{snapshotId:e,group:t,offset:String(n),limit:String(r)}},{init:{signal:i}}),`/workspace/dashboard/tasks`)),o=Qt.get(e);return o!==void 0&&D(o,a.page.rows),a}function tn(e){return u({queryKey:X.snapshot,queryFn:({signal:e})=>$t(e),enabled:e,staleTime:5e3,refetchOnMount:`always`,refetchInterval:e?15e3:!1,refetchIntervalInBackground:!1,retry:!1})}function nn(e){return u({queryKey:X.telemetry,enabled:e,staleTime:0,queryFn:async({signal:e})=>{let t=w.parse(await c(await l.api.v1.workspace.dashboard.telemetry.$get({},{init:{signal:e}}),`/workspace/dashboard/telemetry`));return O.seed(t.samples,t.asOf),t}})}function rn(e,t){let n=u({queryKey:X.feed(e),queryFn:async({signal:t})=>{let n=ne(),r=S.parse(await c(await l.api.v1.workspace.dashboard.feed.$get({query:{filter:e}},{init:{signal:t}}),`/workspace/dashboard/feed`));return D(n,r.rows.flatMap(e=>e.kind===`task-result`?[e.run]:[])),r},enabled:t,staleTime:15e3,refetchInterval:t&&e!==`github`?15e3:!1,retry:!1}),r=(0,F.useRef)(!1);return(0,F.useEffect)(()=>{r.current=!1},[e,t]),(0,F.useEffect)(()=>{if(!t||r.current||!n.data?.sources.some(e=>e.reason===`Still loading GitHub`))return;let e=setTimeout(()=>{document.visibilityState!==`hidden`&&(r.current=!0,n.refetch())},5e3);return()=>clearTimeout(e)},[t,n.data,n.refetch]),n}function an(e,t){let n=rn(`tasks`,t&&e!==`github`),r=rn(`github`,t&&e!==`tasks`),i=(0,F.useMemo)(()=>{if(e===`tasks`)return n.data;if(e===`github`)return r.data;let t=n.data,i=r.data;if(!t&&!i)return;let a=t??i,o=new Date(Math.max(Date.parse(t?.asOf??a.asOf),Date.parse(i?.asOf??a.asOf))).toISOString(),s=new Date(Date.parse(o)-10080*60*1e3).toISOString(),c=[...t?.rows??[],...i?.rows??[]].filter(e=>Date.parse(e.at)>=Date.parse(s)&&Date.parse(e.at)<=Date.parse(o)).sort((e,t)=>on(e,t)),l=new Set(c.slice(60).map(e=>e.kind===`task-result`?`tasks:${e.run.projectId}`:e.key.slice(0,e.key.lastIndexOf(`:`)))),u=[...t?.sources??[],...i?.sources??[]].map(e=>l.has(e.key)?{...e,truncated:!0}:e);return{...a,asOf:o,windowStart:s,filter:`all`,rows:c.slice(0,60),sources:u,coverage:t?.coverage??a.coverage,truncated:c.length>60||!!t?.truncated||!!i?.truncated}},[e,n.data,r.data]),a=e===`github`?r:n;return{...a,data:i,githubError:r.isError,githubFetching:r.isFetching,retryTasks:()=>n.refetch(),retryFailed:()=>e===`github`?r.refetch():e===`tasks`?n.refetch():Promise.all([...n.isError?[n.refetch()]:[],...r.isError?[r.refetch()]:[]]),isPending:!i&&a.isPending,isError:a.isError||e===`all`&&r.isError,isFetching:a.isFetching||e===`all`&&r.isFetching,refetch:()=>e===`tasks`?n.refetch():r.refetch()}}function on(e,t){return Date.parse(t.at)-Date.parse(e.at)||e.key.localeCompare(t.key)}var sn=[...m.dashboard,`costs`];function cn(){let e=0,t=0,n,r=new Set;return{subscribe:e=>(r.add(e),()=>{r.delete(e)}),getSnapshot:()=>n,async read(i,a){let o=++e,s=await pn(i,a);return!a?.aborted&&o>t&&(t=o,(n?.cost!==s.visibility.cost||n?.tokens!==s.visibility.tokens)&&(n=s.visibility,r.forEach(e=>e()))),s}}}var ln=new WeakMap;function un(e){let t=ln.get(e);return t||(t=cn(),ln.set(e,t)),t}function dn(){let e=un(_());return(0,F.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}var fn=new Map;async function pn(e,t){let n=ne(),r=y.parse(await c(await l.api.v1.workspace.dashboard.costs.$get({query:{...e,offset:String(e.offset??0),limit:`20`}},{init:{signal:t}}),`/workspace/dashboard/costs`));!e.snapshotId&&!fn.has(r.snapshotId)&&fn.set(r.snapshotId,n),fn.size>60&&fn.delete(fn.keys().next().value);let i=fn.get(r.snapshotId);return i!==void 0&&D(i,r.tasks.rows),r}function mn(e,t,n){let r=un(_());return u({queryKey:[...sn,e,t,n],queryFn:({signal:n})=>r.read({period:e,sort:t,tzOffsetMinutes:new Date().getTimezoneOffset()},n),staleTime:5e3,refetchOnMount:`always`,refetchInterval:15e3,refetchIntervalInBackground:!1,retry:!1})}function hn(e,t,n,r){let i=un(_());return u({queryKey:[...sn,`tasks`,e.snapshotId,t,n,r,e.visibility],retry:!1,queryFn:async({signal:a})=>{let o=e.tzOffsetMinutes??new Date().getTimezoneOffset(),s=async s=>{let c=await i.read({period:e.period,sort:n,snapshotId:s,projectId:t,tzOffsetMinutes:o},a),l=[...c.tasks.rows];for(;c.tasks.nextOffset!==null&&l.length<r;)c=await i.read({period:e.period,sort:n,snapshotId:c.snapshotId,projectId:t,offset:c.tasks.nextOffset},a),l.push(...c.tasks.rows);return{...c,tasks:{...c.tasks,rows:l}}};try{return await s(e.snapshotId)}catch(e){if(e instanceof h&&e.status===409)return s();throw e}}})}var gn={cost:{text:`text-primary`,fill:`bg-primary`,tint:V.primary,icon:qe},input:{text:`text-violet`,fill:`bg-violet`,tint:V.violet,icon:Ye},output:{text:`text-info`,fill:`bg-info`,tint:V.info,icon:Ce}};function _n({metric:e,label:t,value:n,reported:r,total:i}){let a=gn[e],o=a.icon,s=i?Math.min(100,r/i*100):0;return(0,I.jsxs)(`div`,{className:`${it} ${a.tint}`,children:[(0,I.jsxs)(at,{label:t,value:n,icon:(0,I.jsx)(o,{className:`size-4 ${a.text}`}),children:[r,` of `,i,` tasks report this metric`]}),(0,I.jsx)(`div`,{className:`mt-2 h-1.5 overflow-hidden rounded-full bg-muted`,"aria-hidden":`true`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full ${a.fill} transition-[width] duration-300 motion-reduce:transition-none`,style:{width:`${s}%`}})})]})}function vn({projects:e,currentProjects:t,metric:n,field:r,label:i,format:a,onSelect:o}){let s=e.reduce((e,t)=>Math.max(e,t[r]?.value??0),0),c=gn[n];return(0,I.jsxs)(Pe,{delayDuration:150,children:[(0,I.jsxs)(`div`,{className:`space-y-1 rounded-xl border p-2`,"aria-label":`Projects ranked by ${i}`,children:[e.length===0&&(0,I.jsx)(`p`,{className:`px-3 py-4 text-muted-foreground`,children:`No projects to compare in this cohort.`}),e.slice(0,5).map((e,n)=>{let l=e[r],u=l?.value,d=u==null||s===0?0:u/s*100,f=u!=null;return(0,I.jsxs)(Fe,{children:[(0,I.jsx)(Me,{asChild:!0,children:(0,I.jsxs)(`button`,{"data-export-row":!0,"data-export-keep":!0,className:`group w-full rounded-lg px-3 py-3 text-left transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 motion-reduce:transition-none`,disabled:!t.some(t=>t.projectId===e.projectId),onClick:()=>o(e.projectId),children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`span`,{className:`w-4 shrink-0 text-xs tabular-nums text-muted-foreground`,"aria-hidden":`true`,children:n+1}),(0,I.jsx)(`span`,{className:`min-w-0 flex-1 break-words font-medium`,children:e.projectId}),(0,I.jsx)(`span`,{className:`shrink-0 font-semibold tabular-nums`,children:a(u)}),(0,I.jsx)(ke,{"data-export-exclude":!0,className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`})]}),(0,I.jsx)(`div`,{className:`mt-2 ml-7 h-2 overflow-hidden rounded-full bg-muted`,"aria-hidden":`true`,children:(0,I.jsx)(`div`,{"data-project-bar":e.projectId,className:`h-full rounded-full ${c.fill} transition-[width] duration-300 motion-reduce:transition-none`,style:{width:`${d}%`}})}),(0,I.jsxs)(`p`,{className:`mt-1.5 ml-7 text-xs text-muted-foreground`,children:[l?.reportedTasks??0,` of `,e.tasks,` tasks report this metric`,f?``:` · No measured value`]})]})}),(0,I.jsxs)(Ne,{className:`max-w-64`,children:[(0,I.jsxs)(`p`,{className:`font-medium`,children:[e.projectId,` · `,i,`: `,a(u)]}),(0,I.jsxs)(`p`,{children:[l?.reportedTasks??0,` of `,e.tasks,` tasks report this metric.`]}),(0,I.jsx)(`p`,{children:`Open project tasks`})]})]},e.projectId)})]}),e.length>0&&(0,I.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[e.length>5?`Top 5 of ${e.length} projects. `:``,`Bar lengths compare reported values; the largest is the reference.`]})]})}var Z={cost:`costUsd`,input:`inputTokens`,output:`outputTokens`},yn={cost:`Reported USD`,input:`Input tokens`,output:`Output tokens`};function bn(e,t){return JSON.stringify([e.totals,e.projects,e.tasks,e.visibility,e.coverage,e.invalidDateTasks])!==JSON.stringify([t.totals,t.projects,t.tasks,t.visibility,t.coverage,t.invalidDateTasks])}var xn=(e,t)=>yt(e,t===`cost`);function Q(e){return[...e.cost?[`cost`]:[],...e.tokens?[`input`,`output`]:[]]}function Sn({value:e,onChange:t,visibility:n}){return(0,I.jsxs)(`label`,{className:nt,children:[`Sort by`,(0,I.jsx)(rt,{value:e,onChange:e=>t(e.target.value),children:Q(n).map(e=>(0,I.jsx)(`option`,{value:e,children:yn[e]},e))})]})}function Cn(){return(0,I.jsx)(wn,{visibility:Ve(a().data)})}function wn({visibility:e}){return(0,I.jsxs)(M,{className:`gap-0 py-0`,children:[(0,I.jsx)(`div`,{className:z,children:(0,I.jsx)(`h2`,{className:R,children:`Usage & cost`})}),!e.cost&&!e.tokens?(0,I.jsx)(`p`,{className:`p-4 text-sm`,children:`Usage metrics are hidden by workspace settings`}):(0,I.jsx)(Tn,{visibility:e},`${e.cost}:${e.tokens}`)]})}function Tn({visibility:e}){let[t,n]=bt(`usagePeriod`,[`all`,`7d`,`30d`],`all`),[r,i]=bt(`usageSort`,Q(e),e.cost?`cost`:`input`);return(0,I.jsx)(En,{period:t,setPeriod:n,sort:r,setSort:i,visibility:e})}function En({period:e,setPeriod:t,sort:n,setSort:r,visibility:i}){let a=mn(e,n,`${i.cost}:${i.tokens}`),[o,s]=Y(`usage:accepted`,void 0),c=o??a.data,l=a.data??c,[u,d]=Y(`usage:panel`,null),[f,p]=(0,F.useState)(e);f!==e&&(p(e),s(void 0),d(null));let m=Ut(`usage:${u?.identity??`closed`}`),h=Wt(`usage`,`[data-usage-trigger]`),g=e=>{h.capture(),c&&d({identity:Vt(),projectId:e,snapshot:c,latestId:l?.snapshotId??c.snapshotId})},_=dn()??i,v={cost:i.cost&&_.cost,tokens:i.tokens&&_.tokens},y=Q(v).includes(n)?n:Q(v)[0]??`cost`,b=[...c?.projects??[]].sort((e,t)=>{let n=e[Z[y]]?.value,r=t[Z[y]]?.value;return(n==null?r==null?0:1:r==null?-1:r-n)||e.projectId.localeCompare(t.projectId)});!o&&a.data&&s(a.data);let x=c&&l&&bn(c,l),S=c?.coverage.projects.some(e=>e.state!==`complete`),C=l?.coverage.projects.some(e=>e.state!==`complete`),w=JSON.stringify(c?.coverage)!==JSON.stringify(l?.coverage),T=c?.totals.tasks===0&&!S&&!C;return(0,I.jsxs)(`div`,{className:`space-y-4 p-4 text-sm`,children:[c&&(0,I.jsx)(L,{rows:T?[]:[...Q(v).map(e=>({section:`totals`,metric:Z[e],value:c.totals[Z[e]]?.value??null,unit:e===`cost`?`USD`:`tokens`,reportedTasks:c.totals[Z[e]]?.reportedTasks??0,totalTasks:c.totals.tasks,asOf:c.asOf})),...(v.cost||v.tokens?b.slice(0,5):[]).map(e=>({section:`project`,entity:e.projectId,metric:Z[y],value:e[Z[y]]?.value??null,unit:y===`cost`?`USD`:`tokens`,reportedTasks:e[Z[y]]?.reportedTasks??0,totalTasks:e.tasks,asOf:c.asOf}))]}),c&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(ot,{at:c.asOf})}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`font-medium`,children:`Lifetime totals of retained tasks`}),(0,I.jsxs)(`details`,{className:`mt-1 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`summary`,{"data-export-heading":`Metric definitions`,className:`${tt} min-h-11`,children:[(0,I.jsx)(B,{}),`How these metrics work`]}),(0,I.jsxs)(`p`,{children:[`Includes archived tasks and subtasks.`,` `,v.cost&&`Reported USD is not an invoice. `,`Missing reports are excluded, not treated as zero. Calendar days use your current UTC offset, including today.`]})]})]}),(0,I.jsxs)(`label`,{className:nt,children:[`Tasks created`,(0,I.jsxs)(rt,{value:e,onChange:e=>t(e.target.value),children:[(0,I.jsx)(`option`,{value:`all`,children:`All time`}),(0,I.jsx)(`option`,{value:`7d`,children:`Last 7 days`}),(0,I.jsx)(`option`,{value:`30d`,children:`Last 30 days`})]})]})]}),e!==`all`&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Lifetime usage of tasks created in this period — not spending during the period.`}),a.isPending&&(0,I.jsx)(`p`,{children:`Loading usage…`}),a.isError&&(0,I.jsxs)(`p`,{role:`alert`,children:[c?`Showing stale usage. Could not refresh.`:`Could not load usage.`,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>void a.refetch(),children:`Retry`})]}),x&&(0,I.jsx)(`p`,{role:`status`,children:`Newer usage data is available; displayed values use the previous snapshot.`}),x&&(0,I.jsx)(j,{className:`min-h-11`,variant:`outline`,onClick:()=>s(l),children:`Updates available — Show`}),c&&S&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Coverage of displayed usage:`}),(0,I.jsx)(G,{coverage:c.coverage,retry:()=>void a.refetch()})]}),l&&C&&w&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Current source availability:`}),(0,I.jsx)(G,{coverage:l.coverage,retry:()=>void a.refetch()})]}),c&&(0,I.jsxs)(I.Fragment,{children:[!T&&(0,I.jsx)(`div`,{className:`report-cost-metrics grid gap-3 sm:grid-cols-[repeat(auto-fit,minmax(220px,1fr))]`,children:Q(v).map(e=>(0,I.jsx)(_n,{metric:e,label:yn[e],value:xn(c.totals[Z[e]]?.value,e),reported:c.totals[Z[e]]?.reportedTasks??0,total:c.totals.tasks},e))}),!v.cost&&!v.tokens&&(0,I.jsx)(`p`,{children:`Usage metrics are hidden by workspace settings`}),c.totals.tasks===0?(0,I.jsx)(`p`,{children:S||C?`No retained tasks could be read from available sources.`:`No retained tasks in this cohort.`}):Q(v).every(e=>!c.totals[Z[e]]?.reportedTasks)&&(0,I.jsx)(`p`,{children:`No reports for the visible metrics in this cohort.`}),T&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Usage appears when tasks report cost or tokens.`}),(0,I.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Deleted tasks are excluded from retained history.`,c.invalidDateTasks?` ${c.invalidDateTasks} tasks have missing or invalid creation dates${e===`all`?`; included in All time`:`; excluded from this period`}.`:``]}),!T&&(v.cost||v.tokens)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`font-medium`,children:`Top projects`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Ranking uses reported metrics only.`})]}),(0,I.jsx)(Sn,{value:y,onChange:r,visibility:v})]}),(0,I.jsx)(vn,{projects:b,metric:y,label:yn[y],field:Z[y],format:e=>xn(e,y),currentProjects:l?.projects??[],onSelect:g}),(0,I.jsx)(j,{"data-usage-trigger":!0,className:`min-h-11`,variant:`outline`,onClick:()=>g(``),children:`View tasks`})]})]}),(0,I.jsx)(be,{open:u!==null&&(v.cost||v.tokens),onOpenChange:e=>{e||d(null)},children:(0,I.jsxs)(ye,{...m,className:`w-full overflow-y-auto sm:max-w-xl`,onCloseAutoFocus:e=>{e.preventDefault(),h.restore()},children:[(0,I.jsxs)(ge,{children:[(0,I.jsx)(ve,{children:u?.projectId?`${u.projectId} tasks`:`All tasks`}),(0,I.jsx)(_e,{children:`Lifetime usage of retained tasks. Missing reports are unavailable.`})]}),u!==null&&(0,I.jsx)(Dn,{identity:`usage:${u.identity}`,snapshot:l&&l.snapshotId!==u.latestId?l:u.snapshot,projectId:u.projectId||void 0,visibility:v},u.identity)]})})]})}function Dn({identity:e,snapshot:t,projectId:n,visibility:r}){let[i,a]=Y(`${e}:sort`,t.sort);return(0,I.jsx)(On,{identity:e,snapshot:t,projectId:n,visibility:r,sort:Q(r).includes(i)?i:Q(r)[0]??`cost`,setSort:a})}function On({identity:e,snapshot:t,projectId:n,visibility:r,sort:i,setSort:a}){let[o,s]=Y(`${e}:count`,20),[c,l]=Y(`${e}:paging`,void 0),[u,d]=(0,F.useState)(t.snapshotId);u!==t.snapshotId&&(d(t.snapshotId),l(void 0));let f=hn(c??t,n,i,o),p=dn()??r,m={cost:r.cost&&p.cost,tokens:r.tokens&&p.tokens},h=Q(m).includes(i)?i:Q(m)[0]??`cost`,[g,_]=Y(`${e}:accepted`,void 0),[v,y]=Y(`${e}:acceptedCount`,o),[b,x]=Y(`${e}:acceptedSort`,i),[S,C]=(0,F.useState)(i);S!==i&&(C(i),s(20),l(g??c??t)),f.data&&(!g||(v!==o||b!==i)&&g.snapshotId===f.data.snapshotId)&&(_(f.data),y(o),x(i));let w=g??f.data,T=f.data&&w&&bn(f.data,w),ee=w?.coverage.projects.some(e=>e.state!==`complete`),E=f.data?.coverage.projects.some(e=>e.state!==`complete`),te=JSON.stringify(w?.coverage)!==JSON.stringify(f.data?.coverage),ne=!n||t.projects.some(e=>e.projectId===n);return(0,I.jsxs)(`div`,{className:`space-y-3 p-4 text-sm`,"data-sheet-loading":f.isFetching,children:[(0,I.jsx)(Sn,{value:h,onChange:a,visibility:m}),f.isPending&&(0,I.jsx)(`p`,{children:`Loading tasks…`}),f.isError&&(0,I.jsxs)(`p`,{role:`alert`,children:[`Could not refresh tasks. `,w?`Showing stale usage.`:``,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>void f.refetch(),children:`Retry`})]}),T&&(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>{_(f.data),y(o),x(i)},children:`Updates available — Show`}),w&&ee&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Coverage of displayed tasks:`}),(0,I.jsx)(G,{coverage:w.coverage,retry:()=>void f.refetch()})]}),f.data&&E&&te&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Current source availability:`}),(0,I.jsx)(G,{coverage:f.data.coverage,retry:()=>void f.refetch()})]}),w&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`border-b pb-2 font-mono text-meta text-soft-foreground`,children:[w.tasks.rows.length,` of `,w.tasks.total,` retained tasks`]}),w.tasks.total===0&&(0,I.jsx)(`p`,{children:w.coverage.projects.some(e=>e.state!==`complete`)?`No tasks could be read from available sources.`:`No retained tasks in this cohort.`}),w.tasks.rows.map(e=>(0,I.jsx)(kn,{row:e,sort:h,visibility:m,disabled:!ne||!f.data||!!(T&&!f.data?.tasks.rows.some(t=>t.id===e.id&&t.projectId===e.projectId))},`${e.projectId}:${e.id}`)),w.tasks.nextOffset!==null&&(0,I.jsx)(j,{className:`min-h-11`,disabled:f.isFetching,onClick:()=>{l(w),s(e=>e+20)},children:`Show 20 more tasks`})]})]})}function kn({row:e,sort:t,visibility:n,disabled:r}){let a=ce(e);r||=a===null;let o=i(a?{status:a.status,awaitingAnswerSince:a.awaitingAnswerSince,idleClosedAt:a.idleClosedAt}:e),s=Q(n).filter(e=>e!==t),c=t=>{let n=e[Z[t]];return n==null?`—`:xn(n,t)},l=t=>`${yn[t]}: ${xn(e[Z[t]],t)}`;return(0,I.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-4 border-b py-3 last:border-0`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,I.jsx)(N,{tone:o.tone,pulse:o.pulse,className:`mt-[7px]`}),(0,I.jsx)(E,{className:`line-clamp-2 break-words font-medium leading-snug hover:underline no-hover:min-h-11`,title:e.title,to:`/p/${encodeURIComponent(e.projectId)}/tasks/${encodeURIComponent(e.id)}`,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,onClick:e=>{r&&e.preventDefault()},children:e.title})]}),(0,I.jsxs)(`p`,{className:`mt-1 pl-[15px] font-mono text-meta text-soft-foreground`,children:[e.projectId,` · `,r?`Checking current state…`:a?.status??e.status,e.archived?` · Archived`:``,e.subtask?` · Subtask`:``]})]}),(0,I.jsxs)(`div`,{className:`text-right tabular-nums`,children:[(0,I.jsx)(`span`,{"aria-label":l(t),className:`block font-semibold ${e[Z[t]]==null?`text-soft-foreground`:``}`,children:c(t)}),s.length>0&&(0,I.jsx)(`span`,{className:`mt-1 flex justify-end gap-3 font-mono text-meta text-soft-foreground`,children:s.map(e=>(0,I.jsxs)(`span`,{"aria-label":l(e),children:[c(e),` `,e===`cost`?``:e===`input`?`in`:`out`]},e))})]})]})}var An={cost:`costUsd`,input:`inputTokens`,output:`outputTokens`},jn={cost:`Reported USD`,input:`Input tokens`,output:`Output tokens`};function Mn(e){return[...e.cost?[`cost`]:[],...e.tokens?[`input`,`output`]:[]]}var Nn=(e,t)=>yt(e,t===`cost`);function Pn(e){return new Date(`${e}T00:00:00`).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function Fn({series:e,height:t,accent:n,renderTooltip:r,describe:i}){let a=Math.max(1,...e.map(t));return(0,I.jsxs)(Pe,{delayDuration:150,children:[(0,I.jsx)(`div`,{className:`flex h-20 items-end gap-0.5`,role:`group`,"aria-label":`Daily trend`,children:e.map(e=>{let o=t(e),s=Math.max(o>0?4:0,o/a*100);return(0,I.jsxs)(Fe,{children:[(0,I.jsx)(Me,{asChild:!0,children:(0,I.jsx)(`button`,{"data-export-keep":!0,"aria-label":i(e),type:`button`,className:`min-w-0 flex-1 rounded-t-sm transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,style:{height:`100%`,display:`flex`,alignItems:`end`},children:(0,I.jsx)(`span`,{style:{height:`${s}%`},className:`block w-full rounded-t-sm ${n}`})})}),(0,I.jsx)(Ne,{children:r(e)})]},e.date)})}),(0,I.jsxs)(`div`,{className:`mt-1 flex justify-between text-xs text-muted-foreground`,children:[(0,I.jsx)(`span`,{children:Pn(e[0].date)}),(0,I.jsx)(`span`,{children:Pn(e.at(-1).date)})]})]})}function In({metrics:e,series:t}){return(0,I.jsxs)(`table`,{className:`w-full text-left text-xs`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{className:`border-b`,children:[(0,I.jsx)(`th`,{className:`py-1 pr-2 font-medium`,children:`Date`}),e.map(e=>(0,I.jsx)(`th`,{className:`py-1 pr-2 text-right font-medium`,children:jn[e]},e)),(0,I.jsx)(`th`,{className:`py-1 pr-2 text-right font-medium`,children:`Completed`}),(0,I.jsx)(`th`,{className:`py-1 text-right font-medium`,children:`Avg cycle`})]})}),(0,I.jsx)(`tbody`,{children:t.map(t=>(0,I.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,I.jsx)(`td`,{className:`py-1 pr-2`,children:Pn(t.date)}),e.map(e=>(0,I.jsx)(`td`,{className:`py-1 pr-2 text-right tabular-nums`,children:Nn(t[An[e]]?.value,e)},e)),(0,I.jsx)(`td`,{className:`py-1 pr-2 text-right tabular-nums`,children:t.completed}),(0,I.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.avgCycleHours===null?`—`:K(t.avgCycleHours)})]},t.date))})]})}function Ln({metric:e,series:t}){let n=gn[e],r=An[e],i=t.reduce((e,t)=>e+(t[r]?.reportedTasks??0),0);return(0,I.jsxs)(`div`,{className:`rounded-xl border p-3`,children:[(0,I.jsx)(`p`,{className:`text-xs font-medium ${n.text}`,children:jn[e]}),(0,I.jsx)(`div`,{className:`mt-2`,children:(0,I.jsx)(Fn,{series:t,describe:t=>`${t.date}, ${jn[e]}: ${Nn(t[r]?.value,e)}, ${t[r]?.reportedTasks??0} of ${t.tasks} tasks reported`,height:e=>e[r]?.value??0,accent:n.fill,renderTooltip:t=>(0,I.jsxs)(`p`,{children:[Pn(t.date),` · `,Nn(t[r]?.value,e),` ·`,` `,t[r]?.reportedTasks??0,`/`,t.tasks,` tasks reported`]})})}),i===0&&(0,I.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`No reports in this period.`})]})}function Rn({series:e}){let t=e.reduce((e,t)=>e+t.completed,0),n=e.reduce((e,t)=>e+(t.avgCycleHours??0)*(t.cycleReportedTasks??t.completed),0),r=e.reduce((e,t)=>e+(t.cycleReportedTasks??t.completed),0),i=r?n/r:null;return(0,I.jsxs)(`div`,{className:`rounded-xl border p-3`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-baseline justify-between gap-2`,children:[(0,I.jsx)(`p`,{className:`text-xs font-medium text-success`,children:`Completed tasks`}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t,` done · avg cycle`,` `,i===null?`unavailable`:K(i)]})]}),(0,I.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[r,`/`,t,` completed tasks have valid cycle times.`]}),(0,I.jsx)(`div`,{className:`mt-2`,children:(0,I.jsx)(Fn,{series:e,describe:e=>`${e.date}: ${e.completed} completed tasks, average cycle ${e.avgCycleHours==null?`Unavailable`:K(e.avgCycleHours)}`,height:e=>e.completed,accent:`bg-success`,renderTooltip:e=>(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`p`,{children:[Pn(e.date),` · `,e.completed,` completed`]}),(0,I.jsxs)(`p`,{children:[`Avg cycle`,` `,e.avgCycleHours===null?`unavailable`:K(e.avgCycleHours),` · Median`,` `,e.medianCycleHours===null?`unavailable`:K(e.medianCycleHours)]})]})})}),t===0&&(0,I.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`No tasks finished in this period.`})]})}function zn(){return(0,I.jsx)(Bn,{visibility:Ve(a().data)})}function Bn({visibility:e}){let[t,n]=bt(`trendPeriod`,[`7d`,`30d`],`7d`),r=mn(t,e.cost?`cost`:`input`,`${e.cost}:${e.tokens}`),i=r.data,a=i&&i.totals.tasks===0&&i.coverage.projects.every(e=>e.state===`complete`)&&i.series.every(e=>e.tasks===0&&e.completed===0),o=Mn({cost:e.cost&&i?.visibility.cost!==!1,tokens:e.tokens&&i?.visibility.tokens!==!1});return(0,I.jsxs)(M,{className:`gap-0 py-0`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsx)(`h2`,{className:R,children:`Trends`}),(0,I.jsxs)(`label`,{className:nt,children:[`Period`,(0,I.jsxs)(rt,{value:t,onChange:e=>n(e.target.value),children:[(0,I.jsx)(`option`,{value:`7d`,children:`Last 7 days`}),(0,I.jsx)(`option`,{value:`30d`,children:`Last 30 days`})]})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4 p-4 text-sm`,children:[i&&(0,I.jsx)(L,{rows:a?[]:i.series.flatMap(e=>[...o.map(t=>({section:`daily-creation-cohort`,entity:e.date,metric:An[t],value:e[An[t]]?.value??null,unit:t===`cost`?`USD`:`tokens`,reportedTasks:e[An[t]]?.reportedTasks??0,totalTasks:e.tasks,asOf:i.asOf,note:`Lifetime usage grouped by task creation date; not daily spend`})),{section:`daily-completions`,entity:e.date,metric:`completed`,value:e.completed,unit:`tasks`,asOf:i.asOf},{section:`daily-completions`,entity:e.date,metric:`avgCycleHours`,value:e.avgCycleHours,reportedTasks:e.cycleReportedTasks??e.completed,totalTasks:e.completed,unit:`hours`,asOf:i.asOf},{section:`daily-completions`,entity:e.date,metric:`medianCycleHours`,value:e.medianCycleHours,unit:`hours`,asOf:i.asOf}])}),(0,I.jsxs)(`details`,{className:`text-xs text-muted-foreground`,children:[(0,I.jsxs)(`summary`,{"data-export-heading":`Metric definitions`,className:`${tt} py-2`,children:[(0,I.jsx)(B,{}),`How these metrics work`]}),(0,I.jsx)(`p`,{children:`Usage is grouped by creation date, not spending date. Completed tasks are grouped by finish date. Calendar days use your current UTC offset (fixed across the period), including today.`})]}),r.isPending&&(0,I.jsx)(`p`,{children:`Loading trends…`}),r.isError&&(0,I.jsxs)(`p`,{role:`alert`,children:[i?`Showing stale trends. Could not refresh.`:`Could not load trends.`,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>void r.refetch(),children:`Retry`})]}),i&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,I.jsx)(ot,{at:i.asOf})}),i&&(0,I.jsx)(G,{coverage:i.coverage,retry:()=>void r.refetch()}),i&&a&&(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`No retained tasks in this period yet.`}),i&&!a&&i.series.length>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`space-y-4`,children:[o.length>0&&(0,I.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-[repeat(auto-fit,minmax(200px,1fr))]`,children:o.map(e=>(0,I.jsx)(Ln,{metric:e,series:i.series},e))}),(0,I.jsx)(Rn,{series:i.series})]}),(0,I.jsxs)(`details`,{className:`group rounded-lg border bg-muted/20 print:block`,children:[(0,I.jsxs)(`summary`,{"data-export-heading":`Daily data`,className:`flex min-h-11 cursor-pointer list-none items-center gap-2 px-3 text-xs font-medium text-muted-foreground hover:text-foreground [&::-webkit-details-marker]:hidden`,children:[(0,I.jsx)(Ze,{className:`size-4`,"aria-hidden":`true`}),` View data table`,(0,I.jsx)(Oe,{className:`ml-auto size-4 transition-transform group-open:rotate-180`,"aria-hidden":`true`})]}),(0,I.jsx)(`div`,{className:`max-h-80 overflow-auto border-t p-3 print:max-h-none print:overflow-visible`,role:`region`,"aria-label":`Daily trend values`,tabIndex:0,children:(0,I.jsx)(In,{metrics:o,series:i.series})})]})]})]})]})}function Vn(e,t,n,r=!0){let i=_();return u({queryKey:[...X.snapshot,e?.snapshotId,t,n],enabled:r&&!!e,retry:!1,queryFn:async({signal:r})=>{if(!e)throw Error(`Dashboard not loaded`);let a=[];try{for(let i=0;i<n;){let o=await en(e.snapshotId,t,i,Math.min(20,n-i),r);if(a.push(...o.page.rows),o.page.nextOffset===null)break;i=o.page.nextOffset}return a}catch(e){if(e instanceof h&&e.status===409){let e=await $t(r);i.setQueryData(X.snapshot,e)}throw e}}})}function Hn(e,t,n,r){let i=_(),a=t===`questions`||t===`reviews`?`needs-you`:t,o=a===`needs-you`?0:n,s=r.map(e=>`${e.projectId}:${e.id}`).sort();return u({queryKey:[...X.snapshot,e.snapshotId,t,`displaced`,...s],enabled:s.length>0,retry:!1,queryFn:async({signal:t})=>{let n=new Set(s),r=new Map;try{for(let i=o;i!==null&&n.size;){let o=await en(e.snapshotId,a,i,20,t);for(let e of o.page.rows){let t=`${e.projectId}:${e.id}`;n.delete(t)&&r.set(t,e)}i=o.page.nextOffset}return r}catch(e){throw e instanceof h&&e.status===409&&i.setQueryData(X.snapshot,await $t(t)),e}}})}function Un({snapshot:e,questions:t,reviews:n,more:r,healthy:i=!0}){let a=re();return(0,I.jsxs)(M,{className:`min-w-0 gap-0 overflow-hidden py-0`,children:[(0,I.jsxs)(`div`,{className:z,children:[(0,I.jsxs)(`h2`,{id:`dashboard-needs-you`,tabIndex:-1,className:R,children:[`Needs you · `,e.counts.questions+e.counts.reviews]}),(0,I.jsxs)(`p`,{className:`font-mono text-meta text-soft-foreground`,children:[e.counts.questions,` questions · `,e.counts.reviews,` reviews`]})]}),i&&a.connected&&e.counts.questions+e.counts.reviews===0&&e.coverage.projects.every(e=>e.state===`complete`)?(0,I.jsxs)(`p`,{className:`flex items-center gap-2.5 px-4 py-8 text-sm text-muted-foreground`,children:[(0,I.jsx)(N,{tone:`success`}),`All caught up — no tasks need your input`]}):null,(0,I.jsx)(Wn,{snapshot:e,group:`questions`,count:t,more:r}),(0,I.jsx)(Wn,{snapshot:e,group:`reviews`,count:n,more:r})]})}function Wn({snapshot:e,group:t,count:n,more:r}){let i=e[t],a=Math.max(n,i.rows.length),o=Vn(e,t,a,a>i.rows.length),s=a>i.rows.length?o.data:i.rows,c=ft(s,W,t,n),l=Hn(e,t,a,c.rows.filter(e=>e.removed).map(e=>e.row)),u=(0,F.useRef)(null);return!i.total&&!c.rows.length?null:(0,I.jsxs)(`section`,{children:[(0,I.jsxs)(`h3`,{ref:u,tabIndex:-1,className:`border-b bg-card-2 px-4 py-2 eyebrow text-muted-foreground`,children:[t===`questions`?`Questions`:`Reviews`,` · `,i.total]}),c.updates>0&&(0,I.jsxs)(j,{variant:`ghost`,className:`m-2 min-h-11`,onClick:()=>{c.show(),u.current?.focus()},children:[c.updates,` updates — Show`]}),c.rows.map(({row:e,removed:t})=>(0,I.jsx)(vt,{row:l.data?.get(W(e))??e,removed:t&&!!l.data&&!l.data.has(W(e)),checking:s===void 0||t&&!l.data,checkFailed:s===void 0&&o.isError||t&&!l.data&&l.isError,queue:!0},W(e))),(o.isError||l.isError)&&(0,I.jsxs)(`p`,{role:`alert`,className:`p-4 text-sm`,children:[`Could not check current task state.`,` `,(0,I.jsx)(j,{variant:`ghost`,className:`min-h-11`,onClick:()=>{o.refetch(),l.refetch()},children:`Retry`})]}),a<i.total&&(0,I.jsxs)(j,{variant:`ghost`,className:`m-2 min-h-11`,disabled:o.isFetching,onClick:()=>r(t,a+Math.min(20,i.total-a)),children:[`Show `,Math.min(20,i.total-a),` more `,t]})]})}function Gn(e){if(!e.startsWith(`github:`))return e===`tasks`?`Task results`:e;let t=e.slice(7).split(`:`),n=t.pop()===`pr`?`Pull requests`:`Issues`;return`${t.join(`:`).replace(/^project:/,`Project `).replace(/^github.com\//,``)} · ${n}`}var Kn=e=>e.key;function qn({filter:e,setFilter:t,count:n,more:r}){let i=an(e,!0),a=ft(i.data?.rows,Kn,`feed:${e}`,0,e=>e.kind===`task-result`),o=a.rows,s=a.updates,c=(0,F.useContext)(ut),l=(0,F.useRef)(null),u=`feed:${e}`,d=(0,F.useMemo)(()=>({scroll:gt(c,u)?.scroll??0,done:!1}),[c,u]);(0,F.useLayoutEffect)(()=>{!l.current||d.done||(l.current.scrollTop=d.scroll,d.done=Math.abs(l.current.scrollTop-d.scroll)<1||!!i.data&&!i.isPending&&!i.isFetching)},[d,o.length,n,i.data,i.isPending,i.isFetching]);let f=(0,F.useRef)(null),p=i.data?.sources.filter(e=>e.key.startsWith(`github:`))??[],m=p.flatMap(e=>e.fetchedAt?[e.fetchedAt]:[]).sort()[0],h=i.githubError,_=p.filter(e=>e.reason===`No GitHub remote`),v=p.some(e=>e.reason===`Still loading GitHub`),y=p.length>0&&_.length===p.length&&!h,b=p.filter(e=>e.state!==`ready`&&e.reason!==`No GitHub remote`&&e.reason!==`Still loading GitHub`),x=y&&e===`all`;return(0,I.jsxs)(M,{"data-export-context":`Results source: ${e}; Last 7 days; loaded ${Math.min(n,o.length)} rows`,className:`min-w-0 gap-0 overflow-hidden py-0`,children:[(0,I.jsxs)(`div`,{className:`space-y-2 border-b px-4 pt-2.5 pb-2`,children:[(0,I.jsxs)(`div`,{className:`flex min-h-9 flex-wrap items-center justify-between gap-2`,children:[(0,I.jsx)(`h2`,{ref:f,tabIndex:-1,className:R,children:x?`Recent results`:`Recent results & GitHub`}),(0,I.jsx)(`span`,{className:`font-mono text-meta text-soft-foreground`,children:`Last 7 days`})]}),!x&&(0,I.jsx)(We,{slot:`dashboard-feed`,label:`Results source`,value:e,options:[{value:`all`,label:`All`},{value:`tasks`,label:`Tasks`},{value:`github`,label:`GitHub`}],onChange:t}),x&&(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Task results · No GitHub repositories configured`}),e!==`tasks`&&!x&&(0,I.jsxs)(`details`,{className:`text-xs text-muted-foreground`,open:b.length||h?!0:void 0,children:[(0,I.jsxs)(`summary`,{className:`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden py-1.5`,children:[(0,I.jsx)(B,{}),b.length||h?`GitHub needs attention`:v?`Checking GitHub…`:y?`GitHub not configured`:m?`GitHub checked ${P(m)} ago`:`GitHub source`]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3`,children:[(0,I.jsx)(`p`,{children:b.length||h?m?`Could not refresh GitHub. Showing results from ${new Date(m).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}.`:`Could not load one or more GitHub sources.`:v?`Checking repository sources. Available results remain visible.`:y?`No GitHub repositories configured. Select Tasks to see task results.`:m?`GitHub checked ${P(m)} ago`:`GitHub snapshot`}),!y&&(0,I.jsx)(j,{variant:`ghost`,className:`min-h-11 px-0`,disabled:i.githubFetching,onClick:()=>{i.refetch()},children:i.githubFetching?`Refreshing…`:b.length||h?`Retry GitHub`:`Refresh GitHub`})]})]})]}),(0,I.jsxs)(`div`,{role:`region`,"aria-label":`Recent results list`,ref:l,onWheel:()=>{d.done=!0},onTouchStart:()=>{d.done=!0},onKeyDown:()=>{d.done=!0},onScroll:e=>{c&&d.done&&_t(c,u,{count:n,scroll:e.currentTarget.scrollTop})},tabIndex:0,className:`max-h-80 overflow-y-auto overscroll-contain focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[i.isError&&(0,I.jsxs)(`p`,{role:`alert`,className:`p-4 text-sm`,children:[`Could not load results.`,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>{i.retryFailed()},children:`Retry`})]}),i.isPending&&(0,I.jsx)(`p`,{className:`p-4 text-sm`,children:`Loading results…`}),s>0&&(0,I.jsxs)(j,{variant:`ghost`,className:`m-2 min-h-11`,onClick:()=>{a.show(),f.current?.focus()},children:[s,` updates — Show`]}),o.slice(0,n).map(({row:e,removed:t})=>e.kind===`task-result`?(0,I.jsx)(vt,{row:e.run,kicker:t?`Outside current results`:`Latest result: ${g(e.run)?`Closed after inactivity`:e.run.status===`failed`?`Failed`:`Completed`}`},e.key):(0,I.jsxs)(`div`,{className:`border-b px-4 py-3 transition-colors hover:bg-muted/30`,children:[(0,I.jsx)(L,{rows:[{section:`github`,entity:`${e.repo}#${e.number}`,metric:e.itemKind,value:e.title,asOf:e.at,note:e.url}]}),(0,I.jsx)(`a`,{className:`block break-words text-sm font-medium hover:underline no-hover:min-h-11`,href:e.url,target:`_blank`,rel:`noreferrer`,children:e.title}),(0,I.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.repo,` · `,e.itemKind===`pr`?`PR`:`Issue`,` #`,e.number,` created ·`,` `,P(e.at)]})]},e.key)),i.data&&!i.data.rows.length&&!o.length&&!i.isFetching&&!i.isError&&!b.length&&!v&&i.data.coverage.projects.every(e=>e.state===`complete`)&&(0,I.jsx)(`p`,{className:`px-4 py-8 text-sm text-muted-foreground`,children:`No results in the last 7 days`}),n<o.length&&(0,I.jsxs)(j,{variant:`ghost`,className:`m-2 min-h-11`,onClick:r,children:[`Show `,Math.min(20,o.length-n),` more results`]}),i.data?.truncated&&(0,I.jsx)(`p`,{className:`p-4 text-xs`,children:`Showing the latest 60 results`}),i.data&&(0,I.jsx)(G,{coverage:i.data.coverage,retry:()=>{i.retryTasks()}}),!x&&i.data?.sources.some(e=>e.state!==`ready`||e.truncated)&&(0,I.jsxs)(`details`,{className:`p-4 text-xs`,children:[(0,I.jsxs)(`summary`,{className:`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden min-h-11`,children:[(0,I.jsx)(B,{}),`Source details`]}),i.data.sources.map(e=>(0,I.jsxs)(`p`,{className:`break-words py-1`,children:[Gn(e.key),`:`,` `,e.reason===`No GitHub remote`?`Not configured`:e.reason===`Still loading GitHub`?`Checking…`:e.reason??(e.state===`ready`?`Up to date`:e.state),e.truncated?` · capped`:``,e.fetchedAt?` · checked ${P(e.fetchedAt)}`:``]},e.key))]})]})]})}var $=e=>e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]),Jn=`Visible modules and loaded rows only. Filters and report availability apply. Retained task usage is not an invoice or a complete history.`,Yn=`Confidential — internal distribution only`,Xn={costUsd:{label:`Reported cost`,usd:!0},inputTokens:{label:`Input tokens`},outputTokens:{label:`Output tokens`},needsYou:{label:`Needs you`},running:{label:`Running now`},completed:{label:`Completed in period`},failed:{label:`Failed outcomes in period`},medianCycleHours:{label:`Median cycle (hours)`}};function Zn(e,t){return e==null?`Unavailable`:typeof e==`string`?e:yt(e,t)}function Qn(e){let t=new Set,n=[];for(let r of e.modules)for(let e of r.rows){if(e.section!==`totals`&&e.section!==`fleet`&&e.section!==`overview`)continue;let i=Xn[e.metric];!i||t.has(e.metric)||(t.add(e.metric),n.push({label:i.label,value:Zn(e.value,i.usd),note:[e.metric===`needsYou`||e.metric===`running`?e.note||`Current non-archived state`:r.filters,e.asOf?`Data as of ${e.asOf}`:``,e.reportedTasks==null?``:`${e.reportedTasks} of ${e.totalTasks} tasks reported`].filter(Boolean).join(` · `)}))}return n}function $n(e){let t=e.cloneNode(!0);t.querySelectorAll(`script,style,link,img,iframe,object,embed,input,[hidden],[data-dashboard-export],[data-export-exclude]`).forEach(e=>e.remove()),t.querySelectorAll(`select`).forEach((t,n)=>{let r=e.querySelectorAll(`select`)[n];t.replaceWith(document.createTextNode(`: `+(r?.selectedOptions[0]?.textContent??``)))}),t.querySelectorAll(`[data-export-row],[data-dashboard-row]`).forEach(e=>e.classList.add(`report-row`)),t.querySelectorAll(`summary`).forEach(e=>{let t=document.createElement(`h3`);t.textContent=e.getAttribute(`data-export-heading`)||e.textContent,e.replaceWith(t)}),t.querySelectorAll(`button`).forEach(e=>{if(e.hasAttribute(`data-export-keep`)){let t=document.createElement(`div`);for(let n of[...e.attributes])[`class`,`style`,`title`].includes(n.name)&&t.setAttribute(n.name,n.value);t.append(...e.childNodes),e.replaceWith(t)}else e.remove()}),t.querySelectorAll(`details`).forEach(e=>{let t=document.createElement(`div`);t.className=e.className,t.append(...e.childNodes),e.replaceWith(t)});for(let e of[t,...t.querySelectorAll(`*`)])for(let t of[...e.attributes])(t.name.startsWith(`on`)||[`href`,`src`,`srcset`,`action`,`formaction`,`tabindex`].includes(t.name)||t.name.startsWith(`data-`))&&e.removeAttribute(t.name);return t.removeAttribute(`style`),t.innerHTML}function er(e,t,n,r){return{generatedAt:t,source:n,title:r||void 0,notices:[...e.querySelectorAll(`[role=alert],[role=status]`)].filter(e=>!e.closest(`[data-dashboard-module]`)).map(e=>e.textContent?.trim()??``).filter(Boolean),modules:[...e.querySelectorAll(`[data-dashboard-module]`)].map(e=>{let t=[...e.querySelectorAll(`select`)].map(e=>`${e.closest(`label`)?.childNodes[0]?.textContent?.trim()??`Filter`}: ${e.selectedOptions[0]?.textContent}`).concat([...e.querySelectorAll(`[data-export-context]`)].map(e=>e.dataset.exportContext)).join(`; `),n=[...new Set([...e.querySelectorAll(`p,[role="alert"],[role="status"]`)].filter(e=>!e.closest(`table,[data-export-exclude]`)&&!e.querySelector(`p,[role="alert"],[role="status"]`)).map(e=>{let t=e.cloneNode(!0);return t.querySelectorAll(`table,button,select,summary,[data-export-exclude]`).forEach(e=>e.remove()),t.textContent?.trim()}).filter(Boolean))].join(` | `);return{id:e.dataset.dashboardModule,title:e.querySelector(`h2`)?.textContent??e.dataset.dashboardModule,filters:t,notes:n,html:$n(e),rows:[...e.querySelectorAll(`[data-dashboard-export]`)].flatMap(e=>JSON.parse(e.dataset.dashboardExport))}})}}function tr(e){let t=e==null?``:String(e);return typeof e==`string`&&/^[\s\uFEFF]*[=+@\-]/.test(t)&&(t=`'${t}`),`"${t.replaceAll(`"`,`""`)}"`}function nr(e){let t=[[`generated_at`,`source`,`module`,`filters`,`section`,`entity`,`metric`,`value`,`unit`,`availability`,`reported_tasks`,`total_tasks`,`as_of`,`notes`]];for(let n of e.modules){t.push([e.generatedAt,e.source,n.title,n.filters,`context`,``,`scope`,Jn,``,``,``,``,``,[...e.title?[`Report title: ${e.title}`]:[],...e.notices,n.notes].join(` | `)]);for(let r of n.rows)t.push([e.generatedAt,e.source,n.title,n.filters,r.section,r.entity,r.metric,r.value,r.unit,r.value===null?`unavailable`:typeof r.value==`number`?`measured`:`reported`,r.reportedTasks,r.totalTasks,r.asOf,r.note])}return``+t.map(e=>e.map(tr).join(`,`)).join(`\r
|
|
2
|
+
`)+`\r
|
|
3
|
+
`}function rr(e,t){let n=Qn(e);return`<!doctype html><html class="light"><head><meta charset="utf-8"><title>${$(e.title||`Dashboard`)} ${$(e.generatedAt.slice(0,10))}</title>${t.join(``)}<style>
|
|
4
|
+
@page {
|
|
5
|
+
size:A4; margin:14mm 14mm 18mm;
|
|
6
|
+
@bottom-left { content:"${Yn}"; font-family:system-ui,sans-serif; font-size:9px; color:var(--muted-foreground); }
|
|
7
|
+
@bottom-right { content:"Page " counter(page) " of " counter(pages); font-family:system-ui,sans-serif; font-size:9px; color:var(--muted-foreground); }
|
|
8
|
+
}
|
|
9
|
+
html,body { height:auto!important; overflow:visible!important; background:var(--background)!important; color:var(--foreground)!important; }
|
|
10
|
+
* { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
|
|
11
|
+
body { margin:0; font:12px/1.5 system-ui,sans-serif; }
|
|
12
|
+
.report-heading { border-bottom:2px solid var(--violet); padding-bottom:16px; margin-bottom:20px; }
|
|
13
|
+
.report-heading h1 { font-size:26px; margin:0 0 8px; }
|
|
14
|
+
.report-heading p { margin:4px 0; color:var(--muted-foreground); }
|
|
15
|
+
.report-confidential { display:inline-block; margin:6px 0; padding:2px 8px; border:1px solid var(--destructive); border-radius:4px; color:var(--destructive); font-size:11px; font-weight:600; letter-spacing:.03em; text-transform:uppercase; }
|
|
16
|
+
.report-summary { margin:0 0 24px; }
|
|
17
|
+
.report-summary h2 { font-size:12px; margin:0 0 10px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-foreground); }
|
|
18
|
+
.summary-grid { display:flex; flex-wrap:wrap; gap:12px; }
|
|
19
|
+
.summary-tile { flex:1 1 140px; border:1px solid var(--border); border-radius:8px; padding:12px 14px; break-inside:avoid; }
|
|
20
|
+
.summary-value { display:block; font-size:22px; font-weight:600; }
|
|
21
|
+
.summary-label { display:block; font-size:11px; color:var(--muted-foreground); margin-top:2px; }
|
|
22
|
+
.summary-note { display:block; font-size:10px; color:var(--soft-foreground); margin-top:4px; }
|
|
23
|
+
.report-module { margin:0 0 20px; break-before:auto; }
|
|
24
|
+
.report-module h2,.report-module h3 { break-after:avoid; }
|
|
25
|
+
.report-module-usage, .report-module-fleet { break-inside:avoid; }
|
|
26
|
+
.report-module-usage label { min-height:0!important; }
|
|
27
|
+
.report-module-usage .space-y-4 > :not(:last-child) { margin-block-end:8px!important; }
|
|
28
|
+
.report-module-usage .report-row { padding-top:5px!important; padding-bottom:5px!important; }
|
|
29
|
+
.report-cost-metrics { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
|
|
30
|
+
.report-cost-metrics > div { padding:12px!important; break-inside:avoid; }
|
|
31
|
+
.report-cost-metrics .text-3xl { font-size:22px!important; }
|
|
32
|
+
.report-module > :first-child, .report-module header, .report-context { break-after:avoid; }
|
|
33
|
+
.report-module .report-row, .report-module tr { break-inside:avoid; }
|
|
34
|
+
.report-module thead { display:table-header-group; }
|
|
35
|
+
.report-module .report-row { padding-top:8px!important; padding-bottom:8px!important; }
|
|
36
|
+
.report-module a { min-height:0!important; }
|
|
37
|
+
.report-module > div { padding-top:12px!important; padding-bottom:12px!important; }
|
|
38
|
+
.report-module * { overflow:visible !important; max-height: none !important; animation:none!important; transition:none!important; box-shadow:none!important; }
|
|
39
|
+
.report-module a { color:inherit; text-decoration:none; }
|
|
40
|
+
.report-module svg { max-width:24px; }
|
|
41
|
+
.report-module [role=region] > div, .report-module [role=region] > p { break-inside:avoid; }
|
|
42
|
+
.report-module .sr-only { display:none!important; }
|
|
43
|
+
.report-context { font-size:11px; color:var(--muted-foreground); margin:0 0 8px; }
|
|
44
|
+
</style></head><body><header class="report-heading"><h1>${$(e.title||`Dashboard report`)}</h1><p>${$(e.generatedAt)} · ${$(e.source)}</p><span class="report-confidential">${Yn}</span><p>${$(Jn)}</p>${e.notices.map(e=>`<p>${$(e)}</p>`).join(``)}</header>${n.length?`<section class="report-summary"><h2>Executive summary</h2><div class="summary-grid">${n.map(e=>`<div class="summary-tile"><span class="summary-value">${$(e.value)}</span><span class="summary-label">${$(e.label)}</span>${e.note?`<span class="summary-note">${$(e.note)}</span>`:``}</div>`).join(``)}</div></section>`:``}${e.modules.map(e=>`<section class="report-module${e.id===`usage`?` report-module-usage`:e.id===`fleet`?` report-module-fleet`:``}"><p class="report-context">${$(e.filters)}</p>${e.html}</section>`).join(``)}</body></html>`}function ir({dashboard:e}){let[t,n]=(0,F.useState)(!1),[r,i]=(0,F.useState)(``),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(``),l=t=>{i(``);try{if(!e.current)return;let r=er(e.current,new Date().toISOString(),location.origin,s.trim());if(!r.modules.length){i(`Show at least one dashboard module before exporting.`);return}if(t===`csv`){let e=URL.createObjectURL(new Blob([nr(r)],{type:`text/csv;charset=utf-8`})),t=document.createElement(`a`);t.href=e,t.download=`dashboard-${r.generatedAt.replaceAll(`:`,`-`)}.csv`,document.body.append(t),t.click(),t.remove(),setTimeout(()=>URL.revokeObjectURL(e),1e3),n(!1)}else{o(!0);let e=[...document.querySelectorAll(`link[rel="stylesheet"],style`)].flatMap(e=>{if(e.tagName===`STYLE`)return[e.outerHTML];let t=e.href;if(new URL(t).origin!==location.origin)return[];let n=document.createElement(`link`);return n.rel=`stylesheet`,n.href=t,[n.outerHTML]}),t=document.createElement(`iframe`);t.title=`Dashboard PDF report`,t.style.cssText=`position:fixed;width:1000px;height:1px;bottom:0;left:0;border:0;opacity:0;pointer-events:none`;let a,s=()=>{clearTimeout(a),t.remove(),o(!1)};t.onload=async()=>{try{let e=t.contentWindow;await e.document.fonts.ready,e.addEventListener(`afterprint`,s,{once:!0}),e.focus(),e.print(),n(!1),o(!1)}catch{s(),i(`Could not open the print dialog. Please try again.`)}},a=setTimeout(s,12e4),t.srcdoc=rr(r,e),document.body.append(t)}}catch{o(!1),i(`Could not prepare the export. Please try again.`)}};return(0,I.jsxs)(Re,{open:t,onOpenChange:n,children:[(0,I.jsx)(Ie,{asChild:!0,children:(0,I.jsxs)(j,{variant:`outline`,className:`min-h-11`,disabled:a,children:[(0,I.jsx)(je,{className:`size-4`}),a?`Preparing report…`:`Export`]})}),(0,I.jsxs)(Le,{align:`end`,className:`max-w-[calc(100vw-2rem)] space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-sm font-medium`,children:`Export current dashboard`}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Visible modules, current filters and loaded rows. Hidden metrics are excluded.`}),(0,I.jsxs)(`label`,{className:`block space-y-1 text-xs text-muted-foreground`,children:[`Report title (optional)`,(0,I.jsx)(`input`,{className:`min-h-11 w-full rounded-md border bg-background px-3 text-sm text-foreground`,placeholder:`e.g. Fleet review for leadership`,value:s,onChange:e=>c(e.target.value)})]}),(0,I.jsx)(j,{className:`min-h-11 w-full`,onClick:()=>l(`pdf`),children:`PDF report…`}),(0,I.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Choose Save as PDF in the print dialog.`}),(0,I.jsx)(j,{variant:`outline`,className:`min-h-11 w-full`,onClick:()=>l(`csv`),children:`Download CSV`}),r&&(0,I.jsx)(`p`,{role:`alert`,className:`text-sm`,children:r})]})]})}var ar={overview:`Workspace overview`,portfolio:`Projects`,automations:`Automations`,fleet:`Queue & scheduling`,needsYou:`Needs you`,recent:`Recent results & GitHub`,usage:`Usage & cost`,trends:`Trends`};function or({id:e,children:t,wide:n}){let{attributes:r,listeners:i,setNodeRef:a,setActivatorNodeRef:o,transform:s,isDragging:c}=ie({id:e});return(0,I.jsxs)(`section`,{ref:a,"data-dashboard-module":e,className:`group/module relative min-w-0 ${n?`lg:col-span-2`:``} ${c?`z-20 opacity-80`:``}`,style:{transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0},children:[(0,I.jsx)(j,{ref:o,variant:`ghost`,className:`absolute -top-[22px] left-1/2 z-10 min-h-11 min-w-11 -translate-x-1/2 cursor-grab touch-none p-0 opacity-0 transition-opacity hover:bg-transparent focus-visible:opacity-100 active:cursor-grabbing group-hover/module:opacity-100 no-hover:opacity-100`,...r,...i,"aria-label":`Move ${ar[e]}`,children:(0,I.jsx)(`span`,{className:`flex h-4 w-8 items-center justify-center rounded-full border bg-card text-muted-foreground shadow-xs`,children:(0,I.jsx)(Xe,{className:`size-3.5`,"aria-hidden":`true`})})}),t]})}function sr({order:e,modules:t,onOrder:n}){let r=ae(A(le,{activationConstraint:{distance:8}}),A(k,{coordinateGetter:se})),i=e.filter(e=>t[e]),a=new Set([`overview`,`portfolio`,`usage`,`trends`]),o;for(let e of i)a.has(e)?(o&&a.add(o),o=void 0):o=o?void 0:e;o&&a.add(o);let s=e=>`${ar[e]}, position ${i.indexOf(e)+1} of ${i.length}`;return(0,I.jsx)(pe,{sensors:r,collisionDetection:he,accessibility:{announcements:{onDragStart:({active:e})=>`Picked up ${s(e.id)}.`,onDragOver:({active:e,over:t})=>t?`${ar[e.id]} moved to position ${i.indexOf(t.id)+1} of ${i.length}.`:void 0,onDragEnd:({active:e,over:t})=>t?`${ar[e.id]} dropped at position ${i.indexOf(t.id)+1} of ${i.length}.`:`Order unchanged. ${s(e.id)}.`,onDragCancel:({active:e})=>`Reordering cancelled. ${s(e.id)}.`},screenReaderInstructions:{draggable:`Press Space to pick up a module, use arrow keys to move, Space to drop, or Escape to cancel.`}},onDragEnd:({active:t,over:r})=>{!r||t.id===r.id||n(de(e,e.indexOf(t.id),e.indexOf(r.id)))},children:(0,I.jsx)(me,{items:i,strategy:fe,children:(0,I.jsx)(`div`,{className:`grid items-start gap-5 lg:grid-cols-2`,children:i.map(e=>(0,I.jsx)(or,{id:e,wide:a.has(e),children:t[e]},e))})})})}var cr=[`overview`,`needsYou`,`recent`,`fleet`,`automations`,`portfolio`,`usage`,`trends`],lr=e=>cr.includes(e);function ur(e=[]){let t=e.filter(lr);return(e=>t.length===e.length&&t.every((t,n)=>t===e[n]))(cr.filter(e=>e!==`automations`))?[...cr]:[...new Set([...t.includes(`overview`)?[]:[`overview`],...t,...cr])]}function dr(e=[],t){let n=0;return[...e.map(e=>lr(e)?t[n++]:e),...t.slice(n)]}function fr(){let e=d(),t=_(),[n,r]=(0,F.useState)(),[i,a]=(0,F.useState)(!1),o=(0,F.useRef)(void 0),c=(0,F.useRef)(!1),l=C.parse(e.data?.dashboard??{}),u=(0,F.useRef)(l);u.current=l;let p=n?.tiles??{automations:l.tiles?.automations??!0,fleet:l.tiles?.fleet??!0,needsYou:l.tiles?.needsYou??!0,recent:l.tiles?.recent??!0,usage:l.tiles?.usage??!0,trends:l.tiles?.trends??!0},h=ur(n?.order??l.order),g=(0,F.useRef)({tiles:p,order:h});g.current=n??{tiles:p,order:h};let v=e=>{let t={...g.current,...e};g.current=t,r(t),o.current=t},y=async()=>{if(!(c.current||!o.current)){for(c.current=!0;o.current;){let n=o.current;o.current=void 0;try{e.data||(u.current=C.parse((await s()).dashboard??{}));let i=await f({dashboard:{...u.current,order:dr(u.current.order,n.order),tiles:{...u.current?.tiles,...n.tiles}}});t.setQueryData(m.uiState,i),u.current=C.parse(i.dashboard??{}),a(!1),r(e=>e===n?void 0:e)}catch{a(!0),o.current||=n;break}}c.current=!1}},b=(0,F.useRef)(y);return b.current=y,(0,F.useEffect)(()=>()=>{b.current()},[]),(0,F.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>{y()},250);return()=>clearTimeout(e)},[n]),{tiles:p,order:h,setOrder:e=>v({order:ur(e)}),failed:i,ready:e.data!==void 0||e.isError,setTiles(e){v({tiles:e})},retry:()=>{y()}}}function pr(e,t){let n=cr.filter(e=>t.includes(e)),r=0;return e.map(e=>t.includes(e)?n[r++]:e)}var mr=[[`overview`,`Overview`],[`costs`,`Usage & cost`],[`automations`,`Automations`]];function hr(){let e=ee(),t=e.state?.dashboardEntry??e.key;return(0,I.jsx)(gr,{entryKey:t},t)}function gr({entryKey:e}){let t=ee(),[n,r]=te(),i=(0,F.useRef)(mt(e)).current,[a,o]=(0,F.useState)(i?.questions??0),[s,c]=(0,F.useState)(i?.reviews??0),[l,u]=(0,F.useState)(i?.feed??6),d=(0,F.useRef)(null),f=(0,F.useRef)(null),[p,m]=(0,F.useState)(!1),h=fr(),[g,_]=(0,F.useState)(!1),v=n.get(`view`)===`costs`?`costs`:n.get(`view`)===`automations`?`automations`:`overview`,y=mr.find(([e])=>e===v)[1],b=v===`costs`?[`usage`,`trends`]:v===`automations`?[`automations`]:[`fleet`,`needsYou`,`recent`],x=v===`overview`?[`overview`,`portfolio`,...b]:[...b],S=pr(h.order,x),C=()=>h.setTiles({...h.tiles,...Object.fromEntries(b.map(e=>[e,!0]))}),w=h.tiles,T={...w,automations:v===`automations`&&w.automations,fleet:v===`overview`&&w.fleet,needsYou:v===`overview`&&w.needsYou,recent:v===`overview`&&w.recent,usage:v===`costs`&&w.usage,trends:v===`costs`&&w.trends},ne=n.get(`feed`)===`tasks`?`tasks`:n.get(`feed`)===`github`?`github`:`all`,D=n.get(`panel`),O=D&&[`running`,`queued`,`scheduled`,`needs-you`].includes(D)?D:null,ie=T.fleet||T.needsYou||T.recent&&ne!==`github`||!!O,k=tn(h.ready&&ie),A=re();nn(h.ready&&T.fleet&&g);let ae=(0,F.useRef)({questions:a,reviews:s,feed:l,scroll:i?.scroll??0,focus:i?.focus});ae.current={...ae.current,questions:a,reviews:s,feed:l},(0,F.useEffect)(()=>{let t=d.current?.closest(`main`)??d.current,n=()=>{ae.current.scroll=t?.scrollTop??0},r=()=>{ae.current.focus=document.activeElement?.closest(`[data-dashboard-row]`)?.getAttribute(`data-dashboard-row`)??void 0};return t?.addEventListener(`scroll`,n),document.addEventListener(`focusin`,r),()=>{ht(e,ae.current),t?.removeEventListener(`scroll`,n),document.removeEventListener(`focusin`,r)}},[e]);let oe=(0,F.useRef)(!1),se=h.ready&&(!ie||!!k.data&&!k.isFetching);(0,F.useEffect)(()=>{if(!i||oe.current||!se)return;let e=!1,t=()=>{if(e)return!0;let t=d.current?.closest(`main`)??d.current;t&&(t.scrollTop=i.scroll);let n=!!t&&Math.abs(t.scrollTop-i.scroll)<1;if(!i.focus)return n;let r=document.querySelector(`[data-dashboard-row="${CSS.escape(i.focus)}"] a`);return r?(r.focus({preventScroll:!0}),n):(document.getElementById(`dashboard-needs-you`)?.focus({preventScroll:!0}),!1)},n=()=>{t()&&o()},r=new MutationObserver(n),a=typeof ResizeObserver>`u`?null:new ResizeObserver(n),o=()=>{e=!0,oe.current=!0,r.disconnect(),a?.disconnect()},s=requestAnimationFrame(()=>{n(),e||(r.observe(document.body,{childList:!0,subtree:!0}),d.current&&a?.observe(d.current))}),c=setTimeout(o,5e3),l=[`pointerdown`,`keydown`,`wheel`,`touchstart`];for(let e of l)document.addEventListener(e,o,{once:!0});return()=>{cancelAnimationFrame(s),clearTimeout(c),e=!0,r.disconnect(),a?.disconnect();for(let e of l)document.removeEventListener(e,o)}},[i,se]);let ce=i=>{let a=new URLSearchParams(n);i?a.set(`panel`,i):a.delete(`panel`),r(a,{replace:!0,state:{...t.state,dashboardEntry:e}})},le=(e,t)=>{f.current=t,ce(e)},de=k.data?k.data.counts.questions+k.data.counts.reviews:0;return(0,I.jsx)(ut.Provider,{value:e,children:(0,I.jsx)(dt.Provider,{value:!i||!k.isFetching&&!k.isError,children:(0,I.jsxs)(`div`,{ref:d,"data-route":`dashboard`,className:`mx-auto w-full max-w-[1440px] space-y-6 p-4 md:px-8 md:py-7`,children:[(0,I.jsxs)(`header`,{className:`flex flex-wrap items-end justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Dashboard`}),(0,I.jsxs)(`p`,{className:`mt-1 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground`,children:[`Across your workspace · Includes subtasks`,(0,I.jsxs)(`span`,{"data-export-exclude":!0,className:`inline-flex items-center gap-1.5 rounded-full border px-2 py-0.5 eyebrow`,children:[(0,I.jsx)(N,{tone:A.connected?`success`:`neutral`,pulse:A.connected}),A.connected?`Live`:`Offline`]})]})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(ir,{dashboard:d}),(0,I.jsxs)(Re,{open:p,onOpenChange:m,children:[(0,I.jsx)(Ie,{asChild:!0,children:(0,I.jsxs)(j,{variant:`outline`,className:`min-h-11`,children:[(0,I.jsx)(Ue,{className:`size-4`}),`Customize`]})}),(0,I.jsxs)(Le,{align:`end`,className:`max-h-[min(32rem,80dvh)] max-w-[calc(100vw-2rem)] overflow-y-auto`,children:[(0,I.jsx)(`p`,{className:`mb-3 text-sm font-medium`,children:`Optional modules in this view`}),b.map(e=>(0,I.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:w[e],disabled:!h.ready,onChange:t=>h.setTiles({...w,[e]:t.target.checked})}),{automations:`Automations`,fleet:`Queue & scheduling`,needsYou:`Needs you`,recent:`Recent results & GitHub`,usage:`Usage & cost`,trends:`Trends`}[e]]},e)),(0,I.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:`Drag a module by its handle. With keyboard: Space, arrow keys, Space. Escape cancels.`}),h.order.some((e,t)=>e!==S[t])&&(0,I.jsxs)(j,{variant:`ghost`,className:`min-h-11`,onClick:()=>h.setOrder(S),children:[`Reset `,y,` order`]}),(0,I.jsx)(`p`,{className:`my-3 text-xs text-muted-foreground`,children:`Shared across browsers using this workspace`}),b.some(e=>!w[e])&&(0,I.jsxs)(j,{variant:`outline`,className:`min-h-11`,disabled:!h.ready,onClick:()=>{C(),m(!1)},children:[`Show all in `,y]})]})]})]})]}),(0,I.jsx)(`nav`,{"aria-label":`Dashboard views`,className:`-mt-2 flex flex-wrap gap-5 border-b`,children:mr.map(([r,i])=>{let a=new URLSearchParams(n);return a.set(`view`,r),a.delete(`panel`),(0,I.jsx)(j,{asChild:!0,variant:`ghost`,className:`-mb-px min-h-11 rounded-none border-b-2 px-0.5 hover:bg-transparent ${v===r?`border-primary text-foreground`:`border-transparent`}`,children:(0,I.jsx)(E,{"aria-current":v===r?`page`:void 0,to:`?${a}`,replace:v===r,state:{...t.state,dashboardEntry:v===r?e:void 0},children:i})},r)})}),h.failed&&(0,I.jsxs)(`p`,{role:`alert`,className:`text-sm`,children:[`Layout changed for this session, but could not be saved.`,` `,(0,I.jsx)(j,{variant:`ghost`,className:`min-h-11`,onClick:h.retry,children:`Retry saving`})]}),ie&&!A.connected&&k.data&&(0,I.jsxs)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:[`Tasks disconnected · Last updated `,P(k.data.asOf),` ago`]}),ie&&k.isError&&(0,I.jsxs)(`p`,{role:`alert`,className:`rounded-md border p-4 text-sm`,children:[`Could not refresh dashboard.`,` `,k.data?`Showing the last available task state.`:``,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>{k.refetch()},children:`Retry`})]}),v===`costs`&&!Object.values(T).some(Boolean)?(0,I.jsxs)(`p`,{role:`status`,className:`flex flex-wrap items-center gap-2 text-sm text-muted-foreground`,children:[(0,I.jsx)(ue,{className:`size-4`,"aria-hidden":`true`}),`Optional modules in this view are hidden.`,(0,I.jsxs)(j,{variant:`outline`,className:`min-h-11`,onClick:()=>C(),children:[`Show all in `,y]})]}):null,k.isPending&&(T.fleet||T.needsYou)&&(0,I.jsx)(`p`,{className:`text-sm`,children:`Loading dashboard…`}),ie&&k.data&&(0,I.jsx)(G,{coverage:k.data.coverage,count:de,retry:()=>void k.refetch()}),v===`automations`&&(0,I.jsx)(Rt,{}),(0,I.jsx)(Yt,{active:v===`overview`,onCurrent:le,children:i=>h.ready&&(0,I.jsx)(sr,{order:h.order,onOrder:h.setOrder,modules:{...i,automations:T.automations?(0,I.jsx)(st,{}):null,fleet:T.fleet&&k.data?(0,I.jsxs)(M,{className:`gap-0 py-0`,children:[(0,I.jsx)(L,{rows:Object.entries({queued:k.data.counts.queued,scheduled:k.data.counts.scheduled,monitoring:k.data.counts.monitoring}).map(([e,t])=>({section:`fleet`,metric:e,value:t,unit:`tasks`,asOf:k.data.asOf}))}),(0,I.jsxs)(`div`,{className:`flex min-h-12 flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b px-4 py-2.5`,children:[(0,I.jsx)(`h2`,{className:`section-mark eyebrow text-muted-foreground`,children:`Queue & scheduling`}),(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,I.jsx)(N,{tone:A.connected?`success`:`neutral`}),A.connected?`Tasks connected`:`Tasks disconnected`]})]}),(0,I.jsx)(`div`,{className:`grid grid-cols-2 divide-x`,children:[[`queued`,`Queued`,k.data.counts.queued],[`scheduled`,`Scheduled`,k.data.counts.scheduled]].map(([e,t,n])=>(0,I.jsxs)(`button`,{"data-export-keep":!0,"aria-label":`${t}: ${n}`,className:`min-h-24 p-4 text-left transition-colors hover:bg-muted/40 focus-visible:outline-ring`,onClick:t=>le(e,t.currentTarget),children:[(0,I.jsx)(`span`,{className:`block eyebrow text-muted-foreground`,children:t}),(0,I.jsx)(`span`,{className:`mt-3 block text-3xl font-semibold leading-none tracking-tight tabular-nums`,children:n})]},e))}),(0,I.jsxs)(`details`,{open:g,onToggle:e=>_(e.currentTarget.open),className:`border-t px-4 py-3 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`summary`,{className:`flex w-fit cursor-pointer list-none items-center gap-1.5 rounded-sm text-muted-foreground transition-colors select-none hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 [&::-webkit-details-marker]:hidden py-2`,children:[(0,I.jsx)(B,{}),`Technical details`]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-x-5 gap-y-2`,children:[(0,I.jsxs)(`span`,{children:[k.data.counts.monitoring,` monitoring (included in Running)`]}),(0,I.jsx)(`span`,{children:`Agent processes`}),g&&(0,I.jsx)(_r,{running:k.data.counts.running})]})]})]}):null,needsYou:T.needsYou&&k.data?(0,I.jsx)(Un,{healthy:!k.isError,snapshot:k.data,questions:a,reviews:s,more:(e,t)=>e===`questions`?o(t):c(t)}):null,recent:T.recent?(0,I.jsx)(qn,{filter:ne,setFilter:i=>{let a=new URLSearchParams(n);a.set(`feed`,i||`all`),r(a,{replace:!0,state:{...t.state,dashboardEntry:e}}),u(6)},count:l,more:()=>u(e=>Math.min(60,e+20))}):null,usage:T.usage?(0,I.jsx)(Cn,{}):null,trends:T.trends?(0,I.jsx)(zn,{}):null}})}),v===`costs`&&(0,I.jsx)(It,{}),(0,I.jsx)(be,{open:!!O,onOpenChange:e=>{e||ce(null)},children:(0,I.jsxs)(ye,{className:`w-full overflow-y-auto sm:max-w-lg`,onCloseAutoFocus:e=>{e.preventDefault(),f.current?.focus()},children:[(0,I.jsxs)(ge,{children:[(0,I.jsxs)(ve,{children:[O===`needs-you`?`Needs you`:O?O[0].toUpperCase()+O.slice(1):`Tasks`,k.data&&O?` · ${O===`needs-you`?de:k.data.counts[O]}`:``]}),(0,I.jsx)(_e,{children:`Includes subtasks. Open a task to continue in its project.`})]}),!k.data&&k.isPending&&(0,I.jsx)(`p`,{className:`p-4`,role:`status`,children:`Loading tasks…`}),!k.data&&k.isError&&(0,I.jsxs)(`p`,{className:`p-4`,role:`alert`,children:[`Could not load tasks.`,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>{k.refetch()},children:`Retry`})]}),O&&k.data&&(0,I.jsx)(vr,{snapshot:k.data,group:O},O)]})})]})})})}function _r({running:e}){let{connected:t,samples:n}=re(),r=t?n:[],i=r.filter(e=>e.cpuPct!==null);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(L,{rows:[{section:`telemetry`,metric:`cpuPct`,value:i.length?i.reduce((e,t)=>e+(t.cpuPct??0),0):null,unit:`%`,reportedTasks:i.length,totalTasks:e,note:`Sum of sampled processes; may exceed 100%`},{section:`telemetry`,metric:`rssBytes`,value:r.length?r.reduce((e,t)=>e+t.rssBytes,0):null,unit:`bytes`,reportedTasks:r.length,totalTasks:e}]}),(0,I.jsxs)(`span`,{children:[`CPU`,` `,i.length?`${Math.round(i.reduce((e,t)=>e+(t.cpuPct??0),0))}%`:`unavailable`,` `,`· `,i.length,`/`,e,` measured`]}),(0,I.jsxs)(`span`,{children:[`RSS`,` `,r.length?`${(r.reduce((e,t)=>e+t.rssBytes,0)/1024**3).toFixed(1)} GiB`:`unavailable`,` `,`· `,r.length,`/`,e,` measured`]}),(0,I.jsx)(`span`,{children:`RSS sums process resident memory; CPU may exceed 100%.`})]})}function vr({snapshot:e,group:t}){let n=(0,F.useContext)(ut),r=(0,F.useRef)(gt(n,t)).current,[i,a]=(0,F.useState)(r?.count??20),o=(0,F.useRef)(null),s=(0,F.useRef)({count:i,scroll:r?.scroll??0});s.current.count=i,(0,F.useEffect)(()=>{let e=o.current?.closest(`[data-slot="sheet-content"]`),r=()=>{s.current.scroll=e?.scrollTop??0};return e?.addEventListener(`scroll`,r),()=>{_t(n,t,s.current),e?.removeEventListener(`scroll`,r)}},[n,t]);let c=Vn(e,t,i),l=ft(c.data,W,`panel:${t}`,i),u=Hn(e,t,i,l.rows.filter(e=>e.removed).map(e=>e.row)),d=(0,F.useRef)(null),f=(0,F.useRef)(!1);(0,F.useEffect)(()=>{if(!c.data||!r||f.current)return;f.current=!0;let e=o.current?.closest(`[data-slot="sheet-content"]`);e&&(e.scrollTop=r.scroll)},[c.data,r]);let p=t===`needs-you`?e.counts.questions+e.counts.reviews:e.counts[t];return(0,I.jsxs)(`div`,{ref:o,children:[(0,I.jsx)(`h3`,{ref:d,tabIndex:-1,className:`sr-only`,children:`Tasks`}),c.isPending&&(0,I.jsx)(`p`,{className:`p-4`,children:`Loading tasks…`}),(c.isError||u.isError)&&(0,I.jsxs)(`p`,{className:`p-4`,role:`alert`,children:[`Could not check current task state.`,` `,(0,I.jsx)(j,{className:`min-h-11`,onClick:()=>{c.refetch(),u.refetch()},children:`Retry`})]}),l.updates>0&&(0,I.jsxs)(j,{className:`m-4 min-h-11`,onClick:()=>{l.show(),d.current?.focus()},children:[l.updates,` updates — Show`]}),l.rows.map(({row:e,removed:n})=>(0,I.jsx)(vt,{row:u.data?.get(W(e))??e,removed:n&&!!u.data&&!u.data.has(W(e)),checking:!c.data||n&&!u.data,checkFailed:!c.data&&c.isError||n&&!u.data&&u.isError,queue:t===`needs-you`},W(e))),i<p&&(0,I.jsxs)(j,{className:`m-4 min-h-11`,disabled:c.isFetching,onClick:()=>a(e=>e+20),children:[`Show `,Math.min(20,p-i),` more tasks`]})]})}export{hr as DashboardRoute};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/diff-view-8m9Rnct7.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-runtime-CCIEwYL0.js","assets/utils-Br_dqwn-.js","assets/bundle-mjs-rHxsej31.js","assets/button-BqkA8Ovk.js","assets/check-B1z-_MCO.js","assets/chevron-right-DPaV033p.js","assets/pencil-RUM53auZ.js","assets/plus-Bdmhj8CR.js","assets/toaster-5ad4wwJ9.js","assets/use-submit-shortcut-BJ10ZshV.js","assets/diff-stat-CxDTnfya.js","assets/lib-BQXq3kEf.js","assets/clipboard-DvCUPLwM.js","assets/chunk-BO2N2NFS-Bde6epwZ.js","assets/preload-helper-Czpn1I53.js","assets/lib-BxQXEXDF.js","assets/markdown-YWy3FUHK.js","assets/alert-dialog-BihfE0uZ.js","assets/markdown-CP2EQDsL.js","assets/message-square-beq8DjLH.js","assets/scroll-within-DhWf-4MN.js","assets/zoomable-image-DCITEnK-.js","assets/types-BTlmexWF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Br_dqwn-.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{t as a}from"./diff-stat-CxDTnfya.js";import{i as o,n as s,r as c,t as l}from"./scroll-within-DhWf-4MN.js";var u=e(t(),1),d=n(),f=null,p=null;function m(){return p??=i(()=>import(`./diff-view-8m9Rnct7.js`).then(e=>f={View:e.DiffView},()=>(p=null,`failed`)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])),p}function h(e){let[t,n]=(0,u.useState)(f);return(0,u.useEffect)(()=>{if(f)return;let e=!1;return m().then(t=>{e||n(t)}),()=>{e=!0}},[]),e.files.length===0?(0,d.jsx)(`p`,{"data-slot":`diff-empty`,className:r(`px-1 text-xs text-soft-foreground`,e.className),children:`No changes.`}):t===`failed`?(0,d.jsx)(g,{...e}):t===null?(0,d.jsx)(`p`,{"data-slot":`diff-loading`,className:r(`px-1 text-xs text-soft-foreground`,e.className),children:`Loading diff…`}):(0,d.jsx)(t.View,{...e})}function g({files:e,wrap:t=!1,imageSrc:n,oldImageSrc:i,onOpenInApp:o,viewRef:c,className:f}){let p={adds:e.reduce((e,t)=>e+t.adds,0),dels:e.reduce((e,t)=>e+t.dels,0),files:e.length},m=(0,u.useRef)(null);return(0,u.useImperativeHandle)(c,()=>({scrollToPath:e=>{for(let t of m.current?.querySelectorAll(`[data-slot="diff-file"]`)??[])if(t.dataset.path===e){let e=l(t);e&&s(e,t,Number.parseFloat(getComputedStyle(t).scrollMarginTop)||0);return}}})),(0,d.jsxs)(`div`,{ref:m,"data-slot":`diff`,"data-fallback":`true`,className:r(`flex min-w-0 flex-col gap-3`,f),children:[(0,d.jsxs)(`p`,{"data-slot":`diff-totals`,className:`flex items-center gap-2 px-1 text-xs text-muted-foreground`,children:[(0,d.jsxs)(`span`,{children:[p.files,` `,p.files===1?`file`:`files`,` changed`]}),(0,d.jsx)(a,{stat:p})]}),e.map(e=>(0,d.jsx)(_,{file:e,wrap:t,imageSrc:n,onOpenInApp:o,oldImageSrc:i},`${e.oldPath??``}→${e.path}`))]})}function _({file:e,wrap:t,imageSrc:n,onOpenInApp:i,oldImageSrc:s}){return(0,d.jsxs)(`section`,{"data-slot":`diff-file`,"data-path":e.path,className:`min-w-0 scroll-mt-[var(--diff-sticky-top,0px)] overflow-clip rounded-md border border-border bg-card`,children:[(0,d.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-border/50 px-3 py-2`,children:[(0,d.jsx)(`span`,{"data-slot":`diff-file-path`,className:`min-w-0 truncate font-mono text-xs font-medium`,children:e.oldPath?`${e.oldPath} → ${e.path}`:e.path}),(0,d.jsx)(`span`,{className:`ml-auto shrink-0`,children:(0,d.jsx)(a,{stat:{adds:e.adds,dels:e.dels,files:1},className:`text-meta`})})]}),o(e)?(0,d.jsx)(c,{file:e,imageSrc:n,oldImageSrc:s,onOpenInApp:i}):e.binary?(0,d.jsx)(`p`,{className:`px-4 py-2.5 text-xs text-soft-foreground`,children:`Binary file — no text diff.`}):e.patch===``?(0,d.jsx)(`p`,{className:`px-4 py-2.5 text-xs text-soft-foreground`,children:`No content changes (metadata only).`}):(0,d.jsx)(`pre`,{className:r(`py-2 font-mono text-xs leading-[1.7]`,t?`break-words whitespace-pre-wrap`:`overflow-x-auto whitespace-pre`),children:e.patch.split(`
|
|
3
|
+
`).map((e,t)=>(0,d.jsxs)(`span`,{className:r(`block px-4`,e.startsWith(`+`)&&!e.startsWith(`+++`)&&`bg-diff-add`,e.startsWith(`-`)&&!e.startsWith(`---`)&&`bg-diff-del`,e.startsWith(`@@`)&&`text-soft-foreground`),children:[e,e===``?` `:``]},t))})]})}export{h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./react-runtime-CCIEwYL0.js";import{t}from"./utils-Br_dqwn-.js";var n=e();function r({stat:e,className:r}){let i=`+${e.adds} −${e.dels} across ${e.files} ${e.files===1?`file`:`files`}`,a=e.repointed?`${i} — measured against another branch checked out in this task's worktree, as this task found it`:void 0;return(0,n.jsxs)(`span`,{"data-slot":`diff-stat`,...a?{"data-repointed":`true`,"aria-label":a}:{},title:a??i,className:t(`font-mono text-xs font-semibold tabular-nums`,e.repointed&&`cursor-help underline decoration-dotted underline-offset-2`,r),children:[(0,n.jsxs)(`span`,{className:`text-success`,children:[`+`,e.adds]}),` `,(0,n.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.dels]})]})}export{r as t};
|