@wjarka/cezarion 0.17.0 → 0.18.0-dev.5793
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/bin.js +2 -0
- package/cez.js +2 -0
- package/cezarion.js +2 -0
- package/dist/cez.js +2 -0
- package/dist/cezarion.js +2 -0
- package/dist/hsq.js +2 -0
- package/dist/index.js +1 -835
- package/dist/server/app-type.d.ts +1 -6
- package/dist/server/app-type.js +1 -2
- package/hsq.js +2 -0
- package/package.json +20 -59
- package/web/dist/assets/activity-motion-0wHCeUs7.css +1 -0
- package/web/dist/assets/activity-motion-2nE59DAT.js +2 -0
- package/web/dist/assets/activity-route-R9lPc2jy.js +1 -0
- package/web/dist/assets/agent-accounts-f1cxwgfz.js +18 -0
- package/web/dist/assets/alert-dialog-Dj464rjk.js +1 -0
- package/web/dist/assets/arrow-right-Dh_Lx3um.js +1 -0
- package/web/dist/assets/button-CHUAMTHK.js +3 -0
- package/web/dist/assets/centered-state-DGyy0SuA.js +1 -0
- package/web/dist/assets/cez-idle-EVoUsgU3.js +1 -0
- package/web/dist/assets/commit-diff-panel-BJyNYmCY.js +1 -0
- package/web/dist/assets/control-locations-C9II3kPz.js +1 -0
- package/web/dist/assets/design-icons-DmYTv2r1.js +1 -0
- package/web/dist/assets/diff-D_9MtICR.js +3 -0
- package/web/dist/assets/diff-controls-BR2uqhwG.js +1 -0
- package/web/dist/assets/diff-view-xRPxXHXl.js +11 -0
- package/web/dist/assets/dropdown-menu-DhrBcVgr.js +1 -0
- package/web/dist/assets/es2015-D345RR4o.js +41 -0
- package/web/dist/assets/file-preview-D08Kq15E.js +2 -0
- package/web/dist/assets/git-toolbar-D9taioU5.js +1 -0
- package/web/dist/assets/github-bv_pBGc5.js +1 -0
- package/web/dist/assets/github-sidebar-model-B0Ufci5S.js +1 -0
- package/web/dist/assets/global-activity-route-QxTPDyx-.js +1 -0
- package/web/dist/assets/hourglass-B0lPAJvT.js +1 -0
- package/web/dist/assets/{image-preview-C_t9q45f.js → image-preview-Cq1vDiEo.js} +1 -1
- package/web/dist/assets/index-B18AqW0Z.css +1 -0
- package/web/dist/assets/index-DgU3yYUl.js +14 -0
- package/web/dist/assets/index.global-D3Ga_D3Y.js +1 -0
- package/web/dist/assets/live-protocol-BVn0UA_g.js +64 -0
- package/web/dist/assets/live-refetch-BdnmTJ_8.js +1 -0
- package/web/dist/assets/{live-worker-BizfZSoh.ts → live-worker-BWdeGzQX.ts} +2 -1
- package/web/dist/assets/loader-circle-CZkGEdoI.js +1 -0
- package/web/dist/assets/markdown-D7DUNWcJ.js +6 -0
- package/web/dist/assets/mermaid.min-3O9YjB2l.js +1 -0
- package/web/dist/assets/message-square-B-MD-8rD.js +1 -0
- package/web/dist/assets/{nav-row-styles-AoIhhIwf.js → nav-row-styles-BZUUavOF.js} +1 -1
- package/web/dist/assets/popover-DRcRI46x.js +1 -0
- package/web/dist/assets/preview-pane-connected-cD-MTiVN.js +3 -0
- package/web/dist/assets/project-router-MMOk9VbW.js +1 -0
- package/web/dist/assets/project-scope-context-B3M-u8R0.js +4 -0
- package/web/dist/assets/queries-DORTKwyN.js +1 -0
- package/web/dist/assets/repo-git-E_4Ighvg.js +1 -0
- package/web/dist/assets/report-reader-XVNQsXB4.js +1 -0
- package/web/dist/assets/report-title-D4Mbu2Er.js +1 -0
- package/web/dist/assets/reports-B7QAzibP.css +1 -0
- package/web/dist/assets/reports-B_PVTBzP.js +1 -0
- package/web/dist/assets/run-header-wm0gSs6X.js +2 -0
- package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +1 -0
- package/web/dist/assets/skills-D2RLxUIc.js +1 -0
- package/web/dist/assets/skills-DFBiAuJG.js +1 -0
- package/web/dist/assets/skills-workflows-C21NystW.css +1 -0
- package/web/dist/assets/sortable.esm-zp_qkYGV.js +5 -0
- package/web/dist/assets/tab-link-BvoGfK8S.js +1 -0
- package/web/dist/assets/task-changes-DNtkfFzQ.js +1 -0
- package/web/dist/assets/task-commits-CivO-OrN.js +1 -0
- package/web/dist/assets/task-files-dczkxV_G.js +1 -0
- package/web/dist/assets/task-github-item-DKV4yrcf.js +1 -0
- package/web/dist/assets/task-thread-DIaTTGEF.js +9 -0
- package/web/dist/assets/textarea-DlVUfdWG.js +1 -0
- package/web/dist/assets/thread-state-DIozHuHb.js +4 -0
- package/web/dist/assets/toaster-B1MyeHiE.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-D58ayxI4.js +1 -0
- package/web/dist/assets/useInfiniteQuery-BbYMWe23.js +1 -0
- package/web/dist/assets/useQuery-CqqnAJvu.js +1 -0
- package/web/dist/assets/workflows-YMEsGXeB.js +7 -0
- package/web/dist/assets/ws-BtSVmivO.js +1 -0
- package/web/dist/assets/zoomable-image-5pOUaPEg.js +1 -0
- package/web/dist/index.html +31 -15
- package/web/dist/live-worker.js +2 -2
- package/LICENSE +0 -22
- package/README.md +0 -1725
- package/dist/agent-config/account-identity.d.ts +0 -28
- package/dist/agent-config/account-identity.js +0 -131
- package/dist/agent-config/account-identity.js.map +0 -1
- package/dist/agent-config/catalog.d.ts +0 -70
- package/dist/agent-config/catalog.js +0 -383
- package/dist/agent-config/catalog.js.map +0 -1
- package/dist/agent-config/files.d.ts +0 -42
- package/dist/agent-config/files.js +0 -115
- package/dist/agent-config/files.js.map +0 -1
- package/dist/agent-config/model-settings/claude.d.ts +0 -2
- package/dist/agent-config/model-settings/claude.js +0 -11
- package/dist/agent-config/model-settings/claude.js.map +0 -1
- package/dist/agent-config/model-settings/codex.d.ts +0 -2
- package/dist/agent-config/model-settings/codex.js +0 -16
- package/dist/agent-config/model-settings/codex.js.map +0 -1
- package/dist/agent-config/model-settings/opencode.d.ts +0 -2
- package/dist/agent-config/model-settings/opencode.js +0 -8
- package/dist/agent-config/model-settings/opencode.js.map +0 -1
- package/dist/agent-config/model-settings/pi.d.ts +0 -2
- package/dist/agent-config/model-settings/pi.js +0 -38
- package/dist/agent-config/model-settings/pi.js.map +0 -1
- package/dist/agent-config/model-settings/shared.d.ts +0 -12
- package/dist/agent-config/model-settings/shared.js +0 -100
- package/dist/agent-config/model-settings/shared.js.map +0 -1
- package/dist/agent-config/model-settings/types.d.ts +0 -9
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/agent-config/models.d.ts +0 -9
- package/dist/agent-config/models.js +0 -40
- package/dist/agent-config/models.js.map +0 -1
- package/dist/agent-config/seed.d.ts +0 -15
- package/dist/agent-config/seed.js +0 -94
- package/dist/agent-config/seed.js.map +0 -1
- package/dist/agent-config/service.d.ts +0 -44
- package/dist/agent-config/service.js +0 -72
- package/dist/agent-config/service.js.map +0 -1
- package/dist/agent-config/validate.d.ts +0 -18
- package/dist/agent-config/validate.js +0 -82
- package/dist/agent-config/validate.js.map +0 -1
- package/dist/application-update/bin-recovery.d.ts +0 -5
- package/dist/application-update/bin-recovery.js +0 -96
- package/dist/application-update/bin-recovery.js.map +0 -1
- package/dist/application-update/discovery.d.ts +0 -22
- package/dist/application-update/discovery.js +0 -91
- package/dist/application-update/discovery.js.map +0 -1
- package/dist/application-update/helper.d.ts +0 -57
- package/dist/application-update/helper.js +0 -369
- package/dist/application-update/helper.js.map +0 -1
- package/dist/application-update/launcher.d.ts +0 -12
- package/dist/application-update/launcher.js +0 -59
- package/dist/application-update/launcher.js.map +0 -1
- package/dist/application-update/lock.d.ts +0 -4
- package/dist/application-update/lock.js +0 -70
- package/dist/application-update/lock.js.map +0 -1
- package/dist/application-update/npm-process.d.ts +0 -17
- package/dist/application-update/npm-process.js +0 -133
- package/dist/application-update/npm-process.js.map +0 -1
- package/dist/application-update/service.d.ts +0 -69
- package/dist/application-update/service.js +0 -456
- package/dist/application-update/service.js.map +0 -1
- package/dist/archive-on-merge-setting.d.ts +0 -15
- package/dist/archive-on-merge-setting.js +0 -14
- package/dist/archive-on-merge-setting.js.map +0 -1
- package/dist/artifacts/cli.d.ts +0 -9
- package/dist/artifacts/cli.js +0 -59
- package/dist/artifacts/cli.js.map +0 -1
- package/dist/artifacts/lifecycle.d.ts +0 -4
- package/dist/artifacts/lifecycle.js +0 -42
- package/dist/artifacts/lifecycle.js.map +0 -1
- package/dist/artifacts/resolve.d.ts +0 -18
- package/dist/artifacts/resolve.js +0 -103
- package/dist/artifacts/resolve.js.map +0 -1
- package/dist/artifacts/store.d.ts +0 -8
- package/dist/artifacts/store.js +0 -323
- package/dist/artifacts/store.js.map +0 -1
- package/dist/automations/automation-cli.d.ts +0 -59
- package/dist/automations/automation-cli.js +0 -509
- package/dist/automations/automation-cli.js.map +0 -1
- package/dist/automations/builtin-skill.d.ts +0 -7
- package/dist/automations/builtin-skill.js +0 -14
- package/dist/automations/builtin-skill.js.map +0 -1
- package/dist/automations/coordinator.d.ts +0 -33
- package/dist/automations/coordinator.js +0 -86
- package/dist/automations/coordinator.js.map +0 -1
- package/dist/automations/github-baseline.d.ts +0 -3
- package/dist/automations/github-baseline.js +0 -17
- package/dist/automations/github-baseline.js.map +0 -1
- package/dist/automations/github-poller.d.ts +0 -93
- package/dist/automations/github-poller.js +0 -303
- package/dist/automations/github-poller.js.map +0 -1
- package/dist/automations/prompts.d.ts +0 -12
- package/dist/automations/prompts.js +0 -160
- package/dist/automations/prompts.js.map +0 -1
- package/dist/automations/schedule-runner.d.ts +0 -149
- package/dist/automations/schedule-runner.js +0 -513
- package/dist/automations/schedule-runner.js.map +0 -1
- package/dist/automations/scheduler.d.ts +0 -87
- package/dist/automations/scheduler.js +0 -434
- package/dist/automations/scheduler.js.map +0 -1
- package/dist/automations/service.d.ts +0 -777
- package/dist/automations/service.js +0 -444
- package/dist/automations/service.js.map +0 -1
- package/dist/automations/store.d.ts +0 -160
- package/dist/automations/store.js +0 -738
- package/dist/automations/store.js.map +0 -1
- package/dist/automations/task-template.d.ts +0 -59
- package/dist/automations/task-template.js +0 -273
- package/dist/automations/task-template.js.map +0 -1
- package/dist/automations/tool-adapter.d.ts +0 -6
- package/dist/automations/tool-adapter.js +0 -108
- package/dist/automations/tool-adapter.js.map +0 -1
- package/dist/automations/types.d.ts +0 -1
- package/dist/automations/types.js +0 -2
- package/dist/automations/types.js.map +0 -1
- package/dist/autosave-cleanup.d.ts +0 -26
- package/dist/autosave-cleanup.js +0 -87
- package/dist/autosave-cleanup.js.map +0 -1
- package/dist/autosave-git.d.ts +0 -21
- package/dist/autosave-git.js +0 -204
- package/dist/autosave-git.js.map +0 -1
- package/dist/autosave-group.d.ts +0 -8
- package/dist/autosave-group.js +0 -61
- package/dist/autosave-group.js.map +0 -1
- package/dist/autosave-holders.d.ts +0 -34
- package/dist/autosave-holders.js +0 -204
- package/dist/autosave-holders.js.map +0 -1
- package/dist/autosave-windows.d.ts +0 -25
- package/dist/autosave-windows.js +0 -156
- package/dist/autosave-windows.js.map +0 -1
- package/dist/ci-wait/client.d.ts +0 -28
- package/dist/ci-wait/client.js +0 -105
- package/dist/ci-wait/client.js.map +0 -1
- package/dist/ci-wait/controller.d.ts +0 -756
- package/dist/ci-wait/controller.js +0 -334
- package/dist/ci-wait/controller.js.map +0 -1
- package/dist/ci-wait/errors.d.ts +0 -27
- package/dist/ci-wait/errors.js +0 -252
- package/dist/ci-wait/errors.js.map +0 -1
- package/dist/ci-wait/github.d.ts +0 -87
- package/dist/ci-wait/github.js +0 -278
- package/dist/ci-wait/github.js.map +0 -1
- package/dist/ci-wait/injection.d.ts +0 -3
- package/dist/ci-wait/injection.js +0 -26
- package/dist/ci-wait/injection.js.map +0 -1
- package/dist/ci-wait/mcp.d.ts +0 -3
- package/dist/ci-wait/mcp.js +0 -30
- package/dist/ci-wait/mcp.js.map +0 -1
- package/dist/ci-wait/resources.d.ts +0 -7
- package/dist/ci-wait/resources.js +0 -32
- package/dist/ci-wait/resources.js.map +0 -1
- package/dist/ci-wait/supervisor.d.ts +0 -29
- package/dist/ci-wait/supervisor.js +0 -260
- package/dist/ci-wait/supervisor.js.map +0 -1
- package/dist/ci-wait/tools.d.ts +0 -827
- package/dist/ci-wait/tools.js +0 -208
- package/dist/ci-wait/tools.js.map +0 -1
- package/dist/config.d.ts +0 -68
- package/dist/config.js +0 -209
- package/dist/config.js.map +0 -1
- package/dist/contract/active-provider.d.ts +0 -12
- package/dist/contract/agent-config.d.ts +0 -160
- package/dist/contract/agent-profiles.d.ts +0 -369
- package/dist/contract/application-update.d.ts +0 -32
- package/dist/contract/artifacts.d.ts +0 -83
- package/dist/contract/ask-schema.d.ts +0 -50
- package/dist/contract/ask.d.ts +0 -9
- package/dist/contract/attachments.d.ts +0 -35
- package/dist/contract/attention.d.ts +0 -90
- package/dist/contract/automation-requests.d.ts +0 -308
- package/dist/contract/automation-schedule.d.ts +0 -89
- package/dist/contract/automation-storage.d.ts +0 -512
- package/dist/contract/automations.d.ts +0 -1542
- package/dist/contract/ci-wait.d.ts +0 -222
- package/dist/contract/config-requests.d.ts +0 -36
- package/dist/contract/conversations.d.ts +0 -351
- package/dist/contract/defined.d.ts +0 -8
- package/dist/contract/delegation.d.ts +0 -1882
- package/dist/contract/discovery.d.ts +0 -141
- package/dist/contract/effort.d.ts +0 -18
- package/dist/contract/events.d.ts +0 -292
- package/dist/contract/github-requests.d.ts +0 -26
- package/dist/contract/github.d.ts +0 -732
- package/dist/contract/handoff.d.ts +0 -43
- package/dist/contract/health.d.ts +0 -124
- package/dist/contract/image-path.d.ts +0 -6
- package/dist/contract/index.d.ts +0 -59
- package/dist/contract/index.js +0 -5887
- package/dist/contract/live-coordination.d.ts +0 -158
- package/dist/contract/live-limits.d.ts +0 -8
- package/dist/contract/live.d.ts +0 -123
- package/dist/contract/pending-ask.d.ts +0 -58
- package/dist/contract/permissions.d.ts +0 -54
- package/dist/contract/preview.d.ts +0 -541
- package/dist/contract/project-limits.d.ts +0 -33
- package/dist/contract/projects.d.ts +0 -716
- package/dist/contract/provider-requests.d.ts +0 -77
- package/dist/contract/query-requests.d.ts +0 -52
- package/dist/contract/repo-requests.d.ts +0 -12
- package/dist/contract/repo.d.ts +0 -496
- package/dist/contract/run-labels.d.ts +0 -8
- package/dist/contract/run-limits.d.ts +0 -8
- package/dist/contract/run-predicates.d.ts +0 -32
- package/dist/contract/run-requests.d.ts +0 -33
- package/dist/contract/run-search.d.ts +0 -193
- package/dist/contract/runs.d.ts +0 -5340
- package/dist/contract/scheduled-tasks.d.ts +0 -187
- package/dist/contract/skills.d.ts +0 -56
- package/dist/contract/team-skill-ref.d.ts +0 -10
- package/dist/contract/tool-display.d.ts +0 -25
- package/dist/contract/ui-state-requests.d.ts +0 -60
- package/dist/contract/version.d.ts +0 -3
- package/dist/contract/voice.d.ts +0 -213
- package/dist/contract/waits.d.ts +0 -1204
- package/dist/contract/workflow-file.d.ts +0 -37
- package/dist/contract/workflow-requests.d.ts +0 -7
- package/dist/contract/workflows.d.ts +0 -250
- package/dist/contract/workspace.d.ts +0 -631
- package/dist/contract/zoned-time.d.ts +0 -26
- package/dist/core/agent-env.d.ts +0 -30
- package/dist/core/agent-env.js +0 -400
- package/dist/core/agent-env.js.map +0 -1
- package/dist/core/agent-model-policy.d.ts +0 -10
- package/dist/core/agent-model-policy.js +0 -36
- package/dist/core/agent-model-policy.js.map +0 -1
- package/dist/core/agent-profiles.d.ts +0 -50
- package/dist/core/agent-profiles.js +0 -105
- package/dist/core/agent-profiles.js.map +0 -1
- package/dist/core/agent-runner.d.ts +0 -394
- package/dist/core/agent-runner.js +0 -96
- package/dist/core/agent-runner.js.map +0 -1
- package/dist/core/ask.d.ts +0 -79
- package/dist/core/ask.js +0 -232
- package/dist/core/ask.js.map +0 -1
- package/dist/core/backend-detect.d.ts +0 -17
- package/dist/core/backend-detect.js +0 -209
- package/dist/core/backend-detect.js.map +0 -1
- package/dist/core/claude-cli-runner.d.ts +0 -72
- package/dist/core/claude-cli-runner.js +0 -910
- package/dist/core/claude-cli-runner.js.map +0 -1
- package/dist/core/claude-model-catalog.d.ts +0 -16
- package/dist/core/claude-model-catalog.js +0 -198
- package/dist/core/claude-model-catalog.js.map +0 -1
- package/dist/core/claude-ui-mapper.d.ts +0 -80
- package/dist/core/claude-ui-mapper.js +0 -696
- package/dist/core/claude-ui-mapper.js.map +0 -1
- package/dist/core/codex-app-server-runner.d.ts +0 -61
- package/dist/core/codex-app-server-runner.js +0 -1278
- package/dist/core/codex-app-server-runner.js.map +0 -1
- package/dist/core/codex-app-server-transport.d.ts +0 -52
- package/dist/core/codex-app-server-transport.js +0 -199
- package/dist/core/codex-app-server-transport.js.map +0 -1
- package/dist/core/codex-approvals.d.ts +0 -12
- package/dist/core/codex-approvals.js +0 -161
- package/dist/core/codex-approvals.js.map +0 -1
- package/dist/core/codex-model-catalog.d.ts +0 -10
- package/dist/core/codex-model-catalog.js +0 -110
- package/dist/core/codex-model-catalog.js.map +0 -1
- package/dist/core/codex-permissions.d.ts +0 -6
- package/dist/core/codex-permissions.js +0 -27
- package/dist/core/codex-permissions.js.map +0 -1
- package/dist/core/codex-stream-error.d.ts +0 -2
- package/dist/core/codex-stream-error.js +0 -12
- package/dist/core/codex-stream-error.js.map +0 -1
- package/dist/core/codex-turn-outcome.d.ts +0 -8
- package/dist/core/codex-turn-outcome.js +0 -30
- package/dist/core/codex-turn-outcome.js.map +0 -1
- package/dist/core/codex-ui-mapper.d.ts +0 -112
- package/dist/core/codex-ui-mapper.js +0 -808
- package/dist/core/codex-ui-mapper.js.map +0 -1
- package/dist/core/cursor-acp-runner.d.ts +0 -34
- package/dist/core/cursor-acp-runner.js +0 -777
- package/dist/core/cursor-acp-runner.js.map +0 -1
- package/dist/core/cursor-cli-flags.d.ts +0 -19
- package/dist/core/cursor-cli-flags.js +0 -47
- package/dist/core/cursor-cli-flags.js.map +0 -1
- package/dist/core/cursor-config-options.d.ts +0 -18
- package/dist/core/cursor-config-options.js +0 -31
- package/dist/core/cursor-config-options.js.map +0 -1
- package/dist/core/cursor-model-catalog.d.ts +0 -45
- package/dist/core/cursor-model-catalog.js +0 -300
- package/dist/core/cursor-model-catalog.js.map +0 -1
- package/dist/core/cursor-print-capabilities.d.ts +0 -16
- package/dist/core/cursor-print-capabilities.js +0 -141
- package/dist/core/cursor-print-capabilities.js.map +0 -1
- package/dist/core/cursor-print-process.d.ts +0 -31
- package/dist/core/cursor-print-process.js +0 -117
- package/dist/core/cursor-print-process.js.map +0 -1
- package/dist/core/cursor-print-runner.d.ts +0 -31
- package/dist/core/cursor-print-runner.js +0 -555
- package/dist/core/cursor-print-runner.js.map +0 -1
- package/dist/core/cursor-print-tool-catalog.d.ts +0 -10
- package/dist/core/cursor-print-tool-catalog.js +0 -91
- package/dist/core/cursor-print-tool-catalog.js.map +0 -1
- package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
- package/dist/core/cursor-print-ui-mapper.js +0 -553
- package/dist/core/cursor-print-ui-mapper.js.map +0 -1
- package/dist/core/cursor-provider-error.d.ts +0 -33
- package/dist/core/cursor-provider-error.js +0 -68
- package/dist/core/cursor-provider-error.js.map +0 -1
- package/dist/core/cursor-runner.d.ts +0 -24
- package/dist/core/cursor-runner.js +0 -149
- package/dist/core/cursor-runner.js.map +0 -1
- package/dist/core/cursor-ui-mapper.d.ts +0 -29
- package/dist/core/cursor-ui-mapper.js +0 -275
- package/dist/core/cursor-ui-mapper.js.map +0 -1
- package/dist/core/defined.d.ts +0 -1
- package/dist/core/defined.js +0 -2
- package/dist/core/defined.js.map +0 -1
- package/dist/core/hook-items.d.ts +0 -14
- package/dist/core/hook-items.js +0 -13
- package/dist/core/hook-items.js.map +0 -1
- package/dist/core/host-model-catalog.d.ts +0 -7
- package/dist/core/host-model-catalog.js +0 -21
- package/dist/core/host-model-catalog.js.map +0 -1
- package/dist/core/input-submissions.d.ts +0 -14
- package/dist/core/input-submissions.js +0 -26
- package/dist/core/input-submissions.js.map +0 -1
- package/dist/core/managed-session.d.ts +0 -6
- package/dist/core/managed-session.js +0 -116
- package/dist/core/managed-session.js.map +0 -1
- package/dist/core/model-identity.d.ts +0 -108
- package/dist/core/model-identity.js +0 -137
- package/dist/core/model-identity.js.map +0 -1
- package/dist/core/model-presets.d.ts +0 -10
- package/dist/core/model-presets.js +0 -77
- package/dist/core/model-presets.js.map +0 -1
- package/dist/core/ndjson.d.ts +0 -6
- package/dist/core/ndjson.js +0 -23
- package/dist/core/ndjson.js.map +0 -1
- package/dist/core/omp-model-catalog.d.ts +0 -43
- package/dist/core/omp-model-catalog.js +0 -205
- package/dist/core/omp-model-catalog.js.map +0 -1
- package/dist/core/omp-runner.d.ts +0 -72
- package/dist/core/omp-runner.js +0 -1049
- package/dist/core/omp-runner.js.map +0 -1
- package/dist/core/omp-ui-mapper.d.ts +0 -106
- package/dist/core/omp-ui-mapper.js +0 -882
- package/dist/core/omp-ui-mapper.js.map +0 -1
- package/dist/core/opencode-model-catalog.d.ts +0 -32
- package/dist/core/opencode-model-catalog.js +0 -215
- package/dist/core/opencode-model-catalog.js.map +0 -1
- package/dist/core/opencode-permissions.d.ts +0 -52
- package/dist/core/opencode-permissions.js +0 -101
- package/dist/core/opencode-permissions.js.map +0 -1
- package/dist/core/opencode-server-runner.d.ts +0 -61
- package/dist/core/opencode-server-runner.js +0 -1692
- package/dist/core/opencode-server-runner.js.map +0 -1
- package/dist/core/opencode-session-error.d.ts +0 -19
- package/dist/core/opencode-session-error.js +0 -42
- package/dist/core/opencode-session-error.js.map +0 -1
- package/dist/core/opencode-ui-mapper.d.ts +0 -137
- package/dist/core/opencode-ui-mapper.js +0 -768
- package/dist/core/opencode-ui-mapper.js.map +0 -1
- package/dist/core/pi-model-catalog.d.ts +0 -38
- package/dist/core/pi-model-catalog.js +0 -249
- package/dist/core/pi-model-catalog.js.map +0 -1
- package/dist/core/pi-runner.d.ts +0 -43
- package/dist/core/pi-runner.js +0 -827
- package/dist/core/pi-runner.js.map +0 -1
- package/dist/core/pi-ui-mapper.d.ts +0 -52
- package/dist/core/pi-ui-mapper.js +0 -395
- package/dist/core/pi-ui-mapper.js.map +0 -1
- package/dist/core/process-usage.d.ts +0 -74
- package/dist/core/process-usage.js +0 -218
- package/dist/core/process-usage.js.map +0 -1
- package/dist/core/provider-auth.d.ts +0 -168
- package/dist/core/provider-auth.js +0 -660
- package/dist/core/provider-auth.js.map +0 -1
- package/dist/core/provider-availability.d.ts +0 -3
- package/dist/core/provider-availability.js +0 -14
- package/dist/core/provider-availability.js.map +0 -1
- package/dist/core/runner-factory.d.ts +0 -11
- package/dist/core/runner-factory.js +0 -31
- package/dist/core/runner-factory.js.map +0 -1
- package/dist/core/runner-model-catalog.d.ts +0 -34
- package/dist/core/runner-model-catalog.js +0 -109
- package/dist/core/runner-model-catalog.js.map +0 -1
- package/dist/core/runner-runtime.d.ts +0 -40
- package/dist/core/runner-runtime.js +0 -88
- package/dist/core/runner-runtime.js.map +0 -1
- package/dist/core/runner-stderr.d.ts +0 -2
- package/dist/core/runner-stderr.js +0 -20
- package/dist/core/runner-stderr.js.map +0 -1
- package/dist/core/runner-tool-grants.d.ts +0 -21
- package/dist/core/runner-tool-grants.js +0 -64
- package/dist/core/runner-tool-grants.js.map +0 -1
- package/dist/core/secret-redaction.d.ts +0 -20
- package/dist/core/secret-redaction.js +0 -98
- package/dist/core/secret-redaction.js.map +0 -1
- package/dist/core/session-process.d.ts +0 -42
- package/dist/core/session-process.js +0 -360
- package/dist/core/session-process.js.map +0 -1
- package/dist/core/shell-env.d.ts +0 -17
- package/dist/core/shell-env.js +0 -51
- package/dist/core/shell-env.js.map +0 -1
- package/dist/core/ui-events.d.ts +0 -348
- package/dist/core/ui-events.js +0 -2
- package/dist/core/ui-events.js.map +0 -1
- package/dist/core/usage-limit.d.ts +0 -42
- package/dist/core/usage-limit.js +0 -152
- package/dist/core/usage-limit.js.map +0 -1
- package/dist/core/usage.d.ts +0 -11
- package/dist/core/usage.js +0 -15
- package/dist/core/usage.js.map +0 -1
- package/dist/core/v1-text-coalescer.d.ts +0 -36
- package/dist/core/v1-text-coalescer.js +0 -72
- package/dist/core/v1-text-coalescer.js.map +0 -1
- package/dist/data-gitignore.d.ts +0 -6
- package/dist/data-gitignore.js +0 -59
- package/dist/data-gitignore.js.map +0 -1
- package/dist/delegation/capacity.d.ts +0 -15
- package/dist/delegation/capacity.js +0 -30
- package/dist/delegation/capacity.js.map +0 -1
- package/dist/delegation/cli.d.ts +0 -4
- package/dist/delegation/cli.js +0 -481
- package/dist/delegation/cli.js.map +0 -1
- package/dist/delegation/context.d.ts +0 -40
- package/dist/delegation/context.js +0 -378
- package/dist/delegation/context.js.map +0 -1
- package/dist/delegation/conversations.d.ts +0 -9
- package/dist/delegation/conversations.js +0 -66
- package/dist/delegation/conversations.js.map +0 -1
- package/dist/delegation/credentials.d.ts +0 -21
- package/dist/delegation/credentials.js +0 -66
- package/dist/delegation/credentials.js.map +0 -1
- package/dist/delegation/destroy-observation.d.ts +0 -42
- package/dist/delegation/destroy-observation.js +0 -115
- package/dist/delegation/destroy-observation.js.map +0 -1
- package/dist/delegation/effort.d.ts +0 -1
- package/dist/delegation/effort.js +0 -11
- package/dist/delegation/effort.js.map +0 -1
- package/dist/delegation/execution-identity.d.ts +0 -180
- package/dist/delegation/execution-identity.js +0 -154
- package/dist/delegation/execution-identity.js.map +0 -1
- package/dist/delegation/idle-test-app.d.ts +0 -4
- package/dist/delegation/idle-test-app.js +0 -174
- package/dist/delegation/idle-test-app.js.map +0 -1
- package/dist/delegation/input.d.ts +0 -12
- package/dist/delegation/input.js +0 -50
- package/dist/delegation/input.js.map +0 -1
- package/dist/delegation/park-notice.d.ts +0 -42
- package/dist/delegation/park-notice.js +0 -71
- package/dist/delegation/park-notice.js.map +0 -1
- package/dist/delegation/policy.d.ts +0 -22
- package/dist/delegation/policy.js +0 -95
- package/dist/delegation/policy.js.map +0 -1
- package/dist/delegation/process-liveness.d.ts +0 -98
- package/dist/delegation/process-liveness.js +0 -213
- package/dist/delegation/process-liveness.js.map +0 -1
- package/dist/delegation/provision.d.ts +0 -32
- package/dist/delegation/provision.js +0 -177
- package/dist/delegation/provision.js.map +0 -1
- package/dist/delegation/questions.d.ts +0 -21
- package/dist/delegation/questions.js +0 -50
- package/dist/delegation/questions.js.map +0 -1
- package/dist/delegation/readiness.d.ts +0 -13
- package/dist/delegation/readiness.js +0 -19
- package/dist/delegation/readiness.js.map +0 -1
- package/dist/delegation/results.d.ts +0 -13
- package/dist/delegation/results.js +0 -154
- package/dist/delegation/results.js.map +0 -1
- package/dist/delegation/retry-backoff.d.ts +0 -31
- package/dist/delegation/retry-backoff.js +0 -26
- package/dist/delegation/retry-backoff.js.map +0 -1
- package/dist/delegation/routes.d.ts +0 -953
- package/dist/delegation/routes.js +0 -74
- package/dist/delegation/routes.js.map +0 -1
- package/dist/delegation/scratch-cleanup.d.ts +0 -28
- package/dist/delegation/scratch-cleanup.js +0 -145
- package/dist/delegation/scratch-cleanup.js.map +0 -1
- package/dist/delegation/service.d.ts +0 -211
- package/dist/delegation/service.js +0 -946
- package/dist/delegation/service.js.map +0 -1
- package/dist/delegation/transport.d.ts +0 -931
- package/dist/delegation/transport.js +0 -22
- package/dist/delegation/transport.js.map +0 -1
- package/dist/delegation/wait.d.ts +0 -14
- package/dist/delegation/wait.js +0 -72
- package/dist/delegation/wait.js.map +0 -1
- package/dist/delegation/windows-test-app.d.ts +0 -5
- package/dist/delegation/windows-test-app.js +0 -63
- package/dist/delegation/windows-test-app.js.map +0 -1
- package/dist/delegation/windows-workspace-identity.d.ts +0 -3
- package/dist/delegation/windows-workspace-identity.js +0 -22
- package/dist/delegation/windows-workspace-identity.js.map +0 -1
- package/dist/delegation/workspace.d.ts +0 -33
- package/dist/delegation/workspace.js +0 -556
- package/dist/delegation/workspace.js.map +0 -1
- package/dist/detached-process.d.ts +0 -103
- package/dist/detached-process.js +0 -301
- package/dist/detached-process.js.map +0 -1
- package/dist/discovery/catalog.d.ts +0 -15
- package/dist/discovery/catalog.js +0 -31
- package/dist/discovery/catalog.js.map +0 -1
- package/dist/discovery/cli.d.ts +0 -8
- package/dist/discovery/cli.js +0 -106
- package/dist/discovery/cli.js.map +0 -1
- package/dist/git-diff-base.d.ts +0 -41
- package/dist/git-diff-base.js +0 -116
- package/dist/git-diff-base.js.map +0 -1
- package/dist/git-index-copy.d.ts +0 -4
- package/dist/git-index-copy.js +0 -10
- package/dist/git-index-copy.js.map +0 -1
- package/dist/git-refs.d.ts +0 -11
- package/dist/git-refs.js +0 -14
- package/dist/git-refs.js.map +0 -1
- package/dist/git-worktree-lock-helper.d.ts +0 -7
- package/dist/git-worktree-lock-helper.js +0 -158
- package/dist/git-worktree-lock-helper.js.map +0 -1
- package/dist/git-worktree-lock.d.ts +0 -17
- package/dist/git-worktree-lock.js +0 -90
- package/dist/git-worktree-lock.js.map +0 -1
- package/dist/git-worktree-release.d.ts +0 -20
- package/dist/git-worktree-release.js +0 -27
- package/dist/git-worktree-release.js.map +0 -1
- package/dist/git-worktree.d.ts +0 -154
- package/dist/git-worktree.js +0 -858
- package/dist/git-worktree.js.map +0 -1
- package/dist/handoff.d.ts +0 -72
- package/dist/handoff.js +0 -206
- package/dist/handoff.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/install-as-command.d.ts +0 -40
- package/dist/install-as-command.js +0 -52
- package/dist/install-as-command.js.map +0 -1
- package/dist/merge-observations.d.ts +0 -13
- package/dist/merge-observations.js +0 -55
- package/dist/merge-observations.js.map +0 -1
- package/dist/open-url.d.ts +0 -2
- package/dist/open-url.js +0 -10
- package/dist/open-url.js.map +0 -1
- package/dist/pack-check.d.ts +0 -17
- package/dist/pack-check.js +0 -27
- package/dist/pack-check.js.map +0 -1
- package/dist/paths.d.ts +0 -138
- package/dist/paths.js +0 -220
- package/dist/paths.js.map +0 -1
- package/dist/planner.d.ts +0 -28
- package/dist/planner.js +0 -271
- package/dist/planner.js.map +0 -1
- package/dist/preview/agent-address.d.ts +0 -34
- package/dist/preview/agent-address.js +0 -51
- package/dist/preview/agent-address.js.map +0 -1
- package/dist/preview/agent-marker.d.ts +0 -17
- package/dist/preview/agent-marker.js +0 -71
- package/dist/preview/agent-marker.js.map +0 -1
- package/dist/preview/cdp-proxy.d.ts +0 -54
- package/dist/preview/cdp-proxy.js +0 -151
- package/dist/preview/cdp-proxy.js.map +0 -1
- package/dist/preview/cdp.d.ts +0 -49
- package/dist/preview/cdp.js +0 -167
- package/dist/preview/cdp.js.map +0 -1
- package/dist/preview/chromium.d.ts +0 -87
- package/dist/preview/chromium.js +0 -481
- package/dist/preview/chromium.js.map +0 -1
- package/dist/preview/dev-server.d.ts +0 -68
- package/dist/preview/dev-server.js +0 -317
- package/dist/preview/dev-server.js.map +0 -1
- package/dist/preview/host.d.ts +0 -221
- package/dist/preview/host.js +0 -967
- package/dist/preview/host.js.map +0 -1
- package/dist/preview/registration.d.ts +0 -68
- package/dist/preview/registration.js +0 -111
- package/dist/preview/registration.js.map +0 -1
- package/dist/preview/session.d.ts +0 -75
- package/dist/preview/session.js +0 -357
- package/dist/preview/session.js.map +0 -1
- package/dist/preview/url.d.ts +0 -6
- package/dist/preview/url.js +0 -17
- package/dist/preview/url.js.map +0 -1
- package/dist/process-wait/exit-file.d.ts +0 -29
- package/dist/process-wait/exit-file.js +0 -67
- package/dist/process-wait/exit-file.js.map +0 -1
- package/dist/process-wait/supervisor.d.ts +0 -30
- package/dist/process-wait/supervisor.js +0 -71
- package/dist/process-wait/supervisor.js.map +0 -1
- package/dist/release/manifests.d.ts +0 -103
- package/dist/release/manifests.js +0 -90
- package/dist/release/manifests.js.map +0 -1
- package/dist/release/snapshot.d.ts +0 -67
- package/dist/release/snapshot.js +0 -97
- package/dist/release/snapshot.js.map +0 -1
- package/dist/release/stable.d.ts +0 -38
- package/dist/release/stable.js +0 -55
- package/dist/release/stable.js.map +0 -1
- package/dist/runs/agent-tmpdir-removal.d.ts +0 -15
- package/dist/runs/agent-tmpdir-removal.js +0 -60
- package/dist/runs/agent-tmpdir-removal.js.map +0 -1
- package/dist/runs/agent-tmpdir.d.ts +0 -119
- package/dist/runs/agent-tmpdir.js +0 -829
- package/dist/runs/agent-tmpdir.js.map +0 -1
- package/dist/runs/arm-repo-handle.d.ts +0 -9
- package/dist/runs/arm-repo-handle.js +0 -45
- package/dist/runs/arm-repo-handle.js.map +0 -1
- package/dist/runs/auto-name.d.ts +0 -75
- package/dist/runs/auto-name.js +0 -179
- package/dist/runs/auto-name.js.map +0 -1
- package/dist/runs/client-request.d.ts +0 -11
- package/dist/runs/client-request.js +0 -26
- package/dist/runs/client-request.js.map +0 -1
- package/dist/runs/delegation-state.d.ts +0 -400
- package/dist/runs/delegation-state.js +0 -22
- package/dist/runs/delegation-state.js.map +0 -1
- package/dist/runs/event-history-agent-context.d.ts +0 -14
- package/dist/runs/event-history-agent-context.js +0 -105
- package/dist/runs/event-history-agent-context.js.map +0 -1
- package/dist/runs/event-history-context.d.ts +0 -15
- package/dist/runs/event-history-context.js +0 -109
- package/dist/runs/event-history-context.js.map +0 -1
- package/dist/runs/event-history.d.ts +0 -53
- package/dist/runs/event-history.js +0 -535
- package/dist/runs/event-history.js.map +0 -1
- package/dist/runs/history-compressor.d.ts +0 -29
- package/dist/runs/history-compressor.js +0 -116
- package/dist/runs/history-compressor.js.map +0 -1
- package/dist/runs/history-file.d.ts +0 -36
- package/dist/runs/history-file.js +0 -463
- package/dist/runs/history-file.js.map +0 -1
- package/dist/runs/history-stream.d.ts +0 -2
- package/dist/runs/history-stream.js +0 -62
- package/dist/runs/history-stream.js.map +0 -1
- package/dist/runs/legacy-index.d.ts +0 -49
- package/dist/runs/legacy-index.js +0 -155
- package/dist/runs/legacy-index.js.map +0 -1
- package/dist/runs/live-item-snapshots.d.ts +0 -13
- package/dist/runs/live-item-snapshots.js +0 -79
- package/dist/runs/live-item-snapshots.js.map +0 -1
- package/dist/runs/loaded-run-healing.d.ts +0 -3
- package/dist/runs/loaded-run-healing.js +0 -17
- package/dist/runs/loaded-run-healing.js.map +0 -1
- package/dist/runs/outcome-commit.d.ts +0 -98
- package/dist/runs/outcome-commit.js +0 -132
- package/dist/runs/outcome-commit.js.map +0 -1
- package/dist/runs/pull-requests.d.ts +0 -14
- package/dist/runs/pull-requests.js +0 -96
- package/dist/runs/pull-requests.js.map +0 -1
- package/dist/runs/raw-record.d.ts +0 -40
- package/dist/runs/raw-record.js +0 -133
- package/dist/runs/raw-record.js.map +0 -1
- package/dist/runs/retention.d.ts +0 -91
- package/dist/runs/retention.js +0 -182
- package/dist/runs/retention.js.map +0 -1
- package/dist/runs/review-gate.d.ts +0 -18
- package/dist/runs/review-gate.js +0 -21
- package/dist/runs/review-gate.js.map +0 -1
- package/dist/runs/run-claims.d.ts +0 -16
- package/dist/runs/run-claims.js +0 -24
- package/dist/runs/run-claims.js.map +0 -1
- package/dist/runs/run-database.d.ts +0 -380
- package/dist/runs/run-database.js +0 -1008
- package/dist/runs/run-database.js.map +0 -1
- package/dist/runs/run-index.d.ts +0 -26
- package/dist/runs/run-index.js +0 -212
- package/dist/runs/run-index.js.map +0 -1
- package/dist/runs/run-row.d.ts +0 -15
- package/dist/runs/run-row.js +0 -59
- package/dist/runs/run-row.js.map +0 -1
- package/dist/runs/store-open-error.d.ts +0 -24
- package/dist/runs/store-open-error.js +0 -61
- package/dist/runs/store-open-error.js.map +0 -1
- package/dist/runs/store.d.ts +0 -3090
- package/dist/runs/store.js +0 -4693
- package/dist/runs/store.js.map +0 -1
- package/dist/runs/task-markers.d.ts +0 -29
- package/dist/runs/task-markers.js +0 -78
- package/dist/runs/task-markers.js.map +0 -1
- package/dist/runs/task-refs.d.ts +0 -25
- package/dist/runs/task-refs.js +0 -74
- package/dist/runs/task-refs.js.map +0 -1
- package/dist/runs/transcript-facts-fold.d.ts +0 -64
- package/dist/runs/transcript-facts-fold.js +0 -109
- package/dist/runs/transcript-facts-fold.js.map +0 -1
- package/dist/runs/transcript-facts-load.d.ts +0 -11
- package/dist/runs/transcript-facts-load.js +0 -66
- package/dist/runs/transcript-facts-load.js.map +0 -1
- package/dist/runs/transcript-facts-queue.d.ts +0 -30
- package/dist/runs/transcript-facts-queue.js +0 -227
- package/dist/runs/transcript-facts-queue.js.map +0 -1
- package/dist/runs/transcript-facts-worker.d.ts +0 -15
- package/dist/runs/transcript-facts-worker.js +0 -26
- package/dist/runs/transcript-facts-worker.js.map +0 -1
- package/dist/runs/transcript-facts.d.ts +0 -39
- package/dist/runs/transcript-facts.js +0 -186
- package/dist/runs/transcript-facts.js.map +0 -1
- package/dist/runs/ui-event-sink.d.ts +0 -56
- package/dist/runs/ui-event-sink.js +0 -188
- package/dist/runs/ui-event-sink.js.map +0 -1
- package/dist/runs/webhook.d.ts +0 -191
- package/dist/runs/webhook.js +0 -360
- package/dist/runs/webhook.js.map +0 -1
- package/dist/runs/worker-execution.d.ts +0 -22
- package/dist/runs/worker-execution.js +0 -30
- package/dist/runs/worker-execution.js.map +0 -1
- package/dist/server/app-type.js.map +0 -1
- package/dist/server/archive-on-merge.d.ts +0 -35
- package/dist/server/archive-on-merge.js +0 -202
- package/dist/server/archive-on-merge.js.map +0 -1
- package/dist/server/capabilities.d.ts +0 -59
- package/dist/server/capabilities.js +0 -141
- package/dist/server/capabilities.js.map +0 -1
- package/dist/server/checkout-progress.d.ts +0 -10
- package/dist/server/checkout-progress.js +0 -27
- package/dist/server/checkout-progress.js.map +0 -1
- package/dist/server/checkout.d.ts +0 -129
- package/dist/server/checkout.js +0 -304
- package/dist/server/checkout.js.map +0 -1
- package/dist/server/cockpit-ownership.d.ts +0 -31
- package/dist/server/cockpit-ownership.js +0 -191
- package/dist/server/cockpit-ownership.js.map +0 -1
- package/dist/server/cold-repo-handles.d.ts +0 -14
- package/dist/server/cold-repo-handles.js +0 -78
- package/dist/server/cold-repo-handles.js.map +0 -1
- package/dist/server/completion-actions.d.ts +0 -30
- package/dist/server/completion-actions.js +0 -204
- package/dist/server/completion-actions.js.map +0 -1
- package/dist/server/create-project.d.ts +0 -71
- package/dist/server/create-project.js +0 -448
- package/dist/server/create-project.js.map +0 -1
- package/dist/server/forge/github-filters.d.ts +0 -22
- package/dist/server/forge/github-filters.js +0 -127
- package/dist/server/forge/github-filters.js.map +0 -1
- package/dist/server/forge/github-merge-requirements.d.ts +0 -18
- package/dist/server/forge/github-merge-requirements.js +0 -137
- package/dist/server/forge/github-merge-requirements.js.map +0 -1
- package/dist/server/forge/github.d.ts +0 -535
- package/dist/server/forge/github.js +0 -3200
- package/dist/server/forge/github.js.map +0 -1
- package/dist/server/forge/index.d.ts +0 -40
- package/dist/server/forge/index.js +0 -72
- package/dist/server/forge/index.js.map +0 -1
- package/dist/server/forge/types.d.ts +0 -244
- package/dist/server/forge/types.js +0 -2
- package/dist/server/forge/types.js.map +0 -1
- package/dist/server/fs-browse.d.ts +0 -80
- package/dist/server/fs-browse.js +0 -182
- package/dist/server/fs-browse.js.map +0 -1
- package/dist/server/git-changes.d.ts +0 -203
- package/dist/server/git-changes.js +0 -508
- package/dist/server/git-changes.js.map +0 -1
- package/dist/server/git.d.ts +0 -52
- package/dist/server/git.js +0 -170
- package/dist/server/git.js.map +0 -1
- package/dist/server/github.d.ts +0 -9
- package/dist/server/github.js +0 -8
- package/dist/server/github.js.map +0 -1
- package/dist/server/launch-key.d.ts +0 -5
- package/dist/server/launch-key.js +0 -31
- package/dist/server/launch-key.js.map +0 -1
- package/dist/server/live-routes.d.ts +0 -68
- package/dist/server/live-routes.js +0 -147
- package/dist/server/live-routes.js.map +0 -1
- package/dist/server/open-in-app.d.ts +0 -57
- package/dist/server/open-in-app.js +0 -177
- package/dist/server/open-in-app.js.map +0 -1
- package/dist/server/open-in-targets.d.ts +0 -42
- package/dist/server/open-in-targets.js +0 -110
- package/dist/server/open-in-targets.js.map +0 -1
- package/dist/server/open-in-terminal.d.ts +0 -73
- package/dist/server/open-in-terminal.js +0 -159
- package/dist/server/open-in-terminal.js.map +0 -1
- package/dist/server/pr.d.ts +0 -7
- package/dist/server/pr.js +0 -7
- package/dist/server/pr.js.map +0 -1
- package/dist/server/preview-cdp-socket.d.ts +0 -21
- package/dist/server/preview-cdp-socket.js +0 -112
- package/dist/server/preview-cdp-socket.js.map +0 -1
- package/dist/server/preview-socket.d.ts +0 -36
- package/dist/server/preview-socket.js +0 -126
- package/dist/server/preview-socket.js.map +0 -1
- package/dist/server/preview-sockets.d.ts +0 -14
- package/dist/server/preview-sockets.js +0 -18
- package/dist/server/preview-sockets.js.map +0 -1
- package/dist/server/project-context.d.ts +0 -192
- package/dist/server/project-context.js +0 -444
- package/dist/server/project-context.js.map +0 -1
- package/dist/server/provider-action-gate.d.ts +0 -5
- package/dist/server/provider-action-gate.js +0 -27
- package/dist/server/provider-action-gate.js.map +0 -1
- package/dist/server/provider-auth-runtime.d.ts +0 -32
- package/dist/server/provider-auth-runtime.js +0 -116
- package/dist/server/provider-auth-runtime.js.map +0 -1
- package/dist/server/repo-branches.d.ts +0 -99
- package/dist/server/repo-branches.js +0 -620
- package/dist/server/repo-branches.js.map +0 -1
- package/dist/server/repo-pull.d.ts +0 -18
- package/dist/server/repo-pull.js +0 -96
- package/dist/server/repo-pull.js.map +0 -1
- package/dist/server/run-event-feed.d.ts +0 -20
- package/dist/server/run-event-feed.js +0 -190
- package/dist/server/run-event-feed.js.map +0 -1
- package/dist/server/server-deps.d.ts +0 -37
- package/dist/server/server-deps.js +0 -114
- package/dist/server/server-deps.js.map +0 -1
- package/dist/server/server.d.ts +0 -28587
- package/dist/server/server.js +0 -5466
- package/dist/server/server.js.map +0 -1
- package/dist/server/start-run-options.d.ts +0 -82
- package/dist/server/start-run-options.js +0 -111
- package/dist/server/start-run-options.js.map +0 -1
- package/dist/server/static-ui.d.ts +0 -49
- package/dist/server/static-ui.js +0 -98
- package/dist/server/static-ui.js.map +0 -1
- package/dist/server/upgrade-router.d.ts +0 -23
- package/dist/server/upgrade-router.js +0 -53
- package/dist/server/upgrade-router.js.map +0 -1
- package/dist/server/validators.d.ts +0 -80
- package/dist/server/validators.js +0 -85
- package/dist/server/validators.js.map +0 -1
- package/dist/server/ws.d.ts +0 -65
- package/dist/server/ws.js +0 -200
- package/dist/server/ws.js.map +0 -1
- package/dist/server/wsl.d.ts +0 -25
- package/dist/server/wsl.js +0 -92
- package/dist/server/wsl.js.map +0 -1
- package/dist/server-install/engine.d.ts +0 -47
- package/dist/server-install/engine.js +0 -317
- package/dist/server-install/engine.js.map +0 -1
- package/dist/server-install/npx-cache.d.ts +0 -36
- package/dist/server-install/npx-cache.js +0 -104
- package/dist/server-install/npx-cache.js.map +0 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +0 -6
- package/dist/server-install/platforms/macosx-ngrok.js +0 -371
- package/dist/server-install/platforms/macosx-ngrok.js.map +0 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +0 -54
- package/dist/server-install/platforms/ubuntu-vps.js +0 -1066
- package/dist/server-install/platforms/ubuntu-vps.js.map +0 -1
- package/dist/server-install/state.d.ts +0 -50
- package/dist/server-install/state.js +0 -180
- package/dist/server-install/state.js.map +0 -1
- package/dist/server-install/steps.d.ts +0 -108
- package/dist/server-install/steps.js +0 -332
- package/dist/server-install/steps.js.map +0 -1
- package/dist/server-install/strategies.d.ts +0 -4
- package/dist/server-install/strategies.js +0 -20
- package/dist/server-install/strategies.js.map +0 -1
- package/dist/server-install/types.d.ts +0 -284
- package/dist/server-install/types.js +0 -118
- package/dist/server-install/types.js.map +0 -1
- package/dist/server-install/ui.d.ts +0 -36
- package/dist/server-install/ui.js +0 -130
- package/dist/server-install/ui.js.map +0 -1
- package/dist/session-context.d.ts +0 -64
- package/dist/session-context.js +0 -264
- package/dist/session-context.js.map +0 -1
- package/dist/skills-provision.d.ts +0 -62
- package/dist/skills-provision.js +0 -325
- package/dist/skills-provision.js.map +0 -1
- package/dist/skills-remote.d.ts +0 -129
- package/dist/skills-remote.js +0 -782
- package/dist/skills-remote.js.map +0 -1
- package/dist/skills.d.ts +0 -71
- package/dist/skills.js +0 -249
- package/dist/skills.js.map +0 -1
- package/dist/subcommands.d.ts +0 -11
- package/dist/subcommands.js +0 -24
- package/dist/subcommands.js.map +0 -1
- package/dist/task-cli/cli.d.ts +0 -38
- package/dist/task-cli/cli.js +0 -710
- package/dist/task-cli/cli.js.map +0 -1
- package/dist/task-cli/discovery.d.ts +0 -25
- package/dist/task-cli/discovery.js +0 -98
- package/dist/task-cli/discovery.js.map +0 -1
- package/dist/task-cli/hint.d.ts +0 -20
- package/dist/task-cli/hint.js +0 -14
- package/dist/task-cli/hint.js.map +0 -1
- package/dist/task-cli/http.d.ts +0 -49
- package/dist/task-cli/http.js +0 -109
- package/dist/task-cli/http.js.map +0 -1
- package/dist/task-cli/projections.d.ts +0 -68
- package/dist/task-cli/projections.js +0 -76
- package/dist/task-cli/projections.js.map +0 -1
- package/dist/task-cli/watch.d.ts +0 -119
- package/dist/task-cli/watch.js +0 -475
- package/dist/task-cli/watch.js.map +0 -1
- package/dist/ui-state.d.ts +0 -41
- package/dist/ui-state.js +0 -90
- package/dist/ui-state.js.map +0 -1
- package/dist/update-check.d.ts +0 -2
- package/dist/update-check.js +0 -26
- package/dist/update-check.js.map +0 -1
- package/dist/voice/decide.d.ts +0 -32
- package/dist/voice/decide.js +0 -297
- package/dist/voice/decide.js.map +0 -1
- package/dist/voice/decision-log.d.ts +0 -52
- package/dist/voice/decision-log.js +0 -107
- package/dist/voice/decision-log.js.map +0 -1
- package/dist/voice/engine.d.ts +0 -119
- package/dist/voice/engine.js +0 -60
- package/dist/voice/engine.js.map +0 -1
- package/dist/voice/fake-engine.d.ts +0 -10
- package/dist/voice/fake-engine.js +0 -192
- package/dist/voice/fake-engine.js.map +0 -1
- package/dist/voice/jev-engine.d.ts +0 -17
- package/dist/voice/jev-engine.js +0 -110
- package/dist/voice/jev-engine.js.map +0 -1
- package/dist/voice/pending-ask.d.ts +0 -17
- package/dist/voice/pending-ask.js +0 -50
- package/dist/voice/pending-ask.js.map +0 -1
- package/dist/voice/routes.d.ts +0 -115
- package/dist/voice/routes.js +0 -91
- package/dist/voice/routes.js.map +0 -1
- package/dist/voice/sentence.d.ts +0 -21
- package/dist/voice/sentence.js +0 -61
- package/dist/voice/sentence.js.map +0 -1
- package/dist/voice/thresholds.d.ts +0 -28
- package/dist/voice/thresholds.js +0 -29
- package/dist/voice/thresholds.js.map +0 -1
- package/dist/webhooks/cli.d.ts +0 -18
- package/dist/webhooks/cli.js +0 -145
- package/dist/webhooks/cli.js.map +0 -1
- package/dist/webhooks/prompt.d.ts +0 -5
- package/dist/webhooks/prompt.js +0 -26
- package/dist/webhooks/prompt.js.map +0 -1
- package/dist/workflows/active-run.d.ts +0 -167
- package/dist/workflows/active-run.js +0 -21
- package/dist/workflows/active-run.js.map +0 -1
- package/dist/workflows/attachment-path.d.ts +0 -6
- package/dist/workflows/attachment-path.js +0 -40
- package/dist/workflows/attachment-path.js.map +0 -1
- package/dist/workflows/continuation-admission.d.ts +0 -913
- package/dist/workflows/continuation-admission.js +0 -265
- package/dist/workflows/continuation-admission.js.map +0 -1
- package/dist/workflows/execution-account.d.ts +0 -13
- package/dist/workflows/execution-account.js +0 -18
- package/dist/workflows/execution-account.js.map +0 -1
- package/dist/workflows/grouped-command.d.ts +0 -31
- package/dist/workflows/grouped-command.js +0 -143
- package/dist/workflows/grouped-command.js.map +0 -1
- package/dist/workflows/input-acknowledgement.d.ts +0 -152
- package/dist/workflows/input-acknowledgement.js +0 -38
- package/dist/workflows/input-acknowledgement.js.map +0 -1
- package/dist/workflows/line-order.d.ts +0 -5
- package/dist/workflows/line-order.js +0 -25
- package/dist/workflows/line-order.js.map +0 -1
- package/dist/workflows/load.d.ts +0 -17
- package/dist/workflows/load.js +0 -61
- package/dist/workflows/load.js.map +0 -1
- package/dist/workflows/outcome-batches.d.ts +0 -20
- package/dist/workflows/outcome-batches.js +0 -25
- package/dist/workflows/outcome-batches.js.map +0 -1
- package/dist/workflows/question-routing.d.ts +0 -8
- package/dist/workflows/question-routing.js +0 -18
- package/dist/workflows/question-routing.js.map +0 -1
- package/dist/workflows/run-scheduling.d.ts +0 -35
- package/dist/workflows/run-scheduling.js +0 -61
- package/dist/workflows/run-scheduling.js.map +0 -1
- package/dist/workflows/run-states.d.ts +0 -190
- package/dist/workflows/run-states.js +0 -295
- package/dist/workflows/run-states.js.map +0 -1
- package/dist/workflows/run.d.ts +0 -2405
- package/dist/workflows/run.js +0 -10745
- package/dist/workflows/run.js.map +0 -1
- package/dist/workflows/turn-end.d.ts +0 -116
- package/dist/workflows/turn-end.js +0 -68
- package/dist/workflows/turn-end.js.map +0 -1
- package/dist/workflows/types.d.ts +0 -83
- package/dist/workflows/types.js +0 -192
- package/dist/workflows/types.js.map +0 -1
- package/dist/workflows/waits.d.ts +0 -74
- package/dist/workflows/waits.js +0 -197
- package/dist/workflows/waits.js.map +0 -1
- package/dist/workspace/agent-accounts.d.ts +0 -128
- package/dist/workspace/agent-accounts.js +0 -280
- package/dist/workspace/agent-accounts.js.map +0 -1
- package/dist/workspace/agent-profiles.d.ts +0 -124
- package/dist/workspace/agent-profiles.js +0 -190
- package/dist/workspace/agent-profiles.js.map +0 -1
- package/dist/workspace/config.d.ts +0 -181
- package/dist/workspace/config.js +0 -389
- package/dist/workspace/config.js.map +0 -1
- package/dist/workspace/migrations.d.ts +0 -35
- package/dist/workspace/migrations.js +0 -147
- package/dist/workspace/migrations.js.map +0 -1
- package/dist/workspace/projects-cli.d.ts +0 -25
- package/dist/workspace/projects-cli.js +0 -172
- package/dist/workspace/projects-cli.js.map +0 -1
- package/dist/workspace/projects.d.ts +0 -129
- package/dist/workspace/projects.js +0 -267
- package/dist/workspace/projects.js.map +0 -1
- package/dist/workspace/semaphore.d.ts +0 -145
- package/dist/workspace/semaphore.js +0 -196
- package/dist/workspace/semaphore.js.map +0 -1
- package/dist/workspace/ui-state.d.ts +0 -36
- package/dist/workspace/ui-state.js +0 -55
- package/dist/workspace/ui-state.js.map +0 -1
- package/dist/workspace/webhooks.d.ts +0 -40
- package/dist/workspace/webhooks.js +0 -146
- package/dist/workspace/webhooks.js.map +0 -1
- package/dist/worktree-manifest.d.ts +0 -165
- package/dist/worktree-manifest.js +0 -530
- package/dist/worktree-manifest.js.map +0 -1
- package/dist/worktree-setup.d.ts +0 -85
- package/dist/worktree-setup.js +0 -164
- package/dist/worktree-setup.js.map +0 -1
- package/scripts/benchmark-run-store-fixture.ts +0 -432
- package/scripts/benchmark-run-store.ts +0 -743
- package/scripts/benchmark-stuck-destroys.ts +0 -143
- package/scripts/check-pack.mjs +0 -48
- package/scripts/inline-contract.mjs +0 -165
- package/scripts/install-as-command.mjs +0 -122
- package/scripts/measure-transcript-facts-health.mjs +0 -87
- package/scripts/measure-transcript-facts-lag.mjs +0 -68
- package/scripts/mock-autonomous.mjs +0 -11
- package/scripts/mock-ci-tool.mjs +0 -111
- package/scripts/mock-claude-model-refusal.mjs +0 -42
- package/scripts/mock-claude.mjs +0 -1065
- package/scripts/mock-codex-app-server.mjs +0 -905
- package/scripts/mock-codex-coalesce-steer.mjs +0 -59
- package/scripts/mock-codex-reverse-steer.mjs +0 -130
- package/scripts/mock-cursor-acp.mjs +0 -423
- package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
- package/scripts/mock-cursor-hang-stdin.mjs +0 -30
- package/scripts/mock-cursor-print.mjs +0 -256
- package/scripts/mock-deferred-turn-start.mjs +0 -16
- package/scripts/mock-delivery-control.d.mts +0 -23
- package/scripts/mock-delivery-control.mjs +0 -80
- package/scripts/mock-env-record.mjs +0 -11
- package/scripts/mock-failure-control.d.mts +0 -13
- package/scripts/mock-failure-control.mjs +0 -68
- package/scripts/mock-multi-pr.mjs +0 -7
- package/scripts/mock-nudge.mjs +0 -45
- package/scripts/mock-omp-rpc.mjs +0 -779
- package/scripts/mock-opencode-serve.mjs +0 -1230
- package/scripts/mock-pi-rpc.mjs +0 -698
- package/scripts/mock-runner-crash.mjs +0 -58
- package/scripts/mock-session-context.d.mts +0 -5
- package/scripts/mock-session-context.mjs +0 -56
- package/scripts/mock-silent-tail.mjs +0 -85
- package/scripts/mock-turn-messages.mjs +0 -5
- package/scripts/omp-ci-wait.mjs +0 -29
- package/scripts/omp-restrict-delegation.yml +0 -4
- package/scripts/pi-ci-wait.mjs +0 -17
- package/scripts/pi-default-tools.mjs +0 -22
- package/scripts/pi-project-skills.mjs +0 -59
- package/scripts/pi-retry-degraded-service.mjs +0 -16
- package/scripts/probe-cursor-print.mjs +0 -627
- package/scripts/seed-archive-profile.ts +0 -53
- package/scripts/sync-readme.mjs +0 -20
- package/scripts/test-process-usage.mjs +0 -47
- package/scripts/transcript-facts-fixture.mjs +0 -53
- package/scripts/voice-replay.ts +0 -50
- package/scripts/windows-workspace-identity.cs +0 -208
- package/scripts/windows-workspace-identity.ps1 +0 -10
- package/web/dist/assets/alert-dialog-DfctKUMw.js +0 -1
- package/web/dist/assets/button-CeupvoKG.js +0 -41
- package/web/dist/assets/centered-state-hDsyXrnH.js +0 -1
- package/web/dist/assets/cez-idle-D3aj_9lp.js +0 -1
- package/web/dist/assets/diff-BnIXZK3i2.js +0 -3
- package/web/dist/assets/diff-controls-GewpW9aF.js +0 -1
- package/web/dist/assets/diff-view-Byo7gpvW.js +0 -11
- package/web/dist/assets/dropdown-menu-COj_J5wd.js +0 -6
- package/web/dist/assets/git-toolbar-DY0z0n4S.js +0 -1
- package/web/dist/assets/github-DwU6ALRK.js +0 -1
- package/web/dist/assets/index-BOfE8pyD.js +0 -34
- package/web/dist/assets/index-D9HpsmdW.css +0 -1
- package/web/dist/assets/lib-BQXq3kEf.js +0 -1
- package/web/dist/assets/live-protocol-Uce2NwEX.js +0 -64
- package/web/dist/assets/play-CmVAj_fu.js +0 -1
- package/web/dist/assets/popover-D56fhiXj.js +0 -1
- package/web/dist/assets/preview-pane-connected-BmVqfSU5.js +0 -3
- package/web/dist/assets/reference-chip-gQNk-4jc.js +0 -1
- package/web/dist/assets/repo-git-B5ECDUuv.js +0 -1
- package/web/dist/assets/run-header-C0Y1NvEM.js +0 -2
- package/web/dist/assets/skill-empty-hint-oOtzR3v0.js +0 -1
- package/web/dist/assets/skills-DUeTkZ9z.js +0 -1
- package/web/dist/assets/status-dot-1PR0i69P.js +0 -1
- package/web/dist/assets/tab-link-DmWk4l5O.js +0 -1
- package/web/dist/assets/task-changes-DKZXuW89.js +0 -1
- package/web/dist/assets/task-commits-BZ6KxWdF.js +0 -1
- package/web/dist/assets/task-files-DlF7Apcn.js +0 -2
- package/web/dist/assets/task-github-item-CVPo3geZ.js +0 -1
- package/web/dist/assets/task-thread-mm4-ECyo.js +0 -9
- package/web/dist/assets/thread-state-CIw2BlhT.js +0 -4
- package/web/dist/assets/use-hand-to-agent-state-BCDjzHnG.js +0 -1
- package/web/dist/assets/workflows-D8vYD-ql.js +0 -7
- package/web/dist/assets/zoomable-image-CxQSsfcn.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{A as t,M as n}from"./button-CHUAMTHK.js";import{i as r}from"./react-runtime-CCIEwYL0.js";import{r as i,t as a}from"./live-refetch-BdnmTJ_8.js";import{$ as o,$r as s,An as c,At as l,B as u,Br as d,Ct as f,Dn as p,Er as m,Ft as h,Gr as g,H as _,Hn as v,Hr as y,Ht as ee,I as te,It as ne,Jr as b,Kn as re,Kr as ie,L as ae,Ln as oe,Lt as se,M as ce,Mt as le,N as ue,Nt as de,Ot as fe,Pt as pe,Q as me,R as he,Rt as ge,S as _e,St as ve,Tn as ye,Tr as be,Tt as xe,U as Se,Ur as Ce,Ut as we,V as Te,Vr as Ee,W as De,Wr as Oe,X as ke,Xt as Ae,Y as je,Yr as Me,Yt as Ne,Z as x,_ as Pe,_t as Fe,ai as Ie,at as Le,bn as Re,br as S,bt as ze,ci as Be,cn as Ve,cr as C,ct as He,dn as Ue,dt as We,ei as Ge,en as Ke,et as qe,fi as Je,fn as Ye,ft as Xe,gi as Ze,gn as Qe,gt as $e,h as et,ht as tt,i as nt,jr as rt,jt as it,kn as at,kt as ot,l as st,ln as ct,lt,mt as ut,nt as dt,ot as ft,pi as pt,pt as mt,q as ht,r as gt,ri as _t,rt as vt,st as yt,tt as bt,ui as xt,un as St,ut as Ct,v as wt,vt as Tt,wn as Et,wt as Dt,x as Ot,xn as kt,xt as At,y as jt,yn as Mt,yt as Nt,z as Pt,zr as Ft}from"./project-scope-context-B3M-u8R0.js";import{I as w,L as It,N as Lt,lt as T}from"./live-protocol-BVn0UA_g.js";import{t as Rt}from"./useInfiniteQuery-BbYMWe23.js";import{t as E}from"./useQuery-CqqnAJvu.js";import{n as zt,r as D,t as Bt}from"./ws-BtSVmivO.js";import{n as Vt}from"./toaster-B1MyeHiE.js";var Ht=class extends s{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ut(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ge({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),T.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ut(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Wt=class extends Ze{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Je(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&_t(t.mutationKey)!==_t(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ut();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){T.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function Gt(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function Kt(e,t,n){let r=e.slice(0);return r[t]=n,r}var qt=class extends Ze{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,T.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!Je(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(Gt(e,n).forEach(e=>{e.destroy()}),Gt(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=xt(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new Me(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=Kt(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&T.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},O=e(r(),1);function k({queries:e,...t},n){let r=b(n),i=ie(),a=g(),o=O.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{Ft(e);let t=r.getQueryCache().get(e.queryHash);y(e,a,t)}),Oe(a);let[s]=O.useState(()=>new qt(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),f=!i&&t.subscribed!==!1;O.useSyncExternalStore(O.useCallback(e=>f?s.subscribe(T.batchCalls(e)):Be,[s,f]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),O.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let p=c.some((e,t)=>Ee(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&Ee(n,e)?d(n,new Me(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let m=c.find((e,t)=>{let n=o[t];return n&&Ce({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m?.error)throw m.error;return l(u())}function A(e,t){let n=b(t),[r]=O.useState(()=>new Wt(n,e));O.useEffect(()=>{r.setOptions(e)},[r,e]);let i=O.useSyncExternalStore(O.useCallback(e=>r.subscribe(T.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=O.useCallback((e,t)=>{r.mutate(e,t).catch(Be)},[r]);if(i.error&&pt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function j(e={}){let t=e.projectId??n();return{projectId:t,cacheScope:e.cacheScope??(e.boot?`default`:t)}}function M(e,t={}){return{...j(t),runId:e}}function Jt(e){if(e.workflow===`(planned)`||e.workflow===`(inbox)`){let t=(e.steps??[]).find(e=>e.kind===`agent`);if(t?.name)return t.name}return e.workflow}var N=[`workspace`,`runs-index`],P=e=>[e.cacheScope,`runs`,`list`],F=e=>[e.cacheScope,`runs`,`detail`,e.runId],I=e=>typeof e==`function`?e():e;function Yt(e){let{seenAt:t,...n}=e;return n}function Xt(e,t){let n=Yt(e);return t.seenAt===void 0?n:{...n,seenAt:t.seenAt}}function Zt(e,t,n){return t?{...e,seenAt:n}:Yt(e)}function Qt(e){let t=()=>{e.invalidateQueries({queryKey:N})};function r(r,i){if(r===`index`)return t();let a=typeof i==`function`?i():i;if(r===`indexed`){t(),e.invalidateQueries({queryKey:[n(),`runs`]}),e.invalidateQueries({queryKey:[a.projectId,`runs`,`list`]});return}if(r===`runs`)return e.invalidateQueries({queryKey:[a.cacheScope,`runs`]});let o=m(),s=[a.projectId,a.cacheScope],c=o!==void 0&&s.some(e=>e===o||e==="default")?[o,`default`]:[],l=new Set([...s,...c,n()]);return Promise.all([...l].map(t=>e.invalidateQueries({queryKey:[t,`runs`]}))).then(()=>void 0)}async function i(n,r){await e.cancelQueries({queryKey:P(I(n))}),await e.cancelQueries({queryKey:F(I(n))});let i=e.getQueryData(P(I(n))),a=e.getQueryData(F(I(n))),o=I(n).runId,s=new Date().toISOString();return e.setQueryData(P(I(n)),e=>e?.map(e=>e.id===o?Zt(e,r,s):e)),e.setQueryData(F(I(n)),e=>e&&Zt(e,r,s)),{id:o,prevList:i,prevDetail:a,rollback(){if(!r){i&&e.setQueryData(P(I(n)),i),a&&e.setQueryData(F(I(n)),a);return}let t=i?.find(e=>e.id===o);t&&e.setQueryData(P(I(n)),e=>e?.map(e=>e.id===o?Xt(e,t):e)),a&&e.setQueryData(F(I(n)),e=>e&&Xt(e,a))},settle(i){let a=e=>e.id===(r?o:i.id)?Zt(e,r,i.seenAt):e;e.setQueryData(P(I(n)),e=>e?.map(a));let s={...I(n),runId:r?o:i.id};e.setQueryData(F(s),e=>e?a(e):i),t()}}}async function a(t,n){await e.cancelQueries({queryKey:N});let i=e.getQueryData(N),a=n();return e.setQueryData(N,e=>e===void 0?e:{...e,runs:e.runs.map(e=>e.projectId===t.projectId&&e.id===t.runId?a(e):e)}),{previous:i,rollback(){i&&e.setQueryData(N,i)},settle(){r(`indexed`,t)}}}return{patchRead:i,patchIndex:a,invalidateAfter:r}}function L(){let e=b();return(0,O.useMemo)(()=>Qt(e),[e])}function $t(e){return e.type===`run`?e.run.id:e.id}function R(e,t){return{...e,runs:t}}function en(e,t){let n=0;for(let r of e)r.projectId===t&&r.archived&&(n+=1);return n}function tn(e,t){let n=e.findIndex(e=>(e.createdAt??``).localeCompare(t.createdAt)<0),r=[...e];return r.splice(n<0?e.length:n,0,t),r}function nn(e,t,n){return n?n.has(t):e.runs.some(e=>e.projectId===t)}function rn(e,t,n){let{project:r}=t,i=$t(t),a=e.runs.findIndex(e=>e.projectId===r&&e.id===i),o=a>=0?e.runs[a]:void 0,s=e.truncated.includes(r);if(t.type===`deleted`)return o?{index:R(e,e.runs.filter((e,t)=>t!==a)),reconcile:s&&o.archived}:{index:e,reconcile:!1};let{run:c}=t;if(c.delegation?.role===`worker`)return o?{index:R(e,e.runs.filter((e,t)=>t!==a)),reconcile:!1}:{index:e,reconcile:!1};if(!o&&!nn(e,r,n))return{index:e,reconcile:!0};let l=xt(o,{projectId:r,...c});if(o){if(l===o)return{index:e,reconcile:!1};let t=[...e.runs];t[a]=l;let n=o.archived!==l.archived&&(s||en(t,r)>e.perProjectLimit);return{index:R(e,t),reconcile:n}}if(s)return on(e,l);let u=tn(e.runs,l);return{index:R(e,u),reconcile:l.archived&&en(u,r)>e.perProjectLimit}}function an(e,t){let n;for(let r of e)r.projectId===t&&r.archived&&(n===void 0||r.createdAt<n)&&(n=r.createdAt);return n}function on(e,t){let n=an(e.runs,t.projectId),r=n!==void 0&&t.createdAt>n;return t.archived&&!r?{index:e,reconcile:!1}:{index:R(e,tn(e.runs,t)),reconcile:t.archived||n===void 0||t.createdAt<n}}function sn(e,t,n){let r=!1,i=e.runs.map(e=>{if(e.projectId!==t)return e;let i=n[e.id];if(i){let t=xt(e.usage,i);return t===e.usage?e:(r=!0,{...e,usage:t})}if(e.usage===void 0)return e;r=!0;let{usage:a,...o}=e;return o});return r?R(e,i):e}function cn(e,t){let n=e.runs.filter(e=>e.projectId!==t),r=e.truncated.filter(e=>e!==t),i=Object.prototype.hasOwnProperty.call(e.referenceStatuses,t);if(n.length===e.runs.length&&r.length===e.truncated.length&&!i)return e;let a={...e.referenceStatuses};return delete a[t],{...e,runs:n,truncated:r,referenceStatuses:a}}function ln(){return{stream:void 0,lastStream:void 0,mismatch:void 0,floor:void 0,changes:new Map}}function un(e,t,n){if(e.lastStream===t)e.floor=Math.max(e.floor??n,n);else{for(let[n,r]of e.changes)r.generation!==t&&e.changes.delete(n);e.floor=n}e.stream=t,e.lastStream=t,e.mismatch=void 0}function dn(e){e.stream=void 0}function fn(e,t,n=!1){let r=e.stream;if(r===void 0)return!1;(e.floor===void 0||n)&&(e.floor=t.seq-1);let i=JSON.stringify([r,t.project,$t(t)]),a=e.changes.get(i);return(!a||a.seq<t.seq)&&e.changes.set(i,{...t,generation:r}),!0}function pn(e,t){for(let[n,r]of e.changes)r.project===t&&e.changes.delete(n)}function mn(e){return typeof e.generation==`string`&&typeof e.eventSeq==`number`}function hn(e,t,n){if(!mn(t))return{index:t,reconcile:!1};let{generation:r,eventSeq:i}=t;if(e.stream!==void 0&&e.stream!==r){let n=e.mismatch!==r;return e.mismatch=r,{index:t,reconcile:n}}let a=e.lastStream===r&&e.floor!==void 0,o=a&&i<e.floor,s=t,c=o,l=[...e.changes.entries()].filter(([,e])=>e.generation===r),u=l.map(([,e])=>e).filter(e=>e.seq>i).sort((e,t)=>e.seq-t.seq);for(let e of u){let t=rn(s,e,n);s=t.index,c||=t.reconcile}for(let[t,n]of l)n.seq<=i&&e.changes.delete(t);return a&&!o&&(e.floor=i),{index:s,reconcile:c}}var z=[`workspace`,`runs-index`],gn=[`workspace`,`projects`],_n=6e4,vn=100,yn=new WeakMap;function B(e){let t=yn.get(e);return t||(t=wn(e),yn.set(e,t)),t}function bn(e,t){return typeof e!=`object`||!e||!Array.isArray(e.runs)?e:B(t).merge(e)}function xn(e){let t=e.getQueryData(gn)?.projects;return t?new Set(t.map(e=>e.id)):void 0}function Sn(e,t,n){if(!(!e||typeof e.eventSeq!=`number`||typeof t.eventSeq!=`number`))return e.generation===t.generation?t.eventSeq<e.eventSeq?e:void 0:n!==void 0&&e.generation===n&&t.generation!==n?e:void 0}function Cn(e,t){return t.type===`run-summary`?{type:`run`,project:e,seq:t.seq,run:t.summary}:{type:`deleted`,project:e,seq:t.seq,id:t.id}}function wn(e){let t=ln(),n=[],r,i,a,o,s=!1,c=-1/0,l=new Set,u=!1,d,f=!1,p=()=>{if(!u){if(u=!0,d?.()){f=!0;return}_({hold:!0})}},m=t=>{c=Date.now(),e.setQueryData(z,t)},h=()=>e.getQueryData(z),g=()=>{clearTimeout(a),a=void 0;let t=e.getQueryCache().find({queryKey:z,exact:!0}),n=(t!==void 0&&t.state.data===void 0&&t.state.fetchStatus!==`idle`?e.cancelQueries({queryKey:z,exact:!0}).then(()=>e.invalidateQueries({queryKey:z})):e.invalidateQueries({queryKey:z})).catch(()=>void 0).finally(()=>{o===n&&(o=void 0,s&&(s=!1,g()))});return o=n,n},_=(e={})=>o?(s=!0,o):e.hold?(a??=setTimeout(()=>{g()},400),Promise.resolve()):g(),v=()=>{r!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(r),r=void 0,clearTimeout(i),i=void 0;let t=n;n=[];let a=h();if(!a||t.length===0)return;let o=xn(e),s=a,c=!1;for(let e of t){if(e.generation!==a.generation)continue;if(e.type===`usage`){l.has(e.project)||(s=sn(s,e.project,e.usage));continue}if(l.has(e.change.project)||e.change.seq<=a.eventSeq)continue;let t=rn(s,e.change,o);s=t.index,c||=t.reconcile}s!==a&&m(s),c&&_({hold:!0})},y=()=>{if(i!==void 0)return;let e=c+250-Date.now();if(e>0){i=setTimeout(v,e);return}i=setTimeout(v,vn),typeof requestAnimationFrame==`function`&&(r=requestAnimationFrame(v))};return{ready(e,n){un(t,e,n),u=!1,f&&(f=!1,_({hold:!0}))},detach(){dn(t)},run(e,r,i=!1){if(l.has(e))return;let a=Cn(e,r);if(!fn(t,a,i)){p();return}n.push({type:`change`,change:a,generation:t.stream}),y()},usage(e,r){if(!l.has(e)){if(t.stream===void 0){p();return}n.push({type:`usage`,project:e,usage:r,generation:t.stream}),y()}},dropProject(e){l.add(e),pn(t,e),n=n.filter(t=>(t.type===`change`?t.change.project:t.project)!==e);let r=h();if(!r)return;let i=cn(r,e);i!==r&&m(i)},setUnknownGenerationHandler(e){d=e},restoreProject(e){l.delete(e)},merge(n){let r=h(),i=hn(t,n,xn(e));for(let e of l)i.index=cn(i.index,e);return i.reconcile&&queueMicrotask(()=>{_({hold:!0})}),Sn(r,n,t.stream)??i.index},reconcile:_,flush:v,stop(){r!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(r),r=void 0,clearTimeout(i),i=void 0,clearTimeout(a),a=void 0,n=[],s=!1}}}var Tn={draft:{label:`Draft`,hint:`the author has not marked it ready for review`,tone:`neutral`},"review-required":{label:`Waiting for review`,hint:`checks are fine, no one has reviewed it yet`,tone:`info`},"changes-requested":{label:`Changes requested`,hint:`a reviewer asked for edits before this can merge`,tone:`danger`},"checks-pending":{label:`Checks running`,hint:`CI has not finished on the latest commit`,tone:`pending`},"checks-failing":{label:`Checks failing`,hint:`CI is red on the latest commit`,tone:`danger`},ready:{label:`Ready to merge`,hint:`open, checks pass, nothing is waiting on a reviewer`,tone:`success`},merged:{label:`Merged`,hint:`this landed on its base branch`,tone:`merged`},closed:{label:`Closed`,hint:`closed without merging — the work did not land`,tone:`danger`},open:{label:`Open`,hint:`still open on the tracker`,tone:`success`},completed:{label:`Closed as completed`,hint:`the issue was resolved`,tone:`accent`},"not-planned":{label:`Closed as not planned`,hint:`the issue was declined — nothing shipped for it`,tone:`neutral`}},En={label:`Merge conflicts`,hint:`this branch no longer merges cleanly into its base — rebase or merge the base in`,tone:`conflict`};function Dn(e){return typeof e==`string`&&Object.hasOwn(Tn,e)}function On(e){return e!==void 0&&Dn(e)?Tn[e]:void 0}var V=new Map(Pn()),kn=1e3;function An(e,t){if(V.get(e)!==t){for(V.delete(e),V.set(e,t);V.size>kn;){let e=V.keys().next().value;if(e===void 0)break;V.delete(e)}Ln()}}var H=new Set(Fn());function jn(e,t){if(H.has(e)!==t){if(t)for(H.add(e);H.size>kn;){let e=H.values().next().value;if(e===void 0)break;H.delete(e)}else H.delete(e);Ln()}}var Mn=`cez.reference-statuses.v1`,Nn=`cez.reference-conflicts.v1`;function Pn(){try{let e=globalThis.sessionStorage?.getItem(Mn);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`&&Dn(e[1])):[]}catch{return[]}}function Fn(){try{let e=globalThis.sessionStorage?.getItem(Nn);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}var In;function Ln(){In===void 0&&(In=setTimeout(()=>{In=void 0;try{globalThis.sessionStorage?.setItem(Mn,JSON.stringify([...V])),globalThis.sessionStorage?.setItem(Nn,JSON.stringify([...H]))}catch{}},250))}var U=e=>`${e.projectId}\u0000${e.kind}#${e.number}`;function Rn(e,t){return{...e?{status:e}:{},...t?{conflicting:!0}:{}}}function zn(e){return[...e.prs.map(t=>({projectId:e.projectId,kind:`PR`,number:t})),...e.issues.map(t=>({projectId:e.projectId,kind:`Issue`,number:t}))]}function Bn(e,t,n,r,i,a){let o=r.prs[n.number]??r.issues[n.number];if(!o){e.set(t,{state:`unknown`,...i?{status:i}:{}});return}let s=r.conflicts?r.conflicts.includes(n.number):void 0;An(t,o),s!==void 0&&jn(t,s),e.set(t,{state:`ready`,status:o,...s??a?{conflicting:!0}:{}})}function Vn(e,t,n){let r=U(t),i=V.get(r),a=H.has(r)?!0:void 0,o=n.data;if(o?.available){Bn(e,r,t,o,i,a);return}if(o){e.set(r,{state:`unavailable`,reason:o.reason,...Rn(i,a)});return}if(n.isError){e.set(r,{state:`unavailable`,reason:n.error instanceof Error?n.error.message:void 0,...Rn(i,a)});return}e.set(r,{state:`loading`,...Rn(i,a)})}function Hn(e,t){let n=new Map;return t.forEach((t,r)=>{let i=e[r];if(i)for(let e of zn(i))Vn(n,e,t)}),n}function Un(e){return C(e)?!1:e.status===`queued`||e.status===`running`||e.status===`waiting`}function Wn(e){return Un(e)&&e.status!==`queued`}function Gn(e,t,n){return e.archived||!(e.status===`done`||e.status===`failed`||e.status===`cancelled`)||e.delegation?.role===`worker`||n!==void 0&&re(e)!==n?!1:t===`unpinned`?!e.pinned:t!==`pinned`||e.pinned===!0}var Kn=[`done`,`failed`];function qn(e){return e.archived||C(e)||!Kn.includes(e.status)?!1:e.finishedAt!==void 0}function Jn(e){let t=e.finishedAt;return t===void 0||!qn(e)?!1:e.seenAt===void 0||e.seenAt<t}function Yn(e){let t=/\/(\d+)\/?$/.exec(e.trim()),n=t?Number(t[1]):NaN;return Number.isInteger(n)&&n>0?n:null}function Xn(e){let t=new Set;for(let n of[e.pullRequestUrl,e.referencedPullRequestUrl,e.referencedIssueUrl]){let e=n?Yn(n):null;e!==null&&t.add(e)}for(let n of[e.prNumber,e.issueNumber,e.markerRefs?.pr,e.markerRefs?.issue])typeof n==`number`&&Number.isInteger(n)&&n>0&&t.add(n);for(let n of e.pullRequests??[])t.add(n.number);return[...t]}var Zn=[{id:`title`,kind:`text`,scopes:[`stored`],source:`summary`,texts:e=>[e.title]},{id:`titleSummary`,kind:`text`,scopes:[`stored`],source:`summary`,texts:e=>[e.titleSummary]},{id:`displayTitle`,kind:`text`,scopes:[`shown`],source:`reader`,texts:(e,t)=>[t.displayTitle]},{id:`branch`,kind:`text`,scopes:[`stored`,`shown`],source:`summary`,texts:e=>[e.branch]},{id:`workflow`,kind:`text`,scopes:[`stored`,`shown`],source:`summary`,texts:e=>[e.workflow]},{id:`workflowLabel`,kind:`text`,scopes:[`stored`,`shown`],source:`summary`,texts:e=>[e.workflowLabel]},{id:`automation`,kind:`text`,scopes:[`stored`,`shown`],source:`reader`,texts:(e,t)=>[t.automation],universe:e=>[...e.automationNames?.values()??[]]},{id:`projectName`,kind:`text`,scopes:[`shown`],source:`reader`,texts:(e,t)=>[t.projectName]},{id:`tags`,kind:`text`,scopes:[`shown`],source:`reader`,texts:(e,t)=>t.tags??[]},{id:`id`,kind:`identifier`,scopes:[`stored`],source:`summary`,texts:e=>[e.id]},{id:`urls`,kind:`link`,scopes:[`stored`],source:`summary`,texts:e=>[e.pullRequestUrl,e.referencedPullRequestUrl,e.referencedIssueUrl,...(e.pullRequests??[]).map(e=>e.url)]},{id:`heldReferences`,kind:`reference`,scopes:[`stored`],source:`summary`,numbers:Xn},{id:`shownReferences`,kind:`reference`,scopes:[`shown`],source:`reader`,numbers:(e,t)=>t.references?.()??[]}];function Qn(e){return e.trim().toLowerCase().split(/\s+/).filter(e=>e!==``)}function $n(e,t){if(t!==`phrase`)return Qn(e);let n=e.trim().toLowerCase();return n===``?[]:[n]}function er(e,t){return t&&e.automationId!==void 0?t.get(e.automationId)??e.automationId:void 0}function tr(e,t){let n=t.scope??`stored`,r=t.scope===`shown`?t.omit??[]:[],i=t.scope===`shown`?t.extras:{automation:er(e,t.automationNames)},a=[],o=[],s=[],c={text:a,identifier:o,link:s},l=[];for(let t of Zn)if(!(!t.scopes.includes(n)||r.includes(t.id))){if(t.kind===`reference`){l.push(()=>t.numbers(e,i));continue}for(let n of t.texts(e,i))typeof n==`string`&&c[t.kind].push(n.toLowerCase())}let u;return{prose:a,ids:o,links:s,references:()=>u??=new Set(l.flatMap(e=>e().map(String)))}}function nr(e,t,n={}){let r=$n(t,n.mode);if(r.length===0)return!1;let{prose:i,ids:a,links:o,references:s}=tr(e,n);return r.every(e=>{if(i.some(t=>t.includes(e)))return!0;let t=e.replace(/^#/,``);return/^\d+$/.test(t)?s().has(String(Number(t)))||a.some(e=>e.startsWith(t)):a.some(t=>t.includes(e))||o.some(t=>t.includes(e))})}var rr=[`Needs you`,`Finished`,`Working`,`Archived`],ir={waiting:0,review:1,running:2,queued:4,done:5,failed:6,cancelled:7},ar=3,W=e=>C(e)?ar:ir[e.status]??9;function or(e){let t=e=>oe[v(e).bucket];return[...e].sort((e,n)=>t(e)-t(n)||W(e)-W(n))[0]}function sr(e,t){return t===`archived`?`Archived`:v(e).bucket===`waiting`?`Needs you`:e.status===`waiting`||e.status===`running`||e.status===`queued`?`Working`:`Finished`}function cr(e){let t=e.titleSummary;return t===void 0||!(e.titleOrigin===`user`||e.titleOrigin===`marker`)&&/[.!?][A-Z]/.test(t)?e.title:t}function lr(e){let t=/^(\d{1,9}): (.+)$/.exec(e),n=t?.[1],r=t?.[2];return n===void 0||r===void 0?{ref:null,rest:e}:{ref:Number(n),rest:r}}function ur(e,t){return t!==void 0&&lr(e).ref===t}function dr(e){let t=e.filter(e=>!e.archived&&e.status===`queued`).sort((e,t)=>e.createdAt.localeCompare(t.createdAt));return new Map(t.map((e,t)=>[e.id,t+1]))}function fr(e,t){return e.filter(e=>t===`archived`?e.archived:!e.archived).sort((e,n)=>{if(t!==`archived`){let t=Number(!!n.pinned)-Number(!!e.pinned);if(t!==0)return t}let r=W(e)-W(n);if(r!==0)return r;if(C(e)&&C(n)){let t=e.autoResumeAt.localeCompare(n.autoResumeAt);if(t!==0)return t}return e.status===`queued`&&n.status===`queued`?e.createdAt.localeCompare(n.createdAt):n.createdAt.localeCompare(e.createdAt)})}function G(e){return e.delegation?.role===`worker`}function pr(e,t){if(e==null)return null;let n=t.find(t=>t.id===e);return!n||!G(n)?e:n.delegation?.parentRunId??e}function mr(e,t,n=dr(e)){let r=fr(e,t).filter(e=>!G(e)),i=new Map,a=(e,t)=>{let n=i.get(e);n?n.push(t):i.set(e,[t])};for(let e of r)a(sr(e,t),{kind:`run`,run:e,queuePosition:n.get(e.id)??null});return rr.filter(e=>i.has(e)).map(e=>({label:e,rows:i.get(e)}))}function hr(e,t={}){let n=typeof t==`number`?{overall:t}:Lt(t),r={"Needs you":`needsYou`,Finished:`finished`,Working:`working`},i=[],a=n.overall===void 0?10:n.overall??1/0;for(let t of e){let e=t.label===`Archived`?1/0:n[r[t.label]]??1/0,o=t.rows.filter(n=>{let r=n.run.pinned;return t.label!==`Archived`&&r?!0:a<=0||e<=0?!1:(--a,--e,!0)});o.length&&i.push({label:t.label,rows:o})}return i}function gr(e,t){if(t.length===0)return[...e];let n=new Set(e.map(e=>e.id)),r=new Set,i=t.filter(e=>n.has(e.id)||r.has(e.id)?!1:(r.add(e.id),!0));return[...e,...i]}function _r(e){let t=0,n=0,r=0;for(let i of e)if(!G(i)){if(i.archived){n+=1;continue}t+=1,v(i).bucket===`waiting`&&(r+=1)}return{active:t,archived:n,waiting:r}}function vr(e,t){let n=t===`automations`;return e.filter(e=>!e.archived&&re(e)===n)}var yr={"Needs you":`needs-you`,Finished:`finished`,Working:`working`},br=Object.keys(yr),xr=`section`;function Sr(e,t){return`/?origin=${t===`automations`?`automations`:`direct`}&${xr}=${yr[e]}`}function Cr(e){return br.find(t=>yr[t]===e)??null}function wr(e){let t={active:0,automations:0,activeWaiting:0,automationsWaiting:0};for(let n of e){if(G(n)||n.archived)continue;let e=+(v(n).bucket===`waiting`);re(n)?(t.automations+=1,t.automationsWaiting+=e):(t.active+=1,t.activeWaiting+=e)}return t}var Tr=new Set([`running`,`waiting`]);function Er(e){return e?e>=1024**3?`${(e/1024**3).toFixed(1)} GB`:e>=1024**2?`${Math.round(e/1024**2)} MB`:`${Math.round(e/1024)} kB`:``}function Dr(e){return e===void 0?``:`$${e>=10?e.toFixed(0):e.toFixed(2)}`}function Or(e,t=new Date){if(!C(e))return;let n=new Date(e.autoResumeAt);if(!Number.isFinite(n.getTime()))return;let r=n.toDateString()===t.toDateString(),i=new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(n);return{label:r?i:`${new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(n)} ${i}`,title:`Resumes automatically at ${new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`long`}).format(n)}`}}function kr(e){return e.steps?Jt({workflow:e.workflow,steps:e.steps}):e.workflowLabel??e.workflow}function Ar(e,t,n=()=>``){let r=e.filter(e=>!G(e));return t.trim()?r.filter(e=>nr(e,t,{scope:`shown`,mode:`phrase`,extras:{displayTitle:cr(e),automation:n(e),references:()=>jr(e)}})):[...r]}function jr(e){return K(e).map(e=>e.number)}function Mr(e,t){return e.filter(e=>Gn(e,t)).length}function Nr(e){return Mr(e)}function Pr(e){if(!e)return;let t=e.trim().replace(/\/+$/,``),n=/^(?:https?|ssh|git|git\+ssh):\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/(.+)$/.exec(t),r=n?null:/^(?:[^@/:]+@)?([^:/]+):(.+)$/.exec(t),i=n??r;if(!i)return;let[,a,o]=i;if(!o||a?.toLowerCase()!==`github.com`)return;let s=o.replace(/\.git$/i,``).split(`/`).filter(Boolean),c=s[s.length-2],l=s[s.length-1];return c&&l?`https://github.com/${c}/${l}`:void 0}function Fr(e){return Ir(e)[0]??e.pullRequests?.find(e=>e.url)?.url}function Ir(e){let t=[];return e.pullRequestUrl&&t.push(e.pullRequestUrl),!(e.markerRefs?.issue!==void 0&&e.markerRefs?.pr===void 0)&&e.referencedPullRequestUrl&&t.push(e.referencedPullRequestUrl),t}function Lr(e,t){if(e.referencedIssueUrl)return e.referencedIssueUrl;let n=e.issueNumber??e.markerRefs?.issue;if(!(!n||!t))return`${t}/issues/${n}`}function Rr(e){let t=`${e.kind}#${e.number}`;if(!e.url)return`${t}@project:${e.projectId??`default`}`;try{let n=new URL(e.url),r=n.pathname.split(`/`).filter(Boolean).slice(0,2).join(`/`);return`${t}@${n.host.toLowerCase()}/${r.toLowerCase()}`}catch{return`${t}@${e.url}`}}function K(e,t,n=e.projectId){let r=Ir(e),i=e.markerRefs?.pr,a=[...i===void 0||[...r,...(e.pullRequests??[]).flatMap(e=>e.url?[e.url]:[])].some(e=>Gr(e)===String(i))?[]:[{kind:`PR`,number:i}],...r.map(e=>({kind:`PR`,url:e})),{kind:`PR`,number:e.prNumber},...(e.pullRequests??[]).map(e=>({kind:`PR`,number:e.number,...e.url?{url:e.url}:{},authoritative:!0})),{kind:`Issue`,url:Lr(e,t)},{kind:`Issue`,number:e.issueNumber}],o=new Set,s=[];for(let e of a){let r=e.url?Number(Gr(e.url)):e.number;if(!r||!Number.isInteger(r)||!e.url&&!e.authoritative&&s.some(t=>t.url&&t.kind===e.kind&&t.number===r))continue;let i=e.url??zr(e.kind,r,t),a={kind:e.kind,number:r,...i?{url:i}:n===void 0?{}:{projectId:n}},c=Rr(a);o.has(c)||(o.add(c),s.push(a))}return s}function zr(e,t,n){if(n)return`${n}/${e===`PR`?`pull`:`issues`}/${t}`}function Br(e){return K(e)[0]}function Vr(e,t){if(!e.url)return!0;if(!t)return!1;let n=Hr(t);return n!==void 0&&Hr(e.url)===n}function Hr(e){try{let t=new URL(e),[n,r]=t.pathname.split(`/`).filter(Boolean);return n&&r?`${t.host}/${n}/${r}`.toLowerCase():void 0}catch{return}}function Ur(e,t){let n=[];for(let r of K(e,t)){if(!Vr(r,t))continue;let e=r.kind===`PR`?`pr`:`issue`;n.some(t=>t.kind===e&&t.number===r.number)||n.push({kind:e,number:r.number})}return n}function Wr(e,t,n,r){if(Vr(n,r))return`/p/${e}/tasks/${t}/${n.kind===`PR`?`pr`:`issue`}/${n.number}`}function Gr(e){return/\/(\d+)\/?(?:[?#].*)?$/.exec(e)?.[1]??null}function Kr(e,t){let n=Tr.has(e.status)?t:void 0;if(n)return{cpu:{text:`${n.cpuPct.toFixed(0)}%`,kind:`live`},mem:{text:Er(n.rssBytes),kind:`live`}};let r=Er(e.peakRssBytes);return{cpu:{text:``,kind:`none`},mem:r?{text:`peak ${r}`,kind:`peak`,title:`peak — run finished${e.peakProcCount?` · ${e.peakProcCount} procs`:``}`}:{text:``,kind:`none`}}}function qr(e){let t=new Map;for(let n of e)for(let e of n.tags??[]){let n=e.toLowerCase();t.has(n)||t.set(n,e)}return[...t.values()].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}))}function Jr(e,t,n,r=8){let i=n.trim().toLowerCase(),a=new Set(t.map(e=>e.toLowerCase())),o=e.filter(e=>{let t=e.toLowerCase();return a.has(t)?!1:i===``||t.includes(i)&&t!==i});return i===``?o.slice(0,r):o.sort((e,t)=>Number(t.toLowerCase().startsWith(i))-Number(e.toLowerCase().startsWith(i))||e.localeCompare(t,void 0,{sensitivity:`base`})).slice(0,r)}function Yr(e){let t=new Map;for(let n of e){let e=n.trim();if(!e)continue;let r=e.toLowerCase();t.has(r)||t.set(r,e)}return[...t.values()].sort((e,t)=>e.localeCompare(t,void 0,{sensitivity:`base`}))}function Xr(e){if(!e.available)return;let t=e.issuesNextCursor,n=e.prsNextCursor;if(!(t===void 0&&n===void 0)&&!(!t&&!n))return{...t?{issuesCursor:t}:{issuesDone:!0},...n?{prsCursor:n}:{prsDone:!0}}}function Zr(e,t){return e?(t===`issues`?e.issuesNextCursor:e.prsNextCursor)==null:!1}function Qr(e,t,n){for(let r of e)t.has(r.number)||(t.add(r.number),n.push(r))}function $r(e){let t=e[0];if(!t)return;let n=e[e.length-1],r=[],i=[],a=new Set,o=new Set,s={};for(let t of e){Qr(t.issues,a,r),Qr(t.prs,o,i);for(let[e,n]of Object.entries(t.labelColors??{}))s[e]??=n}let c=e.find(e=>e.projects)?.projects,l=e.map(e=>e.projectsState),u=e.find(e=>e.projectsState===`unavailable`),d=l.includes(`refreshing`)?`refreshing`:u?`unavailable`:l.some(e=>e===`ready`)?`ready`:void 0,{projectsGeneration:f,projectsReason:p,...m}=t;return{...m,issues:r,prs:i,...Object.keys(s).length>0?{labelColors:s}:{},...c?{projects:c}:{},...d?{projectsState:d}:{},...d===`unavailable`&&u?.projectsReason?{projectsReason:u.projectsReason}:{},...`issuesNextCursor`in n?{issuesNextCursor:n.issuesNextCursor}:{},...`prsNextCursor`in n?{prsNextCursor:n.prsNextCursor}:{}}}var q=e=>e.map(e=>e.number).join(`,`);function ei(e,t){let n=e[0];if(e.length>1&&n&&(q(n.issues)!==q(t.issues)||q(n.prs)!==q(t.prs)||n.issuesTotal!==t.issuesTotal||n.prsTotal!==t.prsTotal))return`refetch`;let r=t;if(n&&t.available&&t.projectsState===`refreshing`&&n.repo===t.repo){let e=new Map(n.issues.map(e=>[e.number,e.projectIds]));r={...t,issues:t.issues.map(t=>{let n=e.get(t.number);return t.projectIds===void 0&&n!==void 0?{...t,projectIds:n}:t})}}return[r,...e.slice(1)]}var J={get health(){return[n(),`health`]},runs:{get all(){return[n(),`runs`]},relationships:e=>[n(),`runs`,`relationships`,e],list:(e=n())=>[e,`runs`,`list`],archived:e=>[n(),`runs`,`archived`,e],detail:(e,t=n())=>[t,`runs`,`detail`,e],diff:e=>[n(),`runs`,`diff`,e],changes:e=>[n(),`runs`,`changes`,e],file:(e,t)=>[n(),`runs`,`files`,e,t],handoff:e=>[n(),`runs`,`handoff`,e],commits:e=>[n(),`runs`,`commits`,e],commit:(e,t)=>[n(),`runs`,`commit`,e,t]},get workflows(){return[n(),`workflows`]},get skills(){return[n(),`skills`]},get skillsReady(){return[n(),`skills`,`ready`]},get importableSkills(){return[n(),`skills`,`importable`]},get importableSkillsReady(){return[n(),`skills`,`importable`,`ready`]},get launchKey(){return[n(),`launch-key`]},get repo(){return[n(),`repo`]},get repoChanges(){return[n(),`repo`,`changes`]},repoCommit:e=>[n(),`repo`,`commit`,e],get repoBranches(){return[n(),`repo`,`branches`]},get uiState(){return[n(),`ui-state`]},get config(){return[n(),`config`]},get agentConfig(){return[n(),`agent-config`]},agentConfigFile:e=>[n(),`agent-config`,`file`,e],get worktrees(){return[n(),`worktrees`]},github:(e={})=>[n(),`github`,e.limit??null],githubPages:e=>[n(),`github`,`pages`,e],githubPagesHead:e=>[n(),`github`,`pages-head`,e],githubCommentCounts:(e,t)=>[n(),`github`,`comment-counts`,e,[...t].sort((e,t)=>e-t).join(`,`)],githubChecks:e=>[n(),`github`,`checks`,[...e].sort((e,t)=>e-t).join(`,`)],githubSearch:(e,t)=>[n(),`github`,`search`,e,t],githubRefStatus:(e,t,n)=>[e,`github`,`ref-status`,[...t].sort((e,t)=>e-t).join(`,`),[...n].sort((e,t)=>e-t).join(`,`)],githubComments:(e,t)=>[n(),`github`,`comments`,e,t],githubItem:(e,t)=>[n(),`github`,`item`,e,t],githubRefStatusOf:e=>[e,`github`,`ref-status`],githubPrChanges:e=>[n(),`github`,`pr-changes`,e],githubMergeState:e=>[n(),`github`,`merge-state`,e],get openTargets(){return[n(),`open-targets`]}},Y={models:e=>[`workspace`,`models`,e],providerStatus:[`workspace`,`providers`,`status`],projects:[`workspace`,`projects`],githubOwners:[`workspace`,`github-owners`],runsIndex:z,runsSearch:e=>[`workspace`,`runs-search`,e],uiState:[`workspace`,`ui-state`],config:[`workspace`,`config`],agentProfiles:[`workspace`,`agent-profiles`],agentAccountDetails:e=>[`workspace`,`agent-profiles`,`details`,e],agentAccountStatus:e=>[`workspace`,`agent-profiles`,`status`,e],fsBrowseRoot:[`workspace`,`fs-browse`],fsBrowse:(e,t=!1)=>[...Y.fsBrowseRoot,e,t]};function X(e,t,n=`active`){return e.invalidateQueries({queryKey:t===void 0?[`workspace`,`models`]:Y.models(t),refetchType:n})}function Z(e,t=!0){let n=b();return(0,O.useEffect)(()=>{if(!t||e!==`cursor`)return;let r,i=()=>{let e=n.getQueryData(J.health)?.capabilities?.localHandoff===!0;e&&!r?r=Bt(`models:cursor`,e=>{let t=It.safeParse(e);t.success&&t.data.runner===`cursor`&&(n.cancelQueries({queryKey:Y.models(`cursor`)}),n.setQueryData(Y.models(`cursor`),t.data))}):!e&&r&&(r(),r=void 0)};i();let a=n.getQueryCache().subscribe(i);return()=>{a(),r?.()}},[t,e,n]),E({queryKey:Y.models(e),queryFn:({signal:t})=>w(e)?ot(e,{signal:t}):Promise.reject(Error(`${e} has no host model catalog`)),staleTime:300*1e3,enabled:t&&w(e)})}function ti(e=!0){return{claude:Z(`claude`,e),codex:Z(`codex`,e),opencode:Z(`opencode`,e),pi:Z(`pi`,e),cursor:Z(`cursor`,e),omp:Z(`omp`,e)}}function ni(){let e=b();return E({queryKey:Y.providerStatus,queryFn:async({signal:t})=>{let n=e.getQueryData(Y.providerStatus),r=await ut(!1,{signal:t});return S(n,e.getQueryData(Y.providerStatus),r)},staleTime:5*6e4,refetchInterval:a(!1),refetchOnWindowFocus:!0})}function ri(){let e=b();return A({mutationFn:()=>ut(!0),onMutate:()=>e.getQueryData(Y.providerStatus),onSuccess:(t,n,r)=>{e.setQueryData(Y.providerStatus,e=>S(r,e,t)),X(e)}})}function ii(){let e=b();return A({mutationFn:({provider:e,authFailureId:t})=>Qe(e,t),onMutate:()=>e.getQueryData(Y.providerStatus),onSuccess:(t,n,r)=>{e.setQueryData(Y.providerStatus,e=>S(r,e,t,n.authFailureId)),w(n.provider)&&X(e,n.provider)}})}function ai(e={}){return E({queryKey:Y.projects,queryFn:({signal:e})=>mt({signal:e}),...e})}function oi(e,t=!1){return E({queryKey:Y.fsBrowse(e,t),queryFn:({signal:n})=>st(e??void 0,{signal:n,showHidden:t}),retry:!1})}function si(){let e=b();return A({mutationFn:e=>Ve(e),onSuccess:()=>e.invalidateQueries({queryKey:Y.projects})})}function ci(){let e=b();return A({mutationFn:e=>St(e),retry:!1,onSuccess:()=>{e.invalidateQueries({queryKey:Y.projects})}})}function li(){let e=b();return A({mutationFn:e=>{let{id:t,...n}=e;return at(t,n)},retry:!1,onMutate:async({id:t,...n})=>{await e.cancelQueries({queryKey:Y.projects});let r=e.getQueryData(Y.projects);return e.setQueryData(Y.projects,e=>e===void 0?e:{...e,projects:e.projects.map(e=>e.id===t?ui(e,n):e)}),{previous:r}},onError:(t,n,r)=>{r?.previous&&e.setQueryData(Y.projects,r.previous)},onSuccess:({project:t})=>{e.setQueryData(Y.projects,e=>e===void 0?e:{...e,projects:e.projects.map(e=>e.id===t.id?t:e)})},onSettled:()=>e.invalidateQueries({queryKey:Y.projects})})}function ui(e,t){let{maxParallel:n,tags:r,...i}=e,a={...i},o=`maxParallel`in t?t.maxParallel:e.maxParallel;o!=null&&(a.maxParallel=o);let s=`tags`in t&&t.tags!==void 0?t.tags:e.tags,c=s==null?[]:Yr(s);if(c.length>0&&(a.tags=c),`webhook`in t&&t.webhook!==void 0)if(t.webhook===null)delete a.webhook;else{let n=t.webhook.token===void 0?e.webhook?.tokenSet??!1:t.webhook.token!==``;a.webhook={url:t.webhook.url,tokenSet:n}}return a}function di(e){let t=b();return A({mutationFn:e,retry:!1,onSuccess:({project:e})=>{t.setQueryData(Y.projects,t=>t===void 0?t:{...t,projects:t.projects.map(t=>t.id===e.id?e:t)})},onSettled:()=>t.invalidateQueries({queryKey:Y.projects})})}function fi(){return di(e=>{let{projectId:t,...n}=e;return _e(t,n)})}function pi(){return di(e=>{let{projectId:t,webhookId:n,...r}=e;return c(t,n,r)})}function mi(){return di(({projectId:e,webhookId:t})=>Ue(e,t))}function hi(){return A({mutationFn:({projectId:e,webhookId:t})=>ye(e,t),retry:!1})}function gi(e){let t=b();return A({mutationFn:t=>ee(e,t),retry:!1,onSuccess:()=>t.invalidateQueries({queryKey:J.runs.all})})}function Q(e){let t=b();return A({mutationFn:e,retry:!1,onSuccess:async()=>{await Promise.all([t.invalidateQueries({queryKey:Y.agentProfiles}),t.invalidateQueries({queryKey:Y.projects})])}})}function _i(){return Q(e=>jt(e))}function vi(){return Q(e=>{let{id:t,...n}=e;return p(t,n)})}function yi(){return Q(e=>ct(e))}function bi(){return Q(e=>Re(e))}function xi(e,t){return E({queryKey:Y.agentAccountDetails(e),queryFn:({signal:t})=>te(e,{signal:t}),enabled:t,staleTime:0,retry:!1})}function Si(e,t){return E({queryKey:Y.agentAccountStatus(e),queryFn:({signal:t})=>ae(e,{signal:t}),enabled:t,staleTime:6e4,retry:!1})}function Ci(){let e=b();return A({mutationFn:({provider:e,profileId:t})=>Pe(e,t),retry:!1,onSuccess:async(t,{provider:n})=>{await Promise.all([e.invalidateQueries({queryKey:Y.agentProfiles}),e.invalidateQueries({queryKey:Y.providerStatus}),w(n)?X(e,n,`none`):Promise.resolve()])}})}function wi(){let e=b();return A({mutationFn:e=>ae(e,{refresh:!0}),retry:!1,onSuccess:(t,n)=>{e.setQueryData(Y.agentAccountStatus(n),t),e.invalidateQueries({queryKey:Y.agentProfiles}),w(t.status.provider)&&X(e,t.status.provider)}})}function Ti(){return A({mutationFn:e=>{let{routeId:t,...n}=e;return we(t,n)},retry:!1})}function Ei(){let e=b();return A({mutationFn:e=>et(e),retry:!1,onSuccess:()=>e.invalidateQueries({queryKey:Y.projects})})}function Di(){let e=b();return A({mutationFn:e=>Ot(e),retry:!1,onSuccess:()=>e.invalidateQueries({queryKey:Y.projects})})}function Oi({enabled:e}){return E({queryKey:Y.githubOwners,queryFn:({signal:e})=>dt({signal:e}),enabled:e,staleTime:6e4,retry:!1})}function ki(){let e=b();(0,O.useEffect)(()=>{let n,r=()=>{let r=e.getQueryData(J.health),i=r?.capabilities?.localHandoff===!0;r&&be({local:i,bootProject:r.bootProject??`default`,apiBase:t()}),i&&n===void 0?n=Bt(`health`,t=>{e.setQueryData(J.health,t)}):!i&&n!==void 0&&(n(),n=void 0)};r();let i=e.getQueryCache().subscribe(r);return()=>{i(),n?.(),rt()}},[e])}function $(){return E({queryKey:J.health,queryFn:({signal:e})=>He({signal:e})})}function Ai(e,t){let n=$().data,r=ai(t).data?.projects,i=gt(),a=e??i.projectId,o=a??n?.bootProject,s=o===void 0?void 0:r?.find(e=>e.id===o);return s?.repoUrl?s.repoUrl:a===null||a===n?.bootProject?Pr(n?.repo?.remote):void 0}function ji(){return E({queryKey:J.openTargets,queryFn:({signal:e})=>Xe({signal:e}),staleTime:5*6e4})}function Mi(){return E({queryKey:J.runs.list(),queryFn:({signal:e})=>l(j(),{signal:e})})}function Ni(e,t){return Rt({queryKey:J.runs.archived(e),enabled:t,initialPageParam:void 0,queryFn:({pageParam:t,signal:n})=>Te({before:t,limit:200,q:e},{signal:n}),getNextPageParam:e=>e.nextCursor??void 0,placeholderData:(e,t)=>t?.queryKey[0]===n()?e:void 0})}function Pi(e){let t=e.trim();return E({queryKey:Y.runsSearch(t),queryFn:({signal:e})=>Mt(t,{signal:e}),enabled:t.length>=2,placeholderData:Ie,staleTime:1e4})}function Fi(e=!0,t=_n){let n=B(b());return D(`/api/v1/workspace/runs-index`,Y.runsIndex,a(e?t:!1),bn),E({queryKey:Y.runsIndex,queryFn:({signal:e})=>it({signal:e}).then(n.merge),enabled:e,staleTime:3e4,refetchInterval:!1})}function Ii(e,t=!0,n=!1){return E({queryKey:[j({projectId:e,boot:n}).cacheScope,`runs`,`list`],queryFn:({signal:t})=>l(j({projectId:e,boot:n}),{signal:t}),enabled:t})}function Li(e){let t=b();return A({mutationFn:e=>ce(e),onSettled:()=>t.invalidateQueries({queryKey:J.runs.relationships(e)})})}function Ri(e,t={}){return E({queryKey:J.runs.relationships(e),queryFn:({signal:t})=>fe(e,{signal:t}),enabled:t.enabled??!0})}function zi(e){return E({queryKey:J.runs.detail(e??``),queryFn:({signal:t})=>Nt(M(e),{signal:t}),enabled:!!e})}function Bi(e,t,n=!0){return E({queryKey:[e??`default`,`runs`,`detail`,t??``],queryFn:({signal:n})=>Nt(M(t,{projectId:e}),{signal:n}),enabled:n&&!!e&&!!t})}function Vi(e){return E({queryKey:J.runs.diff(e??``),queryFn:({signal:t})=>f(e,{signal:t}),enabled:!!e})}function Hi(e,t=!1){return D(e?`/api/v1/p/${n()}/runs/${encodeURIComponent(e)}/changes`:void 0,J.runs.changes(e??``),a(t?4e3:!1)),E({queryKey:J.runs.changes(e??``),queryFn:({signal:t})=>ze(e,{signal:t}),enabled:!!e,retry:!1,refetchInterval:!1,refetchOnWindowFocus:!0,staleTime:0})}function Ui(e,t){return E({queryKey:J.runs.file(e??``,t??``),queryFn:({signal:n})=>Dt(e,t,{signal:n}),enabled:!!e&&t!==void 0,retry:!1})}function Wi(e,t){return E({queryKey:[n(),`runs`,`file-link`,e,t],queryFn:({signal:n})=>ke(e,t,{signal:n}),enabled:t!==null,retry:!1})}function Gi(e,t){return E({queryKey:[n(),`runs`,`artifact`,e,t],queryFn:({signal:n})=>_(e,t,{signal:n}),enabled:t!==null,retry:!1})}function Ki(e,t){return E({queryKey:[n(),`runs`,`artifact-metadata`,e,t],queryFn:({signal:n})=>Se(e,t,{signal:n}),enabled:t!==null,retry:!1})}function qi(e){return E({queryKey:[n(),`runs`,`artifacts`,e],queryFn:({signal:t})=>De(e,{signal:t}),retry:!1,staleTime:0,refetchOnWindowFocus:!0})}function Ji(e,t=!1){return D(e?`/api/v1/p/${n()}/runs/${encodeURIComponent(e)}/commits`:void 0,J.runs.commits(e??``),a(t?5e3:!1)),E({queryKey:J.runs.commits(e??``),queryFn:({signal:t})=>ve(e,{signal:t}),enabled:!!e,retry:!1,refetchInterval:!1})}function Yi(e,t){return E({queryKey:J.runs.commit(e??``,t??``),queryFn:({signal:n})=>At(e,t,{signal:n}),enabled:!!e&&!!t,retry:!1})}function Xi(e,t=!0){return E({queryKey:J.runs.handoff(e??``),queryFn:({signal:t})=>xe(M(e),{signal:t}),enabled:!!e&&t})}function Zi(e,t,n){return E({queryKey:e===void 0?J.runs.handoff(t):[e,`runs`,`handoff`,t],queryFn:({signal:n})=>xe(M(t,{projectId:e}),{signal:n}),enabled:n,staleTime:15e3})}function Qi(e,t){let r=[...new Set(e)],i=k({queries:r.map(e=>({queryKey:[e??n(),`automations`,`names`],queryFn:({signal:t})=>ht({signal:t,archived:`include`,...e===void 0?{}:{projectId:e}}),enabled:t,staleTime:6e4,retry:!1}))}),a=i.map(e=>e.data);return(0,O.useMemo)(()=>{let e=new Map;return a.forEach((t,n)=>{if(t?.available)for(let i of t.automations)e.set(JSON.stringify([r[n]??null,i.id]),i.name)}),(t,n)=>e.get(JSON.stringify([t??null,n]))},[JSON.stringify([r,i.map(e=>e.dataUpdatedAt)])])}function $i(){return E({queryKey:J.workflows,queryFn:({signal:e})=>h({signal:e})})}function ea(e=!0){let t=b(),n=J.skills,r=n[0],i=E({queryKey:n,queryFn:({signal:e})=>le({signal:e}),enabled:e}),a=E({queryKey:J.skillsReady,queryFn:({signal:e})=>de({signal:e}),enabled:e&&i.isSuccess,staleTime:1/0,retry:!1});return(0,O.useEffect)(()=>{Array.isArray(a.data)&&t.setQueryData([r,`skills`],a.data)},[t,a.data,r]),i}function ta(e=!0){let t=b(),n=J.importableSkills,r=n[0],i=E({queryKey:n,queryFn:({signal:e})=>lt({signal:e}),enabled:e}),a=E({queryKey:J.importableSkillsReady,queryFn:({signal:e})=>Ct({signal:e}),enabled:e&&i.isSuccess,staleTime:1/0,retry:!1});return(0,O.useEffect)(()=>{Array.isArray(a.data)&&t.setQueryData([r,`skills`,`importable`],a.data)},[t,a.data,r]),i}function na(){return E({queryKey:J.launchKey,queryFn:({signal:e})=>We({signal:e}),staleTime:1/0})}function ra(){return E({queryKey:J.repo,queryFn:({signal:e})=>tt({signal:e})})}function ia(e){return E({queryKey:[e,`repo`],queryFn:({signal:t})=>tt({signal:t},e)})}function aa(){return E({queryKey:J.repoBranches,queryFn:({signal:e})=>$e({signal:e})})}function oa(){return E({queryKey:J.repoChanges,queryFn:({signal:e})=>Fe({signal:e}),retry:!1})}function sa(e){return E({queryKey:J.repoCommit(e??``),queryFn:({signal:t})=>Tt(e,{signal:t}),enabled:!!e,retry:!1})}function ca(){return E({queryKey:J.config,queryFn:({signal:e})=>je({signal:e})})}function la(){return E({queryKey:J.worktrees,queryFn:({signal:e})=>ge({signal:e})})}function ua(e){return E({queryKey:[e,`worktrees`],queryFn:({signal:t})=>ge({signal:t},e),staleTime:0})}function da(e,t=!0,n=!1){return E({queryKey:[j({projectId:e,boot:n}).cacheScope,`ui-state`],queryFn:({signal:t})=>pe({signal:t},e),select:e=>e.sidebarLimits===void 0?e:{...e,sidebarLimits:Lt(e.sidebarLimits)},enabled:t})}function fa(){return da(n())}function pa(){return E({queryKey:J.agentConfig,queryFn:({signal:e})=>he({signal:e})})}function ma(e){return E({queryKey:J.agentConfigFile(e??``),queryFn:({signal:t})=>Pt(e,{signal:t}),enabled:e!==null})}function ha(e){let t=b(),n=J.agentConfig,r=J.agentConfigFile(e);return A({mutationFn:t=>Ke(e,t),onSuccess:e=>{t.setQueryData(r,e),t.invalidateQueries({queryKey:n})}})}function ga(){return E({queryKey:Y.uiState,queryFn:({signal:e})=>se({signal:e})})}function _a(){return E({queryKey:Y.config,queryFn:({signal:e})=>ne({signal:e})})}function va(){return E({queryKey:Y.agentProfiles,queryFn:({signal:e})=>u({signal:e})})}function ya(e){let t=b();return A({mutationFn:t=>Ne(e,t),onSuccess:()=>t.invalidateQueries({queryKey:J.runs.all})})}function ba(e){let t=L(),n=e?.projectId,r=e?.cacheScope,i=A({mutationFn:e=>Et(e,!0),onMutate:e=>t.patchRead(e,!0),onError:(e,t,n)=>n?.rollback(),onSuccess:(e,t,n)=>n?.settle(e)}),a=(0,O.useCallback)(e=>({...M(e,{projectId:n,cacheScope:r}),id:e}),[n,r]),o=(0,O.useCallback)(e=>({onSuccess:(t,n,r,i)=>e?.onSuccess?.(t,n.id,r,i),onError:(t,n,r,i)=>e?.onError?.(t,n.id,r,i),onSettled:(t,n,r,i,a)=>e?.onSettled?.(t,n,r.id,i,a)}),[]),{mutate:s,mutateAsync:c}=i,l=(0,O.useCallback)((e,t)=>s(a(e),o(t)),[s,a,o]),u=(0,O.useCallback)((e,t)=>c(a(e),o(t)),[c,a,o]);return{...i,variables:i.variables?.id,mutate:l,mutateAsync:u}}function xa(){let e=L();return A({mutationFn:e=>Et(M(e),!1),onMutate:t=>e.patchRead(()=>M(t),!1),onError:(e,t,n)=>n?.rollback(),onSuccess:(e,t,n)=>n?.settle(e)})}function Sa(e){let t=L();return A({mutationFn:({id:t,pinned:n})=>Ae(M(t,e),n),onError:e=>Vt(`Could not update pin. ${e.message} Please retry.`,{tone:`danger`}),onMutate:()=>e??j(),onSuccess:(e,n,r)=>t.invalidateAfter(`runs`,r)})}function Ca(e,t){let n=L();return A({mutationFn:n=>kt(M(e,{projectId:t}),n),onMutate:()=>j({projectId:t}),onSuccess:(e,t,r)=>n.invalidateAfter(`send`,r),onError:(e,t,r)=>{e instanceof nt&&e.status===409&&r&&n.invalidateAfter(`send`,r)}})}function wa(e,t){let n=L();return A({mutationFn:(n={})=>wt(M(e,{projectId:t}),n),onMutate:()=>j({projectId:t}),onSuccess:(e,t,r)=>n.invalidateAfter(`continue`,r)})}function Ta(e){let t=b();return A({mutationFn:({msgId:t,message:n})=>ue(e,t,n),onSuccess:()=>t.invalidateQueries({queryKey:J.runs.all})})}function Ea(e){let t=b();return A({mutationFn:t=>Ye(e,t),onSuccess:()=>t.invalidateQueries({queryKey:J.runs.all})})}function Da(e={},t=!0){let r=b(),i=J.github(e);D(`/api/v1/p/${n()}/github${e.limit===void 0?``:`?limit=${e.limit}`}`,i,a(t?6e4:!1));let o=E({queryKey:J.github(e),queryFn:({signal:t})=>x({limit:e.limit},{signal:t}),enabled:t,staleTime:6e4,refetchInterval:!1,refetchIntervalInBackground:!1,refetchOnWindowFocus:!0}),s=o.data?.projectsGeneration,c=E({queryKey:[...i,`projects`,s],queryFn:({signal:e})=>Le(s,{signal:e}),enabled:t&&o.data?.projectsState===`refreshing`&&!!s,staleTime:1/0,retry:!1});return(0,O.useEffect)(()=>{!s||!c.data&&!c.error||r.setQueryData(i,e=>{if(!e||e.projectsGeneration!==s||e.projectsState!==`refreshing`)return e;let t=c.data;return t?.generation&&t.generation!==s?e:t?.state===`ready`?{...e,projectsState:`ready`,projects:t.projects,issues:e.issues.map(e=>({...e,projectIds:t.membership?.[e.number]??[]}))}:{...e,projectsState:`unavailable`,projectsReason:t?.reason??`Project boards unavailable. Refresh to try again.`}})},[r,s,c.data,c.error,i]),o}var Oa=class extends Error{};function ka(e,t,n){return{queryKey:e,initialPageParam:{},queryFn:async({pageParam:e,signal:r})=>{let i=await x({limit:t,...e,...n?{projectId:n}:{}},{signal:r});if(!i.available&&Object.keys(e).length>0)throw new Oa(i.reason??`GitHub is unavailable.`);return i},getNextPageParam:e=>Xr(e),retry:(e,t)=>!(t instanceof Oa)&&!(t instanceof nt&&t.status>=400&&t.status<500)&&e<1,staleTime:6e4,refetchOnWindowFocus:!0}}function Aa(e=50,t=!0){let r=b(),i=J.githubPages(e),o=J.githubPagesHead(e);D(`/api/v1/p/${n()}/github?limit=${e}`,o,a(t?6e4:!1));let s=Rt({...ka(i,e),enabled:t,refetchInterval:!1,refetchIntervalInBackground:!1}),c=E({queryKey:o,queryFn:({signal:t})=>x({limit:e},{signal:t}),enabled:!1,staleTime:1/0}),{refetch:l}=s;(0,O.useEffect)(()=>{if(!c.data)return;let e=r.getQueryData(i);if(!e||e.pages.length===0)return;let t=ei(e.pages,c.data);t===`refetch`?l():r.setQueryData(i,{...e,pages:t})},[r,c.dataUpdatedAt,l]);let u=(s.data?.pages??[]).flatMap(e=>e.projectsState===`refreshing`&&e.projectsGeneration?[e.projectsGeneration]:[]),d=k({queries:u.map(e=>({queryKey:[...i,`projects`,e],queryFn:({signal:t})=>Le(e,{signal:t}),enabled:t,staleTime:1/0,retry:!1}))});return(0,O.useEffect)(()=>{d.forEach((e,t)=>{let n=u[t];!n||!e.data&&!e.error||r.setQueryData(i,t=>{if(!t)return t;let r=!1,i=t.pages.map(t=>{if(t.projectsGeneration!==n||t.projectsState!==`refreshing`)return t;let i=e.data;return i?.generation&&i.generation!==n?t:(r=!0,i?.state===`ready`?{...t,projectsState:`ready`,projects:i.projects,issues:t.issues.map(e=>({...e,projectIds:i.membership?.[e.number]??[]}))}:{...t,projectsState:`unavailable`,projectsReason:i?.reason??`Project boards unavailable. Refresh to try again.`})});return r?{...t,pages:i}:t})})},[r,d.map((e,t)=>e.data||e.error?u[t]:``).join(`,`)]),{pages:s,data:(0,O.useMemo)(()=>$r(s.data?.pages??[]),[s.data])}}function ja(e,t=50,n=!0){let r=Rt({...ka([e,`github`,`pages`,t],t,e),enabled:n});return{pages:r,data:(0,O.useMemo)(()=>$r(r.data?.pages??[]),[r.data])}}function Ma(e,t,n=!0){let r=k({queries:t.filter(e=>e.length>0).map(t=>({queryKey:J.githubCommentCounts(e,t),queryFn:({signal:n})=>o(e,t,{},{signal:n}),enabled:n,staleTime:6e4}))});return(0,O.useMemo)(()=>{let e={};for(let t of r)t.data?.available&&Object.assign(e,t.data.counts);return e},[r.map(e=>e.dataUpdatedAt).join(`,`)])}function Na(e,t,n,r=!0){return E({queryKey:[e,`github`,`search`,t,n],queryFn:({signal:r})=>yt(t,n,{projectId:e},{signal:r}),enabled:r&&n.trim()!==``,staleTime:6e4})}function Pa(e,t=!0){return E({queryKey:J.githubChecks(e),queryFn:({signal:t})=>me(e,{signal:t}),enabled:t&&e.length>0,staleTime:6e4})}function Fa(e,t,n=!0){return E({queryKey:J.githubSearch(e,t),queryFn:({signal:n})=>yt(e,t,{},{signal:n}),enabled:n&&t.trim()!==``,staleTime:6e4})}var Ia=100;function La(e){return[...e].sort((e,t)=>t-e).slice(0,Ia).sort((e,t)=>e-t)}function Ra(){let e=gt(),t=$();return e.projectId??t.data?.bootProject}function za(e){for(let[t,n]of Object.entries(e)){for(let[e,r]of Object.entries(n.prs))An(U({projectId:t,kind:`PR`,number:Number(e)}),r);for(let[e,r]of Object.entries(n.issues))An(U({projectId:t,kind:`Issue`,number:Number(e)}),r)}}var Ba=5*6e4;function Va(e){return e?e.recheckAfterMs:Ba}function Ha(e,t=!0){let n=(0,O.useMemo)(()=>{let t=new Map;for(let n of e){let e=t.get(n.projectId)??{prs:new Set,issues:new Set};e[n.kind===`PR`?`prs`:`issues`].add(n.number),t.set(n.projectId,e)}return[...t.entries()].map(([e,t])=>({projectId:e,prs:La(t.prs),issues:La(t.issues)}))},[e.map(U).sort().join(`|`)]),r=k({queries:n.map(e=>({queryKey:J.githubRefStatus(e.projectId,e.prs,e.issues),queryFn:({signal:t})=>ft(e.projectId,{prs:e.prs,issues:e.issues},{signal:t}),enabled:t&&e.prs.length+e.issues.length>0,staleTime:e=>Va(e.state.data)??1/0,refetchInterval:!1,refetchOnWindowFocus:!0}))}),a=b(),o=JSON.stringify(n.map((e,t)=>({...e,interval:Va(r[t]?.data)??!1})));(0,O.useEffect)(()=>{if(!t||i())return;let e=!0,n=JSON.parse(o).filter(e=>e.interval!==!1).map(t=>{let n=new URLSearchParams;t.prs.length&&n.set(`prs`,t.prs.join(`,`)),t.issues.length&&n.set(`issues`,t.issues.join(`,`));let r=J.githubRefStatus(t.projectId,t.prs,t.issues);return zt({path:`/api/v1/p/${t.projectId}/github/ref-status?${n}`,intervalMs:t.interval},(t,n)=>{n||a.cancelQueries({queryKey:r,exact:!0}).then(()=>{e&&a.setQueryData(r,t)})})});return()=>{e=!1;for(let e of n)e()}},[t,o,a]);let s=(0,O.useMemo)(()=>Hn(n,r),[n,r.map(e=>`${e.dataUpdatedAt}:${e.status}`).join(`,`)]);return(0,O.useCallback)(e=>{let t=U(e),n=s.get(t);if(n)return n;let r=V.get(t);return{state:`idle`,...r?{status:r}:{},...H.has(t)?{conflicting:!0}:{}}},[s])}function Ua(e,t,n=!0){return E({queryKey:J.githubComments(e,t),queryFn:({signal:n})=>qe(e,t,{},{signal:n}),enabled:n,staleTime:6e4})}function Wa(e,t,n=!0){return E({queryKey:J.githubItem(e,t),queryFn:({signal:n})=>bt(e,t,{},{signal:n}),enabled:n,staleTime:6e4})}function Ga(e){return E({queryKey:J.githubPrChanges(e??0),queryFn:({signal:t})=>vt(e,{},{signal:t}),enabled:e!==void 0,staleTime:6e4,retry:!1})}export{ai as $,Rr as $t,Oi as A,gr as An,Ca as At,gi as B,L as Bn,ga as Bt,Wi as C,cr as Cn,Ri as Ct,Ma as D,vr as Dn,Fi as Dt,Pa as E,wr as En,Mi as Et,ki as F,Gn as Fn,vi as Ft,ja as G,Jr as Gt,ji as H,M as Hn,Y as Ht,ta as I,Jn as In,li as It,Ai as J,Dr as Jt,Na as K,Ar as Kt,na as L,En as Ln,pi as Lt,Ga as M,qn as Mn,Zi as Mt,Fa as N,Un as Nn,hi as Nt,Ua as O,fr as On,Pi as Ot,$ as P,Wn as Pn,fa as Pt,ua as Q,Gr as Qt,ba as R,On as Rn,$i as Rt,Ta as S,ur as Sn,Xi as St,Da as T,pr as Tn,Z as Tt,ya as U,A as Un,Zr as Ut,Ti as V,j as Vn,la as Vt,Sa as W,Ht as Wn,qr as Wt,Ii as X,Pr as Xt,Bi as Y,Er as Yt,da as Z,Vr as Zt,wa as _,G as _n,Hi as _t,Si as a,Ur as an,ri as at,fi as b,Cr as bn,Vi as bt,va as c,K as cn,ci as ct,Ki as d,rr as dn,ra as dt,Or as en,ni as et,qi as f,xr as fn,aa as ft,Ci as g,mr as gn,zi as gt,ca as h,hr as hn,ii as ht,xi as i,Wr as in,Ha as it,Aa as j,nr as jn,ea as jt,Wa as k,lr as kn,bi as kt,Ni as l,Kr as ln,mi as lt,Ei as m,sr as mn,sa as mt,J as n,Mr as nn,wi as nt,pa as o,Fr as on,si as ot,Qi as p,br as pn,oa as pt,ia as q,Nr as qt,za as r,Lr as rn,Ra as rt,ma as s,Br as sn,yi as st,X as t,jr as tn,ha as tt,Gi as u,kr as un,Ea as ut,_i as v,_r as vn,Yi as vt,oi as w,Sr as wn,ti as wt,Li as x,dr as xn,Ui as xt,Di as y,or as yn,Ji as yt,xa as z,B as zn,_a as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{D as t,E as n,L as r,M as i,d as a,t as o,u as s}from"./button-CHUAMTHK.js";import{i as c,t as l}from"./react-runtime-CCIEwYL0.js";import{C as u,Jr as d,Kt as f,T as p,an as m,i as h,k as g,on as _}from"./project-scope-context-B3M-u8R0.js";import{lt as v}from"./live-protocol-BVn0UA_g.js";import{Et as y,H as ee,J as b,P as x,Rn as te,T as ne,Un as S,Vt as re,Yt as C,dt as w,ft as T,mt as ie,n as E,pt as ae}from"./queries-DORTKwyN.js";import{n as D}from"./toaster-B1MyeHiE.js";import{i as O,l as oe,p as se,r as ce,t as le}from"./dropdown-menu-DhrBcVgr.js";import{a as k,c as A,i as j,n as M,o as N,r as P,s as F,t as I}from"./alert-dialog-Dj464rjk.js";import{D as ue,I as de,M as fe,N as pe,Q as me,S as he,X as ge,Z as _e,c as ve,ct as L,d as ye,j as R,n as be,st as xe,w as z,y as Se}from"./design-icons-DmYTv2r1.js";import{a as B,t as Ce}from"./loader-circle-CZkGEdoI.js";import{t as V}from"./createLucideIcon-BHp8sXmF.js";import{l as we,n as Te,y as Ee}from"./nav-row-styles-BZUUavOF.js";import{n as De,r as Oe}from"./diff-controls-BR2uqhwG.js";import{i as ke,r as Ae,t as je}from"./git-toolbar-D9taioU5.js";import{t as H}from"./info-DA1x_4bz.js";import{a as Me,l as Ne,n as Pe,t as Fe}from"./control-locations-C9II3kPz.js";import{t as U}from"./project-router-MMOk9VbW.js";import{t as W}from"./centered-state-DGyy0SuA.js";import{Et as G,Kt as Ie,Tt as Le,a as Re,c as ze,d as Be,en as K,f as Ve,i as He,l as Ue,m as We,o as Ge,ot as Ke,p as qe,q,r as Je,rn as J,s as Ye,u as Xe}from"./index-DgU3yYUl.js";import{t as Ze}from"./markdown-BBDDg-4t.js";import{t as Qe}from"./diff-D_9MtICR.js";import{t as $e}from"./commit-diff-panel-BJyNYmCY.js";var Y=e(c(),1);function et(e,t){let n=d(t),r=n.getQueryCache();return Y.useSyncExternalStore(Y.useCallback(e=>r.subscribe(v.batchCalls(e)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}var tt=V(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),nt=V(`git-pull-request-create`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 9v12`,key:`1sc30k`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v3`,key:`1jb6z3`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),X=l();function rt(){let e=i(),t=w(),n=d(),r=et({queryKey:E.repo})>0,a=t.data?.info?t.data:null,o=Je(e,a,`screen`);return(0,X.jsxs)(`div`,{"data-route":`repo-git`,"data-slot":`git-screen`,className:Te,children:[(0,X.jsxs)(`div`,{className:`mb-[16px] flex items-center gap-[8px]`,children:[(0,X.jsx)(`h1`,{className:s(we,`min-w-0 flex-1`),children:`Git`}),(0,X.jsx)(`button`,{type:`button`,"data-slot":`git-screen-refresh`,"aria-label":`Refresh the repository`,title:`Refresh the repository`,disabled:r,onClick:()=>{n.invalidateQueries({queryKey:E.repo}),n.invalidateQueries({queryKey:E.worktrees})},className:`-my-2 -mr-[10px] flex size-11 shrink-0 items-center justify-center rounded-md text-soft-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60`,children:(0,X.jsx)(_e,{size:17,"aria-hidden":`true`,className:s(`size-[17px]`,r&&`motion-safe:animate-spin`)})})]}),a?.info?(0,X.jsx)(`div`,{className:`mb-[16px]`,children:(0,X.jsx)(Ge,{scope:e,repo:a,info:a.info,variant:`screen`},e)}):t.isPending?(0,X.jsx)(`p`,{"data-slot":`git-screen-loading`,role:`status`,className:`mb-[16px] px-[10px] text-[13px] text-soft-foreground`,children:`Loading the checkout…`}):t.isError?(0,X.jsxs)(`p`,{"data-slot":`git-screen-error`,role:`alert`,className:`mb-[16px] px-[10px] text-[13px] text-danger`,children:[`Could not load the repository: `,t.error.message]}):(0,X.jsx)(`p`,{"data-slot":`git-screen-not-git`,className:`mb-[16px] px-[10px] text-[13px] text-soft-foreground`,children:`Not a git repository.`}),t.isPending?null:(0,X.jsx)(He,{branch:a?.info?.branch??null,counts:o,variant:`screen`})]})}function Z({entry:e}){return e.keptReason?(0,X.jsx)(`span`,{"data-slot":`branch-kept-reason`,className:`min-w-0 text-[11px] text-soft-foreground`,children:e.keptReason}):null}function it({repo:e,info:t}){let n=x(),r=T(),i=new Map((r.data?.branches??[]).map(e=>[e.name,e])),a=d(),c=S({mutationFn:e=>u({name:e}),onSuccess:async e=>{D(e.created?`Created and switched to ${e.branch}`:`Switched to ${e.branch}`),await Promise.all([a.invalidateQueries({queryKey:E.repo}),a.invalidateQueries({queryKey:E.health})]),a.setQueryData(E.repo,t=>t?.info?{...t,info:{...t.info,branch:e.branch}}:t),a.setQueryData(E.health,n=>n?.repo?.root===t.root?{...n,repo:{...n.repo,branch:e.branch}}:n)},onError:e=>D(e.message,{tone:`danger`})}),[l,f]=(0,Y.useState)(``),[p,m]=(0,Y.useState)(``),h=p.trim().toLowerCase(),g=Q(e,r.data?.branches),_=h?g.filter(e=>e.toLowerCase().includes(h)):g;return(0,X.jsxs)(`section`,{"data-slot":`repo-branches`,className:`grid min-w-0 grid-cols-1 gap-5 px-[18px] py-[22px] md:grid-cols-[minmax(0,1fr)_290px] md:px-9`,children:[(0,X.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-5`,children:[(0,X.jsx)(`h2`,{className:`sr-only`,children:`Branches`}),(0,X.jsxs)(`label`,{className:`relative block`,children:[(0,X.jsx)(me,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,X.jsx)(J,{"aria-label":`Filter branches`,placeholder:`Filter branches…`,value:p,onChange:e=>m(e.target.value),className:`h-11 pl-10`})]}),(0,X.jsxs)(`ul`,{"data-slot":`repo-branch-list`,className:`mt-4 flex min-w-0 flex-col divide-y divide-border border-t border-border md:max-h-[40rem] md:overflow-y-auto md:overscroll-contain`,children:[_.map(e=>{let n=e===t.branch,r=i.get(e);return(0,X.jsxs)(`li`,{"data-slot":`branch-row`,"data-branch":e,"data-branch-class":r?.class,className:`flex min-h-20 flex-col items-start justify-center gap-2 py-3 md:flex-row md:items-center md:justify-start md:py-2.5`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-[8px]`,children:[r?.runId?(0,X.jsx)(U,{to:`/tasks/${r.runId}`,"data-slot":`branch-task-link`,title:r.title?`Open the task ${r.title}`:`Open the task`,className:`min-w-0 truncate rounded-[2px] text-[13px] underline-offset-2 hover:underline focus-visible:outline-2 focus-visible:outline-ring`,children:e}):(0,X.jsx)(`span`,{className:s(`min-w-0 truncate text-[13px]`,n&&`font-normal`),children:e}),r?(0,X.jsx)(lt,{entry:r}):null]}),r?(0,X.jsx)(Z,{entry:r}):null,e.startsWith(`cez/`)&&!n?null:n?(0,X.jsx)(`span`,{"data-slot":`branch-current`,className:`md:ml-auto flex shrink-0 items-center rounded-md bg-accent-strong/10 px-2 py-1.5 text-[12px] font-medium text-accent-text`,children:`Current`}):(0,X.jsxs)(o,{variant:`outline`,size:`sm`,"data-action":`switch-branch`,className:`md:ml-auto h-11`,disabled:c.isPending,onClick:()=>c.mutate(e),children:[(0,X.jsx)(R,{size:16,"aria-hidden":`true`}),`Switch`]})]},e)}),_.length===0?(0,X.jsxs)(`li`,{"data-slot":`branch-empty`,className:`py-3 text-xs text-soft-foreground`,children:[`No branches match “`,p.trim(),`”.`]}):null]})]}),(0,X.jsxs)(`div`,{className:`min-w-0 self-start rounded-xl border border-border bg-card p-5`,children:[(0,X.jsx)(`h2`,{className:`text-base font-semibold`,children:`Create a branch`}),(0,X.jsxs)(`form`,{"data-slot":`branch-create`,className:`mt-7 flex flex-col items-stretch gap-3`,onSubmit:e=>{e.preventDefault();let t=l.trim();t&&c.mutate(t,{onSuccess:()=>f(``)})},children:[(0,X.jsx)(`label`,{htmlFor:`new-branch-name`,className:`text-sm font-medium`,children:`Branch name`}),(0,X.jsx)(`p`,{className:`-mt-1 text-xs text-muted-foreground`,children:`Create from the selected base.`}),(0,X.jsx)(J,{id:`new-branch-name`,"aria-label":`New branch name`,placeholder:`new-branch-name`,className:`h-11 bg-background`,value:l,onChange:e=>f(e.target.value)}),(0,X.jsxs)(o,{type:`submit`,variant:`primary`,size:`sm`,className:`min-h-11 self-start`,"data-action":`create-branch`,disabled:!l.trim()||c.isPending,children:[(0,X.jsx)(ge,{size:16,"aria-hidden":`true`}),`Create branch`]})]}),(0,X.jsx)(`p`,{className:`mt-3 border-t border-border pt-4 text-xs leading-relaxed text-muted-foreground`,children:`Switching branches changes your working tree. Review uncommitted changes first.`})]}),n.data?.forge?.available?(0,X.jsx)(at,{}):null]})}function at(){let e=ne({limit:20});return(0,X.jsxs)(`div`,{"data-slot":`repo-prs`,className:`max-w-xl`,children:[(0,X.jsx)(`h2`,{className:`text-xs font-semibold tracking-wide text-soft-foreground uppercase`,children:`Open pull requests`}),e.isPending?(0,X.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:`Loading pull requests…`}):e.isError?(0,X.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:e.error.message}):e.data.available?e.data.prs.length===0?(0,X.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:`No open pull requests.`}):(0,X.jsx)(`ul`,{className:`mt-2 flex flex-col divide-y divide-border`,children:e.data.prs.map(e=>(0,X.jsx)(ot,{pr:e},e.number))}):(0,X.jsx)(`p`,{"data-slot":`repo-prs-unavailable`,className:`mt-2 text-xs text-soft-foreground`,children:e.data.reason??`The forge is unreachable right now.`})]})}function ot({pr:e}){let t=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(de,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,X.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:[`#`,e.number]}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px]`,children:e.title}),e.checks?(0,X.jsx)(st,{checks:e.checks}):null]}),n=`flex min-w-0 items-center gap-2 rounded-sm px-1.5 py-2`;return(0,X.jsx)(`li`,{"data-slot":`pr-row`,"data-number":e.number,children:a(e.url)?(0,X.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:s(n,`hover:bg-muted`),children:t}):(0,X.jsx)(`span`,{className:n,children:t})})}function st({checks:e}){return(0,X.jsx)(`span`,{"data-slot":`pr-checks`,"data-checks":e,className:s(`shrink-0 text-[12px] font-medium`,e===`passing`&&`text-success`,e===`failing`&&`text-danger`,e===`pending`&&`text-muted-foreground`),children:e})}var ct={active:`in use`,"not-landed":`not landed`,orphan:`not landed`,merged:`merged`,empty:`empty`,other:`yours`};function lt({entry:e}){return(0,X.jsx)(`span`,{"data-slot":`branch-class`,className:s(`shrink-0 rounded-[4px] border px-[5px] py-[1px] text-[10.5px] leading-[14px]`,e.class===`active`?`border-status-running/40 text-status-running`:e.class===`not-landed`||e.class===`orphan`?`border-inbox-count-foreground/40 text-inbox-count-foreground`:`border-border text-soft-foreground`),children:ct[e.class]})}function Q(e,t){let n=new Set(e.branches);for(let e of t??[])n.add(e.name);return[...n].sort((e,t)=>e.localeCompare(t))}function ut(){let e=ae(),t=q(),[n,r]=(0,Y.useState)(`unified`),[i,a]=(0,Y.useState)(!1),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(null),u=(0,Y.useRef)(null),d=e.isError&&e.error instanceof h&&e.error.status===409,f=e.data?.files??[],p=(0,Y.useMemo)(()=>Ae(f),[f]),m=(0,Y.useMemo)(()=>f.some(Ze),[f]),g=t?n:`unified`,_=!t||i;return(0,X.jsxs)(`section`,{"data-slot":`repo-changes`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{"data-slot":`repo-changes-toolbar`,className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 px-[18px] py-[22px] md:px-9`,children:[(0,X.jsx)(`span`,{className:`text-sm`,children:e.data?`${e.data.stat.files} files changed ·`:`Uncommitted changes`}),e.data?(0,X.jsx)(je,{stat:e.data.stat}):null,(0,X.jsxs)(`span`,{className:`ml-auto flex items-center gap-1`,children:[(0,X.jsx)(`span`,{className:`hidden items-center gap-1 md:flex`,children:(0,X.jsx)(De,{mode:n,wrap:i,onModeChange:r,onWrapChange:a})}),m?(0,X.jsx)(Oe,{preview:o,onPreviewChange:s}):null]})]}),e.isPending?(0,X.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-9`,children:`Loading changes…`}):e.isError?(0,X.jsx)(W,{icon:d?(0,X.jsx)(z,{size:16}):(0,X.jsx)(L,{size:16}),tone:d?`neutral`:`danger`,heading:`h2`,title:d?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):f.length===0?(0,X.jsx)(W,{icon:(0,X.jsx)(z,{size:16}),tone:`neutral`,heading:`h2`,title:`Working tree clean`,subtitle:`No uncommitted changes in the main working tree. Edits show up here as they happen.`}):(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-stretch gap-5 md:flex-row md:items-start px-[18px] pb-9 pt-0 [--diff-sticky-top:1rem] md:px-9`,children:[(0,X.jsxs)(`aside`,{"data-slot":`changes-tree-pane`,className:`md:sticky md:top-4 md:max-h-[calc(100dvh_-_64px_-_var(--diff-sticky-top)_-_1rem)] w-full md:w-60 shrink-0 overflow-y-auto overscroll-contain rounded-xl border border-border bg-card p-3.5 lg:w-[250px]`,children:[(0,X.jsx)(`h2`,{className:`mb-3 border-b border-border pb-3 text-xs font-semibold`,children:`Changed files`}),(0,X.jsx)(ke,{root:p,selected:c,onSelect:e=>{l(e),u.current?.scrollToPath(e)}})]}),(0,X.jsx)(Qe,{files:f,viewRef:u,mode:g,wrap:_,preview:o,className:`min-w-0 flex-1`})]})]})}function dt({repo:e,info:t}){let{sha:r}=n(),i=e.log,a=(0,Y.useMemo)(()=>qe(i),[i]);if(r)return(0,X.jsx)(mt,{sha:r});let o=Be(e,t),s=o&&o.behind>0?(0,X.jsx)(pt,{info:t,tracking:o}):null;return i.length===0?(0,X.jsxs)(X.Fragment,{children:[s?(0,X.jsx)(`div`,{className:`px-[8px] pt-[12px] md:px-[20px]`,children:s}):null,(0,X.jsx)(W,{icon:(0,X.jsx)(fe,{size:16}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`The log is empty — this repository has no commits to show.`})]}):(0,X.jsxs)(`div`,{"data-slot":`repo-commits`,className:`flex flex-col gap-[2px] px-[8px] pt-[12px] pb-[20px] md:px-[20px]`,children:[s,a.map(e=>(0,X.jsxs)(`section`,{"data-slot":`repo-commit-day`,"aria-label":e.label,className:`flex flex-col`,children:[(0,X.jsx)(`h2`,{className:`px-[10px] pt-[14px] pb-[4px] text-[11px] font-medium text-soft-foreground`,children:e.label}),(0,X.jsx)(`ul`,{className:`flex flex-col`,children:e.commits.map(e=>(0,X.jsxs)(`li`,{className:`flex min-h-[52px] items-center gap-[14px] rounded-[6px] hover:bg-sidebar-row-hover`,children:[(0,X.jsxs)(U,{to:`/git/commits/${e.hash}`,"data-slot":`commit-row`,"data-sha":e.hash,className:`flex min-h-[52px] min-w-0 flex-1 flex-col justify-center gap-[3px] rounded-[6px] px-[10px] py-[6px] focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,X.jsx)(`span`,{"data-slot":`commit-row-subject`,className:`truncate text-[13px] text-foreground`,children:e.subject}),(0,X.jsxs)(`span`,{"data-slot":`commit-row-meta`,className:`flex min-w-0 items-center gap-[6px] text-[11px] text-soft-foreground`,children:[(0,X.jsx)(`span`,{className:`shrink-0 font-mono`,children:e.hash}),(0,X.jsxs)(`span`,{className:`truncate`,children:[`· `,e.author,` · `,We(e.when)]})]})]}),(0,X.jsx)(ft,{source:e.source})]},e.hash))})]},e.label))]})}function ft({source:e}){let t=`hidden max-w-[45%] shrink-0 items-center gap-[5px] pr-[10px] text-[11.5px] text-soft-foreground md:flex`;return e?(0,X.jsxs)(U,{to:`/tasks/${e.runId}`,"data-slot":`commit-source`,"data-source":`task`,"aria-label":`From the task ${e.title}${e.prNumber===null?``:`, pull request #${e.prNumber}`}`,className:s(t,`rounded-[4px] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`),children:[e.prNumber===null?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(pe,{"aria-hidden":`true`,className:`size-[11px] shrink-0 text-merged-text`}),(0,X.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[`PR #`,e.prNumber]})]}),(0,X.jsx)(ve,{"aria-hidden":`true`,className:`size-[12px] shrink-0`}),(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title})]}):(0,X.jsx)(`span`,{"data-slot":`commit-source`,"data-source":`unknown`,className:t,children:`no task found`})}function pt({info:e,tracking:t}){let n=ze(i(),e),r=(0,Y.useRef)(null);return(0,X.jsxs)(`div`,{"data-slot":`git-incoming`,className:`mb-[4px] flex min-h-[40px] items-center gap-[8px] rounded-[8px] border border-border px-[10px] py-[6px]`,children:[(0,X.jsx)(tt,{"aria-hidden":`true`,className:`size-[14px] shrink-0 text-inbox-count-foreground`}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1 text-[12.5px] text-muted-foreground`,children:[t.behind,` commit`,t.behind===1?``:`s`,` on `,t.ref,` `,t.behind===1?`is`:`are`,` not in your checkout yet`]}),(0,X.jsxs)(`button`,{ref:r,type:`button`,"data-action":`repo-pull-incoming`,disabled:!n.hasRemote||n.pulling,onClick:()=>void n.pull(),className:`inline-flex h-[26px] shrink-0 items-center gap-[4px] rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 max-md:h-11 [&>svg]:size-[12px]`,children:[n.pulling?(0,X.jsx)(Ce,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,X.jsx)(be,{"aria-hidden":`true`}),`Pull`]}),(0,X.jsx)(Ye,{checkout:n,returnFocus:r})]})}function mt({sha:e}){return(0,X.jsx)($e,{commit:ie(e),sha:e,backTo:q()?`/git`:Ue,backLabel:`All recent commits`,slot:`repo-commit`,className:`flex min-h-0 flex-1 flex-col`,diffClassName:`px-4 py-4 [--diff-sticky-top:1rem] md:px-6`})}var $=`Squash-merged branches may show as not landed without GitHub`;function ht(e){let t=[],n=[],r=[];for(let i of e)if(i.class===`orphan`)r.push(i);else if(i.class!==`not-landed`)continue;else i.pr&&(i.pr.state===`open`||i.pr.state===`draft`)?n.push(i):t.push(i);return[{key:`no-pr`,title:`No pull request`,note:`nobody sees this work until you act`,rows:t},{key:`pr-open`,title:`Pull request open`,rows:n},{key:`deleted`,title:`Task deleted`,note:`this branch is the only copy of the work`,rows:r}].filter(e=>e.rows.length>0)}function gt(e){return e.filter(e=>e.class===`active`&&e.runId!==null&&e.ahead>0&&(e.runStatus===`done`||e.runStatus===`failed`||e.runStatus===`cancelled`)).length}var _t={done:`success`,failed:`danger`,cancelled:`neutral`};function vt(){let e=T(),t=y(),n=i(),r=b(),[a,o]=(0,Y.useState)(null);if(e.isPending)return(0,X.jsx)(`p`,{"data-slot":`not-landed-loading`,role:`status`,className:`px-[28px] py-[20px] text-[13px] text-soft-foreground`,children:`Loading branches…`});if(e.isError)return(0,X.jsx)(W,{icon:(0,X.jsx)(L,{size:16}),tone:`danger`,heading:`h2`,title:`Could not classify the branches`,subtitle:e.error.message});let s=ht(e.data.branches),c=gt(e.data.branches),l=c>0?(0,X.jsxs)(`p`,{"data-slot":`not-landed-retained`,className:`flex items-start gap-[6px] px-[10px] pt-[6px] text-[11.5px] leading-[17px] text-soft-foreground`,children:[(0,X.jsx)(H,{"aria-hidden":`true`,className:`mt-[2.5px] size-[12px] shrink-0`}),(0,X.jsxs)(`span`,{children:[c,` finished task`,c===1?` still has its`:`s still have their`,` worktree and commits not on the base, so `,c===1?`it is`:`they are`,` not listed here.`,` `,`They show here once the worktree is reclaimed in `,(0,X.jsx)(U,{to:Xe.cleanup,className:`underline underline-offset-2 hover:text-foreground`,children:`Cleanup`}),`.`]})]}):null,u=new Map((t.data??[]).map(e=>[e.id,e.finishedAt]));return(0,X.jsxs)(Me,{projectId:n,repoBase:r,requests:s.flatMap(e=>e.rows).flatMap(e=>e.pr?[{projectId:n,kind:`PR`,number:e.pr.number}]:[]),children:[(0,X.jsxs)(`div`,{"data-slot":`repo-not-landed`,className:`flex flex-col gap-[2px] px-[8px] pt-[12px] pb-[calc(90px+env(safe-area-inset-bottom))] md:px-[20px] md:pb-[20px]`,children:[e.data.prStateKnown?null:(0,X.jsx)(yt,{}),l,s.length===0?(0,X.jsx)(W,{icon:(0,X.jsx)(Ie,{size:16}),tone:`neutral`,heading:`h2`,title:c>0?`Nothing else waiting to land`:`Everything landed`,subtitle:c>0?`Every other finished task's commits are on the base branch, or it made none.`:`Every finished task's commits are on the base branch, or it made none.`}):(0,X.jsxs)(X.Fragment,{children:[s.map(e=>(0,X.jsxs)(`section`,{"data-slot":`not-landed-group`,"data-group":e.key,"aria-label":e.title,className:`flex flex-col`,children:[(0,X.jsxs)(`h2`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-[6px] px-[10px] pt-[14px] pb-[6px] text-[11px] text-soft-foreground`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:e.title}),(0,X.jsx)(`span`,{children:e.rows.length}),e.note?(0,X.jsxs)(`span`,{children:[`· `,e.note]}):null]}),(0,X.jsx)(`ul`,{className:`flex flex-col`,children:e.rows.map(e=>(0,X.jsx)(bt,{entry:e,finishedAt:e.runId?u.get(e.runId):void 0,onDelete:()=>o(e)},e.name))})]},e.key)),(0,X.jsxs)(`p`,{"data-slot":`not-landed-note`,className:`flex items-start gap-[6px] px-[10px] pt-[14px] text-[11.5px] leading-[17px] text-soft-foreground`,children:[(0,X.jsx)(H,{"aria-hidden":`true`,className:`mt-[2.5px] size-[12px] shrink-0`}),`Delete branch is in each row's … menu. It confirms and names the commits it drops. Nothing on this list can be bulk-deleted.`]})]})]}),(0,X.jsx)(Tt,{entry:a,onClose:()=>o(null)})]})}function yt({className:e}){return(0,X.jsxs)(`p`,{"data-slot":`git-no-forge`,className:s(`flex items-start gap-[6px] px-[10px] pt-[6px] text-[11.5px] leading-[17px] text-soft-foreground`,e),children:[(0,X.jsx)(H,{"aria-hidden":`true`,className:`mt-[2.5px] size-[12px] shrink-0`}),$,`.`]})}function bt({entry:e,finishedAt:t,onDelete:n}){return(0,X.jsxs)(`li`,{"data-slot":`not-landed-row`,"data-branch":e.name,"data-branch-class":e.class,className:`flex min-h-[56px] items-center gap-[12px] rounded-[6px] px-[10px] py-[6px] hover:bg-sidebar-row-hover`,children:[(0,X.jsx)(Ct,{entry:e,finishedAt:t}),(0,X.jsx)(xt,{entry:e}),(0,X.jsx)(St,{entry:e,onDelete:n})]})}function xt({entry:e}){return(0,X.jsx)(X.Fragment,{children:e.pr?(0,X.jsxs)(`span`,{"data-slot":`not-landed-pr`,className:`hidden shrink-0 items-center gap-[4px] text-[11.5px] text-muted-foreground md:flex`,children:[(0,X.jsx)(Pe,{plain:!0,reference:{kind:`PR`,number:e.pr.number,url:e.pr.url},taskTitle:e.title??e.name,status:e.pr.state===`draft`?`draft`:e.pr.state===`closed`?`closed`:void 0}),(0,X.jsx)(wt,{entry:e})]}):null})}function St({entry:e,onDelete:t}){let n=d(),r=e.class===`orphan`,i=e.pr&&(e.pr.state===`open`||e.pr.state===`draft`)?e.pr:null,a=!r&&e.runId!==null&&!i,o=S({mutationFn:()=>p(e.runId),onSuccess:e=>{D(`Draft PR created — ${e.url}`),n.invalidateQueries({queryKey:E.repoBranches}),n.invalidateQueries({queryKey:E.runs.all})},onError:e=>D(e instanceof h&&e.manual?`${e.message} — ${e.manual}`:e.message,{tone:`danger`})}),c=()=>void navigator.clipboard.writeText(e.name).then(()=>D(`Copied ${e.name}`),()=>D(`Could not copy the branch name`,{tone:`danger`})),l=`inline-flex h-[28px] shrink-0 items-center gap-[5px] rounded-[6px] px-[10px] text-[12px] font-medium text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 [&>svg]:size-[12px]`;return(0,X.jsxs)(X.Fragment,{children:[e.runId?(0,X.jsx)(U,{to:`/tasks/${e.runId}`,"data-action":`not-landed-open`,className:s(l,`hidden border border-border hover:bg-muted md:inline-flex`),children:`Open task`}):null,a?(0,X.jsxs)(`button`,{type:`button`,"data-action":`not-landed-create-pr`,disabled:o.isPending,onClick:()=>o.mutate(),className:s(l,`hidden bg-muted hover:brightness-110 md:inline-flex`),children:[(0,X.jsx)(nt,{"aria-hidden":`true`}),o.isPending?`Creating…`:`Create draft PR`]}):null,r?(0,X.jsxs)(`button`,{type:`button`,"data-action":`not-landed-copy`,onClick:c,className:s(l,`hidden border border-border hover:bg-muted md:inline-flex`),children:[(0,X.jsx)(Se,{"aria-hidden":`true`}),`Copy branch`]}):null,(0,X.jsxs)(le,{children:[(0,X.jsx)(se,{"data-action":`not-landed-more`,"aria-label":`More actions for ${e.name}`,className:`flex size-[28px] shrink-0 items-center justify-center rounded-[6px] text-soft-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring max-md:size-11`,children:(0,X.jsx)(he,{"aria-hidden":`true`,className:`size-[14px]`})}),(0,X.jsxs)(ce,{align:`end`,className:`w-52`,children:[e.runId?(0,X.jsx)(O,{asChild:!0,className:`md:hidden`,children:(0,X.jsx)(U,{to:`/tasks/${e.runId}`,children:`Open task`})}):null,a?(0,X.jsx)(O,{className:`md:hidden`,disabled:o.isPending,onSelect:()=>o.mutate(),children:`Create draft PR`}):null,(0,X.jsx)(O,{className:s(!r&&`md:hidden`),onSelect:c,children:`Copy branch`}),(0,X.jsx)(oe,{className:`md:hidden`}),(0,X.jsx)(O,{"data-action":`not-landed-delete`,variant:`destructive`,onSelect:t,children:`Delete branch…`})]})]})]})}function Ct({entry:e,finishedAt:t}){let n=e.class===`orphan`,r=n?`No task · last commit “${e.lastCommit.subject}”`:e.title??e.name,i=B(t??e.lastCommit.at),a=n||!e.runStatus?i?`${i} ago`:``:`${e.runStatus}${i?` ${i} ago`:``}`;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`flex size-[12px] shrink-0 items-center justify-center`,children:n?(0,X.jsx)(Ee,{"aria-label":`Task deleted`,className:`size-[12px] text-soft-foreground`}):(0,X.jsx)(Ke,{tone:e.runStatus&&_t[e.runStatus]||`neutral`,"aria-label":e.runStatus??void 0})}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[3px]`,children:[e.runId?(0,X.jsx)(U,{to:`/tasks/${e.runId}`,"data-slot":`not-landed-title`,className:`min-w-0 truncate rounded-[2px] text-[13px] text-foreground hover:underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-ring`,children:r}):(0,X.jsx)(`span`,{"data-slot":`not-landed-title`,className:`min-w-0 truncate text-[13px] text-muted-foreground`,title:r,children:r}),(0,X.jsxs)(`span`,{"data-slot":`not-landed-meta`,className:`flex min-w-0 items-center gap-[6px] text-[11px] text-soft-foreground`,children:[(0,X.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:e.name}),(0,X.jsxs)(`span`,{className:`shrink-0`,children:[`· `,e.ahead,` commit`,e.ahead===1?``:`s`]}),e.diffStat?(0,X.jsxs)(`span`,{className:`flex shrink-0 gap-[4px] tabular-nums`,children:[(0,X.jsxs)(`span`,{className:`text-success`,children:[`+`,e.diffStat.additions]}),(0,X.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.diffStat.deletions]})]}):null,a?(0,X.jsxs)(`span`,{className:`truncate`,children:[`· `,a]}):null]}),(0,X.jsx)(Z,{entry:e})]})]})}function wt({entry:e}){let t=te(Ne(`PR`,e.pr?.number).status),n=e.pr?.state;return(0,X.jsxs)(`span`,{"data-slot":`not-landed-pr-state`,children:[`· `,n===`draft`||n===`closed`?n:t?t.label.toLowerCase():`open`]})}function Tt({entry:e,onClose:t}){let n=d(),[r,i]=(0,Y.useState)(``),a=(0,Y.useId)(),o=S({mutationFn:e=>g({names:[e],confirm:e}),onSuccess:e=>{let t=e.dropped?.length??0;D(e.deleted.length>0?`Deleted ${e.deleted[0]}${t?` and ${t} commit${t===1?``:`s`} with it`:``}`:e.refused[0]?.reason??`Nothing was deleted`),n.invalidateQueries({queryKey:E.repo}),s()},onError:e=>D(e.message,{tone:`danger`})}),s=()=>{i(``),t()},c=e!==null&&r.trim()===e.name,l=e&&`${e.ahead} commit${e.ahead===1?``:`s`}`;return(0,X.jsx)(I,{open:e!==null,onOpenChange:e=>!e&&!o.isPending&&s(),children:(0,X.jsxs)(j,{"data-slot":`delete-branch-dialog`,children:[(0,X.jsxs)(F,{children:[(0,X.jsxs)(A,{children:[`Delete `,e?.name,`?`]}),(0,X.jsx)(k,{asChild:!0,children:(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(`p`,{children:e?.class===`orphan`?`Its task was deleted, so this branch is the only copy of the work.`:(0,X.jsxs)(X.Fragment,{children:[`This drops the work of `,(0,X.jsx)(`span`,{className:`font-medium text-foreground`,children:e?.title??e?.name}),`. It is not on the base branch`,e?.pr?``:` and no pull request carries it`,`.`]})}),(0,X.jsxs)(`p`,{"data-slot":`delete-branch-dropped`,children:[l,` will be dropped`,e?.diffStat?` (+${e.diffStat.additions} −${e.diffStat.deletions})`:``,`, the latest “`,e?.lastCommit.subject,`”`,` `,`(`,(0,X.jsx)(`span`,{className:`font-mono`,children:e?.lastCommit.sha.slice(0,7)}),`).`]})]})})]}),(0,X.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),c&&e&&o.mutate(e.name)},className:`flex flex-col gap-[6px]`,children:[(0,X.jsxs)(`label`,{htmlFor:a,className:`text-[12.5px] text-muted-foreground`,children:[`Type `,(0,X.jsx)(`span`,{className:`font-mono text-foreground`,children:e?.name}),` to confirm`]}),(0,X.jsx)(J,{id:a,"data-slot":`delete-branch-confirm`,autoComplete:`off`,spellCheck:!1,value:r,onChange:e=>i(e.target.value),className:`h-11 font-mono`})]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(P,{className:`h-11`,disabled:o.isPending,children:`Keep it`}),(0,X.jsx)(M,{"data-action":`delete-branch-confirm`,className:`h-11 bg-danger text-danger-foreground hover:brightness-[0.96]`,disabled:!c||o.isPending,onClick:t=>{t.preventDefault(),e&&o.mutate(e.name)},children:o.isPending?`Deleting…`:`Delete branch`})]})]})})}function Et({base:e}){let t=T(),n=d(),[r,i]=(0,Y.useState)({merged:!1,empty:!1}),[a,o]=(0,Y.useState)(!1),s=(t.data?.branches??[]).filter(e=>e.class===`merged`),c=(t.data?.branches??[]).filter(e=>e.class===`empty`),l=[...s,...c],u=S({mutationFn:e=>g({names:e}),onSuccess:e=>{let t=e.refused.length;D(`Deleted ${e.deleted.length} branch${e.deleted.length===1?``:`es`}${t?`; kept ${t} that ${t===1?`is`:`are`} no longer safe to delete`:``}`),n.invalidateQueries({queryKey:E.repo})},onError:e=>{n.invalidateQueries({queryKey:E.repo}),D(e.message,{tone:`danger`})}});if(t.isPending)return(0,X.jsx)(`p`,{"data-slot":`cleanup-branches-loading`,className:`text-[13px] text-soft-foreground`,children:`Loading branches…`});if(t.isError)return(0,X.jsxs)(`p`,{"data-slot":`cleanup-branches-error`,className:`text-[13px] text-danger`,children:[`Branches did not load: `,t.error.message]});let f=l.length,p=`branch${f===1?``:`es`}`;return(0,X.jsxs)(`section`,{"data-slot":`cleanup-branches`,"aria-labelledby":`cleanup-branches-title`,className:`flex flex-col rounded-[8px] border border-border`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] border-b border-border px-[14px] py-[12px] md:flex-row md:items-center`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`h2`,{id:`cleanup-branches-title`,className:`text-[13px] font-semibold text-foreground`,children:[`Branches safe to delete · `,f]}),(0,X.jsxs)(`p`,{className:`text-[11.5px] leading-[17px] text-soft-foreground`,children:[`Their work is already on `,e,`, or they have none. Deleting loses nothing.`]})]}),(0,X.jsxs)(`button`,{type:`button`,"data-action":`cleanup-branches-delete`,disabled:f===0||u.isPending,onClick:()=>o(!0),className:`inline-flex h-[28px] shrink-0 items-center gap-[5px] self-start rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 disabled:hover:brightness-100 max-md:h-11 md:self-center`,children:[(0,X.jsx)(xe,{"aria-hidden":`true`,className:`size-[12px]`}),u.isPending?`Deleting…`:`Delete ${f} ${p}`]})]}),(0,X.jsx)(Dt,{kind:`merged`,title:`Merged into ${e}`,hint:t.data.prStateKnown?`including squash-merged PRs, read from the PR state`:$.toLowerCase(),rows:s,open:r.merged,onToggle:()=>i(e=>({...e,merged:!e.merged}))}),(0,X.jsx)(Dt,{kind:`empty`,title:`Empty`,hint:`no commits beyond the fork point`,rows:c,open:r.empty,onToggle:()=>i(e=>({...e,empty:!e.empty}))}),(0,X.jsx)(I,{open:a,onOpenChange:o,children:(0,X.jsxs)(j,{children:[(0,X.jsxs)(F,{children:[(0,X.jsxs)(A,{children:[`Delete `,f,` `,p,`?`]}),(0,X.jsxs)(k,{children:[s.length,` merged into `,e,` and `,c.length,` empty. Their work is already on `,e,`, or they have none. Anything that stopped being safe since this list loaded is kept.`]})]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(P,{children:`Keep them`}),(0,X.jsxs)(M,{"data-action":`cleanup-branches-confirm`,className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{u.mutate(l.map(e=>e.name)),o(!1)},children:[`Delete `,f,` `,p]})]})]})})]})}function Dt({kind:e,title:t,hint:n,rows:r,open:i,onToggle:a}){let o=`cleanup-branches-${e}`;return(0,X.jsxs)(`div`,{"data-slot":`cleanup-branch-group`,"data-group":e,className:`border-b border-border last:border-0`,children:[(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":i,"aria-controls":o,disabled:r.length===0,onClick:a,className:`flex min-h-[44px] w-full items-center gap-[12px] px-[14px] py-[4px] text-left hover:bg-sidebar-row-hover focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring disabled:hover:bg-transparent`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`span`,{className:`truncate text-[12.5px] text-foreground`,children:[t,` · `,r.length]}),(0,X.jsx)(`span`,{className:`truncate text-[11px] text-soft-foreground`,children:n})]}),r.length>0?(0,X.jsx)(ye,{"aria-hidden":`true`,className:s(`size-[13px] shrink-0 text-soft-foreground transition-transform motion-reduce:transition-none`,i&&`rotate-90`)}):null]}),i?(0,X.jsx)(`ul`,{id:o,"aria-label":t,className:`flex flex-col pb-[6px]`,children:r.map(e=>(0,X.jsxs)(`li`,{"data-slot":`cleanup-branch-row`,"data-branch":e.name,className:`flex min-h-[32px] items-center gap-[10px] px-[14px] pl-[26px] text-[11.5px]`,children:[(0,X.jsx)(`span`,{className:`shrink-0 font-mono text-muted-foreground`,children:e.name}),e.runId?(0,X.jsx)(U,{to:`/tasks/${e.runId}`,className:`min-w-0 flex-1 truncate text-soft-foreground underline-offset-2 hover:text-foreground hover:underline`,children:e.title??`Open the task`}):(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-soft-foreground`,children:e.lastCommit.subject}),e.pr?(0,X.jsxs)(`span`,{className:`shrink-0 text-soft-foreground`,children:[`PR #`,e.pr.number]}):null,(0,X.jsx)(`span`,{className:`shrink-0 tabular-nums text-soft-foreground`,children:B(e.lastCommit.at)})]},e.name))}):null]})}function Ot(){let e=re(),t=ee().data?.targets.find(e=>e.id===`finder`),n=S({mutationFn:e=>f(e,t.id),onError:e=>D(e.message,{tone:`danger`})}),r=d(),[i,a]=(0,Y.useState)(!1),o=()=>Promise.all([r.invalidateQueries({queryKey:E.worktrees}),r.invalidateQueries({queryKey:E.repoBranches})]),s=S({mutationFn:e=>_(),onSuccess:(e,t)=>{o();let n=e.reclaimed.length,r=Math.max(0,t-n);D(n===0?r>0?`Nothing was reclaimed — the worktrees past the keep limit have uncommitted work or are in use`:`Nothing to reclaim — no finished worktrees exceed the keep limit`:`Reclaimed ${n} worktree${n===1?``:`s`} (branch kept)${r>0?` · ${r} kept: uncommitted work or in use`:``}`)},onError:e=>D(e.message,{tone:`danger`})}),c=S({mutationFn:e=>m(e.runId),onSuccess:(e,t)=>{o(),D(`Reclaimed the worktree of ${t.title} (branch kept)`)},onError:e=>{o(),D(e.message,{tone:`danger`})}});if(e.isPending)return(0,X.jsx)(`p`,{"data-slot":`worktrees-loading`,className:`text-[13px] text-soft-foreground`,children:`Loading worktrees…`});if(e.isError)return(0,X.jsxs)(`p`,{"data-slot":`worktrees-error`,className:`text-[13px] text-danger`,children:[`Worktrees did not load: `,e.error.message]});let{worktrees:l,totalBytes:u,keep:p}=e.data,h=s.isPending||c.isPending,g=l.filter(e=>e.pastKeep),v=g.length>0,y=g.some(e=>e.sizeBytes===null)?null:g.reduce((e,t)=>e+(t.sizeBytes??0),0),b=v?y?`Reclaim ${C(y)} now`:`Reclaim ${g.length} now`:`Reclaim now`,x=u?C(u):null;return(0,X.jsxs)(`section`,{"data-slot":`worktrees-panel`,"aria-labelledby":`worktrees-panel-title`,className:`flex flex-col rounded-[8px] border border-border`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] border-b border-border px-[14px] py-[12px] md:flex-row md:items-center`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`h2`,{id:`worktrees-panel-title`,className:`text-[13px] font-semibold text-foreground`,children:[`Worktrees on disk`,x?` · ${x}`:``]}),(0,X.jsxs)(`p`,{"data-slot":`worktrees-retention`,className:`text-[11.5px] leading-[17px] text-soft-foreground`,children:[p===0?`Retention is unlimited (`:`Retention keeps the newest ${p} finished checkout${p===1?``:`s`} (`,(0,X.jsx)(U,{to:`/settings/worktrees`,"data-slot":`worktrees-retention-link`,className:`underline-offset-2 hover:text-foreground hover:underline`,children:Fe(`worktrees`,` › `)}),p===0?`), so nothing is reclaimed on its own.`:`) and reclaims the rest.`,` `,`Reclaim removes the directory only; the branch stays, so its work stays recoverable.`]})]}),(0,X.jsxs)(`button`,{type:`button`,"data-action":`worktrees-reclaim-now`,disabled:h||!v,title:v?void 0:`Nothing past the keep limit to reclaim`,onClick:()=>a(!0),className:`inline-flex h-[28px] shrink-0 items-center gap-[5px] self-start rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 disabled:hover:brightness-100 max-md:h-11 md:self-center`,children:[(0,X.jsx)(K,{"aria-hidden":`true`,className:`size-[12px]`}),b]})]}),l.length===0?(0,X.jsx)(`p`,{"data-slot":`worktrees-empty`,className:`px-[14px] py-[12px] text-[12.5px] text-soft-foreground`,children:`No task worktrees on disk.`}):(0,X.jsx)(`ul`,{"aria-label":`Task worktrees on disk`,className:`flex flex-col`,children:l.map(e=>(0,X.jsx)(jt,{worktree:e,keep:p,disabled:h,onOpen:t?()=>n.mutate(e.runId):void 0,opening:n.isPending,onReclaim:()=>c.mutate(e)},e.runId))}),(0,X.jsx)(I,{open:i,onOpenChange:a,children:(0,X.jsxs)(j,{children:[(0,X.jsxs)(F,{children:[(0,X.jsx)(A,{children:`Reclaim old worktrees?`}),(0,X.jsxs)(k,{children:[g.length,` finished worktree`,g.length===1?``:`s`,` beyond the keep limit`,y?` (${C(y)})`:``,` `,g.length===1?`is`:`are`,` reclaimed now, directory only. Their branches are kept, so the work stays recoverable.`]})]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(P,{children:`Keep them`}),(0,X.jsx)(M,{"data-action":`worktrees-confirm`,onClick:()=>{s.mutate(g.length),a(!1)},children:b})]})]})})]})}var kt=new Set([`queued`,`running`,`waiting`,`review`]);function At(e,t){return kt.has(e.status)||!e.reclaimable?{label:`in use`,tone:`in-use`}:e.pastKeep?{label:`reclaimable`,tone:`plain`}:{label:t>0?`kept · newest ${t}`:`kept`,tone:`plain`}}function jt({worktree:e,keep:t,disabled:n,onOpen:r,opening:i,onReclaim:a}){let o=At(e,t),c=B(e.finishedAt??void 0),l=e.status===`review`?`at review`:c?`${e.status} ${c} ago`:e.status,u=(0,X.jsx)(`span`,{"data-slot":`worktree-state`,"data-state":o.tone===`in-use`?`in-use`:e.pastKeep?`reclaimable`:`kept`,className:s(`text-[11.5px]`,o.tone===`in-use`?`text-status-running`:`text-soft-foreground`),children:o.label}),d=`flex size-[28px] shrink-0 items-center justify-center rounded-[6px] text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 max-md:size-11`;return(0,X.jsxs)(`li`,{"data-slot":`worktree-row`,"data-run":e.runId,className:`flex min-h-[44px] items-center gap-[12px] border-b border-border px-[14px] py-[4px] last:border-0`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsx)(`span`,{className:`truncate text-[12.5px] text-foreground`,title:e.title,children:e.title}),(0,X.jsxs)(`span`,{className:`truncate font-mono text-[10.5px] text-soft-foreground`,children:[e.branch??e.runId.slice(0,8),` · `,l,(0,X.jsxs)(`span`,{className:`md:hidden`,children:[` · `,o.label]})]})]}),(0,X.jsx)(`span`,{"data-slot":`worktree-size`,className:`shrink-0 text-[11.5px] tabular-nums text-muted-foreground`,children:e.sizeBytes===null?`—`:C(e.sizeBytes)||`0 kB`}),(0,X.jsx)(`span`,{className:`hidden shrink-0 md:inline`,children:u}),r?(0,X.jsx)(`button`,{type:`button`,className:d,"aria-label":`Open folder for ${e.title}`,title:`Open folder`,disabled:i,onClick:r,children:(0,X.jsx)(ue,{"aria-hidden":`true`,className:`size-[13px]`})}):null,o.tone===`in-use`?null:(0,X.jsx)(`button`,{type:`button`,"data-action":`worktree-reclaim`,"aria-label":`Reclaim the worktree of ${e.title} (branch kept)`,title:`Reclaim the directory (branch kept)`,disabled:n,onClick:a,className:d,children:(0,X.jsx)(K,{"aria-hidden":`true`,className:`size-[13px]`})})]})}function Mt({section:e,index:n=!1}){let i=w(),a=q(),[o]=t();if(n&&!a&&o.get(`view`)!==`repo`)return(0,X.jsx)(rt,{});if(i.isPending)return(0,X.jsx)(Le,{});if(i.isError)return(0,X.jsxs)(`div`,{"data-route":`repo-git`,className:`flex min-h-full flex-col`,children:[(0,X.jsx)(G,{}),(0,X.jsx)(W,{icon:(0,X.jsx)(L,{size:16}),tone:`danger`,title:`Could not load the repository`,subtitle:i.error.message})]});let s=i.data.info;return s?(0,X.jsx)(Nt,{repo:i.data,info:s,section:e}):(0,X.jsxs)(`div`,{"data-route":`repo-git`,className:`flex min-h-full flex-col`,children:[(0,X.jsx)(G,{}),(0,X.jsx)(W,{icon:(0,X.jsx)(R,{size:16}),tone:`neutral`,title:`Not a git repository`,subtitle:`${r(`cezar`)} is running outside a git repository — start it inside one to browse changes, commits and branches.`})]})}function Nt({repo:e,info:t,section:n}){return(0,X.jsxs)(`div`,{"data-route":`repo-git`,"data-git-section":n,className:`flex min-h-full flex-col`,children:[(0,X.jsx)(G,{}),(0,X.jsxs)(`header`,{"data-slot":`repo-header`,className:`flex flex-col gap-1 px-[18px] pt-[18px] md:min-h-[61px] md:flex-row md:items-center md:gap-[10px] md:border-b md:border-border md:px-7 md:py-4`,children:[(0,X.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-2xl font-semibold tracking-tight md:text-[15px] md:tracking-normal`,children:Re(n,t.branch)}),(0,X.jsx)(`p`,{"data-slot":`repo-meta`,className:`min-w-0 truncate text-[12px] text-soft-foreground md:text-[11.5px]`,children:(0,X.jsx)(Pt,{repo:e,info:t,section:n})})]}),n===`main`?(0,X.jsx)(dt,{repo:e,info:t}):n===`not-landed`?(0,X.jsx)(vt,{}):n===`cleanup`?(0,X.jsxs)(`div`,{"data-slot":`repo-cleanup`,className:`flex flex-col gap-[16px] px-[18px] pt-[12px] pb-[calc(90px+env(safe-area-inset-bottom))] md:px-[20px] md:pb-[20px]`,children:[(0,X.jsx)(Ot,{}),(0,X.jsx)(Et,{base:e.baseBranch??t.branch})]}):n===`branches`?(0,X.jsx)(it,{repo:e,info:t}):(0,X.jsx)(ut,{})]})}function Pt({repo:e,info:t,section:n}){let r=e.baseBranch??t.branch;switch(n){case`main`:return(0,X.jsxs)(X.Fragment,{children:[e.log.length===0?`no commits yet`:`latest ${e.log.length} commit${e.log.length===1?``:`s`} in the main checkout`,e.tracking?` · ${Ve(e.tracking)}`:``]});case`not-landed`:return(0,X.jsxs)(X.Fragment,{children:[`finished tasks whose commits are not on `,r]});case`branches`:return(0,X.jsx)(Ft,{repo:e,info:t});case`changes`:return(0,X.jsxs)(X.Fragment,{children:[e.status.length,` uncommitted file`,e.status.length===1?``:`s`,` in the main checkout`]});case`cleanup`:return(0,X.jsxs)(X.Fragment,{children:[`nothing here can delete work that is not on `,r]})}}function Ft({repo:e,info:t}){let n=Q(e,T().data?.branches).length;return(0,X.jsxs)(X.Fragment,{children:[n,` branch`,n===1?``:`es`,` · on `,t.branch]})}export{Mt as RepoGitRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,D as n,E as r,h as i,p as a,t as o,w as s}from"./button-CHUAMTHK.js";import{i as c,t as l}from"./react-runtime-CCIEwYL0.js";import{c as u,i as d}from"./project-scope-context-B3M-u8R0.js";import{C as f,u as p}from"./queries-DORTKwyN.js";import{ct as m,r as h}from"./design-icons-DmYTv2r1.js";import{c as g,i as _,l as v,o as y,s as b,t as x}from"./file-preview-D08Kq15E.js";import{t as S}from"./centered-state-DGyy0SuA.js";import{s as C}from"./markdown-D7DUNWcJ.js";import{gt as w,ht as T,mt as E}from"./index-DgU3yYUl.js";var D=e(c(),1),O=l();function k(){let e=t(),n=s();return()=>{if(e.key==="default"||window.history.state?.idx===0){n({pathname:e.pathname.replace(/\/report\/?$/,``)},{replace:!0});return}let t=window.navigation,r=A(e.state);t?.canGoBack?t.back():r?n(r,{state:{filesRestoreKey:e.state?.filesRestoreKey}}):n(-1)}}function A(e){let t=e?.readerFrom;return typeof t==`string`&&t.startsWith(`/`)&&!t.startsWith(`//`)?t:null}function j(e){return e?.type===`file`?e:null}function M(){let[e]=n(),t=e.get(`path`),r=e.get(`artifact`);return{path:t,artifactId:r,conflict:e.getAll(`path`).length>1||e.getAll(`artifact`).length>1||t!==null&&r!==null||t===``||r===``}}function N(){let{id:e=``}=r(),n=M(),i=t(),a=k();return(0,O.jsx)(P,{runId:e,selection:n,fragment:i.hash,onBack:a,variant:`route`})}function P({runId:e,selection:n,fragment:r,onBack:a,variant:o,sourceLookup:s}){let{path:c,conflict:l,selected:u,result:d}=I(e,n,s),f=w(E,!0),p=w(T,!1),m=t(),[h,g]=(0,D.useState)(!1),_=j(d.data);if(o===`route`&&L(_))return(0,O.jsx)(i,{replace:!0,to:{pathname:m.pathname.replace(/\/report\/?$/,`/files`),search:m.search,hash:m.hash}});let v=z(_,c),y=o===`pane`&&!p&&!f?`Conversation`:`Back`,b=o===`pane`&&!h&&R(_),x=F(m.pathname,e,n);return(0,O.jsxs)(`div`,{"data-route":`task-report`,"data-variant":o,onKeyDown:e=>{o!==`pane`||e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),e.stopPropagation(),a())},className:o===`route`?`fixed inset-0 z-50 flex flex-col bg-background [padding-block-start:env(safe-area-inset-top)] [padding-inline-end:env(safe-area-inset-right)] [padding-block-end:env(safe-area-inset-bottom)] [padding-inline-start:env(safe-area-inset-left)] md:static md:z-auto md:h-full md:p-0`:`flex h-full min-h-0 flex-col bg-background max-md:[padding-block-start:env(safe-area-inset-top)] max-md:[padding-inline-start:env(safe-area-inset-left)] max-md:[padding-inline-end:env(safe-area-inset-right)]`,children:[(0,O.jsx)(B,{runId:e,file:_,name:v,source:h,onSource:()=>g(e=>!e),onBack:a,backLabel:y,hideDownload:o===`pane`&&p,focusBack:o===`pane`}),(0,O.jsx)(`div`,{"data-slot":`report-body`,className:b?`flex min-h-0 flex-1 flex-col overflow-clip`:`flex min-h-0 flex-1 flex-col overflow-auto`,children:(0,O.jsx)(V,{conflict:l,selected:u,result:d,source:h,name:v,fragment:r,pane:o===`pane`,filesHref:x})})]})}function F(e,t,n){let r=/^\/p\/[^/]+/.exec(e)?.[0]??``,i=n.artifactId?new URLSearchParams({artifact:n.artifactId}):new URLSearchParams({path:n.path??``});return`${r}/tasks/${encodeURIComponent(t)}/files?${i}`}function I(e,t,n){let{path:r=null,artifactId:i=null,conflict:a=!1}=t,o=n?.isPending||n?.isError,s=f(e,i||a||o?null:r),c=p(e,a||o?null:i),l=o&&n?{...n,data:void 0}:i?c:s;return{path:r,conflict:a,selected:r!==null||i!==null,result:l}}function L(e){return e!==null&&(!C(e.path)||!e.artifact&&(e.tooLarge||e.binary))}function R(e){return e!==null&&!e.tooLarge&&!e.binary}function z(e,t){return e?e.artifact?.name??e.path.split(/[\\/]/).at(-1)??e.path:t??`Report`}function B({runId:e,file:t,name:n,source:r,onSource:i,onBack:a,backLabel:s,hideDownload:c,focusBack:l}){let d=(0,D.useRef)(null);(0,D.useEffect)(()=>{l&&d.current?.focus({preventScroll:!0})},[l]);let f=t?.artifact;return(0,O.jsxs)(`header`,{"data-slot":`report-bar`,className:`flex min-h-14 shrink-0 items-center gap-2 border-b border-border bg-card px-2 md:px-4`,children:[(0,O.jsxs)(o,{ref:d,variant:`ghost`,className:`min-h-11 min-w-11 gap-1.5 px-2`,onClick:a,"aria-label":s,children:[(0,O.jsx)(h,{size:18,"aria-hidden":`true`}),(0,O.jsx)(`span`,{className:`max-sm:sr-only`,children:s})]}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`h1`,{className:`truncate text-sm font-medium`,children:n}),t?(0,O.jsxs)(`p`,{className:`truncate text-xs text-soft-foreground`,children:[f?`Published snapshot · ${new Date(f.createdAt).toLocaleString()}`:`Live file`,` · `,_(t.size)]}):null]}),t&&!t.tooLarge&&!t.binary?(0,O.jsx)(o,{variant:`ghost`,className:`min-h-11 px-3 text-accent-text`,onClick:i,children:r?`Preview`:`Source`}):null,f&&!c?(0,O.jsx)(`a`,{className:`inline-flex min-h-11 items-center rounded-md px-3 text-sm text-accent-text underline focus-visible:ring-2`,href:u(e,f.id,`download`),children:`Download`}):null]})}function V({conflict:e,selected:t,result:n,source:r,name:i,fragment:o,pane:s,filesHref:c}){if(e)return(0,O.jsx)(U,{icon:(0,O.jsx)(b,{}),title:`Invalid report link`,subtitle:`Choose either a path or a published artifact.`});if(!t)return(0,O.jsx)(U,{icon:(0,O.jsx)(g,{}),title:`No report selected`,subtitle:`Open a report from a link in the conversation or from Files.`});if(n.isPending)return(0,O.jsx)(`p`,{role:`status`,"data-slot":`report-loading`,className:`px-4 py-6 text-center text-sm text-soft-foreground`,children:`Loading report…`});if(n.isError)return(0,O.jsx)(H,{result:n});let l=n.data;return l.type===`file`?s&&!C(l.path)?(0,O.jsx)(U,{icon:(0,O.jsx)(g,{}),title:`Not an HTML report`,subtitle:`Open this published file in Files.`,action:(0,O.jsx)(a,{to:c,className:`inline-flex min-h-11 items-center rounded-md px-3 text-sm text-accent-text underline active:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,children:`Open in Files`})}):l.tooLarge?(0,O.jsx)(U,{icon:(0,O.jsx)(v,{}),title:`Too large to preview`,subtitle:`${_(l.size)} is past the 500 kB preview limit. Download it to read it.`}):l.binary?(0,O.jsx)(U,{icon:(0,O.jsx)(g,{}),title:`Binary file`,subtitle:`This file holds binary data, not readable HTML.`}):r?(0,O.jsx)(`div`,{className:`bg-card`,children:(0,O.jsx)(x,{path:l.path,text:l.content??``})}):(0,O.jsx)(y,{html:l.content??``,title:`Report: ${i}`,fragment:o,className:s?`min-h-0 flex-1`:`min-h-[60dvh] flex-1`}):(0,O.jsx)(U,{icon:(0,O.jsx)(b,{}),title:l.type===`unpublished`?`Report not published`:`Report unavailable`,subtitle:l.reason})}function H({result:e}){let t=e.error instanceof d&&e.error.status===404;return(0,O.jsx)(U,{icon:t?(0,O.jsx)(b,{}):(0,O.jsx)(m,{size:16}),tone:t?`neutral`:`danger`,title:t?`Report missing or deleted`:`Could not load this report`,subtitle:e.error?.message??`Try again.`,action:(0,O.jsx)(o,{variant:`outline`,className:`min-h-11`,onClick:()=>void e.refetch(),children:`Retry`})})}function U({icon:e,title:t,subtitle:n,tone:r=`neutral`,action:i}){return(0,O.jsxs)(`div`,{"data-slot":`report-state`,className:`flex flex-col items-center gap-3 p-6`,children:[(0,O.jsx)(S,{icon:e,tone:r,heading:`h2`,title:t,subtitle:n}),i]})}export{P as ReportReader,N as TaskReportRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e.title||e.name.replace(/(.+)\.[^.]+$/,`$1`)}export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.reports-row{position:relative}.reports-open{align-items:center;min-block-size:44px;display:flex}.reports-open:after{content:"";position:absolute;inset:0}.reports-task{z-index:1;align-items:center;min-block-size:44px;display:flex;position:relative}.reports-open:focus-visible{outline:2px solid #0000}.reports-row:has(.reports-open:focus-visible){outline:2px solid var(--ring);outline-offset:2px}.reports-task:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.reports-row:active{background:var(--sidebar-row-selected)}@media (hover:hover) and (pointer:fine){.reports-row:hover{background:var(--sidebar-row-hover)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,I as n,M as r,T as i,t as a}from"./button-CHUAMTHK.js";import{i as o,t as s}from"./react-runtime-CCIEwYL0.js";import{Dr as c,En as l,Jr as u,Xn as d,kr as f,p,zt as m}from"./project-scope-context-B3M-u8R0.js";import{$ as h,J as g,X as _,Z as v,ct as y,et as b,rt as x,st as S}from"./live-protocol-BVn0UA_g.js";import{t as C}from"./useInfiniteQuery-BbYMWe23.js";import{n as w,t as T}from"./ws-BtSVmivO.js";import{t as E}from"./project-router-MMOk9VbW.js";import{rn as D,yt as O}from"./index-DgU3yYUl.js";import{t as k}from"./report-title-D4Mbu2Er.js";var A=e(o(),1),j=1e3,M=x().min(1).max(1024);b({q:x().max(j).optional(),before:M.optional(),limit:x().regex(/^(?:[1-9]|[1-9][0-9]|100)$/).transform(Number).optional()}).strict();var N=b({reports:g(b({id:S(),runId:S(),name:x(),title:x(),createdAt:y(),size:h().int().nonnegative(),taskTitle:x(),taskStatus:d}).strict()),nextCursor:M.nullable(),total:h().int().nonnegative()}).strict(),P=b({epoch:S(),generation:h().int().nonnegative(),metadataGeneration:h().int().nonnegative()}).strict(),F=b({runId:S(),taskTitle:x(),taskStatus:d}).strict(),I=_(`type`,[P.extend({type:v(`snapshot`)}),P.extend({type:v(`content`)}),P.extend({type:v(`metadata`),runs:g(F)})]),L=new WeakMap;function R(e,t){if(!e)return{content:t.type===`content`,metadata:t.type===`metadata`,reset:!1};if(e.epoch!==t.epoch)return{content:!0,metadata:!0,reset:!0};if(!(t.generation<e.generation||t.metadataGeneration<e.metadataGeneration)&&!(e.generation===t.generation&&e.metadataGeneration===t.metadataGeneration))return{content:t.generation!==e.generation,metadata:t.metadataGeneration!==e.metadataGeneration,reset:!1}}var z=class{client;project;state;content=0;metadata=0;patches=new Map;trailing=new Set;flights=new Map;constructor(e,t){this.client=e,this.project=t,e.getQueryCache().subscribe(n=>{if(n.type===`removed`){this.trailing.delete(n.query),this.flights.delete(n.query);return}if(!(n.query.queryKey[0]!==t||n.query.queryKey[1]!==`reports`)){if(n.type===`updated`&&n.action.type===`fetch`&&this.flights.set(n.query,this.metadata),n.query.state.fetchStatus===`idle`&&this.flights.has(n.query)){let e=this.flights.get(n.query);this.flights.delete(n.query),e!==this.metadata&&String(n.query.queryKey[2]??``).trim()===``&&this.client.setQueryData(n.query.queryKey,t=>t&&{...t,pages:t.pages.map(t=>this.patch(t,e))})}!this.trailing.has(n.query)||n.query.state.fetchStatus!==`idle`||(this.trailing.delete(n.query),queueMicrotask(()=>{e.invalidateQueries({queryKey:n.query.queryKey,exact:!0,refetchType:`active`},{cancelRefetch:!1})}))}})}patch(e,t=-1){return{...e,reports:e.reports.map(e=>{let n=this.patches.get(e.runId);return n&&n.version>t?{...e,taskTitle:n.value.taskTitle,taskStatus:n.value.taskStatus}:e})}}async read(e,t){for(;;){let n=this.content,r=this.metadata,i=await t();if(!(n!==this.content||e.trim()!==``&&r!==this.metadata))return e.trim()===``?this.patch(i,r):i}}receive(e,t=!1){let n=this.state;if(!n&&e.type===`snapshot`){this.state=e,this.content++,this.client.getQueryCache().findAll({queryKey:[this.project,`reports`]}).some(e=>e.state.data!==void 0)&&this.invalidate(!0);return}let r=R(n,e);if(!r){t&&e.type===`snapshot`&&(this.content++,this.invalidate(!0));return}let{metadata:i,reset:a}=r,o=r.content||t&&e.type===`snapshot`;this.state=e,a&&this.patches.clear(),i&&this.metadata++,o&&this.content++,e.type===`metadata`&&!a&&this.patchCaches(e);let s=o||i&&e.type!==`metadata`;(s||i)&&this.invalidate(s)}patchCaches(e){for(let t of e.runs)this.patches.set(t.runId,{value:t,version:this.metadata});this.client.setQueriesData({queryKey:[this.project,`reports`],predicate:e=>String(e.queryKey[2]??``).trim()===``},e=>e&&{...e,pages:e.pages.map(e=>this.patch(e,this.metadata-1))})}invalidate(e){let t={queryKey:[this.project,`reports`],refetchType:`active`,...e?{}:{predicate:e=>String(e.queryKey[2]??``).trim()!==``}};for(let e of this.client.getQueryCache().findAll(t))e.state.fetchStatus===`fetching`&&this.trailing.add(e);this.client.invalidateQueries(t,{cancelRefetch:!1})}};function B(e,t){let n=L.get(e);n||(n=new Map,L.set(e,n));let r=n.get(t);return r||(r=new z(e,t),n.set(t,r)),r}async function V(e,t){let n=await p.api.v1.p[`:projectId`].reports.state.$get({param:{projectId:e}},m({signal:t}));return P.parse(await l(n,`/reports/state`))}function H(e){let t=B(u(),e);return(0,A.useEffect)(()=>{let n=T(`reports:project:${e}`,e=>{let n=I.safeParse(e);n.success&&t.receive(n.data,n.data.type===`snapshot`)}),r,i,a=()=>{if(c()===`finite`&&!r){i=new AbortController;let n=i.signal;V(e,n).then(e=>{n.aborted||t.receive({type:`snapshot`,...e})}).catch(()=>void 0),r=w({path:`/api/v1/p/${encodeURIComponent(e)}/reports/state`,intervalMs:5e3},(e,n)=>{let r=P.safeParse(e);!n&&r.success&&t.receive({type:`snapshot`,...r.data})})}else c()!==`finite`&&(i?.abort(),r?.(),r=void 0)};a();let o=f(a);return()=>{o(),i?.abort(),r?.(),n()}},[t,e]),t}async function U(e,t,n,r){let i=await p.api.v1.p[`:projectId`].reports.$get({param:{projectId:e},query:{q:t.slice(0,j),...n?{before:n}:{}}},m(r?{signal:r}:void 0));return N.parse(await l(i,`/reports`))}function W(e){let t=r(),n=H(t);return C({queryKey:[t,`reports`,e],initialPageParam:void 0,queryFn:({pageParam:r,signal:i})=>n.read(e,()=>U(t,e,r,i)),getNextPageParam:e=>e.nextCursor??void 0,staleTime:0,refetchOnWindowFocus:!0})}var G=s(),K=new Map;function q(){let e=t(),r=i(),[o,s]=O(),c=(o.get(`q`)??``).slice(0,j),l=W(c),u=(0,A.useRef)(null),d=(0,A.useRef)(``),f=e.pathname+e.search,p=l.data?.pages.flatMap(e=>e.reports)??[];(0,A.useLayoutEffect)(()=>{if(!l.data||d.current===f)return;let t=K.get(f),n=e.state?.filesRestoreKey===f;if(!t||!u.current||r!==`POP`&&!n){d.current=f;return}let i=u.current.querySelector(`[data-report-id="${t.row}"]`);if(l.isFetchNextPageError){d.current=f,u.current.scrollTop=0;return}if((!i||l.data.pages.length<t.pages)&&l.hasNextPage){l.isFetchingNextPage||l.fetchNextPage();return}d.current=f,u.current.scrollTop=i?t.scroll:0,i?.focus({preventScroll:!0})},[f,l.data,l.hasNextPage,l.isFetchingNextPage,l.isFetchNextPageError,l.fetchNextPage,e.state,r]);let m=t=>s(n=>(t?n.set(`q`,t.slice(0,j)):n.delete(`q`),K.delete(e.pathname+`?`+n.toString()),n));return(0,G.jsxs)(`section`,{"data-route":`reports`,className:`flex h-full min-h-0 flex-col`,children:[(0,G.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-3 border-b border-border p-4`,children:[(0,G.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Reports`}),(0,G.jsx)(D,{maxLength:j,"aria-label":`Search reports`,placeholder:`Search reports or source tasks`,value:c,onChange:e=>m(e.target.value),className:`min-h-11`})]}),(0,G.jsxs)(`div`,{ref:u,"data-slot":`reports-list`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain p-4 [scrollbar-gutter:stable]`,children:[l.isPending?(0,G.jsx)(`p`,{role:`status`,children:`Loading reports…`}):l.isError?(0,G.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3`,children:[(0,G.jsx)(`p`,{children:`Could not load reports`}),(0,G.jsx)(`p`,{className:`text-sm text-soft-foreground`,children:l.error.message}),(0,G.jsx)(a,{className:`min-h-11`,onClick:()=>void l.refetch(),children:`Retry`})]}):p.length===0?(0,G.jsxs)(`div`,{className:`flex flex-col items-start gap-3`,children:[(0,G.jsx)(`h2`,{className:`font-medium`,children:c?`No matching reports`:`No published reports yet`}),c?(0,G.jsx)(a,{"data-slot":`reports-clear-search`,variant:`outline`,className:`min-h-11`,onClick:()=>m(``),children:`Clear search`}):(0,G.jsxs)(`p`,{className:`text-sm text-soft-foreground`,children:[`Publish an HTML snapshot with `,(0,G.jsxs)(`code`,{children:[n(),` artifact publish`]}),` to list it here.`]})]}):(0,G.jsx)(`ul`,{className:`flex flex-col gap-3`,children:p.map(e=>(0,G.jsxs)(`li`,{"data-slot":`report-row`,className:`reports-row rounded-lg border border-border bg-card p-3`,children:[(0,G.jsx)(`h2`,{className:`min-w-0 font-medium [overflow-wrap:anywhere]`,children:(0,G.jsx)(E,{"data-report-id":e.id,className:`reports-open`,to:`/tasks/${e.runId}/report?artifact=${e.id}`,state:{readerFrom:f,filesRestoreKey:f},onClick:()=>K.set(f,{scroll:u.current?.scrollTop??0,row:e.id,pages:l.data?.pages.length??1}),children:k(e)})}),(0,G.jsx)(E,{className:`reports-task text-sm text-accent-text underline [overflow-wrap:anywhere]`,to:`/tasks/${e.runId}`,children:e.taskTitle}),(0,G.jsx)(`time`,{className:`block text-xs text-soft-foreground`,dateTime:e.createdAt,children:new Date(e.createdAt).toLocaleString()})]},e.id))}),l.hasNextPage?(0,G.jsx)(a,{variant:`outline`,className:`min-h-11`,disabled:l.isFetchingNextPage,onClick:()=>void l.fetchNextPage(),children:`Load more reports`}):null]})]})}export{q as ReportsRoute};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{E as t,L as n,S as r,d as i,t as a,u as o}from"./button-CHUAMTHK.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import"./live-refetch-BdnmTJ_8.js";import{$n as l,A as u,Hn as d,Jr as ee,Kt as te,er as f,i as p,qt as m,s as h,wr as g}from"./project-scope-context-B3M-u8R0.js";import{$ as ne,$t as _,B as re,Bn as ie,Cn as v,Et as ae,H as y,Hn as oe,J as b,P as se,Qt as x,St as S,U as C,Un as w,Vn as ce,W as le,Zt as ue,an as de,cn as T,et as fe,gt as pe,in as me,n as he,on as ge,rn as _e,rt as E,xn as ve,z as ye}from"./queries-DORTKwyN.js";import{n as D}from"./toaster-B1MyeHiE.js";import{a as O,i as k,l as A,n as j,p as M,r as N,t as P}from"./dropdown-menu-DhrBcVgr.js";import{a as be,c as xe,i as Se,n as Ce,o as we,r as F,s as I,t as L}from"./alert-dialog-Dj464rjk.js";import{i as Te,r as Ee,t as De}from"./popover-DRcRI46x.js";import{I as Oe,S as ke,Y as Ae,a as R,m as je,mt as z,st as Me,t as Ne,u as Pe,y as B}from"./design-icons-DmYTv2r1.js";import{a as Fe,c as Ie,i as Le,n as Re,o as ze,s as Be,t as Ve}from"./textarea-DlVUfdWG.js";import{n as He}from"./loader-circle-CZkGEdoI.js";import{t as V}from"./createLucideIcon-BHp8sXmF.js";import{t as Ue}from"./app-window-CSHwDX9N.js";import{t as We}from"./info-DA1x_4bz.js";import{t as Ge}from"./message-square-B-MD-8rD.js";import{a as Ke,n as H,r as qe}from"./control-locations-C9II3kPz.js";import{c as Je,s as Ye,t as U}from"./project-router-MMOk9VbW.js";import{r as W,t as Xe}from"./markdown-D7DUNWcJ.js";import{Dt as Ze,H as G,J as Qe,L as $e,Lt as et,N as tt,Ot as nt,P as rt,V as K,Vt as it,W as at,Y as ot,_ as st,at as ct,g as lt,h as ut,it as dt,j as ft,kt as pt,nn as mt,ot as ht,pt as gt,qt as _t,rt as vt,zt as yt}from"./index-DgU3yYUl.js";import{t as q}from"./tab-link-BvoGfK8S.js";var bt=V(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),xt=V(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),St=V(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),J=e(s(),1),Y=c();function Ct(e){let t=ie();return w({mutationFn:t=>h(oe(e),t),onSuccess:()=>t.invalidateAfter(`runs`,()=>ce()),onError:e=>D(e.message,{tone:`danger`})})}function wt(e){return e.archived?`Unarchive`:`Archive task`}function Tt({run:e,open:t,onOpenChange:n,onConfirm:r}){return(0,Y.jsx)(L,{open:t,onOpenChange:n,children:(0,Y.jsxs)(Se,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(xe,{children:`Archive task?`}),(0,Y.jsxs)(be,{children:[`Move “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:v(e),children:v(e)}),`” out of Active tasks. You can restore it from Archived.`]})]}),(0,Y.jsxs)(we,{children:[(0,Y.jsx)(F,{children:`Cancel`}),(0,Y.jsx)(Ce,{className:`bg-accent-strong text-accent-strong-foreground hover:brightness-[0.96]`,onClick:r,children:`Archive task`})]})]})})}function X({run:e,className:t,compactOnMobile:n=!1}){let[r,i]=(0,J.useState)(!1),s=Ct(e.id),c=wt(e);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(a,{type:`button`,variant:`outline`,"data-slot":`archive-action`,"aria-label":c,title:e.archived?`Put this task back in Active tasks`:`Move this task out of Active tasks`,disabled:s.isPending,className:o(`h-11 gap-[7px] px-3`,n&&`max-md:size-11 max-md:px-0`,t),onClick:()=>e.archived?s.mutate(!1):i(!0),children:[e.archived?(0,Y.jsx)(mt,{"aria-hidden":`true`}):(0,Y.jsx)(Ne,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:o(n&&`max-md:sr-only`),children:c})]}),(0,Y.jsx)(Tt,{run:e,open:r,onOpenChange:i,onConfirm:()=>{s.mutate(!0),i(!1)}})]})}function Et({run:e,action:t,prUrl:n,patch:r}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:t.phase===`blocked`?`Completion blocked`:`Completion pending`}),` · `,t.message||(t.phase===`blocked`?`Completion needs attention.`:`Checking completion actions.`)]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&i(n)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:`Open PR`})}):null,e.autoMergePr?(0,Y.jsx)(a,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate({autoMergePr:!1},{onError:e=>D(e.message,{tone:`danger`})}),children:r.isPending?`Saving…`:`Disable auto-merge`}):null]})]})}function Dt({run:e,blocker:t,flags:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Archive blocked`}),` · `,t.message]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.runId?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(U,{to:`/tasks/${t.runId}`,children:`Open blocking task`})}):null,t.pullRequestUrl&&i(t.pullRequestUrl)?(0,Y.jsx)(a,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:t.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,children:`Open blocking PR`})}):null,n.archive?(0,Y.jsx)(X,{run:e}):null]})]})}function Ot({run:e}){let t=C(e.id),n=G(e),r=e.status===`done`?e.completionAction:void 0,i=n.archive?e.archiveBlocker:void 0,a=r&&r.phase!==`complete`?r:void 0;if(!a&&!i)return null;let o=e.pullRequestUrl??e.pullRequests?.find(e=>e.url)?.url;return(0,Y.jsxs)(`section`,{"data-slot":`completion-status`,"aria-label":`Completion action`,className:`grid min-w-0 gap-2 rounded-lg border border-border bg-card p-3 [margin-block:0.75rem]`,children:[a?(0,Y.jsx)(Et,{run:e,action:a,prUrl:o,patch:t}):null,i?(0,Y.jsx)(Dt,{run:e,blocker:i,flags:n}):null]})}var kt=[`running`,`queued`,`waiting`];function At(e,{queuePosition:t,now:n=new Date}){let r=d(e),i=r.label.charAt(0).toUpperCase()+r.label.slice(1),a=t===void 0?i:`${i} #${t}`,o=kt.includes(e.status)?Mt(e,n):void 0;return o?{attention:r,label:a,nextCheck:o}:{attention:r,label:a}}function jt(e){return e.nextCheck?`${e.label} · Next check ${e.nextCheck.text}`:e.label}function Mt(e,t){let n;for(let t of Array.isArray(e.waits)?e.waits:[]){if(t?.kind!==`timer`||t.phase!==`open`)continue;let e=new Date(t.deadline);Number.isFinite(e.getTime())&&(!n||e<n)&&(n=e)}if(n)return{at:n.toISOString(),text:He(n,t)}}async function Z(e,t){try{await navigator.clipboard.writeText(e),D(t)}catch{D(`Run manually: ${e}`)}}function Nt(e){let t=b(),n=E(),r=(0,J.useMemo)(()=>T(e,t),[e,t]);return{referenceProjectId:n,repoBase:t,references:r,requests:(0,J.useMemo)(()=>n===void 0?[]:r.filter(e=>ue(e,t)).map(e=>({projectId:n,kind:e.kind,number:e.number})),[r,n,t])}}function Pt(e){return w({mutationFn:()=>m(e.id),onError:e=>{if(e instanceof p&&e.command){Z(e.command,`No terminal found — command copied to clipboard.`);return}D(e.message,{tone:`danger`})}})}function Q(e,t){let n=y(),r=fe(),i=w({mutationFn:t=>te(e.id,t),onError:e=>D(e.message,{tone:`danger`})}),a=g(r.data),o=e=>!r.isSuccess||a.includes(e??`claude`);return{canResumeHere:t&&o($e(e)),choices:e.worktreePath?(n.data?.targets??[]).filter(e=>{let t=dt(e.id);return t===void 0||o(t)}).map(t=>({target:t,...rt(e,t.id)?{suffix:` (resume)`,title:`Resume this run's session`}:{}})):[],open:i}}function Ft({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e);return!r&&i.length===0&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[r||i.length>0?(0,Y.jsxs)(`div`,{className:`task-open-targets flex flex-wrap gap-3`,children:[r?(0,Y.jsxs)(a,{variant:`outline`,"data-target":`terminal-resume`,onClick:n,children:[(0,Y.jsx)(et,{}),`Terminal (resume session)`]}):null,i.map(({target:e,suffix:t,title:n})=>{let r=ct(e);return(0,Y.jsxs)(a,{variant:`outline`,"data-target":e.id,title:n,disabled:o.isPending,onClick:()=>o.mutate(e.id),children:[(0,Y.jsx)(r,{"aria-hidden":`true`}),e.label,t??``]},e.id)}),e.worktreePath?(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>D(`Worktree path copied`)).catch(()=>D(`Path: ${t}`))},children:[(0,Y.jsx)(B,{}),`Copy worktree path`]}):null]}):null,s?(0,Y.jsxs)(`div`,{"data-slot":`resume-command`,className:`mt-5 border-t border-border pt-5`,children:[(0,Y.jsx)(`h3`,{className:`text-base font-medium`,children:`Resume in a terminal`}),(0,Y.jsx)(`pre`,{className:`my-4 whitespace-pre-wrap break-all rounded-lg border border-border bg-background p-4 text-xs`,children:s}),(0,Y.jsxs)(a,{variant:`outline`,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{}),`Copy resume command`]})]}):null]})}function It({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:o}=Q(e,t),s=K(e),c=e.worktreePath;if(!r&&i.length===0&&!s&&!c)return null;let l=`max-md:min-h-11`;return(0,Y.jsxs)(`div`,{"data-slot":`workspace-tools`,className:`flex min-w-0 flex-wrap gap-2`,children:[r||i.length>0?(0,Y.jsx)(vt,{choices:i,onPick:e=>o.mutate(e),disabled:o.isPending,triggerVariant:`outline`,className:l,leading:r?(0,Y.jsxs)(k,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(et,{"aria-hidden":`true`}),`Terminal (resume session)`]}):void 0}):null,c?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,className:l,onClick:()=>void Z(c,`Worktree path copied`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy worktree path`]}):null,s?(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`resume-command`,title:s,className:l,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),`Copy resume command`]}):null]})}function Lt({run:e,canResume:t,onResume:n,onOpen:r,onClose:i}){let{canResumeHere:o,choices:s}=Q(e,t);return!o&&s.length===0?null:r?(0,Y.jsx)(k,{onSelect:r,children:`Open in…`}):(0,Y.jsxs)(`section`,{"aria-label":`Open task worktree in…`,className:`task-action-panel my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Open task worktree in…`}),(0,Y.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Close worktree chooser`,onClick:i,children:(0,Y.jsx)(z,{})})]}),e.worktreePath?(0,Y.jsx)(`p`,{className:`my-4 break-all text-xs text-muted-foreground`,children:e.worktreePath}):null,(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(Ft,{run:e,canResume:t,onResume:n})})]})}function Rt({branch:e}){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(null);(0,J.useEffect)(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);let i=t===e,a=async()=>{r.current!==null&&clearTimeout(r.current),n(null);try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(e),n(e),r.current=setTimeout(()=>n(null),2e3)}catch{D(`Could not copy branch. Select and copy: ${e}`)}};return(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1`,children:[(0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`min-w-0 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium break-all`,children:e}),(0,Y.jsxs)(`button`,{type:`button`,"aria-label":i?`Copied branch name`:`Copy branch name`,onClick:()=>void a(),className:`inline-flex min-h-11 shrink-0 items-center gap-1 rounded-sm px-2 text-xs font-medium text-foreground hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-link-foreground md:min-h-8`,children:[(0,Y.jsx)(B,{className:`size-3.5`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{"aria-live":`polite`,children:i?`Copied`:`Copy`})]})]})}function zt({run:e}){let t=b(),n=E(),r=r=>n===void 0?void 0:me(n,e.id,r,t),a=(0,J.useMemo)(()=>T(e,t),[e,t]),o=[],s=[],c=a.filter(e=>e.kind===`PR`);for(let t of c)o.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`,conflictAction:(0,Y.jsx)(ft,{run:e,prNumber:t.number})},_(t)));let l=ge(e);l&&i(l)&&!c.some(e=>e.url===l)&&o.push((0,Y.jsx)(H,{reference:{kind:`PR`,url:l},taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`pr`));let u=a.filter(e=>e.kind===`Issue`);for(let t of u)s.push((0,Y.jsx)(H,{reference:t,to:r(t),taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},_(t)));let d=_e(e,t);if(d&&i(d)&&!u.some(e=>e.url===d)){let t=x(d);s.push((0,Y.jsx)(H,{reference:{kind:`Issue`,...t?{number:Number(t)}:{},url:d},to:t?r({kind:`Issue`,number:Number(t),url:d}):void 0,taskTitle:v(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`issue`))}return o.length===0&&s.length===0?null:(0,Y.jsx)(`div`,{"data-slot":`linked-references`,className:`flex min-w-0 flex-col gap-3`,children:[[`PR`,`PRs`,o],[`Issue`,`Issues`,s]].map(([e,t,n])=>n.length>0?(0,Y.jsxs)(`div`,{"data-reference-kind":e,className:`grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n})]},e):null)})}function $(){let e=Ye(),t=ne();return Ze(t.data?.projects?.find(n=>n.id===(e??t.data?.bootProject)))}var Bt=e=>e.map(e=>`${e.name}: ${nt(e.url)}`).join(`
|
|
2
|
+
`);function Vt(e){return $().length>0||e.notify===!0}function Ht({run:e}){let t=$(),n=t.length>0,r=re(e.id),[i,o]=(0,J.useState)(null),s=e.notify===!0;return!n&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[s?(0,Y.jsxs)(P,{children:[(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`notifying-chip`,className:`h-11 gap-1.5 md:h-[30px]`,"aria-label":n?`Notifying ${pt(t)} — webhook actions`:`Notifying — webhook actions`,title:n?Bt(t):void 0,children:[(0,Y.jsx)(ht,{tone:`success`}),(0,Y.jsx)(`span`,{children:`Notifying`}),(0,Y.jsx)(Pe,{"aria-hidden":`true`,className:`size-3.5`})]})}),(0,Y.jsxs)(N,{align:`end`,"data-slot":`notifying-menu`,className:`w-[240px] max-w-[calc(100vw-2rem)] p-2`,children:[n?(0,Y.jsx)(O,{"data-slot":`notifying-targets`,className:`flex flex-col gap-0.5 px-2 py-1.5 text-[11px] font-normal text-muted-foreground`,children:t.map(e=>(0,Y.jsx)(`span`,{"data-webhook-target":e.id,className:`truncate`,title:nt(e.url),children:e.name},e.id))}):null,n?(0,Y.jsxs)(k,{className:`min-h-11`,onSelect:()=>o(`note`),children:[(0,Y.jsx)(Ge,{"aria-hidden":`true`}),` Send a note…`]}):null,(0,Y.jsxs)(k,{variant:`destructive`,className:`min-h-11`,disabled:r.isPending,onSelect:()=>r.mutate({notify:!1},{onSuccess:()=>D(`Stopped notifying the webhook`),onError:e=>D(`Could not stop notifying. ${e.message}`,{tone:`danger`})}),children:[(0,Y.jsx)(bt,{"aria-hidden":`true`}),` Stop notifying`]})]})]}):(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-action":`handoff`,className:`size-11 px-0 md:h-[30px] md:w-auto md:px-2.5`,"aria-label":`Hand off to webhook`,onClick:()=>o(`handoff`),children:[(0,Y.jsx)(yt,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`max-md:sr-only`,children:`Hand off`})]}),n?(0,Y.jsx)(Ut,{mode:i,targets:t,pending:r.isPending,onOpenChange:e=>!e&&o(null),onSubmit:e=>r.mutate({notify:!0,...e?{message:e}:{}},{onSuccess:()=>{o(null),D(i===`note`?`Note sent to the webhook`:`Handed off to the webhook`)},onError:e=>D(`Could not hand off. ${e.message}`,{tone:`danger`})})}):null]})}function Ut({mode:e,targets:t,pending:n,onOpenChange:r,onSubmit:i}){let o=(0,J.useId)(),s=(0,J.useId)(),[c,l]=(0,J.useState)(``);(0,J.useEffect)(()=>{e!==null&&l(``)},[e]);let u=e===`note`,d=pt(t);return(0,Y.jsx)(Re,{open:e!==null,onOpenChange:e=>{e||l(``),r(e)},children:(0,Y.jsx)(Le,{"data-slot":`handoff-dialog`,className:`max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:border-x-0 max-sm:border-b-0 max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100`,children:(0,Y.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault(),i(c.trim())},children:[(0,Y.jsxs)(Be,{className:`text-left`,children:[(0,Y.jsx)(Ie,{children:u?`Send a note to ${t.length===1?`the webhook`:`the webhooks`}`:`Hand off to webhook`}),(0,Y.jsx)(Fe,{children:(0,Y.jsx)(`span`,{"data-webhook-destination":``,title:Bt(t),children:u?`${d} ${t.length===1?`gets`:`get`} this note with the task's current status.`:`${d} will start receiving this task's status updates. Add a note (optional).`})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:o,className:`text-[13px] font-medium`,children:`Note`}),(0,Y.jsx)(Ve,{id:o,"data-slot":`handoff-note`,"aria-describedby":s,rows:4,maxLength:1e5,className:`min-h-24`,placeholder:`e.g. Take over from here, ping me when the PR is green`,value:c,onChange:e=>l(e.target.value)}),(0,Y.jsxs)(`p`,{id:s,className:`flex items-center gap-1.5 text-[12px] text-muted-foreground`,children:[(0,Y.jsx)(We,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`The note goes to the webhook only, not to the agent.`]})]}),(0,Y.jsxs)(ze,{className:`gap-2 max-sm:flex-col-reverse max-sm:[&>button]:h-11 max-sm:[&>button]:w-full`,children:[(0,Y.jsx)(a,{type:`button`,variant:`ghost`,className:`sm:h-9`,onClick:()=>r(!1),children:`Cancel`}),(0,Y.jsxs)(a,{type:`submit`,variant:`contrast`,className:`sm:h-9`,"data-action":`handoff-submit`,disabled:n||u&&c.trim()===``,children:[(0,Y.jsx)(yt,{"aria-hidden":`true`}),u?`Send note`:`Hand off`]})]})]})})})}function Wt({runId:e,children:t}){let n=r(),i=(0,J.useMemo)(()=>({runId:e}),[e]);return n?(0,Y.jsx)(Gt,{runId:e,children:t}):(0,Y.jsx)(W.Provider,{value:i,children:t})}function Gt({runId:e,children:n}){let{projectId:r}=t(),i=(0,J.useMemo)(()=>({runId:e,...r?{projectId:r}:{}}),[e,r]);return(0,Y.jsx)(W.Provider,{value:i,children:n})}function Kt({id:e}){return(0,Y.jsxs)(U,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,"data-slot":`mobile-parent-task-link`,className:`inline-flex shrink-0 items-center justify-center gap-1 rounded-sm px-2 text-[13px] text-muted-foreground [min-block-size:2.75rem] [min-inline-size:2.75rem] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:bg-muted active:text-foreground`,children:[(0,Y.jsx)(R,{"aria-hidden":!0,className:`shrink-0 [block-size:1.2cap] [inline-size:auto]`}),`Parent`]})}function qt({id:e}){let t=pe(e),n=t.data?v(t.data):e;return(0,Y.jsxs)(`div`,{"data-slot":`parent-task`,className:`flex min-w-0 flex-wrap items-center gap-x-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsxs)(U,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,title:`Parent · ${n}`,"data-slot":`parent-task-link`,className:`flex min-h-11 min-w-0 max-w-full items-center gap-2 rounded-sm text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:text-foreground`,children:[(0,Y.jsx)(R,{"aria-hidden":!0,className:`h-[1.2cap] w-auto shrink-0`}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:`Parent`}),(0,Y.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,Y.jsx)(`span`,{className:`min-w-0 overflow-clip text-ellipsis whitespace-nowrap`,children:n})]}),t.isError?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{children:`Parent record unavailable or deleted`}),(0,Y.jsx)(a,{variant:`outline`,className:`min-h-11`,onClick:()=>void t.refetch(),children:`Retry parent task`})]}):null]})}var Jt=3,Yt=(e,t)=>e.kind===t.kind&&e.number===t.number;function Xt(e,t,n=Jt){let r=t?e.findIndex(e=>Yt(e,t)):-1;if(e.length<=n||r<n)return{inline:e.slice(0,n),overflow:e.slice(n)};let i=[...e.slice(0,n-1),e[r]];return{inline:i,overflow:e.filter(e=>!i.includes(e))}}var Zt=(e,t)=>`/tasks/${e}/${t.kind}/${t.number}`;function Qt({tab:e}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(e.kind===`pr`?Oe:je,{"aria-hidden":`true`,className:`mr-1 size-3.5 shrink-0`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:e.kind===`pr`?`Pull request`:`Issue`}),` #`,e.number,(0,Y.jsx)(qe,{kind:e.kind===`pr`?`PR`:`Issue`,number:e.number,className:`ml-1`})]})}function $t(e,t){let n=e[0],r=e.length+ +!!t;return n?`Preview :${n.port}${r>1?` +${r-1}`:``}`:t?`Preview · agent`:`Preview`}function en({servers:e}){let t=gt();if(t===null)return null;let n=t.agentLive===!0,r=e[0],i=e.length+ +!!n===1?r?{port:r.port}:{agent:!0}:{};return(0,Y.jsxs)(a,{variant:`outline`,size:`sm`,"data-slot":`preview-toggle`,className:`max-md:h-11`,"aria-pressed":t.open,onClick:()=>t.openPane(i),children:[(0,Y.jsx)(Ue,{"aria-hidden":`true`}),$t(e,n),t.live?(0,Y.jsx)(ht,{tone:`success`,"aria-label":`Preview is live`}):null]})}function tn(e){return e?.role===`worker`?`Worker session`:e?.role===`root`?`Parent session`:`Task session`}function nn({run:e,compact:t=!1}){return e.delegation?.role===`worker`?t?(0,Y.jsx)(Kt,{id:e.delegation.parentRunId}):(0,Y.jsx)(qt,{id:e.delegation.parentRunId}):null}function rn(e,t,n){return!e.archiveBlocker&&t.archive&&(n!==`session`||!tt(e))?(0,Y.jsx)(X,{run:e}):null}function an({run:e}){return e.archived&&e.autoArchive?.reason===`pull-requests-merged`&&e.autoArchive.archivedAt===e.archivedAt?(0,Y.jsx)(`p`,{"data-slot":`auto-archive-reason`,className:`text-[13px] text-muted-foreground`,children:`Archived automatically after all associated PRs merged.`}):null}function on({shown:e,run:t,archiveButton:n,previewToggle:r}){let i=Vt(t);return e&&(n||r||i)?(0,Y.jsxs)(`div`,{"data-slot":`run-mobile-actions`,className:`flex flex-wrap items-center gap-2 pt-2`,children:[n,r,(0,Y.jsx)(Ht,{run:t})]}):null}function sn({run:e,tab:t,activeItem:n,inlineItemTabs:r,overflowItemTabs:i,phoneBar:a,isDesktop:o}){let s=(0,J.useRef)(null),c=n?`${n.kind}#${n.number}`:null;return(0,J.useEffect)(()=>{!c||o||s.current?.querySelector(`[aria-current="page"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[c,r.map(e=>`${e.kind}#${e.number}`).join(`,`),o]),(0,Y.jsxs)(`div`,{ref:s,"data-slot":`run-tabs`,"data-phone-bar":a||void 0,className:`mt-3 flex flex-wrap items-end gap-1 border-b border-border md:mt-5 max-md:flex-nowrap max-md:overflow-x-auto max-md:border-b-0 max-md:shadow-[inset_0_-1px_0_var(--border)] max-md:gap-0 max-md:[&>*]:mb-0 max-md:[&>*]:shrink-0 max-md:[&>a]:min-h-11 max-md:[&>a]:px-3.5 max-md:[&>a]:text-[13.5px]`,children:[(0,Y.jsx)(q,{to:`/tasks/${e.id}`,active:t===`session`,replace:a,children:`Session`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/changes`,active:t===`changes`,replace:a,count:e.diffStat&&e.diffStat.files>0?e.diffStat.files:void 0,children:`Changes`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/commits`,active:t===`commits`,replace:a,children:`Commits`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/files`,active:t===`files`,replace:a,children:`Files`}),r.map(t=>(0,Y.jsx)(q,{to:Zt(e.id,t),active:n!==null&&Yt(t,n),replace:a,children:(0,Y.jsx)(Qt,{tab:t})},`${t.kind}-${t.number}`)),i.length>0?(0,Y.jsxs)(P,{children:[(0,Y.jsxs)(M,{"data-slot":`run-tabs-more`,"aria-label":`${i.length} more linked items`,className:`-mb-px flex h-8 items-center rounded-t-md border-b-2 border-transparent px-3 text-[13px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-link-foreground max-md:min-h-11 max-md:px-3.5 max-md:text-[13.5px]`,children:[`+`,i.length]}),(0,Y.jsx)(N,{align:`end`,children:i.map(t=>(0,Y.jsx)(k,{asChild:!0,children:(0,Y.jsx)(U,{to:Zt(e.id,t),replace:a,children:(0,Y.jsx)(Qt,{tab:t})})},`${t.kind}-${t.number}`))})]}):null]})}function cn({run:e,tab:t=`session`,onMarkedUnread:n}){let r=d(e),i=G(e),[a,s]=(0,J.useState)(!1),[c,l]=(0,J.useState)(!1),u=ln(e,n),ee=ae(),te=se(),f=At(e,{queuePosition:e.status===`queued`?ve(ee.data??[]).get(e.id):void 0}),p=st(),m=lt(),h=p!==null&&!m?p:null,g=h!==null,{referenceProjectId:ne,repoBase:_,requests:re}=Nt(e),ie=(0,J.useMemo)(()=>de(e,_),[e,_]),v=typeof t==`object`?t:null,{inline:y,overflow:oe}=Xt(ie,v),b=te.data?.capabilities?.preview===!0,x=e.worktreePath&&b?(0,Y.jsx)(en,{servers:e.previewServers??[]}):null,S=(0,Y.jsx)(pn,{run:e,actions:u,onOpenChooser:()=>l(!0),onToggleNotes:()=>s(e=>!e)}),C=rn(e,i,t);return(0,Y.jsx)(Ke,{projectId:ne,repoBase:_,requests:re,children:(0,Y.jsxs)(`header`,{"data-slot":`run-header`,className:o(`relative z-20 bg-background px-[18px] md:px-9 md:pt-7`,g?`pt-0`:`pt-[18px]`,t===`session`&&`md:sticky md:top-0`),children:[(0,Y.jsx)(an,{run:e}),(0,Y.jsx)(Ot,{run:e}),(0,Y.jsxs)(`div`,{className:`w-full`,children:[(0,Y.jsx)(nn,{run:e}),h?(0,Y.jsxs)(ut,{slot:h,children:[(0,Y.jsx)(fn,{run:e}),(0,Y.jsx)(nn,{run:e,compact:!0}),S]}):(0,Y.jsxs)(`div`,{"data-slot":`run-title-row`,className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 md:flex-nowrap`,children:[(0,Y.jsx)(`p`,{"data-slot":`session-kind`,className:`text-[12px] font-semibold tracking-[0.14em] text-muted-foreground uppercase md:hidden`,children:tn(e.delegation)}),(0,Y.jsx)(dn,{run:e}),(0,Y.jsx)(at,{dot:r.tone,shape:r.shape,pulse:r.pulse,className:`max-md:hidden`,children:jt(f)}),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1 md:gap-2.5`,children:[C,x,(0,Y.jsx)(Ht,{run:e}),S]})]}),(0,Y.jsx)(on,{shown:h!==null,run:e,archiveButton:C,previewToggle:x}),(0,Y.jsx)(sn,{run:e,tab:t,activeItem:v,inlineItemTabs:y,overflowItemTabs:oe,phoneBar:g,isDesktop:m}),a?(0,Y.jsx)(gn,{runId:e.id,onClose:()=>s(!1)}):null,c?(0,Y.jsx)(Lt,{run:e,canResume:G(e).terminal,onResume:()=>u.terminal.mutate(),onClose:()=>l(!1)}):null]}),(0,Y.jsx)(hn,{run:e,actions:u})]})})}function ln(e,t){let n=ee(),r=Je(),[i,a]=(0,J.useState)(null),o=()=>n.invalidateQueries({queryKey:he.runs.all}),s=e=>D(e.message,{tone:`danger`}),c=le(),l={isPending:c.isPending,mutate:()=>c.mutate({id:e.id,pinned:!e.pinned})},d=ye();return{pin:l,markUnread:{isPending:d.isPending,mutate:()=>{t?.(),d.mutate(e.id,{onError:s})}},delete:w({mutationFn:()=>u(e.id),onSuccess:()=>{o(),r(`/`)},onError:s}),terminal:Pt(e),confirming:i,setConfirming:a}}function un(e){let t=C(e.id),n=v(e);return{title:n,editor:ot(n,e=>t.mutate({title:e},{onError:e=>D(e.message,{tone:`danger`})}))}}function dn({run:e}){let{title:t,editor:n}=un(e);return n.editing?(0,Y.jsx)(Qe,{editor:n,className:`flex-1 text-[16px] font-semibold`}):(0,Y.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,Y.jsx)(`h1`,{className:`line-clamp-2 min-w-0 break-words text-2xl font-semibold tracking-tight`,title:e.task,children:t}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,onClick:n.begin,className:`shrink-0 rounded-sm p-1 text-soft-foreground opacity-0 transition-opacity group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(it,{className:`size-3.5`,"aria-hidden":`true`})})]})}function fn({run:e}){let{title:t,editor:n}=un(e);return(0,Y.jsxs)(De,{open:n.editing,onOpenChange:e=>{e?n.begin():n.commit()},children:[(0,Y.jsx)(`div`,{"data-slot":`mobile-run-title`,className:`flex min-w-0 flex-1 flex-col gap-px`,children:(0,Y.jsx)(`h1`,{className:`truncate text-[15px] leading-tight font-semibold text-foreground`,title:e.task,children:t})}),(0,Y.jsx)(Te,{asChild:!0,children:(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,className:`flex size-11 shrink-0 items-center justify-center rounded-sm text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(it,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,Y.jsx)(Ee,{align:`end`,className:`w-64 max-w-[calc(100vw-16px)] p-2`,onEscapeKeyDown:e=>{e.preventDefault(),n.cancel()},children:(0,Y.jsx)(Qe,{editor:n,className:`text-[16px] font-semibold`})})]})}function pn({run:e,actions:t,onToggleNotes:n,onOpenChooser:r}){let i=G(e),o=K(e),s=C(e.id),c=(0,J.useId)();return(0,Y.jsxs)(P,{children:[(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsx)(a,{variant:`ghost`,size:`icon-sm`,className:`size-11`,"aria-label":`Run actions`,children:(0,Y.jsx)(ke,{"aria-hidden":`true`})})}),(0,Y.jsxs)(N,{align:`end`,"data-slot":`run-actions-menu`,className:`w-[270px] max-w-[calc(100vw-2rem)] p-3`,children:[(0,Y.jsx)(O,{className:`px-2 py-3 text-[12px] font-normal text-muted-foreground`,children:`TASK ACTIONS`}),(0,Y.jsxs)(k,{onSelect:n,children:[(0,Y.jsx)(_t,{"aria-hidden":`true`}),` Notes / handoff`]}),(0,Y.jsx)(Lt,{run:e,canResume:i.terminal,onResume:()=>t.terminal.mutate(),onOpen:r}),o?(0,Y.jsxs)(k,{onSelect:()=>void Z(o,`Command copied to clipboard.`),children:[(0,Y.jsx)(B,{"aria-hidden":`true`}),` Copy resume command`]}):null,i.markUnread?(0,Y.jsxs)(k,{disabled:t.markUnread.isPending,onSelect:()=>t.markUnread.mutate(),children:[(0,Y.jsx)(xt,{"aria-hidden":`true`}),` Mark unread`]}):null,i.pin?(0,Y.jsxs)(j,{"data-slot":`pin-run`,className:`min-h-11`,checked:!!e.pinned,disabled:t.pin.isPending,onCheckedChange:()=>t.pin.mutate(),children:[e.pinned?(0,Y.jsx)(St,{"aria-hidden":`true`}):(0,Y.jsx)(Ae,{"aria-hidden":`true`}),e.pinned?`Unpin task`:`Pin task`]}):null,(0,Y.jsx)(A,{}),(0,Y.jsx)(O,{className:`text-xs text-muted-foreground`,children:`AFTER DONE`}),(0,Y.jsx)(j,{"data-slot":`archive-when-done`,className:`min-h-11`,checked:e.archiveWhenDone===!0,disabled:s.isPending,onCheckedChange:e=>s.mutate({archiveWhenDone:e},{onError:e=>D(e.message,{tone:`danger`})}),children:`Archive when Done`}),(0,Y.jsx)(j,{"data-slot":`auto-merge-pr`,className:`min-h-11`,checked:e.autoMergePr===!0,disabled:s.isPending,"aria-describedby":c,onCheckedChange:e=>s.mutate({autoMergePr:e},{onError:e=>D(e.message,{tone:`danger`})}),children:`Auto-merge PR`}),(0,Y.jsx)(`p`,{id:c,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block:0.5rem]`,children:`After Done, auto-merge can mark a draft PR ready. It waits for current-head CI and GitHub rules. Merge comes before archive.`}),e.delegation?.role===`worker`?null:(0,Y.jsx)(mn,{run:e,patch:s}),i.deleteRun?(0,Y.jsx)(A,{}):null,i.deleteRun?(0,Y.jsxs)(k,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,Y.jsx)(Me,{"aria-hidden":`true`}),` Delete task…`]}):null]})]})}function mn({run:e,patch:t}){let r=(0,J.useId)(),i=(0,J.useId)(),a=(0,J.useId)(),o=e=>D(e.message,{tone:`danger`});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(A,{}),(0,Y.jsx)(O,{className:`text-xs text-muted-foreground`,children:`TASK ACCESS`}),(0,Y.jsxs)(j,{"data-slot":`allow-workers`,className:`min-h-11`,checked:f(e),disabled:t.isPending,"aria-describedby":`${r} ${a}`,onCheckedChange:e=>t.mutate({allowWorkers:e},{onError:o}),children:[`Allow `,n(`cezar`),` workers`]}),(0,Y.jsxs)(`p`,{id:r,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:[`Agents in this task can start `,n(`Cezar`),` workers. Each worker is a separate paid agent session. Worker limits cap resources, not spending.`]}),(0,Y.jsx)(j,{"data-slot":`allow-messaging`,className:`min-h-11`,checked:l(e),disabled:t.isPending,"aria-describedby":`${i} ${a}`,onCheckedChange:e=>t.mutate({allowMessaging:e},{onError:o}),children:`Allow task messaging`}),(0,Y.jsx)(`p`,{id:i,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Agents in this task can message other tasks in this project.`}),(0,Y.jsx)(`p`,{id:a,"data-slot":`task-access-session-note`,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Turning one off applies at once. Turning one on reaches a running agent at its next session.`})]})}function hn({run:e,actions:t}){let n=t.confirming;return(0,Y.jsx)(L,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,Y.jsxs)(Se,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(xe,{className:`text-danger`,children:`Delete task permanently?`}),(0,Y.jsx)(be,{children:(0,Y.jsxs)(Y.Fragment,{children:[`Delete “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:v(e),children:v(e)}),`” and its transcript, worktree and branch. This cannot be undone.`]})})]}),(0,Y.jsxs)(we,{children:[(0,Y.jsx)(F,{children:`Cancel`}),(0,Y.jsx)(Ce,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{t.delete.mutate(),t.setConfirming(null)},children:`Delete task`})]})]})})}function gn({runId:e,onClose:t}){let n=S(e);return(0,Y.jsxs)(`div`,{"data-slot":`notes-panel`,className:`my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Notes / handoff`}),(0,Y.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Close notes`,onClick:t,children:(0,Y.jsx)(z,{})})]}),n.isPending?(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):n.isError?(0,Y.jsx)(`p`,{className:`text-xs text-danger`,children:n.error.message}):n.data.trim().length>0?(0,Y.jsx)(Wt,{runId:e,children:(0,Y.jsx)(Xe,{children:n.data})}):(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`}),(0,Y.jsxs)(`div`,{className:`mt-4 flex gap-3`,children:[(0,Y.jsx)(a,{variant:`outline`,disabled:!n.data?.trim(),onClick:()=>void Z(n.data??``,`Notes copied`),children:`Copy notes`}),(0,Y.jsx)(a,{variant:`outline`,onClick:t,children:`Close`})]})]})}export{It as a,At as c,zt as i,X as l,Wt as n,Pt as o,Rt as r,Nt as s,cn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./react-runtime-CCIEwYL0.js";var t=e(),n=[`.ai/cezar/skills/`,`.ai/squawk/skills/`,`.ai/skills/`,`.agents/skills/`];function r({children:e}){return(0,t.jsx)(`span`,{className:`font-mono`,children:e})}function i(){return(0,t.jsx)(t.Fragment,{children:n.map((e,i)=>(0,t.jsxs)(`span`,{children:[i>0?i===n.length-1?`, or `:`, `:``,(0,t.jsx)(r,{children:e})]},e))})}function a(){return(0,t.jsxs)(t.Fragment,{children:[`No skills yet. Drop Markdown files into `,(0,t.jsx)(i,{}),` (agent mirrors like`,` `,(0,t.jsx)(r,{children:`.claude/skills/`}),` work too) — optional frontmatter: `,(0,t.jsx)(r,{children:`name`}),`,`,` `,(0,t.jsx)(r,{children:`description`}),`. Global (`,(0,t.jsx)(r,{children:`~/.agents/skills`}),`) and team-repo skills appear here too — try Refresh.`]})}function o(){return(0,t.jsxs)(t.Fragment,{children:[`No skills yet — drop Markdown files into `,(0,t.jsx)(i,{}),` (or a global/team-repo skill source).`]})}export{o as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{D as t,I as n,L as r,M as i,t as a,u as o}from"./button-CHUAMTHK.js";import{i as s,t as c}from"./react-runtime-CCIEwYL0.js";import{En as l,Jr as u,nn as d,p as f,sn as p,zt as m}from"./project-scope-context-B3M-u8R0.js";import{$ as h,J as g,K as _,X as ee,Y as v,Z as y,et as b,rt as x,z as S}from"./live-protocol-BVn0UA_g.js";import{I as te,Rt as ne,Un as C,Z as w,jt as re,n as T}from"./queries-DORTKwyN.js";import{t as ie}from"./useQuery-CqqnAJvu.js";import{n as E}from"./toaster-B1MyeHiE.js";import{S as ae,x as oe,y as se}from"./github-sidebar-model-B0Ufci5S.js";import{G as ce,Q as le,Z as D,ct as O,d as ue,ht as de,l as fe,mt as pe,u as me}from"./design-icons-DmYTv2r1.js";import{t as k}from"./project-router-MMOk9VbW.js";import{t as he}from"./centered-state-DGyy0SuA.js";import{c as ge,i as _e,o as ve,p as ye}from"./skills-DFBiAuJG.js";/* empty css */import{et as be,rn as A}from"./index-DgU3yYUl.js";import{t as xe}from"./skill-empty-hint-YDmkqgo-.js";var j=e(s(),1),M=`owner/name, an https, ssh or git URL, git@host:path, or a local or file:// path`,Se=new Set([`https`,`http`,`ssh`,`git`,`file`]);function N(e){let t=e.trim();if(!t||t.startsWith(`-`)||t.includes(`::`))return null;if(t.startsWith(`~/`))return`home`;if(/^(\/|\.\/|\.\.\/)/.test(t)||/^[A-Za-z]:[\\/]/.test(t))return`local`;if(/^[\w.-]+\/[\w.-]+$/.test(t))return`github`;let n=/^([a-z][a-z0-9+.-]*):\/\//i.exec(t);return n?Se.has(n[1].toLowerCase())?`url`:null:/^[\w.-]+@[\w.-]+:/.test(t)?`scp`:null}function P(e){return e.length>0&&e.length<=256&&!e.startsWith(`-`)&&!e.includes(`..`)&&/^[A-Za-z0-9._/-]+$/.test(e)}var Ce=x().trim().min(1).max(500).refine(e=>N(e)!==null,{message:`Use ${M}.`}),we=x().trim().refine(P,{message:`Use a branch, tag or commit SHA, such as main.`}),Te=b({repo:x().min(1).max(500),ref:x().min(1).max(256)}).strict();b({repo:Ce,ref:we.optional()}).strict(),Te.extend({enabled:v()}).strict();var Ee=_([`refused-format`,`fetch-failed`,`ref-not-found`]),De=ee(`state`,[b({state:y(`idle`)}),b({state:y(`loading`)}),b({state:y(`ok`),skillCount:h().int().min(0)}),b({state:y(`error`),cause:Ee,detail:x(),skillCount:h().int().min(0)})]);b({sources:g(b({repo:x(),ref:x(),enabled:v(),status:De})),editable:v(),configIssue:x().nullable()});var F=()=>[i(),`skills`,`sources`];async function Oe(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$get({param:{projectId:i()}},m(e)),`/skills/sources`)}async function ke(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$post({param:{projectId:i()},json:e}),`/skills/sources`)}async function Ae(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$patch({param:{projectId:i()},json:e}),`/skills/sources`)}async function je(e){return l(await f.api.v1.p[`:projectId`].skills.sources.$delete({param:{projectId:i()},json:e}),`/skills/sources`)}async function Me(e){return l(await f.api.v1.p[`:projectId`].skills.sources.retry.$post({param:{projectId:i()},json:e}),`/skills/sources/retry`)}var I=c(),Ne=1e3,L=e=>`${e.repo} @ ${e.ref}`;function Pe(){return ie({queryKey:F(),queryFn:({signal:e})=>Oe({signal:e}),refetchInterval:e=>e.state.data?.sources.some(e=>e.status.state===`loading`)?Ne:!1})}function R(){return{sources:F(),lists:[T.skills,T.skillsReady,T.importableSkills,T.importableSkillsReady]}}function z(e,t=R()){for(let n of t.lists)e.invalidateQueries({queryKey:n,exact:!0})}function B(e,t){let n=u();return C({mutationFn:async t=>{let n=R();return{answer:await e(t),keys:n}},onSuccess:({answer:e,keys:r},i)=>{n.setQueryData(r.sources,e),n.invalidateQueries({queryKey:r.sources,exact:!0}),z(n,r),t?.(i)},onError:e=>E(e.message,{tone:`danger`})})}function Fe(e){let t=u(),n=(0,j.useRef)(!1),r=e?.sources.some(e=>e.status.state===`loading`)??!1;(0,j.useEffect)(()=>{n.current&&!r&&z(t),n.current=r},[r,t])}function Ie(){let e=Pe();Fe(e.data);let t=B(Ae),i=B(je,e=>E(`Removed ${L(e)}. Add it again to restore its skill switches.`)),o=B(Me),s=e.data,c=s?.editable===!0&&s.configIssue===null,l=t.isPending||i.isPending;return(0,I.jsxs)(`section`,{"data-slot":`skill-sources`,"aria-labelledby":`skill-sources-heading`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-3 @min-[520px]:p-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{id:`skill-sources-heading`,className:`text-[15px] font-semibold`,children:`Team skill sources`}),(0,I.jsxs)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:[`Repos whose skills this project can use. Changes are saved to`,` `,(0,I.jsx)(`span`,{className:`font-mono`,children:`.ai/cezar/config.json`}),`.`]})]}),e.isError?(0,I.jsxs)(V,{slot:`skill-sources-error`,alert:!0,children:[`Could not load the team skill sources: `,e.error.message,` `,(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2 min-h-11`,disabled:e.isFetching,onClick:()=>void e.refetch(),children:`Retry`})]}):null,s?.configIssue?(0,I.jsx)(V,{slot:`skill-sources-config-issue`,alert:!0,children:s.configIssue}):null,s&&!s.editable?(0,I.jsxs)(V,{slot:`skill-sources-read-only`,children:[`Sources are read-only on this remote cockpit. To edit them here, run`,` `,(0,I.jsxs)(`span`,{className:`font-mono`,children:[n(),` remote-settings enable`]}),` on the machine running `,r(`cezar`),`.`]}):null,e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`text-xs text-muted-foreground`,children:`Loading sources…`}):s&&s.configIssue===null&&s.sources.length===0?(0,I.jsx)(`p`,{"data-slot":`skill-sources-empty`,className:`text-xs leading-relaxed text-soft-foreground`,children:`No team skill sources yet. Add a repo below to use its skills in this project.`}):s&&s.sources.length>0?(0,I.jsx)(`ul`,{"data-slot":`skill-source-list`,className:`flex flex-col divide-y divide-border rounded-lg border border-border`,children:s.sources.map(e=>(0,I.jsx)(Le,{source:e,editable:c,busy:l,retrying:o.isPending,onToggle:()=>t.mutate({repo:e.repo,ref:e.ref,enabled:!e.enabled}),onRemove:()=>i.mutate({repo:e.repo,ref:e.ref}),onRetry:()=>o.mutate({repo:e.repo,ref:e.ref})},JSON.stringify([e.repo,e.ref])))}):null,s?(0,I.jsx)(Ve,{disabled:!c}):null]})}function V({slot:e,alert:t=!1,children:n}){return(0,I.jsxs)(`div`,{role:t?`alert`:void 0,"data-slot":e,className:`flex items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs leading-relaxed text-muted-foreground`,children:[t?(0,I.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-danger`}):null,(0,I.jsx)(`div`,{className:`min-w-0 break-words`,children:n})]})}function Le({source:e,editable:t,busy:n,retrying:r,onToggle:i,onRemove:o,onRetry:s}){let c=(0,j.useId)(),l=Re(e),u=e.status.state===`error`,d=e.enabled&&(u||e.status.state===`idle`);return(0,I.jsxs)(`li`,{"data-slot":`skill-source`,"data-repo":e.repo,"data-ref":e.ref,"data-state":e.enabled?e.status.state:`disabled`,className:`flex flex-col gap-2 p-2.5 @min-[520px]:flex-row @min-[520px]:items-center`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`p`,{className:`break-all font-mono text-[13px] text-foreground`,children:[e.repo,` `,(0,I.jsxs)(`span`,{className:`text-muted-foreground`,children:[`@ `,e.ref]})]}),(0,I.jsx)(`p`,{id:c,"data-slot":`skill-source-status`,role:u?`alert`:void 0,"aria-live":u?void 0:`polite`,className:u?`mt-1 text-xs leading-relaxed text-danger`:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:l})]}),(0,I.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[d?(0,I.jsxs)(a,{type:`button`,variant:`outline`,size:`sm`,"data-slot":`skill-source-retry`,className:`min-h-11`,disabled:!t||r,"aria-label":`Retry ${L(e)}`,onClick:s,children:[(0,I.jsx)(D,{"aria-hidden":`true`}),`Retry`]}):null,(0,I.jsx)(`span`,{className:`inline-flex min-h-11 min-w-11 items-center justify-center`,children:(0,I.jsx)(ae,{"data-slot":`skill-source-switch`,"aria-label":`Enable ${L(e)}`,"aria-describedby":c,checked:e.enabled,disabled:!t||n,onCheckedChange:i,className:`relative before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-['']`})}),(0,I.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,"data-slot":`skill-source-remove`,className:`size-11`,disabled:!t||n,"aria-label":`Remove ${L(e)}`,onClick:o,children:(0,I.jsx)(pe,{"aria-hidden":`true`})})]})]})}function Re(e){if(!e.enabled)return`Disabled. Its skills are hidden from the catalog and from tasks.`;let t=e.status;switch(t.state){case`loading`:return`Fetching…`;case`idle`:return`Not fetched yet. Use Retry to fetch it now.`;case`ok`:return t.skillCount===1?`1 skill`:`${t.skillCount} skills`;case`error`:{let e=t.skillCount>0?` Skills from an earlier fetch still show.`:``;return t.cause===`refused-format`?`${r(`cezar`)} does not accept this repo format. Remove it, then add it as ${M}.`:t.cause===`ref-not-found`?`${t.detail} Check the ref, or remove the source and add it with another ref.${e}`:`Could not fetch: ${ze(t.detail)} Check the network and your access to the repo, then Retry.${e}`}}}var ze=e=>/[.!?]$/.test(e.trim())?e.trim():`${e.trim()}.`;function Be(e,t){return e.trim()?N(e)===null?`Use ${M}.`:t.trim()&&!P(t.trim())?`Use a branch, tag or commit SHA for the ref, such as main.`:null:`Enter a repo.`}function Ve({disabled:e}){let[t,n]=(0,j.useState)(``),[r,i]=(0,j.useState)(``),[o,s]=(0,j.useState)(null),c=(0,j.useId)(),l=(0,j.useId)(),u=(0,j.useId)(),d=B(ke,()=>{n(``),i(``)});return(0,I.jsxs)(`form`,{"data-slot":`skill-source-add`,"aria-label":`Add a team skill source`,noValidate:!0,onSubmit:e=>{e.preventDefault();let n=Be(t,r);s(n),!n&&d.mutate(r.trim()?{repo:t.trim(),ref:r.trim()}:{repo:t.trim()})},className:`flex flex-col gap-2 @min-[520px]:flex-row @min-[520px]:flex-wrap @min-[520px]:items-end`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,I.jsx)(`label`,{htmlFor:c,className:`text-xs font-medium`,children:`Repo`}),(0,I.jsx)(A,{id:c,"data-slot":`skill-source-repo`,value:t,placeholder:`owner/name`,autoComplete:`off`,spellCheck:!1,disabled:e,"aria-invalid":o?!0:void 0,"aria-describedby":o?u:void 0,onChange:e=>{n(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 @min-[520px]:w-36`,children:[(0,I.jsx)(`label`,{htmlFor:l,className:`text-xs font-medium`,children:`Ref`}),(0,I.jsx)(A,{id:l,"data-slot":`skill-source-ref`,value:r,placeholder:`main`,autoComplete:`off`,spellCheck:!1,disabled:e,onChange:e=>{i(e.target.value),s(null)},className:`h-11 font-mono text-[13px]`})]}),(0,I.jsx)(a,{type:`submit`,"data-slot":`skill-source-submit`,className:`h-11`,disabled:e||d.isPending,children:`Add source`}),o?(0,I.jsx)(`p`,{id:u,role:`alert`,"data-slot":`skill-source-problem`,className:`text-xs text-danger @min-[520px]:basis-full`,children:o}):null]})}var He=[[`.ai`,`cezar`,`skills`],[`.ai`,`squawk`,`skills`],[`.ai`,`skills`],[`.claude`,`skills`],[`.agents`,`skills`],[`skills`]];function Ue(e){let t=e.split(`/`).slice(0,-1);if((e===`SKILL.md`||e.endsWith(`/SKILL.md`)||t.at(-1)===`commands`)&&t.pop(),t[0]===`plugins`&&t[1])return{kind:`plugin`,name:t[1]};for(let e of He){let n=We(t,e);if(n!==-1&&(e.length>1||n===t.length-1)){t.splice(n,e.length);break}}return t.length>0?{kind:`directory`,name:t.join(`/`)}:null}function We(e,t){for(let n=e.length-t.length;n>=0;n--)if(t.every((t,r)=>e[n+r]===t))return n;return-1}var H=[{id:`project`,label:`This project`,sources:new Set([`ai`,`cezar`,`agents`])},{id:`global`,label:`Global`,sources:new Set([`global`])},{id:`builtin`,label:`Built-in`,sources:new Set([`builtin`])}],U=(e,t,n,r)=>({key:e,label:t,kind:n,locked:r,items:[],children:[]});function Ge(e){let t=H.map(e=>U(`source\u0000${e.id}`,e.label,`source`,!0)),n=new Map;for(let r of e){let{skill:e}=r;if(!e.team){let n=H.findIndex(t=>t.sources.has(e.source));t[n===-1?0:n].items.push(r);continue}let{repo:i,path:a}=e.team,o=n.get(i);o||(o=U(`repo\u0000${i}`,i,`repo`,!1),n.set(i,o));let s=Ue(a);if(!s){o.items.push(r);continue}let c=`${o.key}\u0000${s.kind}\u0000${s.name}`,l=o.children.find(e=>e.key===c);l||(l=U(c,s.name,s.kind,!1),o.children.push(l)),l.items.push(r)}for(let e of n.values())e.children.sort((e,t)=>e.label.localeCompare(t.label));let r=[...n.values()].sort((e,t)=>e.label.localeCompare(t.label));return[t[0],...r,t[1],t[2]].filter(e=>e.items.length>0||e.children.length>0)}function W(e){return e.flatMap(e=>[e.key,...W(e.children)])}function G(e){return[...e.items,...e.children.flatMap(G)]}function Ke(e,t){let n=G(e);if(e.locked)return{enabled:n.length,total:n.length,state:`on`,refs:[]};let r=[],i=0;for(let{skill:e}of n)e.team&&(r.push({repo:e.team.repo,name:e.name}),t(e)&&i++);let a=i===0?`off`:i===r.length?`on`:`mixed`;return{enabled:i,total:r.length,state:a,refs:r}}function K(e,t){if(t.trim()===``)return null;let n=new Set,r=(e,i)=>{let a=[...i,e.label];for(let{skill:r,key:i}of e.items){let e=[r.description??``,...a].join(` `);ge(r.name,e,t)>0&&n.add(i)}for(let t of e.children)r(t,a)};for(let t of e)r(t,[]);return n}function q(e,t){let n=[],r=(e,i)=>{let a=[...i,e.key],o=e.items.some(e=>t.has(e.key));o&&n.push(...a.filter(e=>!n.includes(e)));for(let t of e.children)o=r(t,a)||o;return o};for(let t of e)r(t,[]);return n}function J(e){let t=e?.disabledTeamSkills;if(!Array.isArray(t))return[];let n=[];for(let e of t){let t=S.safeParse(e);t.success&&n.push(t.data)}return n}var Y=(e,t)=>e.repo===t.repo&&e.name===t.name;function X(e){return e.team?{repo:e.team.repo,name:e.name}:void 0}function qe(e,t,n){let r=new Map;for(let e of t)r.has(e.name)||r.set(e.name,e);let i=[],a=new Set;for(let t of e){let e=X(t);if(!e)continue;let o=JSON.stringify([e.repo,e.name]);if(a.has(o))continue;a.add(o);let s=n(e),c=r.get(t.name),l=c?X(c):void 0;s&&c&&!(l&&Y(l,e))?i.push({skill:t,on:s,hiddenBy:c.team?.repo??c.source}):i.push({skill:t,on:s})}return i}var Z=new Map;function Je(e){let t=Z.get(e);return t||(t={chain:Promise.resolve(),latest:0},Z.set(e,t)),t}function Ye(e){let t=u(),n=w(e),[r,i]=j.useState(0),a=j.useMemo(()=>J(n.data),[n.data]),o=j.useCallback(e=>!a.some(t=>Y(t,e)),[a]),s=j.useCallback(n=>{let r=[e,`ui-state`],a=[e,`skills`],o=t.getQueryData(r),s=n(J(o));t.setQueryData(r,{...o,disabledTeamSkills:s});let c=Je(e),l=++c.latest;i(e=>e+1),c.chain=c.chain.then(async()=>{try{let n=await d({disabledTeamSkills:s},e);l===c.latest&&(t.setQueryData(r,n),t.invalidateQueries({queryKey:a}))}catch(e){E(e instanceof Error?e.message:String(e),{tone:`danger`}),l===c.latest&&t.invalidateQueries({queryKey:r})}finally{i(e=>e-1)}})},[e,t]);return{disabled:a,isOn:o,toggle:j.useCallback(e=>{let t={repo:e.repo,name:e.name};s(e=>e.some(e=>Y(e,t))?e.filter(e=>!Y(e,t)):[...e,t])},[s]),setMany:j.useCallback((e,t)=>{let n=e.map(e=>({repo:e.repo,name:e.name}));s(e=>{if(t)return e.filter(e=>!n.some(t=>Y(e,t)));let r=[...e];for(let e of n)r.some(t=>Y(t,e))||r.push(e);return r})},[s]),pending:r>0,ready:n.isSuccess}}var Q=`__bm`,Xe=`__import`,$=e=>e.team?`${e.team.repo}\u0000${e.name}`:e.path,Ze=e=>e.source!==`team`&&e.source!==`builtin`;function Qe(){return(0,I.jsx)(`div`,{"data-route":`skills`,className:`mx-auto min-h-full w-full px-[18px] py-6 md:p-9`,children:(0,I.jsx)($e,{})})}function $e(){let e=re(),n=ne(),r=te(),[a]=t(),[o,s]=(0,j.useState)(``),c=Ye(i()),l=et(),u=(0,j.useMemo)(()=>e.data??[],[e.data]),d=(0,j.useMemo)(()=>r.data??[],[r.data]),f=r.isSuccess,p=(0,j.useMemo)(()=>tt(u,f?d:null,c.isOn),[u,d,f,c.isOn]),m=(0,j.useMemo)(()=>Ge(p),[p]),h=new Map;for(let e of p)h.set(e.skill.name,(h.get(e.skill.name)??0)+1);let g=e=>(h.get(e.name)??0)>1&&e.team!==void 0,_=e=>{let t=X(e);return t&&f?c.isOn(t):!0},ee=e=>{let t=X(e);return t?{ariaLabel:g(e)?`Enable ${e.name} from ${t.repo}`:`Enable ${e.name}`,checked:_(e),disabled:!f||!c.ready,locked:!1,onCheckedChange:()=>c.toggle(t)}:{ariaLabel:`${e.name} is always enabled`,checked:!0,disabled:!0,locked:!0,onCheckedChange:()=>{}}},v=e=>`/skills?skill=${encodeURIComponent(e.name)}${g(e)?`&repo=${encodeURIComponent(e.team.repo)}`:``}`,y=a.get(`skill`),b=nt(p,y,a.get(`repo`),_)?.key??null,x=rt(m,b),S=e=>{s(e);let t=K(m,e);t&&t.size>0&&x.open(q(m,t))};if(e.isError)return(0,I.jsx)(he,{icon:(0,I.jsx)(O,{}),tone:`danger`,heading:`h2`,title:`Could not load skills`,subtitle:e.error.message});let C=y===Q,w=e.isPending?[]:it({tree:m,matches:K(m,o),isOpen:x.isOpen,onFold:x.toggle,openKey:b,workflows:n.data?.workflows??[],activationFor:ee,linkFor:v,groupActivationFor:e=>Ke(e,_),switchable:f&&c.ready,onActivate:c.setMany});return(0,I.jsxs)(`div`,{"data-slot":`skills-section`,className:`@container flex min-w-0 flex-col gap-[22px]`,children:[(0,I.jsxs)(`header`,{className:`flex flex-col gap-4 @min-[700px]:flex-row @min-[700px]:items-center @min-[700px]:justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-[25px] font-semibold md:text-[30px]`,children:`Skills`}),(0,I.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground md:text-[13px]`,children:`Markdown playbooks your agents can follow.`})]}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,I.jsxs)(k,{to:C?`/skills`:`/skills?skill=${Q}`,"data-slot":`bookmarklets-row`,"aria-current":C?`page`:void 0,"aria-expanded":C,className:`inline-flex min-h-11 items-center gap-2 rounded-lg border border-border bg-card px-3 text-xs font-medium aria-[current=page]:bg-accent-strong/10 hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,I.jsx)(de,{"aria-hidden":`true`,className:`size-4 text-link-foreground`}),`Run from GitHub`]})})]}),C?(0,I.jsx)(`section`,{"data-slot":`skills-bookmarklets`,className:`min-w-0 rounded-xl border border-border bg-card p-5`,children:(0,I.jsx)(be,{skills:p.filter(e=>_(e.skill)&&!e.hiddenBy).map(e=>e.skill)})}):null,(0,I.jsx)(Ie,{}),(0,I.jsx)(ot,{query:o,onQuery:S,refreshing:l.isPending,onRefresh:()=>l.mutate(),onFoldAll:x.setAll}),(0,I.jsxs)(`section`,{"data-slot":`skills-list`,"aria-label":`Skills`,className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-2 @min-[520px]:p-3`,children:[r.isError?(0,I.jsx)(st,{message:r.error.message,retrying:r.isFetching,onRetry:()=>void r.refetch()}):null,(0,I.jsx)(`div`,{"data-slot":`skill-rows`,className:`min-h-0 overflow-y-auto md:max-h-[calc(100dvh-260px)]`,children:e.isPending?(0,I.jsx)(`p`,{role:`status`,"aria-busy":`true`,className:`min-h-72 p-3 text-[13px] text-muted-foreground`,children:`Loading skills…`}):w.length>0?(0,I.jsxs)(`table`,{"data-slot":`skills-table`,className:`w-full table-fixed border-collapse text-left`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{className:`border-b border-border text-[12px] text-muted-foreground`,children:[(0,I.jsx)(`th`,{scope:`col`,className:`px-2 py-2 font-semibold`,children:`Skill / group`}),(0,I.jsx)(`th`,{scope:`col`,className:`hidden w-[30%] px-2 py-2 font-semibold @min-[520px]:table-cell`,children:`Used by`}),(0,I.jsx)(`th`,{scope:`col`,className:`w-[116px] px-2 py-2 text-right font-semibold`,children:`Enabled`})]})}),(0,I.jsx)(`tbody`,{children:w})]}):(0,I.jsx)(`p`,{className:`px-2.5 py-2 text-xs leading-relaxed text-soft-foreground`,children:p.length>0?`(no skills match)`:(0,I.jsx)(xe,{})})})]})]})}function et(){let e=u();return C({mutationFn:()=>p(),onSuccess:t=>{e.setQueryData(T.skills,t),e.invalidateQueries({queryKey:T.importableSkills}),E(`Team skills refreshed.`)},onError:e=>E(e.message,{tone:`danger`})})}function tt(e,t,n){let r=new Set(e.filter(Ze).map(e=>e.name)),i=t?qe(t.filter(e=>!r.has(e.name)),e,n):[],a=(e,t)=>({skill:e,key:$(e),...t?{hiddenBy:t}:{}}),o=new Set((t??[]).map($)),s=[...e.filter(e=>e.source!==`team`||!o.has($(e))).map(e=>a(e)),...i.map(e=>a(e.skill,e.on?e.hiddenBy:void 0))].sort((e,t)=>e.skill.name.localeCompare(t.skill.name)),c=new Map(s.map(e=>[e.skill,e]));return ve(s.map(e=>e.skill)).map(e=>c.get(e))}function nt(e,t,n,r){if(t===null||t===Q)return null;if(t===Xe)return e.find(e=>!r(e.skill))??null;let i=e.filter(e=>e.skill.name===t);return i.find(e=>n===null||e.skill.team?.repo===n)??i[0]??null}function rt(e,t){let[n,r]=(0,j.useState)({}),i=e=>r(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),a=t?q(e,new Set([t])).join(``):``;return(0,j.useEffect)(()=>{a&&r(e=>({...e,...Object.fromEntries(a.split(``).map(e=>[e,!0]))}))},[a]),{isOpen:(e,t)=>n[e.key]??t===0,toggle:(e,t)=>r(n=>({...n,[e]:t})),open:i,setAll:t=>r(Object.fromEntries(W(e).map(e=>[e,t])))}}function it(e){let t=[],n=t=>e.matches===null||e.matches.has(t.key),r=e=>e.items.some(n)||e.children.some(r),i=(a,o)=>{if(!r(a))return;let s=e.isOpen(a,o);if(t.push((0,I.jsx)(ut,{node:a,depth:o,open:s,onFold:()=>e.onFold(a.key,!s),activation:e.groupActivationFor(a),switchable:e.switchable,onActivate:e.onActivate},a.key)),s){for(let r of a.items.filter(n)){let n=r.key===e.openKey,i=ye(e.workflows,r.skill.name),a=e.activationFor(r.skill);t.push((0,I.jsx)(ft,{item:r,depth:o+1,href:n?`/skills`:e.linkFor(r.skill),expanded:n,usedBy:i,activation:a},r.key)),n&&t.push((0,I.jsx)(at,{skill:r.skill,usedBy:i,activation:a},`${r.key}\u0000detail`))}for(let e of a.children)i(e,o+1)}};for(let t of e.tree)i(t,0);return t}function at({skill:e,usedBy:t,activation:n}){return(0,I.jsx)(`tr`,{"data-slot":`skill-detail-row`,children:(0,I.jsx)(`td`,{colSpan:3,className:`border-b border-border px-3 pb-5 @min-[520px]:px-5`,children:(0,I.jsx)(`div`,{"data-slot":`skills-detail`,className:`min-w-0 rounded-lg border border-border bg-background p-4 md:p-5`,children:(0,I.jsx)(se,{skill:e,usedBy:t,activation:n})})})})}function ot({query:e,onQuery:t,refreshing:n,onRefresh:r,onFoldAll:i}){return(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`sw-search relative min-w-0 basis-full sm:basis-auto sm:flex-1`,children:[(0,I.jsx)(le,{"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,I.jsx)(A,{"data-slot":`skills-filter`,placeholder:`Filter skills…`,"aria-label":`Filter skills`,value:e,onChange:e=>t(e.target.value),className:`h-11 min-w-0 bg-card pl-9 text-xs`})]}),(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skills-refresh`,title:`git fetch the team skills repos`,disabled:n,onClick:r,className:`flex h-11 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-55`,children:[(0,I.jsx)(D,{"aria-hidden":`true`,className:o(`size-3`,n&&`motion-safe:animate-spin`)}),n?`Refreshing…`:`Refresh`]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-expand-all`,className:`h-11 text-xs`,onClick:()=>i(!0),children:`Expand groups`}),(0,I.jsx)(a,{type:`button`,variant:`outline`,"data-slot":`skills-collapse-all`,className:`h-11 text-xs`,onClick:()=>i(!1),children:`Collapse groups`})]})}function st({message:e,retrying:t,onRetry:n}){return(0,I.jsxs)(`div`,{role:`alert`,"data-slot":`skills-importable-error`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-background p-3 text-xs text-muted-foreground`,children:[(0,I.jsxs)(`span`,{children:[`Could not load the team skills, so they cannot be switched right now. Your saved choice is kept.`,` `,e]}),(0,I.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,className:`min-h-11`,disabled:t,onClick:n,children:`Retry`})]})}var ct={repo:`repository`,plugin:`plugin`,directory:`directory`},lt=e=>({paddingInlineStart:`${e*16}px`});function ut({node:e,depth:t,open:n,onFold:r,activation:i,switchable:a,onActivate:s}){let c=n?me:ue,l=ct[e.kind],u=e.locked||a;return(0,I.jsxs)(`tr`,{"data-slot":`skill-group-row`,"data-group":e.label,"data-kind":e.kind,"data-level":t,className:o(`border-b border-border`,t===0&&`bg-muted/40`),children:[(0,I.jsx)(`th`,{scope:`row`,className:`min-w-0 p-0 text-left font-normal`,children:(0,I.jsx)(`span`,{className:`flex min-w-0`,style:lt(t),children:(0,I.jsxs)(`button`,{type:`button`,"data-slot":`skill-group-toggle`,"aria-expanded":n,onClick:r,className:`flex min-h-11 min-w-0 flex-1 items-center gap-2 rounded-md px-2 text-left hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,children:[(0,I.jsx)(c,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`}),(0,I.jsx)(`span`,{className:o(`min-w-0 [overflow-wrap:anywhere]`,t===0?`text-[13px] font-semibold`:`text-[13px] font-medium`),children:e.label}),l?(0,I.jsx)(`span`,{className:`shrink-0 text-[12px] text-soft-foreground`,children:l}):null]})})}),(0,I.jsx)(`td`,{"aria-hidden":`true`,className:`hidden @min-[520px]:table-cell`}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right`,children:(0,I.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,I.jsx)(`span`,{"data-slot":`skill-group-count`,className:`text-[12px] tabular-nums text-muted-foreground`,children:u?`${i.enabled} / ${i.total}`:`—`}),(0,I.jsx)(dt,{label:e.label,locked:e.locked,state:u?i.state:null,disabled:e.locked||!a||i.total===0,onClick:()=>s(i.refs,i.state!==`on`)})]})})]})}function dt({label:e,locked:t,state:n,disabled:r,onClick:i}){return(0,I.jsx)(`button`,{type:`button`,role:`checkbox`,"data-slot":`skill-group-switch`,"data-state":n??`unknown`,"aria-checked":n===null?void 0:n===`mixed`?`mixed`:n===`on`,"aria-busy":n===null||void 0,"aria-label":t?`${e} skills are always enabled`:`Enable all skills in ${e}`,disabled:r,onClick:i,className:`group/check inline-flex size-11 shrink-0 items-center justify-center rounded-md focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground disabled:cursor-default`,children:(0,I.jsx)(`span`,{"aria-hidden":`true`,className:o(`inline-flex size-5 items-center justify-center rounded border-2 transition-colors`,n===`on`||n===`mixed`?`border-accent-strong bg-accent-strong text-accent-strong-foreground`:`border-muted-foreground bg-card text-transparent`,n===null&&`border-dashed border-soft-foreground`,`group-disabled/check:opacity-60`),children:n===`mixed`?(0,I.jsx)(ce,{className:`size-3.5`}):(0,I.jsx)(fe,{className:`size-3.5`})})})}function ft({item:e,depth:t,href:n,expanded:r,usedBy:i,activation:a}){let{skill:s,hiddenBy:c}=e,l=_e(s),u=[...new Set(i.map(e=>e.split(` › `)[0]))];return(0,I.jsxs)(`tr`,{"data-slot":`skill-table-row`,className:o(`border-b border-border`,r&&`border-transparent`),children:[(0,I.jsx)(`td`,{className:`min-w-0 p-0`,style:lt(t),children:(0,I.jsxs)(k,{to:n,"data-slot":`skill-row`,"data-skill":s.name,"data-repo":s.team?.repo,"data-project":l?`true`:void 0,"data-enabled":a.checked?`true`:void 0,"aria-current":r?`page`:void 0,"aria-expanded":r,className:o(`selection-row flex min-h-11 min-w-0 flex-col justify-center gap-1 rounded-md px-3 py-2 transition-colors hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-link-foreground`,r&&`bg-accent-strong/10`),children:[(0,I.jsx)(`span`,{className:`flex min-w-0 items-center gap-2`,children:(0,I.jsx)(`span`,{className:o(`min-w-0 break-words text-[13px]`,l?`font-semibold text-foreground`:`font-normal text-muted-foreground`),children:s.name})}),s.description?(0,I.jsx)(`span`,{className:`line-clamp-1 text-xs leading-relaxed text-supporting-foreground`,children:s.description}):null,u.length>0?(0,I.jsxs)(`span`,{"data-slot":`skill-used-by-inline`,className:`text-xs text-supporting-foreground @min-[520px]:hidden`,children:[`Used by `,u.join(`, `)]}):null,c?(0,I.jsxs)(`span`,{"data-slot":`skill-hidden-by`,className:`min-w-0 text-xs text-supporting-foreground [overflow-wrap:anywhere]`,children:[`hidden by `,c]}):null]})}),(0,I.jsx)(`td`,{"data-slot":`skill-used-by-cell`,className:`hidden px-2 py-2 align-middle text-xs text-supporting-foreground @min-[520px]:table-cell`,children:u.length>0?(0,I.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:u.join(`, `)}):(0,I.jsx)(`span`,{className:`text-soft-foreground`,children:`—`})}),(0,I.jsx)(`td`,{className:`px-1 py-0 text-right align-middle`,children:(0,I.jsx)(`span`,{className:`inline-flex justify-end`,children:(0,I.jsx)(oe,{skill:s,activation:a})})})]})}export{Qe as SkillsRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=new Set([`ai`,`cezar`,`agents`,`team`]);function t(t){return e.has(t.source)}function n(e){return[...e].sort((e,n)=>Number(!t(e))-Number(!t(n)))}var r=5;function i(e,n,{mostUsedLimit:i=r}={}){let a=e.map((e,t)=>({skill:e,index:t,count:o(n,e.name)})).filter(e=>e.count>0).sort((e,n)=>n.count-e.count||Number(!t(e.skill))-Number(!t(n.skill))||e.index-n.index).slice(0,i).map(e=>e.skill),s=new Set(a),c=e.filter(e=>!s.has(e));return{mostUsed:a,project:c.filter(t),global:c.filter(e=>!t(e))}}function a(e,t){let n=i(e,t);return[...n.mostUsed,...n.project,...n.global]}function o(e,t){if(!e||!Object.hasOwn(e,t))return 0;let n=e[t];return typeof n==`number`?n:0}function s(e,t){return{...e,[t]:o(e,t)+1}}function c(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 l(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 u=/[\s\-/_.]/;function d(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&&u.test(a)){let n=e[r+t.length];i=n===void 0||u.test(n)?3:2}if(i>n&&(n=i),n===3)break}return n}function f(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=d(i,e);if(t===0)return 0;a+=t}return a/(r.length*3)}function p(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&&u.test(e)?4:3}return+!!c(n,r)}function m(e,t){let n=e.split(`-`).filter(Boolean);return t?[...n,t]:n}var h=10;function g(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=p(e,n),a=t?p(t,n):0;if(r===0&&a===0)return 0;i+=r>0?r+h:a}return i}function _(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean),r=0;for(let t of n)r+=p(e,t);return r}function v(e,t,n){return t.trim()===``?[...e]:e.map((e,r)=>{let i=g(e.name,e.description,t);return{item:e,index:r,count:o(n,e.name),nameScore:_(e.name,t),score:i}}).filter(e=>e.score>0).sort((e,t)=>t.nameScore-e.nameScore||t.score-e.score||t.count-e.count||e.index-t.index).map(e=>e.item)}function y(e,t,n){return v(e,t,n)}function b(e,t,r){return t.trim()===``?{...i(e,r),ranked:null}:{mostUsed:[],project:[],global:[],ranked:y(n(e),t,r)}}function x(e,t){return v(e,t)}function S(e,t,n){return v(a(e,n),t,n)}export{f as a,g as c,x as d,m as f,t as i,y as l,S as n,n as o,l as p,c as r,a as s,s as t,b as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-route=skills] h1,[data-route=workflows] h1{line-height:1.5}[data-route=skills] :is([data-slot=skills-list],[data-slot=skills-detail]),[data-route=workflows] :is([data-slot=wb-main],[data-slot=wb-aside],[data-slot=wb-auto-panel],[data-slot=wb-import-panel]){border-radius:10px}[data-slot=skills-section]>header a{gap:8px}[data-slot=skills-refresh]{color:var(--foreground);border-radius:8px;gap:8px;padding-inline:12px}[data-slot=skills-refresh] svg{width:16px;height:16px}[data-slot=skill-row]{gap:10px;min-height:0}[data-slot=skill-row]>span:nth-child(2){font-size:11px;line-height:1.65}[data-slot=skill-detail]{flex-direction:column;gap:16px;display:flex}[data-slot=skill-detail]>:is(p,section){margin-block-start:0}.sw-detail-source{background:color-mix(in oklch, var(--accent-strong) 10%, transparent);height:26px;color:var(--link-foreground);white-space:pre;border-radius:5px;align-items:center;padding-inline:8px;font-weight:500;display:inline-flex}.sw-detail-source [data-slot=skill-source]{color:inherit;font-size:inherit;font-weight:inherit;background:0 0;padding:0}[data-slot=skill-used-by]>p{margin-block-start:16px;line-height:1.6}[data-slot=skill-body]{margin-block-start:0;font-size:13px;line-height:1.65}[data-slot=skill-body] h1,[data-slot=skill-body] h2{font-size:18px;font-weight:600}[data-slot=skill-body] h3{font-size:14px;font-weight:600}[data-slot=wb-metadata]{gap:14px}[data-slot=wb-load]{margin-block-end:-6px}[data-slot=wb-load] label{font-size:11px}[data-slot=wb-name]{padding-inline:14px}[data-slot=wb-actions] button{border-radius:8px;gap:8px;padding-inline:12px}[data-slot=wb-actions] svg{width:16px;height:16px}[data-slot=wb-auto-panel]{border-color:color-mix(in oklch, var(--accent-strong) 35%, var(--border))}[data-slot=wb-auto-cancel]{border:1px solid var(--border);background:var(--card)}[data-slot=wb-palette]{gap:16px;margin-block-start:16px}[data-slot=wb-skill]{padding:0}[data-slot=wb-skill-add]{width:24px}[data-slot=wb-aside] h2{font-size:16px}[data-slot=wb-aside] h3{margin-block-start:16px}[data-slot=wb-step-grip] span{justify-content:center;align-items:center;width:26px;height:26px;padding:0;font-family:inherit;display:inline-flex}[data-slot=wb-step-heading]>div{font-weight:400}[data-slot=wb-main]>p:last-of-type{font-size:11px}[data-slot=wb-import-panel]>div{flex-direction:row-reverse;justify-content:flex-end;gap:12px;margin-block-start:16px}[data-slot=wb-import-run],[data-slot=wb-add-dialog] button[data-variant=primary]{background:var(--accent-strong);color:var(--accent-strong-foreground)}[data-slot=wb-import-cancel]{border:1px solid var(--border)}[data-slot=wb-import-panel]{flex-direction:column;display:flex}[data-slot=wb-import-error]{order:1;margin-block-start:16px;font-size:12px}@media (width<=767px){[data-route=skills],[data-route=workflows]{padding-block-end:32px}[data-route=workflows]>header{flex-direction:column;align-items:flex-start}[data-slot=skills-section]>header a{gap:10px;padding-inline:14px}[data-slot=wb-import-panel]{z-index:50;max-height:calc(100dvh - 57px);position:fixed;inset-block:57px auto;inset-inline:0;overflow-y:auto}}@container (width<=649px){[data-slot=skill-row][aria-current=page]{border-color:var(--border);background:0 0}}[data-route=skills] h1,[data-route=workflows] h1{letter-spacing:-.7px;line-height:1.2}[data-route=skills] header p,[data-route=workflows] header p{color:var(--soft-foreground);line-height:1.6}[data-slot=skill-row]{gap:8px;padding-block:14px}[data-slot=skill-row]:before{display:none}[data-slot=skill-row]:has([data-source=team])>span:first-child>span{font-weight:500;line-height:1.6}[data-slot=skill-row] [data-source=team]{font-weight:400}[data-slot=skill-row][aria-current=page],[data-slot=skill-row][data-highlighted],[data-slot=skills-section]>header a[aria-current=page]{background:var(--task-brand-selected)}[data-slot=skill-detail]>div:first-child{gap:16px}[data-slot=skill-detail]>div:first-child :is(h2,h3),[data-slot=skill-path]{line-height:1.6}[data-slot=skill-body] .thread-markdown{flex-direction:column;gap:16px;display:flex}[data-slot=skill-body] .thread-markdown>*{margin:0}[data-slot=skill-body] .thread-markdown :is(p,ul,ol){color:var(--muted-foreground)}[data-slot=skill-body] .thread-markdown ul{flex-direction:column;gap:16px;padding-inline-start:12px;font-size:12px;display:flex}[data-slot=skill-body] .thread-markdown li{margin:0;padding:0}[data-slot=wb-skill]>span{color:var(--muted-foreground);font-weight:400}@container (width<=649px){[data-slot=skill-row][aria-current=page]{background:0 0}}[data-slot=wb-import-panel]{gap:0}.sw-workflow-confirm{border-radius:12px;padding:24px}.sw-workflow-confirm [data-slot=alert-dialog-title]{font-size:20px;font-weight:400}.sw-workflow-confirm [data-slot=alert-dialog-footer]{justify-content:flex-start}.sw-workflow-confirm button{min-height:44px}@media (width<=767px){[data-slot=dialog-overlay]:has(+[data-slot=wb-import-panel]){background:0 0}[data-slot=wb-import-panel]{width:100%;max-width:100%;inset-block-start:57px;inset-inline-start:0;transform:none}}[data-slot=skills-section]>header a{font-size:13px;font-weight:600}.sw-detail-source,[data-slot=wb-step-grip] span{background:var(--task-brand-selected)}[data-route=workflows] button{border-radius:8px;font-size:12px;font-weight:500}:is([data-slot=wb-import-panel],[data-slot=wb-add-dialog],.sw-workflow-confirm) button{border-radius:8px;font-size:12px;font-weight:400}.sw-workflow-confirm [data-slot=alert-dialog-title]{line-height:1.6}.sw-workflow-confirm [data-slot=alert-dialog-description]{font-size:13px;line-height:1.6}.sw-workflow-confirm [data-slot=alert-dialog-header]{text-align:start;gap:16px}[data-slot=wb-step-actions] svg,[data-slot=wb-skill-add] svg{width:18px;height:18px}[data-slot=wb-save] svg,[data-slot=wb-auto-run] svg{width:16px;height:16px}[data-slot=skill-row] [data-slot=skill-source]{line-height:1.5}:is([data-slot=wb-import-panel],[data-slot=wb-add-dialog],.sw-workflow-confirm){box-shadow:none}[data-slot=wb-import-panel] [data-slot=dialog-title]{line-height:1.6}[data-slot=wb-add-dialog] [data-slot=dialog-header]{text-align:start}[data-slot=skills-section]>header a{padding-inline:11px}[data-slot=skill-body] .thread-markdown :is(h1,h2,h3){line-height:1.5}[data-slot=skill-body] .thread-markdown :is(p,ul,ol){line-height:1.6}[data-slot=skill-body] .thread-markdown ul{padding-inline-start:0;list-style-position:inside}:is([data-slot=skills-filter],[data-route=workflows] :is(input,textarea,select)){border-color:var(--border);border-radius:8px}:is([data-slot=skills-filter],[data-route=workflows] :is(input,textarea)):focus-visible{border-color:var(--ring)}[data-slot=wb-filter]{background:var(--card)}[data-slot=wb-metadata]>label{line-height:1.5}[data-slot=wb-auto-panel]{border-color:var(--composer-border);padding:19px}[data-slot=wb-auto-panel]>h2,[data-slot=wb-auto-panel]>p{line-height:1.6}[data-slot=wb-auto-panel]>div{gap:8px;margin-block-start:16px}[data-slot=wb-auto-text]{border-radius:8px;padding:15px}@media (width<=767px){[data-slot=skills-section]>header a{padding-inline:13px}}[data-slot=skill-body] .thread-markdown :is(h1,h2){font-size:18px}[data-slot=skill-body] .thread-markdown h3{font-size:14px}[data-slot=wb-step-heading] :is([data-slot=wb-step-grip],[data-slot=wb-step-actions]){width:26px;min-width:26px;height:26px;min-height:26px;position:relative}[data-slot=wb-step-heading] :is([data-slot=wb-step-grip],[data-slot=wb-step-actions]):after{content:"";position:absolute;inset:-9px}@media (width<=767px){[data-slot=wb-import-panel]{gap:18px;padding:19px}[data-slot=wb-import-panel]>*{margin:0}[data-slot=wb-import-panel] [data-slot=dialog-title]{line-height:1.5}[data-slot=wb-import-panel]>p{font-size:12px;line-height:1.5}[data-slot=wb-import-text]{border-radius:12px;padding:15px;line-height:1.8}[data-slot=wb-import-panel]>div{margin-block-start:0}[data-slot=wb-import-panel] button{height:50px;min-height:50px;padding-inline:15px}}[data-slot=wb-step-grip] span{border-radius:5px}[data-slot=wb-main],[data-slot=wb-aside]{padding:19px}[data-slot=wb-step]{padding:15px}[data-slot=wb-step-heading]>div{line-height:24px}[data-slot=wb-step-summary],[data-slot=wb-main]>p:first-child,[data-slot=wb-main] footer p,[data-slot=wb-aside]>p{line-height:19px}[data-slot=wb-main]>p:last-of-type{line-height:18px}[data-slot=wb-main] footer{padding-block-start:15px}[data-slot=wb-aside]>p{margin-block-start:16px}[data-slot=wb-aside] h3{line-height:21px}[data-slot=wb-load] label{line-height:16px}[data-slot=wb-new],[data-slot=wb-save],[data-slot=wb-auto-run]{gap:8px;padding-inline:12px}[data-slot=wb-actions] button,[data-slot=wb-main]>button,[data-slot=wb-step]>div:last-child button,[data-slot=wb-auto-cancel],[data-slot=wb-yaml-toggle]{gap:8px;padding-inline:11px}[data-slot=skills-refresh]{padding-inline:11px}[data-slot=skills-section]>header a{gap:10px;height:43px;min-height:43px;padding-inline:13px;position:relative}[data-slot=skills-section]>header a:after{content:"";position:absolute;inset-block:-.5px;inset-inline:0}[data-slot=skill-row]>span:first-child{font-size:13px;line-height:21px}[data-slot=skill-row]:has([data-source=team])>span:first-child>span{line-height:21px}[data-slot=skill-row]>span:nth-child(2){line-height:18px}[data-slot=skill-detail]>div:first-child :is(h2,h3){line-height:30px}[data-slot=skill-used-by]>h3,[data-slot=skill-used-by]>p{line-height:19px}[data-slot=skill-body] .thread-markdown p{line-height:21px}[data-slot=skill-body] .thread-markdown :is(ul,ol){line-height:19px}[data-slot=skill-body] .thread-markdown ul{list-style:none}[data-slot=skill-body] .thread-markdown ul>li:before{content:"• ";white-space:pre}@media (width<=639px){[data-slot=wb-main] footer{gap:14px}}@media (width>=768px){[data-slot=skill-detail]>div:first-child :is(h2,h3){line-height:38px}}[data-slot=wb-auto-panel]>h2{line-height:29px}[data-slot=wb-auto-panel]>p{line-height:21px}[data-slot=wb-auto-panel]>p:last-child{font-size:11px;line-height:18px}[data-slot=wb-auto-text]{line-height:22px}@container (width<=649px){[data-slot=skill-row][aria-current=page]{box-shadow:inset 0 -1px var(--border)}}[data-slot=wb-yaml-toggle] svg{margin-inline-end:0}[data-slot=wb-description]{field-sizing:content;color:var(--muted-foreground);padding:13px;font-size:13px;line-height:21px}
|