@shepai/cli 1.155.0-pr486.e53674d → 1.156.0-pr485.030e6b4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +252 -141
- package/apis/json-schema/Language.yaml +13 -0
- package/apis/json-schema/UserProfile.yaml +3 -0
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +5 -0
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +7 -0
- package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +11 -1
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +3 -0
- package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +5 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +14 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +4 -2
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-language-preference.d.ts +14 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-language-preference.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-language-preference.js +19 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.js +3 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/claude-code.json +3 -4
- package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/_serve.command.js +5 -3
- package/dist/src/presentation/cli/commands/agent/approve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/approve.command.js +9 -4
- package/dist/src/presentation/cli/commands/agent/delete.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/delete.command.js +9 -5
- package/dist/src/presentation/cli/commands/agent/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/index.js +3 -1
- package/dist/src/presentation/cli/commands/agent/logs.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/logs.command.js +7 -5
- package/dist/src/presentation/cli/commands/agent/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/ls.command.js +12 -10
- package/dist/src/presentation/cli/commands/agent/reject.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/reject.command.js +10 -5
- package/dist/src/presentation/cli/commands/agent/resolve-run.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/resolve-run.js +7 -2
- package/dist/src/presentation/cli/commands/agent/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/show.command.js +8 -6
- package/dist/src/presentation/cli/commands/agent/stop.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/agent/stop.command.js +9 -4
- package/dist/src/presentation/cli/commands/daemon/start-daemon.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/daemon/start-daemon.js +10 -8
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.js +5 -3
- package/dist/src/presentation/cli/commands/feat/adopt.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/adopt.command.js +14 -12
- package/dist/src/presentation/cli/commands/feat/approve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/approve.command.js +8 -6
- package/dist/src/presentation/cli/commands/feat/archive.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/archive.command.js +10 -8
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/del.command.js +17 -15
- package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/index.js +2 -1
- package/dist/src/presentation/cli/commands/feat/logs.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/logs.command.js +8 -6
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/ls.command.js +14 -12
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +43 -37
- package/dist/src/presentation/cli/commands/feat/reject.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/reject.command.js +11 -9
- package/dist/src/presentation/cli/commands/feat/resolve-waiting-feature.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/resolve-waiting-feature.js +12 -5
- package/dist/src/presentation/cli/commands/feat/resume.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/resume.command.js +8 -6
- package/dist/src/presentation/cli/commands/feat/review.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/review.command.js +17 -15
- package/dist/src/presentation/cli/commands/feat/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/show.command.js +89 -45
- package/dist/src/presentation/cli/commands/feat/start.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/start.command.js +12 -10
- package/dist/src/presentation/cli/commands/feat/unarchive.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/unarchive.command.js +8 -6
- package/dist/src/presentation/cli/commands/ide-open.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/ide-open.command.js +10 -5
- package/dist/src/presentation/cli/commands/install.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/install.command.js +29 -21
- package/dist/src/presentation/cli/commands/log-viewer.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/log-viewer.js +6 -3
- package/dist/src/presentation/cli/commands/repo/add.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/add.command.js +12 -10
- package/dist/src/presentation/cli/commands/repo/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/index.js +3 -1
- package/dist/src/presentation/cli/commands/repo/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/ls.command.js +11 -9
- package/dist/src/presentation/cli/commands/repo/resolve-repository.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/resolve-repository.js +7 -2
- package/dist/src/presentation/cli/commands/repo/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/show.command.js +21 -10
- package/dist/src/presentation/cli/commands/restart.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/restart.command.js +6 -4
- package/dist/src/presentation/cli/commands/run.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/run.command.js +21 -17
- package/dist/src/presentation/cli/commands/session/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/session/index.js +3 -1
- package/dist/src/presentation/cli/commands/session/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/session/ls.command.js +11 -9
- package/dist/src/presentation/cli/commands/session/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/session/show.command.js +26 -18
- package/dist/src/presentation/cli/commands/settings/agent.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/agent.command.js +12 -8
- package/dist/src/presentation/cli/commands/settings/ide.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/ide.command.js +13 -7
- package/dist/src/presentation/cli/commands/settings/index.d.ts +1 -0
- package/dist/src/presentation/cli/commands/settings/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/index.js +7 -3
- package/dist/src/presentation/cli/commands/settings/init.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/init.command.js +8 -7
- package/dist/src/presentation/cli/commands/settings/language.command.d.ts +14 -0
- package/dist/src/presentation/cli/commands/settings/language.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/settings/language.command.js +79 -0
- package/dist/src/presentation/cli/commands/settings/model.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/model.command.js +7 -6
- package/dist/src/presentation/cli/commands/settings/show.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/show.command.js +4 -3
- package/dist/src/presentation/cli/commands/settings/workflow.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/workflow.command.js +20 -18
- package/dist/src/presentation/cli/commands/start.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/start.command.js +5 -3
- package/dist/src/presentation/cli/commands/status.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/status.command.js +32 -24
- package/dist/src/presentation/cli/commands/stop.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/stop.command.js +4 -2
- package/dist/src/presentation/cli/commands/tools.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/tools.command.js +8 -4
- package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/ui.command.js +12 -10
- package/dist/src/presentation/cli/commands/upgrade.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/upgrade.command.js +18 -13
- package/dist/src/presentation/cli/commands/version.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/version.command.js +5 -3
- package/dist/src/presentation/cli/i18n.d.ts +41 -0
- package/dist/src/presentation/cli/i18n.d.ts.map +1 -0
- package/dist/src/presentation/cli/i18n.js +100 -0
- package/dist/src/presentation/cli/index.js +13 -1
- package/dist/src/presentation/cli/ui/install-messages.d.ts.map +1 -1
- package/dist/src/presentation/cli/ui/install-messages.js +16 -6
- package/dist/src/presentation/tui/i18n.d.ts +24 -0
- package/dist/src/presentation/tui/i18n.d.ts.map +1 -0
- package/dist/src/presentation/tui/i18n.js +48 -0
- package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts +13 -31
- package/dist/src/presentation/tui/prompts/agent-select.prompt.d.ts.map +1 -1
- package/dist/src/presentation/tui/prompts/agent-select.prompt.js +17 -15
- package/dist/src/presentation/tui/prompts/auth-method.prompt.d.ts +7 -11
- package/dist/src/presentation/tui/prompts/auth-method.prompt.d.ts.map +1 -1
- package/dist/src/presentation/tui/prompts/auth-method.prompt.js +7 -5
- package/dist/src/presentation/tui/prompts/ide-select.prompt.d.ts.map +1 -1
- package/dist/src/presentation/tui/prompts/ide-select.prompt.js +2 -1
- package/dist/src/presentation/tui/prompts/prd-review-summary.prompt.d.ts.map +1 -1
- package/dist/src/presentation/tui/prompts/prd-review-summary.prompt.js +8 -6
- package/dist/src/presentation/tui/wizards/agent-config.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/agent-config.wizard.js +2 -1
- package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/github-import.wizard.js +15 -11
- package/dist/src/presentation/tui/wizards/merge-review.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/merge-review.wizard.js +10 -8
- package/dist/src/presentation/tui/wizards/onboarding/onboarding.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/onboarding/onboarding.wizard.js +10 -7
- package/dist/src/presentation/tui/wizards/onboarding/steps/workflow-defaults.step.d.ts +0 -41
- package/dist/src/presentation/tui/wizards/onboarding/steps/workflow-defaults.step.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/onboarding/steps/workflow-defaults.step.js +15 -15
- package/dist/src/presentation/tui/wizards/plan-review.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/plan-review.wizard.js +10 -8
- package/dist/src/presentation/tui/wizards/prd-review.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/prd-review.wizard.js +3 -2
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +4 -2
- package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/create-feature.js +3 -0
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +5 -2
- package/dist/src/presentation/web/components/assistant-ui/thread.d.ts.map +1 -1
- package/dist/src/presentation/web/components/assistant-ui/thread.js +13 -10
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/add-repository-button/add-repository-button.js +3 -1
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +5 -2
- package/dist/src/presentation/web/components/common/ci-status-badge/ci-status-badge.js +3 -3
- package/dist/src/presentation/web/components/common/control-center-drawer/adopt-branch-drawer.js +4 -4
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +7 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +3 -1
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +2 -2
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +6 -2
- package/dist/src/presentation/web/components/common/empty-state/empty-state.stories.js +2 -2
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +34 -22
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +11 -7
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/branch-sync-status.js +3 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +4 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/log-tab.js +5 -3
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +9 -5
- package/dist/src/presentation/web/components/common/feature-list-item/feature-list-item.js +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +22 -22
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +49 -36
- package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.js +7 -3
- package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-badges/feature-status-badges.js +4 -2
- package/dist/src/presentation/web/components/common/feature-status-config.d.ts +2 -1
- package/dist/src/presentation/web/components/common/feature-status-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-status-config.js +6 -6
- package/dist/src/presentation/web/components/common/feature-status-group/feature-status-group.js +1 -1
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/floating-action-button/floating-action-button.js +4 -2
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +1 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.js +2 -2
- package/dist/src/presentation/web/components/common/merge-review/merge-review.js +2 -2
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +3 -3
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/reject-feedback-dialog/reject-feedback-dialog.js +6 -4
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +18 -11
- package/dist/src/presentation/web/components/common/server-log-viewer/server-log-viewer.js +1 -1
- package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/task-progress-view/task-progress-view.js +7 -4
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.js +2 -2
- package/dist/src/presentation/web/components/common/version-badge/version-badge.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/version-badge/version-badge.js +3 -1
- package/dist/src/presentation/web/components/features/chat/ChatComposer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatComposer.js +3 -1
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatMessageBubble.js +7 -5
- package/dist/src/presentation/web/components/features/chat/ChatMessageList.js +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +5 -3
- package/dist/src/presentation/web/components/features/chat/ChatTab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatTab.js +5 -3
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-empty-state.js +15 -11
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +14 -6
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +2 -2
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +8 -6
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/canvas-toolbar.js +3 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/features-canvas/features-canvas.js +4 -2
- package/dist/src/presentation/web/components/features/settings/AgentModelPicker/index.js +2 -2
- package/dist/src/presentation/web/components/features/settings/ModelPicker/index.js +2 -2
- package/dist/src/presentation/web/components/features/settings/agent-settings-section.js +1 -1
- package/dist/src/presentation/web/components/features/settings/language-settings-section.d.ts +5 -0
- package/dist/src/presentation/web/components/features/settings/language-settings-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/language-settings-section.js +54 -0
- package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts +18 -0
- package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/language-settings-section.stories.js +36 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +89 -77
- package/dist/src/presentation/web/components/features/settings/timeout-slider.js +1 -1
- package/dist/src/presentation/web/components/features/skills/category-filter.js +1 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.js +1 -1
- package/dist/src/presentation/web/components/features/tools/tool-card.js +1 -1
- package/dist/src/presentation/web/components/features/tools/tool-detail-drawer.js +2 -2
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-shell/app-shell.js +5 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +13 -7
- package/dist/src/presentation/web/components/providers/i18n-provider.d.ts +17 -0
- package/dist/src/presentation/web/components/providers/i18n-provider.d.ts.map +1 -0
- package/dist/src/presentation/web/components/providers/i18n-provider.js +36 -0
- package/dist/src/presentation/web/components/ui/alert-dialog.js +1 -1
- package/dist/src/presentation/web/components/ui/alert.js +1 -1
- package/dist/src/presentation/web/components/ui/checkbox-group.js +1 -1
- package/dist/src/presentation/web/components/ui/command.js +1 -1
- package/dist/src/presentation/web/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/dialog.js +2 -2
- package/dist/src/presentation/web/components/ui/dialog.stories.js +1 -1
- package/dist/src/presentation/web/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/drawer.js +2 -8
- package/dist/src/presentation/web/components/ui/dropdown-menu.js +6 -6
- package/dist/src/presentation/web/components/ui/scroll-area.js +1 -1
- package/dist/src/presentation/web/components/ui/select.js +1 -1
- package/dist/src/presentation/web/components/ui/sheet.js +3 -3
- package/dist/src/presentation/web/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/ui/sidebar.js +15 -15
- package/dist/src/presentation/web/components/ui/switch.js +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.js +7 -4
- package/dist/src/presentation/web/hooks/use-sound-action.stories.js +1 -1
- package/dist/src/presentation/web/lib/i18n.d.ts +15 -0
- package/dist/src/presentation/web/lib/i18n.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/i18n.js +64 -0
- package/dist/src/presentation/web/lib/language.d.ts +23 -0
- package/dist/src/presentation/web/lib/language.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/language.js +37 -0
- package/dist/src/presentation/web/lib/layout-with-dagre.d.ts +2 -0
- package/dist/src/presentation/web/lib/layout-with-dagre.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/layout-with-dagre.js +4 -0
- package/dist/src/presentation/web/lib/rtl-fonts.d.ts +19 -0
- package/dist/src/presentation/web/lib/rtl-fonts.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/rtl-fonts.js +51 -0
- package/dist/translations/ar/cli.json +613 -0
- package/dist/translations/ar/common.json +55 -0
- package/dist/translations/ar/tui.json +130 -0
- package/dist/translations/ar/web.json +594 -0
- package/dist/translations/de/cli.json +613 -0
- package/dist/translations/de/common.json +55 -0
- package/dist/translations/de/tui.json +109 -0
- package/dist/translations/de/web.json +580 -0
- package/dist/translations/en/cli.json +613 -0
- package/dist/translations/en/common.json +55 -0
- package/dist/translations/en/tui.json +130 -0
- package/dist/translations/en/web.json +594 -0
- package/dist/translations/es/cli.json +613 -0
- package/dist/translations/es/common.json +55 -0
- package/dist/translations/es/tui.json +130 -0
- package/dist/translations/es/web.json +594 -0
- package/dist/translations/fr/cli.json +613 -0
- package/dist/translations/fr/common.json +55 -0
- package/dist/translations/fr/tui.json +130 -0
- package/dist/translations/fr/web.json +594 -0
- package/dist/translations/he/cli.json +613 -0
- package/dist/translations/he/common.json +55 -0
- package/dist/translations/he/tui.json +130 -0
- package/dist/translations/he/web.json +594 -0
- package/dist/translations/pt/cli.json +613 -0
- package/dist/translations/pt/common.json +55 -0
- package/dist/translations/pt/tui.json +130 -0
- package/dist/translations/pt/web.json +594 -0
- package/dist/translations/ru/cli.json +613 -0
- package/dist/translations/ru/common.json +55 -0
- package/dist/translations/ru/tui.json +130 -0
- package/dist/translations/ru/web.json +594 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +6 -6
- package/web/.next/required-server-files.json +6 -6
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/chat/page.js +3 -3
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/create/page.js +3 -3
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/page.js +3 -3
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +3 -3
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/_not-found/page.js +2 -2
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js +2 -2
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/skills/page.js +3 -4
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/tools/page.js +3 -4
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b4102cc7._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__209c9597._.js +4 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__88f7e8e6._.js.map → [root-of-the-server]__209c9597._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__27301e38._.js +4 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__17ed7ed1._.js.map → [root-of-the-server]__27301e38._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5edfc56b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6fecf886._.js +4 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__42bf1807._.js.map → [root-of-the-server]__6fecf886._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8d27866c._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8d27866c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9f3504c7._.js +4 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__f80bfc75._.js.map → [root-of-the-server]__9f3504c7._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd6ed91a._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd6ed91a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dffa13c5._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dffa13c5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0dc06d07._.js +3 -0
- package/web/.next/server/chunks/ssr/_0dc06d07._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_41633e32._.js → _2b858df5._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_41633e32._.js.map → _2b858df5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
- package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_67104d9e._.js → _3bcda5d7._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_67104d9e._.js.map → _3bcda5d7._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_59d0f988._.js → _4e19e8d2._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_59d0f988._.js.map → _4e19e8d2._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_5119a3df._.js +3 -0
- package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6645de45._.js +4 -0
- package/web/.next/server/chunks/ssr/_6645de45._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8b57edb8._.js +1 -1
- package/web/.next/server/chunks/ssr/_8b57edb8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8d733ce4._.js +1 -1
- package/web/.next/server/chunks/ssr/_8d733ce4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
- package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_507a8382._.js → _b9ba2473._.js} +2 -2
- package/web/.next/server/chunks/ssr/_b9ba2473._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_bcaea66b._.js +3 -0
- package/web/.next/server/chunks/ssr/_bcaea66b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_bcfa8457._.js +9 -0
- package/web/.next/server/chunks/ssr/_bcfa8457._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +1 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d90b0a06._.js +3 -0
- package/web/.next/server/chunks/ssr/_d90b0a06._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
- package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +3 -0
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -0
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +45 -45
- package/web/.next/static/chunks/{b4cde06eff374c59.js → 0a79dfbb8486b66e.js} +2 -2
- package/web/.next/static/chunks/{42e9d0c76e624005.js → 0c87b59a0fdd22dd.js} +1 -1
- package/web/.next/static/chunks/11e4b9d959a6efa7.js +2 -0
- package/web/.next/static/chunks/{ea823175bb410162.js → 16d35285b664c30c.js} +1 -1
- package/web/.next/static/chunks/2273b81cd7c7d2af.css +1 -0
- package/web/.next/static/chunks/{902c670cb337840c.js → 24d701de138b762d.js} +1 -1
- package/web/.next/static/chunks/2c5bf14361cf6728.js +1 -0
- package/web/.next/static/chunks/{688971d5bad5dc7c.js → 3deefc76ea55047c.js} +1 -1
- package/web/.next/static/chunks/42e6a21f1d63dc5c.js +1 -0
- package/web/.next/static/chunks/{11091b676d1b3bd4.js → 47477ed4c5871747.js} +1 -1
- package/web/.next/static/chunks/4864ff06a738d58b.js +1 -0
- package/web/.next/static/chunks/{22c459f1877b1e4f.js → 74db65fa7bfb80bd.js} +1 -1
- package/web/.next/static/chunks/9061f08ab7e537a8.js +1 -0
- package/web/.next/static/chunks/919509a19de3205b.js +7 -0
- package/web/.next/static/chunks/9aa752f55e6cfcc9.js +1 -0
- package/web/.next/static/chunks/a72f1d456f0afa8a.js +5 -0
- package/web/.next/static/chunks/ad5b1373e5ba0789.js +1 -0
- package/web/.next/static/chunks/b447e13b2ac5bb65.js +1 -0
- package/web/.next/static/chunks/d2cbeefbc8967b16.js +1 -0
- package/web/.next/static/chunks/d5366257d6b9f855.js +1 -0
- package/web/.next/static/chunks/{5ae60a052ab5f437.js → d6e702c209c413ce.js} +2 -2
- package/web/.next/static/chunks/{6e6cd6218f76e404.js → e63d0d79a334fa97.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +0 -4
- package/web/.next/server/chunks/ssr/_4b432739._.js +0 -3
- package/web/.next/server/chunks/ssr/_4b432739._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_507a8382._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_813095ef._.js +0 -4
- package/web/.next/server/chunks/ssr/_813095ef._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_8219712a._.js +0 -3
- package/web/.next/server/chunks/ssr/_8219712a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js +0 -3
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e9a73a63._.js +0 -9
- package/web/.next/server/chunks/ssr/_e9a73a63._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_324a47da._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_324a47da._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +0 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js.map +0 -1
- package/web/.next/static/chunks/125b250c28113507.js +0 -1
- package/web/.next/static/chunks/2817c3b9d560aaeb.js +0 -1
- package/web/.next/static/chunks/4b2c4a5c35ebb70d.js +0 -1
- package/web/.next/static/chunks/7a1a68bdc20f0428.js +0 -1
- package/web/.next/static/chunks/8590bd2e69b24b9e.css +0 -1
- package/web/.next/static/chunks/8ba1c07ef18b15a9.js +0 -1
- package/web/.next/static/chunks/a676d236e8214de3.js +0 -5
- package/web/.next/static/chunks/a7c1cddd7d406fb8.js +0 -7
- package/web/.next/static/chunks/b3be394b3cc24151.js +0 -1
- package/web/.next/static/chunks/b4080e40597d7f8e.js +0 -1
- package/web/.next/static/chunks/cd54b758f58061d0.js +0 -1
- package/web/.next/static/chunks/da980f1c277bafcb.js +0 -2
- /package/web/.next/static/{_5yY0q7bqEA7bwlEo729P → _3mdwhLrxBePUb5DWqy3q}/_buildManifest.js +0 -0
- /package/web/.next/static/{_5yY0q7bqEA7bwlEo729P → _3mdwhLrxBePUb5DWqy3q}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{_5yY0q7bqEA7bwlEo729P → _3mdwhLrxBePUb5DWqy3q}/_ssgManifest.js +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36986,e=>{"use strict";var t=e.i(20314),s=e.i(79054),a=e.i(31406),r=e.i(60112),n=e.i(83428),l=e.i(67669),i=e.i(24042),o=e.i(6910),d=e.i(33548),c=e.i(23925),u=e.i(8986),m=e.i(30702),x=e.i(37260),p=e.i(83299),h=e.i(21023);let f=(0,h.createServerReference)("601161a74719d928d76566bf643d4a56096659b518",h.callServer,void 0,h.findSourceMapURL,"approveFeature");var g=e.i(23131),j=e.i(61221);let b=(0,h.createServerReference)("70612fda1ecbad50c43668387b9799d53abe2272cf",h.callServer,void 0,h.findSourceMapURL,"rejectFeature"),v=(0,h.createServerReference)("40f3f254b181e9c37c1b4740a464bd38a68e9a2a61",h.callServer,void 0,h.findSourceMapURL,"getFeatureArtifact"),N=(0,h.createServerReference)("40a871593ff44ca5540d93c9950da5ed5b959275de",h.callServer,void 0,h.findSourceMapURL,"getResearchArtifact"),y=(0,h.createServerReference)("401c86e7cfaa9489d38e8aaf3a907e4eacdeed450d",h.callServer,void 0,h.findSourceMapURL,"getMergeReviewData");var w=e.i(75921),k=e.i(8361),C=e.i(30153),S=e.i(8537),M=e.i(39443);e.i(1650);var R=e.i(11495);e.i(99348);var T=e.i(5259),I=e.i(35364),A=e.i(2828);e.i(31566);var P=e.i(65104);e.i(81803);var $=e.i(72714),E=e.i(38573),L=e.i(19933),z=e.i(99105),D=e.i(51251),F=e.i(70646);function q({actions:e,repositoryPath:a,worktreePath:r,showSpecs:l}){let[i,o]=(0,s.useState)(!1),m=e.ideLoading||e.shellLoading||e.folderLoading||e.specsLoading,x=e.ideError??e.shellError??e.folderError??e.specsError;return(0,t.jsxs)(F.DropdownMenu,{modal:!1,children:[(0,t.jsx)(F.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(I.Button,{variant:"outline",size:"sm",className:"gap-1.5",disabled:m,children:[m?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):x?(0,t.jsx)(D.CircleAlert,{className:"text-destructive size-4"}):(0,t.jsx)(L.FolderOpen,{className:"size-4"}),"Open",(0,t.jsx)(z.ChevronDown,{className:"size-3 opacity-60"})]})}),(0,t.jsxs)(F.DropdownMenuContent,{align:"start",className:"w-48",children:[(0,t.jsx)(F.DropdownMenuLabel,{children:"Open in"}),(0,t.jsxs)(F.DropdownMenuItem,{onClick:e.openInIde,disabled:e.ideLoading,className:"gap-2",children:[e.ideLoading?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):e.ideError?(0,t.jsx)(D.CircleAlert,{className:"text-destructive size-4"}):(0,t.jsx)(u.Code2,{className:"size-4"}),"IDE"]}),(0,t.jsxs)(F.DropdownMenuItem,{onClick:e.openInShell,disabled:e.shellLoading,className:"gap-2",children:[e.shellLoading?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):e.shellError?(0,t.jsx)(D.CircleAlert,{className:"text-destructive size-4"}):(0,t.jsx)(E.Terminal,{className:"size-4"}),"Terminal"]}),(0,t.jsxs)(F.DropdownMenuItem,{onClick:e.openFolder,disabled:e.folderLoading,className:"gap-2",children:[e.folderLoading?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):e.folderError?(0,t.jsx)(D.CircleAlert,{className:"text-destructive size-4"}):(0,t.jsx)(L.FolderOpen,{className:"size-4"}),"Folder"]}),(0,t.jsxs)(F.DropdownMenuItem,{onClick:e.openSpecsFolder,disabled:e.specsLoading||!l,className:"gap-2",children:[e.specsLoading?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):e.specsError?(0,t.jsx)(D.CircleAlert,{className:"text-destructive size-4"}):(0,t.jsx)(L.FolderOpen,{className:"size-4"}),"Specs Folder"]}),(0,t.jsx)(F.DropdownMenuSeparator,{}),(0,t.jsxs)(F.DropdownMenuItem,{onClick:()=>{navigator.clipboard.writeText(r??a),o(!0),setTimeout(()=>o(!1),2e3)},className:"gap-2",children:[i?(0,t.jsx)(c.Check,{className:"size-4 text-green-600"}):(0,t.jsx)(d.Copy,{className:"size-4"}),i?"Copied!":"Copy path"]})]})]})}var B=e.i(79687),O=e.i(68304),U=e.i(25235);let W=(0,h.createServerReference)("40232a6b0e778181f4002ab25cb18dcdde8c788915",h.callServer,void 0,h.findSourceMapURL,"getFeaturePhaseTimings"),H=(0,h.createServerReference)("40cef8929b6879de26edfe7808107102e18e1d223e",h.callServer,void 0,h.findSourceMapURL,"getFeaturePlan");var V=e.i(11345),G=e.i(76016),_=e.i(31777),K=e.i(81846),Q=e.i(16868),J=e.i(3645);let Z=(0,J.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var X=e.i(58481),Y=e.i(48306);e.i(50032);var ee=e.i(86254),et=e.i(42076);let es=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]);function ea({onReject:e,onApprove:a,approveLabel:r,approveVariant:n="default",revisionPlaceholder:l,isProcessing:i=!1,isRejecting:o=!1,children:d,chatInput:u,onChatInputChange:m}){let x="warning"===n,p=x?X.AlertTriangle:c.Check,h=x?"bg-orange-500/85":"bg-blue-500/85",[f,g]=(0,s.useState)(""),j=u??f,b=m??g,v=(0,k.useSoundAction)("approve"),N=i||o,[y,w]=(0,s.useState)([]),[C,S]=(0,s.useState)(!1),[M,R]=(0,s.useState)(null),[T,P]=(0,s.useState)(!1),[$,E]=(0,s.useState)(!1),[L,z]=(0,s.useState)(!1),D=j.trim().length>0,F=D?T||$&&L:!T,q=(0,s.useRef)(0),B=(0,s.useRef)(crypto.randomUUID()),O=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(e){("Control"===e.key||"Meta"===e.key)&&E(!0),"Shift"===e.key&&z(!0)}function t(e){("Control"===e.key||"Meta"===e.key)&&E(!1),"Shift"===e.key&&z(!1)}function s(){E(!1),z(!1)}return window.addEventListener("keydown",e),window.addEventListener("keyup",t),window.addEventListener("blur",s),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",t),window.removeEventListener("blur",s)}},[]);let U=(0,s.useCallback)(async e=>{for(let t of(R(null),e)){if(t.size>0xa00000)return void R(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!es.has(e))return void R(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();w(s=>[...s,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let s=new FormData;s.append("file",t),s.append("sessionId",B.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:s});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));w(t=>t.filter(t=>t.id!==e)),R(t.error??"Upload failed");return}let r=await a.json();w(t=>t.some(t=>t.id!==e&&t.path===r.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...r,id:e,loading:!1}:t))}catch{w(t=>t.filter(t=>t.id!==e)),R("Upload failed")}}},[]),W=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),q.current+=1,1===q.current&&S(!0)},[]),H=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),q.current-=1,0===q.current&&S(!1)},[]),G=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),K=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),q.current=0,S(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&U(t)},[U]),J=(0,s.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let s=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&s.push(t)}s.length>0&&(e.preventDefault(),U(s))},[U]),ea=(0,s.useCallback)(async()=>{try{let e=await (0,et.pickFiles)();e&&w(t=>{let s=new Set(t.map(e=>e.path)),a=e.filter(e=>!s.has(e.path)).map(e=>({id:crypto.randomUUID(),name:e.name,size:e.size,mimeType:"application/octet-stream",path:e.path}));return a.length>0?[...t,...a]:t})}catch{}},[]),er=(0,s.useCallback)(e=>{w(t=>t.filter(t=>t.id!==e))},[]),en=(0,s.useCallback)((e,t)=>{w(s=>s.map(s=>s.id===e?{...s,notes:t}:s))},[]),el=(0,s.useCallback)(()=>{b(""),w([]),R(null)},[b]),ei=(0,s.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),O.current?.requestSubmit())},[]),eo="u">typeof navigator&&/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl";return(0,t.jsxs)("div",{className:"border-border shrink-0 border-t",children:[d,e?(0,t.jsx)(A.TooltipProvider,{delayDuration:400,children:(0,t.jsx)("form",{ref:O,onSubmit:function(t){t.preventDefault();let s=j.trim();if(F)v.play(),a(),el();else{if(!s||!e)return;e(s,y.filter(e=>!e.loading)),el()}},className:"p-3",children:(0,t.jsx)("div",{role:"region","aria-label":"File drop zone","data-drag-over":C?"true":"false",onDragEnter:W,onDragLeave:H,onDragOver:G,onDrop:K,className:(0,_.cn)("rounded-md border-2 border-transparent transition-colors",C&&"border-primary/50 bg-primary/5"),children:(0,t.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,t.jsx)(Y.Textarea,{placeholder:l??"Ask AI to revise...","aria-label":l??"Ask AI to revise...",disabled:N,value:j,onChange:e=>b(e.target.value),onKeyDown:ei,onPaste:J,rows:1,className:"max-h-[35dvh] min-h-9 flex-1 resize-none overflow-y-auto rounded-none border-0 py-2 shadow-none focus-visible:ring-0","data-testid":"drawer-chat-input"}),y.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:y.map(e=>(0,t.jsx)(ee.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>er(e.id),disabled:N,loading:e.loading,notes:e.notes,onNotesChange:t=>en(e.id,t)},e.id))}),M?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:M}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-2 border-t px-3 py-1.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex-1 truncate text-[11px]",children:[(0,t.jsxs)("kbd",{className:"bg-muted rounded px-1 py-0.5 font-mono text-[10px]",children:[eo,"+Enter"]})," ",D?"reject":"approve"]}),(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:ea,disabled:N,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(Q.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(A.TooltipContent,{side:"top",children:"Attach files"})]}),(0,t.jsx)("div",{onMouseLeave:()=>P(!1),children:(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"submit",disabled:N,"data-testid":"drawer-action-submit",className:(0,_.cn)("relative flex h-9 min-w-[12rem] cursor-pointer items-center overflow-hidden rounded-md border pr-10 pl-4 text-sm font-medium whitespace-nowrap transition-colors","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",F?`${x?"border-orange-400/60":"border-blue-400/60"} text-white`:D&&$&&!L?"border-primary bg-muted ring-primary/30 shadow-sm ring-1":"border-border bg-muted/50 hover:bg-muted shadow-sm"),children:[(0,t.jsx)("div",{className:(0,_.cn)("pointer-events-none absolute inset-0 transition-transform duration-300 ease-in-out",h),style:{transform:F?"translateX(0)":"translateX(100%)"}}),(0,t.jsxs)("span",{className:(0,_.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 pr-8 transition-opacity duration-300",F?"opacity-0":"opacity-100"),children:[(0,t.jsx)(Z,{className:"h-4 w-4 shrink-0"}),"Reject"]}),(0,t.jsxs)("span",{className:(0,_.cn)("absolute inset-0 z-10 flex items-center justify-center gap-2 text-white transition-opacity duration-300",F?"opacity-100":"opacity-0"),children:[(0,t.jsx)(p,{className:"h-4 w-4 shrink-0"}),r]}),(0,t.jsx)("span",{className:(0,_.cn)(`border-input/60 absolute inset-y-0 right-0 z-20 flex w-8 cursor-pointer items-center justify-center rounded-r-[5px] border-l ${h} transition-opacity duration-300`,!D&&!T&&"pointer-events-none opacity-0"),onMouseEnter:()=>P(!0),children:(0,t.jsx)(V.ChevronLeft,{className:"h-4 w-4 text-white"})})]})}),x?null:(0,t.jsx)(A.TooltipContent,{side:"top",children:F?r:"Send revision feedback"})]})})]})]})})})}):(0,t.jsx)("div",{className:"flex items-center gap-2 px-4 pb-4",children:(0,t.jsx)(I.Button,{type:"button",className:"flex-1",disabled:N,onClick:()=>{v.play(),a()},children:r})})]})}function er({data:e,selections:a,onSelect:r,onApprove:n,onReject:l,isProcessing:i=!1,isRejecting:o=!1,showHeader:d=!1,chatInput:c,onChatInputChange:u}){let{question:m,context:x,questions:p,finalAction:h}=e,[f,g]=(0,s.useState)(0),j=(0,k.useSoundAction)("select"),b=(0,k.useSoundAction)("navigate"),v=p.length,N=f===v-1,y=p[f],w=(0,s.useMemo)(()=>Object.keys(a).length,[a]),C=(0,s.useCallback)((e,t)=>{j.play(),r(e,t),N||setTimeout(()=>g(e=>e+1),250)},[r,N,j]);return 0===v?null:(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[d?(0,t.jsxs)("div",{className:"border-border flex items-start gap-3 border-b pb-3",children:[(0,t.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"text-foreground mb-1.5 text-sm font-bold",children:m}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs leading-relaxed",children:x})]})]}):null,(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsxs)("label",{className:"text-foreground min-w-0 flex-1 text-sm font-semibold",children:[f+1,". ",y.question]}),(0,t.jsx)("div",{className:"mt-1.5 flex shrink-0 gap-1",children:p.map((e,s)=>(0,t.jsx)("button",{type:"button","aria-label":`Go to question ${s+1}`,className:(0,_.cn)("h-1.5 rounded-full transition-all duration-200",s===f?"bg-primary w-4":"w-1.5",s!==f&&a[e.id]?"bg-primary/50":"",s===f||a[e.id]?"":"bg-muted-foreground/25"),onClick:()=>{b.play(),g(s)}},e.id))})]}),(0,t.jsx)("div",{className:"space-y-2",children:y.options.map((e,s)=>{let r=a[y.id]===e.id,n=String.fromCharCode(65+s);return(0,t.jsx)("button",{type:"button",className:(0,_.cn)("border-border w-full overflow-hidden rounded-md border px-3 py-3 text-left text-xs transition-all","hover:border-primary/70 hover:bg-primary/5 group",r&&"border-primary bg-primary/5",e.isNew&&"animate-option-highlight"),disabled:i,onClick:()=>C(y.id,e.id),children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsxs)("span",{className:"text-muted-foreground mt-0.5 font-mono text-xs",children:[n,"."]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-foreground mb-0.5 text-xs font-semibold wrap-break-word",children:e.label}),(0,t.jsx)("div",{className:"text-muted-foreground text-xs leading-snug",children:e.rationale})]}),e.recommended||e.isNew?(0,t.jsx)("div",{className:"shrink-0 pt-0.5",children:e.recommended?(0,t.jsx)(K.Badge,{className:"px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):(0,t.jsx)(K.Badge,{className:"border-transparent bg-emerald-600 px-1.5 py-0 text-[10px] whitespace-nowrap text-white hover:bg-emerald-600/80",children:"New"})}):null]})},e.id)})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)(I.Button,{type:"button",variant:"ghost",size:"sm",disabled:0===f||i,onClick:()=>{b.play(),g(e=>e-1)},children:[(0,t.jsx)(V.ChevronLeft,{className:"mr-1 h-4 w-4"}),"Previous"]}),N?null:(0,t.jsxs)(I.Button,{type:"button",variant:"ghost",size:"sm",disabled:i,onClick:()=>{b.play(),g(e=>e+1)},children:[a[y.id]?"Next":"Skip",(0,t.jsx)(G.ChevronRight,{className:"ml-1 h-4 w-4"})]})]})]}),(0,t.jsx)(ea,{onReject:l,onApprove:()=>n(h.id),approveLabel:h.label,revisionPlaceholder:"Ask AI to refine requirements...",isProcessing:i,isRejecting:o,chatInput:c,onChatInputChange:u,children:(0,t.jsx)("div",{className:(0,_.cn)("bg-muted h-1.5 overflow-hidden",w>0&&w<v||i?"opacity-100":"opacity-0","transition-opacity duration-200"),"data-testid":"progress-bar-container",children:i?(0,t.jsx)("div",{className:"bg-primary animate-indeterminate-progress h-full w-1/3"}):(0,t.jsx)("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${v>0?w/v*100:0}%`},"data-testid":"progress-bar"})})})]})}var en=e.i(427);let el=(0,J.default)("git-compare-arrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]),ei=(0,J.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),eo={p:({children:e})=>(0,t.jsx)("p",{className:"text-muted-foreground mb-2 text-xs leading-relaxed last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"text-foreground font-semibold",children:e}),em:({children:e})=>(0,t.jsx)("em",{className:"italic",children:e}),code:({children:e,className:s})=>s?(0,t.jsx)("code",{className:`${s} text-[11px]`,children:e}):(0,t.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:e}),pre:({children:e})=>(0,t.jsx)("pre",{className:"bg-muted my-2 overflow-x-auto rounded-lg border p-3",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"text-muted-foreground mb-2 list-disc space-y-1 pl-4 text-xs",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"text-muted-foreground mb-2 list-decimal space-y-1 pl-4 text-xs",children:e}),li:({children:e})=>(0,t.jsx)("li",{className:"leading-relaxed",children:e}),a:({children:e,href:s})=>(0,t.jsx)("a",{href:s,className:"text-primary underline underline-offset-2",target:"_blank",rel:"noopener noreferrer",children:e})};function ed({decision:e,index:a}){let[r,n]=(0,s.useState)(!1),l=(0,k.useSoundAction)("expand"),i=(0,k.useSoundAction)("collapse");return(0,t.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,t.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:a+1}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:e.title}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-xs",children:e.chosen})]})]}),"decisionName"in e&&e.decisionName?(0,t.jsx)(K.Badge,{variant:"secondary",className:"bg-primary/10 text-primary shrink-0",children:e.decisionName}):null]}),e.rationale?(0,t.jsx)(en.default,{components:eo,children:e.rationale}):null]}),e.rejected.length>0?(0,t.jsxs)("div",{className:"border-border border-t",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{r?i.play():l.play(),n(e=>!e)},className:"text-muted-foreground hover:bg-muted/50 flex w-full items-center gap-1.5 px-4 py-3 text-xs font-medium transition-colors",children:[(0,t.jsx)(G.ChevronRight,{className:`h-3.5 w-3.5 transition-transform ${r?"rotate-90":""}`}),(0,t.jsx)(ei,{className:"h-3.5 w-3.5"}),"Other Options Considered (",e.rejected.length,")"]}),r?(0,t.jsx)("div",{className:"space-y-1.5 px-4 pb-3",children:e.rejected.map(e=>(0,t.jsx)("div",{className:"bg-primary/5 rounded-md px-3 py-2",children:(0,t.jsx)("span",{className:"text-foreground text-xs",children:e})},e))}):null]}):null]})}function ec({data:e}){let{summary:s,decisions:a}=e;return 0===a.length?null:(0,t.jsxs)("div",{className:"space-y-4 p-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"text-foreground text-sm font-bold",children:"Technical Implementation Plan Review"}),s?(0,t.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:s}):null]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,t.jsx)(el,{className:"text-primary h-4 w-4"}),(0,t.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Technical Decisions"})]}),a.map((e,s)=>(0,t.jsx)(ed,{decision:e,index:s},e.title))]})}var eu=e.i(41698);function em({item:e,index:s}){return(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsx)("div",{className:"space-y-2 px-4 py-3",children:(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("span",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold",children:s+1}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"text-foreground text-sm leading-tight font-semibold",children:e.question}),(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-muted-foreground min-w-0 truncate text-xs",children:e.selectedOption}),e.wasRecommended?(0,t.jsx)(K.Badge,{className:"shrink-0 px-1.5 py-0 text-[10px] whitespace-nowrap",children:"AI Recommended"}):null]})]})]})})})}function ex({data:e}){let{questions:s}=e;return 0===s.length?null:(0,t.jsxs)("div",{className:"space-y-4 p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eu.ClipboardList,{className:"text-primary h-4 w-4"}),(0,t.jsx)("h3",{className:"text-foreground text-sm font-bold",children:"Product Decisions"})]}),s.map((e,s)=>(0,t.jsx)(em,{item:e,index:s},e.question))]})}let ep=(0,J.default)("file-diff",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);var eh=e.i(48923),ef=e.i(49228);let eg=(0,J.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),ej=(0,J.default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);var eb=e.i(70471);let ev=(0,J.default)("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);var eN=e.i(81181),ey=e.i(35e3),ew=e.i(30090),ew=ew,ek=e.i(17406);function eC({status:e}){switch(e){case ek.CiStatus.Success:return(0,t.jsxs)(K.Badge,{className:"border-transparent bg-green-50 text-green-700 hover:bg-green-50",children:[(0,t.jsx)(ey.CheckCircle2,{className:"mr-1 h-3.5 w-3.5"}),"Passing"]});case ek.CiStatus.Pending:return(0,t.jsxs)(K.Badge,{className:"border-transparent bg-yellow-50 text-yellow-700 hover:bg-yellow-50",children:[(0,t.jsx)(n.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Pending"]});case ek.CiStatus.Failure:return(0,t.jsxs)(K.Badge,{className:"border-transparent bg-red-50 text-red-700 hover:bg-red-50",children:[(0,t.jsx)(ew.default,{className:"mr-1 h-3.5 w-3.5"}),"Failing"]})}}let eS=(0,J.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]),eM=(0,J.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]),eR=(0,J.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]),eT={added:{icon:eS,label:"A",className:"text-green-600"},modified:{icon:eR,label:"M",className:"text-amber-600"},deleted:{icon:eM,label:"D",className:"text-red-600"},renamed:{icon:eR,label:"R",className:"text-blue-600"}};function eI({status:e}){let s=eT[e],a=s.icon;return(0,t.jsx)(a,{className:(0,_.cn)("h-3.5 w-3.5 shrink-0",s.className)})}function eA({hunk:e}){return(0,t.jsxs)("div",{className:"border-border border-t first:border-t-0",children:[(0,t.jsx)("div",{className:"bg-muted/50 text-muted-foreground px-3 py-1 font-mono text-[10px]",children:e.header}),(0,t.jsx)("div",{className:"font-mono text-[11px] leading-[18px]",children:e.lines.map(e=>(0,t.jsxs)("div",{className:(0,_.cn)("flex","added"===e.type&&"bg-green-50 dark:bg-green-950/30","removed"===e.type&&"bg-red-50 dark:bg-red-950/30"),children:[(0,t.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-right text-[10px] select-none",children:e.oldNumber??""}),(0,t.jsx)("span",{className:"text-muted-foreground w-10 shrink-0 px-1 text-right text-[10px] select-none",children:e.newNumber??""}),(0,t.jsx)("span",{className:(0,_.cn)("w-4 shrink-0 text-center select-none","added"===e.type&&"text-green-700 dark:text-green-400","removed"===e.type&&"text-red-700 dark:text-red-400"),children:"added"===e.type?"+":"removed"===e.type?"-":" "}),(0,t.jsx)("span",{className:"min-w-0 flex-1 pr-2 break-all whitespace-pre-wrap",children:e.content})]},`${e.type}-${e.oldNumber??""}-${e.newNumber??""}`))})]})}function eP({file:e}){let[a,r]=(0,s.useState)(!1),n=e.path.split("/").pop()??e.path,l=e.path.includes("/")?e.path.slice(0,e.path.lastIndexOf("/")):"";return(0,t.jsxs)("div",{className:"border-border border-b last:border-b-0",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(!a),className:"hover:bg-muted/50 flex w-full items-center gap-2 px-3 py-2 text-left",children:[(0,t.jsx)(G.ChevronRight,{className:(0,_.cn)("text-muted-foreground h-3 w-3 shrink-0 transition-transform duration-150",a&&"rotate-90")}),(0,t.jsx)(eI,{status:e.status}),(0,t.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-xs",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[l,"/"]}),n]}):n}),e.oldPath?(0,t.jsxs)("span",{className:"text-muted-foreground truncate text-[10px]",children:["← ",e.oldPath.split("/").pop()]}):null,(0,t.jsxs)("span",{className:"shrink-0 text-[10px]",children:[e.additions>0?(0,t.jsxs)("span",{className:"text-green-600",children:["+",e.additions]}):null,e.additions>0&&e.deletions>0?" ":null,e.deletions>0?(0,t.jsxs)("span",{className:"text-red-600",children:["-",e.deletions]}):null]})]}),a&&e.hunks.length>0?(0,t.jsx)("div",{className:"border-border overflow-x-auto border-t",children:e.hunks.map(e=>(0,t.jsx)(eA,{hunk:e},e.header))}):null]})}function e$({fileDiffs:e}){return 0===e.length?null:(0,t.jsxs)("div",{className:"border-border rounded-lg border",children:[(0,t.jsx)("div",{className:"px-4 py-3",children:(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)(eb.FileText,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changed Files"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:["(",e.length,")"]})]})}),(0,t.jsx)("div",{className:"border-border border-t",children:e.map(e=>(0,t.jsx)(eP,{file:e},`${e.status}-${e.path}`))})]})}let eE={Screenshot:ej,Video:ev,TestOutput:eb.FileText,TerminalRecording:E.Terminal},eL=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp"]),ez=new Set([".mp4",".webm",".mov"]);function eD({evidence:e}){var a,r;let n,[l,i]=(0,s.useState)(!0),o=eE[e.type]??ej,d=(n=(a=e.relativePath).lastIndexOf("."))>=0?a.slice(n).toLowerCase():"",c=(r=e.relativePath,`/api/evidence?path=${encodeURIComponent(r)}`),u="Screenshot"===e.type||eL.has(d),m="Video"===e.type||ez.has(d),x="TestOutput"===e.type||"TerminalRecording"===e.type;return(0,t.jsxs)("li",{className:"border-border rounded-md border",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(!l),className:"flex w-full cursor-pointer items-center gap-2.5 px-3 py-2.5 text-left",children:[l?(0,t.jsx)(z.ChevronDown,{className:"text-muted-foreground h-3 w-3 shrink-0"}):(0,t.jsx)(G.ChevronRight,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)(o,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"text-foreground text-xs font-medium",children:e.description}),e.taskRef?(0,t.jsxs)("span",{className:"text-muted-foreground ml-1.5 text-[10px]",children:["(",e.taskRef,")"]}):null]}),(0,t.jsx)("a",{href:c,download:!0,onClick:e=>e.stopPropagation(),className:"text-muted-foreground hover:text-foreground shrink-0 rounded p-1 transition-colors","aria-label":"Download",children:(0,t.jsx)(eN.Download,{className:"h-3 w-3"})})]}),l&&c?(0,t.jsx)("div",{className:"border-border border-t px-3 py-2.5",children:u?(0,t.jsx)("img",{src:c,alt:e.description,className:"max-h-80 w-full rounded-md border object-contain",loading:"lazy"}):m?(0,t.jsx)("video",{src:c,controls:!0,className:"max-h-80 w-full rounded-md border",preload:"metadata",children:(0,t.jsx)("track",{kind:"captions"})}):x?(0,t.jsx)(eF,{url:c}):(0,t.jsx)("p",{className:"text-muted-foreground truncate font-mono text-[10px]",children:e.relativePath})}):null,null]})}function eF({url:e}){let[a,r]=(0,s.useState)(null),[n,l]=(0,s.useState)(!1);return n?a?(0,t.jsx)("pre",{className:"bg-muted/50 max-h-60 overflow-auto rounded-md p-3 font-mono text-[11px] leading-relaxed",children:a}):(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"Unable to load preview"}):(fetch(e).then(e=>e.ok?e.text():Promise.reject(Error("Failed"))).then(e=>{let t=e.split("\n");r(t.length>100?`${t.slice(0,100).join("\n")}
|
|
2
|
-
...`:e)}).catch(()=>r(null)).finally(()=>l(!0)),(0,t.jsx)("div",{className:"bg-muted/50 h-16 animate-pulse rounded-md"}))}function eq({evidence:e}){return(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)(ej,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Evidence"}),(0,t.jsx)(K.Badge,{variant:"secondary",className:"text-[10px]",children:e.length})]}),(0,t.jsx)("ul",{className:"space-y-2",children:e.map(e=>(0,t.jsx)(eD,{evidence:e},`${e.type}-${e.relativePath}`))})]})})}function eB({data:e,readOnly:s=!1,onApprove:a,onReject:r,isProcessing:n=!1,isRejecting:l=!1,chatInput:i,onChatInputChange:o}){let{pr:d,diffSummary:c,fileDiffs:u,branch:x,warning:p,evidence:h,hideCiStatus:f}=e,g=d?.mergeable===!1,j=g&&r?()=>r("Resolve merge conflicts",[]):a;return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex-1 space-y-4 overflow-y-auto p-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-emerald-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"text-foreground text-sm font-bold",children:s?"Merge History":"Merge Review"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:s?"This feature was merged. Review the pull request details and evidence below.":d?"Review the pull request details and approve to merge.":"Review the changes and approve to merge."})]})]}),x?(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,t.jsx)(ef.GitBranch,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,t.jsx)(K.Badge,{variant:"secondary",className:"font-mono text-[11px]",children:x.source}),(0,t.jsx)(eg,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)(K.Badge,{variant:"outline",className:"font-mono text-[11px]",children:x.target})]})}):null,d?(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsxs)("div",{className:"space-y-3 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2",children:["PR #",d.number,(0,t.jsx)(m.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,t.jsx)(K.Badge,{variant:"outline",className:"text-xs",children:d.status})]}),!1===d.mergeable?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Merge Status"}),(0,t.jsxs)(K.Badge,{className:"border-transparent bg-orange-50 text-orange-700 hover:bg-orange-50",children:[(0,t.jsx)(X.AlertTriangle,{className:"mr-1 h-3.5 w-3.5"}),"Conflicts"]})]}):null,d.ciStatus&&!0!==f?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"CI Status"}),(0,t.jsx)(eC,{status:d.ciStatus})]}):null,d.commitHash?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Commit"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(eh.GitCommitHorizontal,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:d.commitHash.slice(0,7)})]})]}):null]})}):null,c?(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)(ep,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("span",{className:"text-foreground text-xs font-semibold",children:"Changes"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-foreground text-sm font-bold",children:c.filesChanged}),(0,t.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"files"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"text-sm font-bold text-green-600",children:["+",c.additions]}),(0,t.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"additions"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"text-sm font-bold text-red-600",children:["-",c.deletions]}),(0,t.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"deletions"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-foreground text-sm font-bold",children:c.commitCount}),(0,t.jsx)("div",{className:"text-muted-foreground text-[10px]",children:"commits"})]})]})]})}):p?(0,t.jsx)("div",{className:"border-border rounded-lg border",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",children:[(0,t.jsx)(X.AlertTriangle,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:p})]})}):null,h&&h.length>0?(0,t.jsx)(eq,{evidence:h}):null,u&&u.length>0?(0,t.jsx)(e$,{fileDiffs:u}):null]}),!s&&(0,t.jsx)(ea,{onReject:r,onApprove:j,approveLabel:g?"Resolve Conflicts":"Approve Merge",approveVariant:g?"warning":"default",revisionPlaceholder:"Ask AI to revise before merging...",isProcessing:n,isRejecting:l,chatInput:i,onChatInputChange:o})]})}let eO=(0,J.default)("file-search",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]]);var eU=e.i(38227);let eW=(0,J.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var eH=e.i(60253),eV=e.i(53360),eG=e.i(2287),e_=e.i(28267),eK=e.i(80436);let eQ=(0,J.default)("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),eJ=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function eZ(e){let t=e.lastIndexOf(".");return t>=0&&eJ.has(e.slice(t).toLowerCase())}function eX(e){let t=e.lastIndexOf(".")>=0?e.slice(e.lastIndexOf(".")):"",s=eZ(e)?`image/${t.slice(1).replace("jpg","jpeg")}`:"",a=new URLSearchParams({path:e,...s&&{mimeType:s}});return`/api/attachments/preview?${a.toString()}`}let eY=/(?:^|\s)@(\/[^\s]+)/g;function e0({text:e,attachmentPaths:s}){let a=function(e){let t=[],s=0;for(let a of e.matchAll(eY)){let r=a.index,n=r+(a[0].length-a[0].trimStart().length);n>s&&t.push({type:"text",value:e.slice(s,n)}),t.push({type:"attachment",path:a[1]}),s=r+a[0].length}return s<e.length&&t.push({type:"text",value:e.slice(s)}),t}(e),r=a.some(e=>"attachment"===e.type),n=s?.filter(Boolean)??[];return r||0!==n.length?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[a.map(e=>{if("text"===e.type){let s=e.value.trim();return s?(0,t.jsx)("span",{className:"text-sm leading-relaxed",children:s},`text-${s.slice(0,40)}`):null}return(0,t.jsx)(e1,{path:e.path},`att-${e.path}`)}),n.map(e=>(0,t.jsx)(e1,{path:e},`extra-${e}`))]}):(0,t.jsx)("span",{className:"text-sm leading-relaxed",children:e})}function e1({path:e}){let a=e.split("/").pop()??e,[r,n]=(0,s.useState)(!1);return eZ(e)?r?(0,t.jsxs)("div",{"data-testid":"inline-attachment-image-error",className:"text-muted-foreground flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:[(0,t.jsx)(eQ,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]}):(0,t.jsxs)(eG.Dialog,{children:[(0,t.jsx)(eG.DialogTrigger,{asChild:!0,children:(0,t.jsx)("img",{src:eX(e),alt:a,"data-testid":"inline-attachment-image",onError:()=>n(!0),className:"max-h-48 max-w-full cursor-pointer rounded-md border object-contain transition-opacity hover:opacity-80"})}),(0,t.jsxs)(eG.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,t.jsx)(e_.VisuallyHidden.Root,{children:(0,t.jsxs)(eG.DialogTitle,{children:["Preview: ",a]})}),(0,t.jsx)("div",{className:"relative bg-black/90",children:(0,t.jsx)("img",{src:eX(e),alt:a,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,t.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-col",children:(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a})}),(0,t.jsx)("a",{href:eX(e),download:a,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${a}`,children:(0,t.jsx)(eK.DownloadIcon,{className:"h-4 w-4"})})]})]})]}):(0,t.jsx)("a",{href:eX(e),download:a,"data-testid":"inline-attachment-file",className:"text-primary text-sm underline underline-offset-2",children:a})}let e2=(0,e.i(94237).cva)("inline-block shrink-0",{variants:{size:{sm:"size-5",md:"size-8",lg:"size-12"}},defaultVariants:{size:"md"}}),e5=[{r:9,spline:"0.12 0 0.04 1",opacity:1},{r:8.2,spline:"0.16 0 0.08 1",opacity:.95},{r:7.4,spline:"0.20 0 0.12 1",opacity:.9},{r:6.6,spline:"0.25 0 0.16 1",opacity:.84},{r:5.8,spline:"0.30 0 0.20 1",opacity:.76},{r:5,spline:"0.36 0 0.25 1",opacity:.67},{r:4.2,spline:"0.42 0 0.31 1",opacity:.56},{r:3.4,spline:"0.48 0 0.37 1",opacity:.44},{r:2.6,spline:"0.55 0 0.44 1",opacity:.32},{r:1.8,spline:"0.62 0 0.52 1",opacity:.2},{r:1,spline:"0.70 0 0.60 1",opacity:.1}];function e3({className:e,size:s="md",duration:a=5,...r}){return(0,t.jsxs)("svg",{"data-slot":"comet-spinner",role:"status","aria-label":"Loading",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",className:(0,_.cn)(e2({size:s}),e),...r,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"comet-gooey",x:"-100%",y:"-100%",width:"300%",height:"300%",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"2.5"}),(0,t.jsx)("feColorMatrix",{mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 50 -30",result:"goo"})]})}),(0,t.jsxs)("g",{filter:"url(#comet-gooey)",children:[(0,t.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:`${a}s`,repeatCount:"indefinite"}),e5.map(e=>(0,t.jsxs)("g",{children:[(0,t.jsx)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"spline",values:"0 50 50;360 50 50",keyTimes:"0;1",keySplines:e.spline,dur:"1s",repeatCount:"indefinite"}),(0,t.jsx)("circle",{cx:"50",cy:"18",r:e.r,fill:"currentColor",opacity:e.opacity})]},e.r)),(0,t.jsxs)("circle",{cx:"50",cy:"50",r:"4",fill:"currentColor",opacity:"0.15",children:[(0,t.jsx)("animate",{attributeName:"r",values:"3;5;3",dur:"2s",repeatCount:"indefinite"}),(0,t.jsx)("animate",{attributeName:"opacity",values:"0.1;0.25;0.1",dur:"2s",repeatCount:"indefinite"})]})]})]})}e.i(47506);var e4=e.i(2929),e6=e.i(86782),e8=e.i(29847);function e9(e){if(0===e)return"0s";let t=Math.floor(e/1e3);if(0===t)return"<1s";let s=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return s>0?`${s}h ${a}m`:a>0?`${a}m ${r}s`:`${r}s`}let e7=(0,J.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var te=e.i(59311);function tt({syncStatus:e,syncLoading:s,syncError:a,onRefreshSync:r,onRebaseOnMain:n,rebaseLoading:l,rebaseError:i}){let o=null!=e&&e.behind>0,d=e?.behind===0,c=e?.baseBranch??"main";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.Separator,{}),(0,t.jsxs)("div",{"data-testid":"branch-sync-status",className:"flex flex-col gap-3 p-4",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"BRANCH SYNC"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:s&&!e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e3,{size:"sm",className:"shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-sm",children:"Checking..."})]}):a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(X.AlertTriangle,{className:"h-4 w-4 shrink-0 text-red-500"}),(0,t.jsx)("span",{className:"text-sm text-red-600",children:a})]}):l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e3,{size:"sm",className:"shrink-0"}),(0,t.jsxs)("span",{className:"text-sm",children:["Rebasing on"," ",(0,t.jsx)("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:c}),"..."]})]}):o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(X.AlertTriangle,{className:"h-4 w-4 shrink-0 text-orange-500"}),(0,t.jsxs)("span",{className:"text-sm",children:[e.behind," commit",1===e.behind?"":"s"," behind"," ",(0,t.jsx)("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:c}),e.ahead>0?(0,t.jsxs)("span",{className:"text-muted-foreground ml-1",children:["· ",e.ahead," ahead"]}):null]})]}):d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.CheckCircle2,{className:"h-4 w-4 shrink-0 text-green-500"}),(0,t.jsxs)("span",{className:"text-sm",children:["Up to date with"," ",(0,t.jsx)("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:c}),e.ahead>0?(0,t.jsxs)("span",{className:"text-muted-foreground ml-1",children:["· ",e.ahead," ahead"]}):null]})]}):null}),(e||a)&&!l?(0,t.jsx)("button",{"data-testid":"sync-refresh-button",onClick:r,disabled:s,className:"text-muted-foreground hover:text-foreground inline-flex items-center rounded p-1 transition-colors disabled:opacity-50","aria-label":"Refresh sync status",children:(0,t.jsx)(te.RefreshCw,{className:`h-3.5 w-3.5 ${s?"animate-spin":""}`})}):null]}),o&&!l?(0,t.jsx)($.ActionButton,{label:"Rebase on Main",onClick:n,loading:!1,error:!!i,icon:e7,variant:"outline",size:"sm"}):null,i?(0,t.jsx)("p",{className:"text-destructive text-xs",children:i}):null]})]})}function ts({data:e,syncStatus:s,syncLoading:a,syncError:r,onRefreshSync:n,onRebaseOnMain:l,rebaseLoading:i,rebaseError:d}){let c="maintain"===e.lifecycle;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"data-testid":"feature-drawer-status",className:"flex flex-col gap-3 p-4",children:[(0,t.jsx)("div",{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:e4.lifecycleDisplayLabels[e.lifecycle]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ta,{data:e}),"error"===e.state&&e.onRetry?(0,t.jsxs)("button",{"data-testid":"feature-drawer-retry-button",onClick:()=>e.onRetry(e.featureId),className:"flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100",children:[(0,t.jsx)(eU.RotateCcw,{className:"h-3.5 w-3.5"}),"Retry"]}):null,("running"===e.state||"action-required"===e.state)&&e.onStop?(0,t.jsxs)("button",{"data-testid":"feature-drawer-stop-button",onClick:()=>e.onStop(e.featureId),className:"flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100",children:[(0,t.jsx)(o.Square,{className:"h-3.5 w-3.5"}),"Stop"]}):null]}),!c&&e.progress>0?(0,t.jsxs)("div",{"data-testid":"feature-drawer-progress",className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center justify-between text-xs",children:[(0,t.jsx)("span",{children:"Progress"}),(0,t.jsxs)("span",{children:[e.progress,"%"]})]}),(0,t.jsx)("div",{className:"bg-muted h-2 w-full overflow-hidden rounded-full",children:(0,t.jsx)("div",{className:(0,_.cn)("h-full rounded-full transition-all",e4.featureNodeStateConfig[e.state].progressClass),style:{width:`${e.progress}%`}})})]}):null,c&&e.pr?(0,t.jsx)(tl,{pr:e.pr,hideCiStatus:e.hideCiStatus}):null]}),(0,t.jsx)(tr,{data:e}),!c&&e.pr?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.Separator,{}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsx)(tl,{pr:e.pr,hideCiStatus:e.hideCiStatus})})]}):null,(0,t.jsx)(ti,{data:e}),l&&e.branch&&n?(0,t.jsx)(tt,{syncStatus:s??null,syncLoading:a??!1,syncError:r??null,onRefreshSync:n,onRebaseOnMain:l,rebaseLoading:i??!1,rebaseError:d??null}):null,(0,t.jsx)(tc,{data:e})]})}function ta({data:e}){let s=e4.featureNodeStateConfig[e.state],a=s.icon;return(0,t.jsxs)("div",{className:(0,_.cn)("flex items-center gap-2 rounded-full px-3 py-1.5 text-sm font-medium",s.badgeBgClass,s.badgeClass),children:["running"===e.state?(0,t.jsx)(e3,{size:"sm",className:"shrink-0"}):(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:s.label})]})}function tr({data:e}){var s;let a,r,n,l,i,o=!!e.summary&&!(e.userQuery&&e.summary?.trim()===e.userQuery.trim());return e.branch||e.oneLiner||o||e.userQuery||e.createdAt?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.Separator,{}),(0,t.jsxs)("div",{"data-testid":"feature-drawer-info",className:"flex flex-col gap-3 p-4",children:[e.branch?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Branch"}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-sm",children:[(0,t.jsx)(ef.GitBranch,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:e.branch}),e.baseBranch?(0,t.jsxs)("span",{className:"text-muted-foreground text-xs",children:["from ",e.baseBranch]}):null]})]}):null,e.oneLiner?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"One-Liner"}),(0,t.jsx)("span",{className:"text-sm leading-relaxed",children:e.oneLiner})]}):null,e.userQuery?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"User Query"}),(0,t.jsx)(e0,{text:e.userQuery})]}):null,o?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Summary"}),(0,t.jsx)("span",{className:"text-sm leading-relaxed",children:e.summary})]}):null,e.createdAt?(0,t.jsx)(tu,{label:"Created",value:(s=e.createdAt,a=Date.now(),(i=Math.floor((l=Math.floor((n=Math.floor(Math.floor((a-(r="string"==typeof s?new Date(s).getTime():s))/1e3)/60))/60))/24))>30?new Date(r).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):i>0?`${i} day${1===i?"":"s"} ago`:l>0?`${l} hour${1===l?"":"s"} ago`:n>0?`${n} minute${1===n?"":"s"} ago`:"just now")}):null]})]}):null}let tn={[ek.PrStatus.Open]:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",[ek.PrStatus.Merged]:"border-transparent bg-purple-50 text-purple-700 hover:bg-purple-50",[ek.PrStatus.Closed]:"border-transparent bg-red-50 text-red-700 hover:bg-red-50"};function tl({pr:e,hideCiStatus:s}){return(0,t.jsx)("div",{"data-testid":"feature-drawer-pr",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2",children:["PR #",e.number,(0,t.jsx)(m.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,t.jsx)(K.Badge,{className:tn[e.status],children:e.status})]}),e.ciStatus&&!0!==s?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"CI Status"}),(0,t.jsx)(eC,{status:e.ciStatus})]}):null,!1===e.mergeable?(0,t.jsxs)("div",{"data-testid":"pr-merge-conflict",className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Merge Status"}),(0,t.jsxs)(K.Badge,{className:"border-transparent bg-orange-50 text-orange-700 hover:bg-orange-50",children:[(0,t.jsx)(X.AlertTriangle,{className:"mr-1 h-3.5 w-3.5"}),"Conflicts"]})]}):null,e.commitHash?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Commit"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(eh.GitCommitHorizontal,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("code",{className:"bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]",children:e.commitHash.slice(0,7)})]})]}):null]})})}function ti({data:e}){let a=function(e){let[t,a]=(0,s.useState)(null),r=(0,s.useRef)(null);return(0,s.useEffect)(()=>e?(a(e9(Math.max(0,Date.now()-e))),r.current=setInterval(()=>{a(e9(Math.max(0,Date.now()-e)))},1e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}):void a(null),[e]),t}("running"===e.state||"action-required"===e.state?e.startedAt:void 0);return e.fastMode??e.agentType??e.runtime??a??e.blockedBy??e.errorMessage?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.Separator,{}),(0,t.jsxs)("div",{"data-testid":"feature-drawer-details",className:"flex flex-col gap-3 p-4",children:[e.fastMode?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Mode"}),(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(eV.Zap,{className:"h-4 w-4 shrink-0 text-amber-500"}),"Fast Mode"]})]}):null,e.agentType?(0,t.jsx)(to,{agentType:e.agentType}):null,e.runtime?(0,t.jsx)(tu,{label:"Runtime",value:e.runtime}):null,!e.runtime&&a?(0,t.jsx)(tu,{label:"Running for",value:a}):null,e.blockedBy?(0,t.jsx)(tu,{label:"Blocked by",value:e.blockedBy}):null,e.errorMessage?(0,t.jsx)(tu,{label:"Error",value:e.errorMessage}):null]})]}):null}function to({agentType:e}){let s=(0,e6.getAgentTypeIcon)(e),a=e6.agentTypeLabels[e]??e;return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Agent"}),(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(s,{className:"h-4 w-4 shrink-0"}),a]})]})}function td({enabled:e,label:s}){return(0,t.jsxs)("span",{className:(0,_.cn)("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",e?"bg-emerald-50 text-emerald-700":"bg-muted text-muted-foreground"),children:[e?(0,t.jsx)(c.Check,{className:"h-3 w-3"}):(0,t.jsx)(eH.X,{className:"h-3 w-3"}),s]})}function tc({data:e}){return null!=e.approvalGates||null!=e.push||null!=e.openPr||null!=e.ciWatchEnabled||null!=e.enableEvidence||null!=e.forkAndPr||null!=e.commitSpecs||e.modelId?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.Separator,{}),(0,t.jsxs)("div",{"data-testid":"feature-drawer-settings",className:"flex flex-col gap-3 p-4",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"SETTINGS"}),e.modelId?(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Model"}),(0,t.jsx)("span",{className:"text-sm",children:(0,e8.getModelMeta)(e.modelId).displayName||e.modelId})]}):null,e.approvalGates?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(eW,{className:"h-3 w-3"}),"Auto-Approve"]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,t.jsx)(td,{enabled:e.approvalGates.allowPrd,label:"PRD"}),(0,t.jsx)(td,{enabled:e.approvalGates.allowPlan,label:"Plan"}),(0,t.jsx)(td,{enabled:e.approvalGates.allowMerge,label:"Merge"})]})]}):null,null!=e.enableEvidence?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(eO,{className:"h-3 w-3"}),"Evidence"]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,t.jsx)(td,{enabled:e.enableEvidence,label:"Collect"}),null!=e.commitEvidence?(0,t.jsx)(td,{enabled:e.commitEvidence,label:"Add to PR"}):null]})]}):null,null!=e.push||null!=e.openPr||null!=e.ciWatchEnabled||null!=e.commitSpecs||null!=e.forkAndPr?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(ef.GitBranch,{className:"h-3 w-3"}),"Git"]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[null!=e.push?(0,t.jsx)(td,{enabled:e.push,label:"Push"}):null,null!=e.openPr?(0,t.jsx)(td,{enabled:e.openPr,label:"PR"}):null,null!=e.ciWatchEnabled?(0,t.jsx)(td,{enabled:e.ciWatchEnabled,label:"Watch"}):null,null!=e.commitSpecs?(0,t.jsx)(td,{enabled:e.commitSpecs,label:"Commit Specs"}):null,null!=e.forkAndPr?(0,t.jsx)(td,{enabled:e.forkAndPr,label:"Fork & PR"}):null]})]}):null]})]}):null}function tu({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:e}),(0,t.jsx)("span",{className:"text-sm",children:s})]})}var tm=e.i(55016);let tx=(0,J.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var ew=ew,tp=e.i(94819),th=e.i(48109),tf=e.i(58860);let tg=(0,J.default)("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"}]]),tj=(0,J.default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);function tb(e,t){if(null!=e.durationMs&&e.durationMs>0)return e.durationMs;if(!e.completedAt&&e.startedAt){let s=new Date(e.startedAt).getTime();if(!Number.isNaN(s))return Math.max(0,t-s)}return 0}function tv(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function tN(e){let t=e instanceof Date?e:new Date(String(e));return Number.isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function ty(e){return e>=1?`$${e.toFixed(2)}`:e>=.01?`$${e.toFixed(3)}`:`$${e.toFixed(4)}`}let tw={analyze:"Analyzing",requirements:"Requirements",research:"Researching",plan:"Planning",implement:"Implementing",rebase:"Rebasing","fast-implement":"Fast Implement",evidence:"Evidence",validate:"Validating",repair:"Repairing",merge:"Merging"},tk={"run:started":{label:"started",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:i.Play},"run:resumed":{label:"resumed",colorClass:"text-blue-600",bgClass:"bg-blue-50 dark:bg-blue-950/30",icon:eU.RotateCcw},"run:completed":{label:"completed",colorClass:"text-emerald-600",bgClass:"bg-emerald-50 dark:bg-emerald-950/30",icon:ey.CheckCircle2},"run:failed":{label:"failed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:ew.default},"run:stopped":{label:"stopped",colorClass:"text-amber-600",bgClass:"bg-amber-50 dark:bg-amber-950/30",icon:o.Square},"run:crashed":{label:"crashed",colorClass:"text-red-600",bgClass:"bg-red-50 dark:bg-red-950/30",icon:ew.default},"run:rejected":{label:"rejected",colorClass:"text-orange-600",bgClass:"bg-orange-50 dark:bg-orange-950/30",icon:tp.Ban}};function tC(e){return e.startsWith("run:")}function tS({timings:e,loading:a,error:r,rejectionFeedback:l}){let i=function(e){let[t,a]=(0,s.useState)(Date.now),r=(0,s.useRef)(null);return(0,s.useEffect)(()=>(e&&e.some(e=>!e.phase.startsWith("run:")&&!e.completedAt&&e.startedAt)&&(r.current=setInterval(()=>a(Date.now()),1e3)),()=>{r.current&&(clearInterval(r.current),r.current=null)}),[e]),t}(e);if(a)return(0,t.jsx)("div",{"data-testid":"activity-tab-loading",className:"flex items-center justify-center p-8",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})});if(r)return(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 text-base text-red-600",children:[(0,t.jsx)(B.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:r})]});if(!e||0===e.length)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,t.jsx)(tm.Clock,{className:"text-muted-foreground h-8 w-8"}),(0,t.jsx)("p",{className:"text-muted-foreground text-base",children:"No activity recorded yet"})]});let o=e.filter(e=>!tC(e.phase)),d=Math.max(...o.map(e=>tb(e,i)),...o.map(e=>e.approvalWaitMs??0),0),c=function(e,t){if(!e.length)return[];let s=e.filter(e=>"run:rejected"===e.phase).length,a=t?.length??0,r=e;if(a>s){r=[...e];let n=e[e.length-1].agentRunId;for(let e=s;e<a;e++){let a=t[e];e>s&&r.push({agentRunId:n,phase:"run:resumed",startedAt:a.timestamp??`synthetic-resumed-${e}`}),r.push({agentRunId:n,phase:"run:rejected",startedAt:a.timestamp??`synthetic-${e}`})}}let n=[],l=[],i=0;for(let e of r)if(l.push(e),"run:rejected"===e.phase){let e=t?.[i];n.push({number:n.length+1,timings:l,rejectionMessage:e?.message,rejectionAttachments:e?.attachments}),l=[],i++}return l.length>0&&n.push({number:n.length+1,timings:l}),n}(e,l),u=c.length>1,m=o.reduce((e,t)=>e+tb(t,i),0),x=o.reduce((e,t)=>e+(t.approvalWaitMs??0),0),p=o.reduce((e,t)=>e+(t.inputTokens??0),0),h=o.reduce((e,t)=>e+(t.outputTokens??0),0),f=o.reduce((e,t)=>e+(t.costUsd??0),0);return(0,t.jsxs)("div",{className:"flex flex-col gap-3 p-4",children:[(0,t.jsx)("div",{"data-testid":"activity-timings",className:"flex flex-col gap-3",children:c.map(e=>(0,t.jsx)(tM,{iteration:e,showHeader:u,maxDurationMs:d,now:i},e.number))}),m>0?(0,t.jsx)(tA,{totalExecMs:m,totalWaitMs:x,totalInputTokens:p,totalOutputTokens:h,totalCostUsd:f}):null]})}function tM({iteration:e,showHeader:s,maxDurationMs:a,now:r}){let n=function(e){let t=[...e.timings].reverse().find(e=>tC(e.phase));if(!t)return null;switch(t.phase){case"run:rejected":return{label:"Rejected",colorClass:"text-orange-600",dotClass:"bg-orange-500"};case"run:completed":return{label:"Completed",colorClass:"text-emerald-600",dotClass:"bg-emerald-500"};case"run:failed":return{label:"Failed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:crashed":return{label:"Crashed",colorClass:"text-red-600",dotClass:"bg-red-500"};case"run:stopped":return{label:"Stopped",colorClass:"text-amber-600",dotClass:"bg-amber-500"};default:return null}}(e);return(0,t.jsxs)("div",{"data-testid":`iteration-${e.number}`,className:"border-border/50 bg-card/50 flex flex-col overflow-hidden rounded-lg border",children:[s?(0,t.jsxs)("div",{className:"bg-muted/30 border-border/50 flex items-center justify-between border-b px-3 py-1.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground text-sm font-semibold tracking-wide",children:["Iteration ",e.number]}),n?(0,t.jsxs)("span",{className:`flex items-center gap-1 text-xs font-medium ${n.colorClass}`,children:[(0,t.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${n.dotClass}`}),n.label]}):null]}):null,(0,t.jsxs)("div",{className:"relative flex flex-col",children:[(0,t.jsx)("div",{className:"bg-border/60 absolute top-4 bottom-4 left-[21.5px] w-px"}),e.timings.map((s,n)=>{if(tC(s.phase)){let a,r="run:rejected"===s.phase,l="run:failed"===s.phase||"run:crashed"===s.phase||"run:stopped"===s.phase;if(r)a=e.rejectionMessage;else if(l){let t=[...e.timings].reverse().find(e=>!tC(e.phase)&&e.errorMessage);a=t?.errorMessage??s.errorMessage}return(0,t.jsx)(tR,{timing:s,message:a,attachments:r?e.rejectionAttachments:void 0,isFirst:0===n,isLast:n===e.timings.length-1},`${s.agentRunId}-${s.phase}-${s.startedAt}`)}return(0,t.jsx)(tT,{timing:s,maxDurationMs:a,now:r},`${s.agentRunId}-${s.phase}-${s.startedAt}`)})]})]})}function tR({timing:e,message:s,attachments:a,isFirst:r,isLast:n}){let l,i=tk[e.phase];if(!i)return null;let o=a&&a.length>0,d=i.icon;return(0,t.jsxs)("div",{className:`relative flex flex-col gap-1 px-3 ${r?"pt-2":"pt-1"} ${n?"pb-2":"pb-1"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`relative z-10 flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${i.bgClass}`,children:(0,t.jsx)(d,{className:`h-3 w-3 ${i.colorClass}`})}),(0,t.jsx)("span",{className:`text-sm font-medium ${i.colorClass}`,children:i.label}),e.startedAt&&!("string"==typeof e.startedAt&&e.startedAt.startsWith("synthetic"))?(0,t.jsx)("span",{className:"text-muted-foreground/60 ml-auto text-xs tabular-nums",children:tN(String(e.startedAt))}):null]}),s?(l="run:failed"===e.phase||"run:crashed"===e.phase||"run:stopped"===e.phase,(0,t.jsxs)("div",{className:`ml-[26px] flex items-start gap-1.5 rounded-md px-2 py-1.5 ${l?"bg-red-50/50 dark:bg-red-950/20":"bg-orange-50/50 dark:bg-orange-950/20"}`,children:[l?(0,t.jsx)(B.AlertCircle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-red-400"}):(0,t.jsx)(th.MessageSquare,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-orange-400"}),(0,t.jsxs)("span",{"data-testid":l?"error-message-text":"rejection-feedback-text",className:"text-muted-foreground text-xs leading-relaxed italic",children:["— ",s]})]})):null,o?(0,t.jsx)("div",{"data-testid":"rejection-feedback-attachments",className:"ml-[26px]",children:(0,t.jsx)(e0,{text:"",attachmentPaths:a})}):null]})}function tT({timing:e,maxDurationMs:a,now:r}){let n=e.phase.includes(":")?e.phase.split(":")[0]:e.phase,l=e.phase.includes(":")?e.phase.split(":")[1]:null,i=null!==l,o=l?.startsWith("phase-")??!1,u=tw[n]??n,m=o?`Phase ${l.replace("phase-","")}`:null!==l?`${u} #${l}`:u,x=tb(e,r),p=!e.completedAt&&!!e.startedAt,h=p?15:2,f=a>0?Math.max(h,x/a*100):h,g=e.completedAt?o?"bg-emerald-400":i?"bg-amber-500":"bg-emerald-500":"bg-blue-500",j=null!=e.inputTokens||null!=e.outputTokens?(e.inputTokens??0)+(e.outputTokens??0):null,[b,v]=(0,s.useState)(!1),N=(0,s.useCallback)(()=>{e.prompt&&navigator.clipboard.writeText(e.prompt).then(()=>{v(!0),setTimeout(()=>v(!1),1500)})},[e.prompt]);return(0,t.jsxs)("div",{className:`group/phase relative flex flex-col gap-0.5 px-3 py-1.5 ${i?"ml-4":""}`,children:[(0,t.jsxs)("div",{"data-testid":`timing-bar-${e.phase}`,className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"relative z-10 flex h-5 w-5 shrink-0 items-center justify-center",children:(0,t.jsx)("div",{className:`rounded-full ${p?"h-3 w-3 animate-pulse":"h-2.5 w-2.5"} ${p?"bg-blue-500":e.completedAt?"bg-emerald-500":"bg-muted-foreground/30"}`})}),(0,t.jsx)("span",{className:`w-28 shrink-0 truncate text-sm font-medium ${i?"text-muted-foreground":"text-foreground/80"}`,children:m}),e.prompt?(0,t.jsx)("button",{type:"button",onClick:N,className:"text-muted-foreground/50 hover:text-foreground/70 -ml-1 shrink-0 opacity-0 transition-opacity group-hover/phase:opacity-100",title:"Copy prompt to clipboard",children:b?(0,t.jsx)(c.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(d.Copy,{className:"h-3.5 w-3.5"})}):null,(0,t.jsx)("div",{className:`bg-muted relative min-w-0 flex-1 overflow-hidden rounded-full ${i?"h-1.5":"h-2"}`,children:p?(0,t.jsx)("div",{className:"absolute inset-0 rounded-full bg-blue-500/30",style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgb(59 130 246) 50%, transparent 100%)",backgroundSize:"200% 100%",animation:"shimmer 1.5s ease-in-out infinite"}}):(0,t.jsx)("div",{className:`h-full rounded-full transition-all duration-300 ${g}`,style:{width:`${Math.min(f,100)}%`}})}),(0,t.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-right text-sm font-medium tabular-nums",children:e9(x)})]}),(0,t.jsxs)("div",{className:"ml-[28px] flex items-center gap-3 text-xs",children:[e.startedAt?(0,t.jsx)("span",{className:"text-muted-foreground/60 tabular-nums",children:tN(e.startedAt)}):null,null!=j&&j>0?(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,t.jsx)(eV.Zap,{className:"h-3 w-3 opacity-50"}),tv(j)]}):null,null!=e.costUsd&&e.costUsd>0?(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5",children:[(0,t.jsx)(tx,{className:"h-3 w-3 opacity-50"}),ty(e.costUsd)]}):null]}),null!=e.approvalWaitMs&&e.approvalWaitMs>0?(0,t.jsx)(tI,{timing:e,maxDurationMs:a}):null]})}function tI({timing:e,maxDurationMs:s}){let a=e.approvalWaitMs??0,r=s>0?Math.max(2,a/s*100):2;return(0,t.jsxs)("div",{"data-testid":`approval-wait-${e.phase}`,className:"ml-[26px] flex items-center gap-2 rounded-md bg-amber-50/50 px-1.5 py-1 dark:bg-amber-950/20",children:[(0,t.jsx)(tf.Timer,{className:"h-3.5 w-3.5 shrink-0 text-amber-500"}),(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs",children:"approval"}),(0,t.jsx)("div",{className:"bg-muted h-1.5 min-w-0 flex-1 overflow-hidden rounded-full",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-amber-500",style:{width:`${Math.min(r,100)}%`}})}),(0,t.jsx)("span",{className:"text-muted-foreground w-14 shrink-0 text-right text-xs tabular-nums",children:e9(a)})]})}function tA({totalExecMs:e,totalWaitMs:s,totalInputTokens:a,totalOutputTokens:r,totalCostUsd:n}){let l=a+r;return(0,t.jsxs)("div",{"data-testid":"activity-summary",className:"border-border bg-card/30 flex flex-col gap-2 rounded-lg border p-3",children:[(0,t.jsx)("div",{className:"text-muted-foreground mb-1 text-xs font-semibold tracking-wider uppercase",children:"Summary"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-4 gap-y-3",children:[(0,t.jsx)(tP,{icon:tm.Clock,label:"Execution",value:e9(e)}),(0,t.jsx)(tP,{icon:tf.Timer,label:"Wait",value:s>0?e9(s):"n/a"}),(0,t.jsx)(tP,{icon:tm.Clock,label:"Wall-clock",value:s>0?e9(e+s):e9(e)}),(0,t.jsx)(tP,{icon:tx,label:"Cost",value:n>0?ty(n):"n/a"}),(0,t.jsxs)("div",{className:"col-span-2 flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,t.jsx)(eV.Zap,{className:"h-3 w-3 opacity-40"}),"Tokens"]}),l>0?(0,t.jsxs)("span",{className:"flex items-center gap-2.5 text-sm tabular-nums",children:[(0,t.jsx)("span",{children:tv(l)}),(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-3 text-xs",title:"Input tokens / Output tokens",children:[(0,t.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(tg,{className:"h-3 w-3 text-blue-500 opacity-60"}),tv(a)]}),(0,t.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(tj,{className:"h-3 w-3 text-emerald-500 opacity-60"}),tv(r)]})]})]}):(0,t.jsx)("span",{className:"text-muted-foreground/40 text-sm italic tabular-nums",children:"n/a"})]})]})]})}function tP({icon:e,label:s,value:a,className:r=""}){let n="n/a"===a;return(0,t.jsxs)("div",{className:`flex flex-col gap-0.5 ${r}`,children:[(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[(0,t.jsx)(e,{className:"h-3 w-3 opacity-40"}),s]}),(0,t.jsx)("span",{className:`text-sm tabular-nums ${n?"text-muted-foreground/40 italic":""}`,children:a})]})}var t$=e.i(7311),tE=e.i(44229);let tL=(0,J.default)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]),tz=(0,J.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),tD=(0,J.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),tF=/^\[(\d{4}-\d{2}-\d{2}T[\d:.]+Z?)\]\s+(?:\[([^\]]+)\]\s+)?(?:\[([^\]|]+)(?:\|([^\]]+))?\]\s+)?(.*)$/,tq=/^\[(tool-result|tool|text|delta|result|tokens|cmd|file|turn|thread|error|event|raw|WORKER)\]\s*(.*)/;function tB(e){let t=e.match(tF);if(!t)return{timestamp:null,phase:null,agent:null,model:null,tag:"raw",message:e,raw:e};let[,s,a,r,n,l]=t,i=null,o=null,d=null,c=l??"";if(null!=r&&null!=a)if(a.includes("|")){let[e,t]=a.split("|");o=e,d=t??null,c=`[${r}] ${l??""}`}else i=a,o=r,d=n??null;else if(null!=a)if(a.includes("|")){let[e,t]=a.split("|");o=e,d=t??null}else i=a;let u=c.match(tq),m="info";return u&&(m=u[1].toLowerCase(),c=u[2]),{timestamp:s??null,phase:i,agent:o,model:d,tag:m,message:c.trim(),raw:e}}function tO({content:e}){let a=(0,s.useMemo)(()=>e?e.split("\n").filter(e=>e.trim().length>0).map(tB):[],[e]);return 0===a.length?null:(0,t.jsx)("div",{className:"flex flex-col",children:a.map((e,s)=>(0,t.jsx)(tU,{line:e},s))})}function tU({line:e}){switch(e.tag){case"tool":return(0,t.jsx)(tV,{line:e});case"tool-result":return(0,t.jsx)(tZ,{line:e});case"text":case"delta":return(0,t.jsx)(t_,{line:e});case"result":return(0,t.jsx)(tK,{line:e});case"tokens":case"turn":return(0,t.jsx)(tQ,{line:e});case"cmd":return(0,t.jsx)(tX,{line:e});case"file":return(0,t.jsx)(tY,{line:e});case"thread":case"event":case"info":return(0,t.jsx)(t1,{line:e});case"error":return(0,t.jsx)(t0,{line:e});case"worker":return(0,t.jsx)(tJ,{line:e});default:return(0,t.jsx)(t2,{line:e})}}function tW({value:e}){if(!e)return null;let s=e.replace(/^.*T/,"").replace("Z",""),a=s.split(":"),r=a.length>=3?`${a[1]}:${a[2].split(".")[0]}`:s;return(0,t.jsx)("span",{className:"text-muted-foreground/60 w-11 shrink-0 font-mono text-[10px]",children:r})}function tH({phase:e}){return e?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground w-20 shrink-0 truncate rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",title:e,children:e}):(0,t.jsx)("span",{className:"w-20 shrink-0"})}function tV({line:e}){var s;let a,{toolName:r,args:n}=-1===(a=(s=e.message).indexOf(" "))?{toolName:s,args:""}:{toolName:s.slice(0,a),args:s.slice(a+1)},l=function(e,t){try{let s=JSON.parse(t);if("Read"===e&&s.file_path||"Write"===e&&s.file_path||"Edit"===e&&s.file_path)return s.file_path;if("Glob"===e&&s.pattern||"Grep"===e&&s.pattern)return s.pattern;if("Bash"===e&&s.command)return s.command;if("Task"===e&&s.description)return s.description}catch{if(t.length>0)return t}return null}(r,n);return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 border-b border-transparent px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(tG,{toolName:r}),(0,t.jsx)("span",{className:"text-xs font-semibold text-violet-600 dark:text-violet-400",children:r}),l?(0,t.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-xs break-all",children:l}):null]})]})}function tG({toolName:e}){let s=e.toLowerCase();return"bash"===s?(0,t.jsx)(E.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"read"===s||"glob"===s||"grep"===s?(0,t.jsx)(eb.FileText,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):"write"===s||"edit"===s?(0,t.jsx)(tD,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"}):(0,t.jsx)(E.Terminal,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-500"})}function t_({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(th.MessageSquare,{className:"mt-0.5 h-3 w-3 shrink-0 text-blue-500"}),(0,t.jsx)("span",{className:"text-foreground/80 min-w-0 text-xs leading-relaxed",children:e.message})]})]})}function tK({line:e}){var s;let a,r,{chars:n}=(a=(s=e.message).match(/^(\d+)\s+chars/),r=s.match(/session=(\S+)/),{chars:a?parseInt(a[1],10):0,sessionId:r?r[1]:null});return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(ey.CheckCircle2,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-xs font-medium text-emerald-600 dark:text-emerald-400",children:["Result: ",n.toLocaleString()," chars"]})]})]})}function tQ({line:e}){let s,{inputTokens:a,outputTokens:r}=(s=e.message.match(/^(\d+)\s+in\s*\/\s*(\d+)\s+out/))?{inputTokens:parseInt(s[1],10),outputTokens:parseInt(s[2],10)}:{inputTokens:0,outputTokens:0};return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(tL,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-xs",children:[(0,t.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:a.toLocaleString()})," in / ",(0,t.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:r.toLocaleString()})," out"]})]})]})}function tJ({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-zinc-50 px-3 py-1.5 transition-colors dark:bg-zinc-900/50",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(tz,{className:"mt-0.5 h-3 w-3 shrink-0 text-zinc-500"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium break-all",children:e.message})]})]})}function tZ({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(eg,{className:"mt-0.5 h-3 w-3 shrink-0 text-violet-400"}),(0,t.jsx)("span",{className:"text-muted-foreground min-w-0 font-mono text-[11px] break-all",children:e.message})]})]})}function tX({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(i.Play,{className:"mt-0.5 h-3 w-3 shrink-0 text-cyan-500"}),(0,t.jsx)("span",{className:"min-w-0 font-mono text-xs break-all text-cyan-700 dark:text-cyan-400",children:e.message})]})]})}function tY({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(tD,{className:"mt-0.5 h-3 w-3 shrink-0 text-orange-500"}),(0,t.jsx)("span",{className:"min-w-0 text-xs break-all text-orange-700 dark:text-orange-400",children:e.message})]})]})}function t0({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 bg-red-50 px-3 py-1.5 transition-colors dark:bg-red-950/30",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-1.5",children:[(0,t.jsx)(B.AlertCircle,{className:"mt-0.5 h-3 w-3 shrink-0 text-red-500"}),(0,t.jsx)("span",{className:"min-w-0 text-xs font-medium break-all text-red-700 dark:text-red-400",children:e.message})]})]})}function t1({line:e}){return(0,t.jsxs)("div",{className:"hover:bg-muted/50 flex items-start gap-2 px-3 py-1.5 transition-colors",children:[(0,t.jsx)(tW,{value:e.timestamp}),(0,t.jsx)(tH,{phase:e.phase}),(0,t.jsx)("span",{className:"text-muted-foreground min-w-0 text-xs break-all",children:e.message})]})}function t2({line:e}){return(0,t.jsx)("div",{className:"px-3 py-0.5",children:(0,t.jsx)("span",{className:"text-muted-foreground/70 font-mono text-[11px] break-all whitespace-pre-wrap",children:e.raw})})}function t5({content:e,isConnected:a,error:r}){let n=(0,s.useRef)(null),[l,i]=(0,s.useState)(!0),[o,d]=(0,s.useState)("structured"),c=(0,s.useCallback)(()=>{let e=n.current;e&&i(e.scrollHeight-e.scrollTop-e.clientHeight<40)},[]),u=(0,s.useCallback)(()=>{let e=n.current;e&&(e.scrollTop=e.scrollHeight,i(!0))},[]);return((0,s.useEffect)(()=>{l&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e,l]),r)?(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,t.jsx)(B.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:r})]}):e?(0,t.jsxs)("div",{className:"flex h-full flex-col","data-testid":"log-tab",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b px-3 py-1.5",children:[(0,t.jsx)("span",{className:`h-2 w-2 rounded-full ${a?"bg-emerald-500":"bg-zinc-400"}`}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:a?"Live":"Disconnected"}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>d("structured"),className:`rounded p-1 transition-colors ${"structured"===o?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:"Structured view",children:(0,t.jsx)(eb.FileText,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:()=>d("raw"),className:`rounded p-1 transition-colors ${"raw"===o?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,title:"Raw view",children:(0,t.jsx)(tE.Code,{className:"h-3.5 w-3.5"})}),l?null:(0,t.jsxs)("button",{type:"button",onClick:u,className:"text-muted-foreground hover:text-foreground ml-1 flex items-center gap-1 text-xs",children:[(0,t.jsx)(t$.ArrowDown,{className:"h-3 w-3"}),"Jump to bottom"]})]})]}),(0,t.jsx)("div",{ref:n,onScroll:c,className:`flex-1 overflow-y-auto ${"raw"===o?"bg-zinc-950 p-3 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap text-zinc-300":"bg-background"}`,children:"structured"===o?(0,t.jsx)(tO,{content:e}):e})]}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,t.jsx)(E.Terminal,{className:"text-muted-foreground h-8 w-8"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No log output yet"}),a?(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:"Waiting for log data..."}):null]})}let t3=(0,J.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var t4=e.i(95812),t6=e.i(87889);let t8=(0,J.default)("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),t9={Todo:{icon:t4.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Todo"},"Work in Progress":{icon:n.Loader2,colorClass:"text-blue-600",borderClass:"border-blue-200",spinning:!0,label:"In Progress"},Done:{icon:c.Check,colorClass:"text-emerald-600",borderClass:"border-emerald-200",label:"Done"},Review:{icon:t6.Eye,colorClass:"text-amber-600",borderClass:"border-amber-200",label:"Review"}},t7={icon:t4.Circle,colorClass:"text-muted-foreground",borderClass:"border-border",label:"Unknown"};function se({tasks:e}){return 0===e.length?(0,t.jsx)("div",{className:"flex flex-col items-center justify-center gap-2 py-4",children:(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No tasks defined yet"})}):(0,t.jsxs)("div",{"data-testid":"task-progress-view",className:"flex flex-col gap-3",children:[(0,t.jsx)(st,{tasks:e}),(0,t.jsx)("div",{"data-testid":"task-progress-list",className:"flex flex-col gap-2",children:e.map((e,s)=>(0,t.jsx)(sa,{task:e,index:s},e.title||`task-${s}`))})]})}function st({tasks:e}){let a=(0,s.useMemo)(()=>{let t=e.filter(e=>"Done"===e.state).length,s=e.filter(e=>"Work in Progress"===e.state).length,a=e.filter(e=>"Review"===e.state).length,r=e.filter(e=>"Done"!==e.state&&"Work in Progress"!==e.state&&"Review"!==e.state).length,n=e.length,l=n>0?Math.round(t/n*100):0;return{done:t,wip:s,review:a,todo:r,total:n,percent:l}},[e]);return(0,t.jsxs)("div",{"data-testid":"task-progress-summary",className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Task Progress"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-xs",children:[a.done," of ",a.total," done"]})]}),(0,t.jsx)("div",{className:"bg-muted h-2 w-full overflow-hidden rounded-full",children:(0,t.jsx)("div",{"data-testid":"task-progress-bar",className:"h-full rounded-full bg-emerald-500 transition-all",style:{width:`${a.percent}%`}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3",children:[a.done>0?(0,t.jsx)(ss,{icon:c.Check,label:"Done",count:a.done,className:"text-emerald-600"}):null,a.wip>0?(0,t.jsx)(ss,{icon:n.Loader2,label:"In Progress",count:a.wip,className:"text-blue-600"}):null,a.review>0?(0,t.jsx)(ss,{icon:t6.Eye,label:"Review",count:a.review,className:"text-amber-600"}):null,a.todo>0?(0,t.jsx)(ss,{icon:t4.Circle,label:"Todo",count:a.todo,className:"text-muted-foreground"}):null]})]})}function ss({icon:e,label:s,count:a,className:r}){return(0,t.jsxs)("span",{className:(0,_.cn)("flex items-center gap-1 text-xs",r),children:[(0,t.jsx)(e,{className:"h-3 w-3"}),a," ",s]})}function sa({task:e,index:a}){let[r,n]=(0,s.useState)(!1),l=t9[e.state]??t7,i=l.icon,o=e.actionItems.length>0,d=(0,s.useCallback)(()=>{o&&n(e=>!e)},[o]);return(0,t.jsxs)("div",{"data-testid":`task-card-${a}`,className:(0,_.cn)("rounded-lg border",l.borderClass),children:[(0,t.jsxs)("button",{type:"button",onClick:d,disabled:!o,className:(0,_.cn)("flex w-full items-start gap-2 px-3 py-2.5 text-left",o&&"hover:bg-muted/50 cursor-pointer transition-colors"),children:[(0,t.jsx)(i,{className:(0,_.cn)("mt-0.5 h-4 w-4 shrink-0",l.colorClass,l.spinning&&"animate-spin")}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,_.cn)("text-sm font-medium",l.colorClass),children:e.title}),e.description?(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description}):null]}),o?(0,t.jsx)(G.ChevronRight,{className:(0,_.cn)("text-muted-foreground mt-0.5 h-4 w-4 shrink-0 transition-transform",r&&"rotate-90")}):null]}),r&&o?(0,t.jsx)("div",{className:"border-t px-3 py-2.5",children:(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.actionItems.map((e,s)=>(0,t.jsx)(sr,{item:e},e.name||`ai-${s}`))})}):null]})}function sr({item:e}){let s=e.acceptanceCriteria.length,a=e.acceptanceCriteria.filter(e=>e.verified).length,r=s>0&&a===s;return(0,t.jsxs)("div",{"data-testid":"action-item",className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[r?(0,t.jsx)(ey.CheckCircle2,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-600"}):(0,t.jsx)(t8,{className:"text-muted-foreground mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.name}),e.description?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:e.description}):null]}),s>0?(0,t.jsxs)("span",{className:"text-muted-foreground ml-auto shrink-0 text-[11px]",children:[a,"/",s]}):null]}),s>0?(0,t.jsx)("div",{className:"ml-5.5 flex flex-col gap-1",children:e.acceptanceCriteria.map((e,s)=>(0,t.jsx)(sn,{criterion:e},e.description||`ac-${s}`))}):null]})}function sn({criterion:e}){return(0,t.jsxs)("div",{"data-testid":"acceptance-criterion",className:"flex items-start gap-1.5",children:[e.verified?(0,t.jsx)(c.Check,{className:"mt-0.5 h-3 w-3 shrink-0 text-emerald-600"}):(0,t.jsx)(t4.Circle,{className:"text-muted-foreground mt-0.5 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:(0,_.cn)("text-[11px]",e.verified?"text-muted-foreground line-through":"text-foreground"),children:e.description})]})}let sl={Requirements:"border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50",ClarificationRequired:"border-transparent bg-amber-50 text-amber-700 hover:bg-amber-50",Ready:"border-transparent bg-green-50 text-green-700 hover:bg-green-50"};function si({plan:e,loading:s,error:a}){return s?(0,t.jsx)("div",{"data-testid":"plan-tab-loading",className:"flex items-center justify-center p-8",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):a?(0,t.jsxs)("div",{className:"flex items-center gap-2 p-4 text-sm text-red-600",children:[(0,t.jsx)(B.AlertCircle,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:a})]}):e?(0,t.jsxs)("div",{className:"flex flex-col gap-4 p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Plan State"}),(0,t.jsx)(K.Badge,{className:sl[e.state]??"border-transparent bg-gray-50 text-gray-700",children:e.state})]}),e.overview?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:"Overview"}),(0,t.jsx)("p",{className:"text-sm leading-relaxed",children:e.overview})]}):null,(0,t.jsx)(se,{tasks:e.tasks})]}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[(0,t.jsx)(t3,{className:"text-muted-foreground h-8 w-8"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:"No plan created yet"})]})}var so=e.i(28112);function sd(){return{data:null,loading:!1,error:null}}let sc=[{key:"overview",label:"Overview"},{key:"activity",label:"Activity"},{key:"log",label:"Log"},{key:"plan",label:"Plan"},{key:"prd-review",label:"PRD Review"},{key:"tech-decisions",label:"Tech Decisions"},{key:"product-decisions",label:"Product"},{key:"merge-review",label:"Merge Review"},{key:"chat",label:"Chat"}],su={activity:async function(e){let t=await W(e);if("error"in t)throw Error(t.error);return{timings:t.timings,rejectionFeedback:t.rejectionFeedback}},plan:async function(e){let t=await H(e);if("error"in t)throw Error(t.error);return t.plan}};function sm({featureName:e,headerContent:r,featureNode:l,featureId:i,initialTab:o,urlTab:d,prdData:c,prdSelections:u,onPrdSelect:m,onPrdApprove:x,onPrdReject:p,isPrdLoading:h,techData:f,onTechApprove:g,onTechReject:j,isTechLoading:b,productData:v,mergeData:N,onMergeApprove:y,onMergeReject:w,isMergeLoading:k,syncStatus:C,syncLoading:S,syncError:M,onRefreshSync:R,onRebaseOnMain:T,rebaseLoading:I,rebaseError:A,isRejecting:P,chatInput:$,onChatInputChange:E,sseEvents:L,interactiveAgentEnabled:z=!0}){let D=(0,a.usePathname)(),F=(0,s.useMemo)(()=>(function(e,t=!0){let s=["overview","activity"];return e.hasAgentRun&&s.push("log"),e.hasPlan&&s.push("plan"),"requirements"===e.lifecycle&&"action-required"===e.state&&s.push("prd-review"),"implementation"===e.lifecycle&&"action-required"===e.state&&s.push("tech-decisions","product-decisions"),"review"===e.lifecycle&&("action-required"===e.state||"error"===e.state)&&s.push("merge-review"),"maintain"===e.lifecycle&&e.pr&&s.push("merge-review"),t&&s.push("chat"),s})(l,z),[l,z]),q=(0,s.useMemo)(()=>sc.filter(e=>F.includes(e.key)).map(e=>"merge-review"===e.key&&"maintain"===l.lifecycle?{...e,label:"Merge History"}:e),[F,l.lifecycle]),W=(0,s.useMemo)(()=>{let e=D.match(/^(\/feature\/[^/]+)/);return e?e[1]:D},[D]),H=(0,s.useMemo)(()=>d&&F.includes(d)?d:o&&F.includes(o)?o:"overview",[]),[V,G]=(0,s.useState)(H),_=function(e){let[t,a]=(0,s.useState)(""),[r,n]=(0,s.useState)(!1),[l,i]=(0,s.useState)(null),o=(0,s.useRef)(null),d=(0,s.useCallback)(()=>{o.current&&(o.current.close(),o.current=null),n(!1)},[]);return(0,s.useEffect)(()=>{if(!e){a(""),n(!1),i(null);return}a(""),i(null);let t=new EventSource(`/api/feature-logs?featureId=${e}`);return o.current=t,t.onopen=()=>{n(!0)},t.addEventListener("initial",e=>{a(JSON.parse(e.data).content)}),t.addEventListener("log",e=>{let t=JSON.parse(e.data);a(e=>e+t.content)}),t.addEventListener("error",e=>{try{let t=JSON.parse(e.data);i(t.error)}catch{i(e.data?String(e.data):"Log stream unavailable")}}),t.onerror=()=>{n(!1)},()=>{t.close(),o.current=null}},[e,d]),{content:t,isConnected:r,error:l}}("log"===V?i:null),{tabs:K,fetchTab:Q,refreshTab:J}=function(e,t){let a=Object.keys(t),[r,n]=(0,s.useState)(()=>{let e={};for(let t of a)e[t]=sd();return e}),l=(0,s.useRef)(t);l.current=t;let i=(0,s.useRef)(e);i.current=e;let o=(0,s.useRef)(!0);(0,s.useEffect)(()=>(o.current=!0,()=>{o.current=!1}),[]);let d=(0,s.useRef)(e);(0,s.useEffect)(()=>{d.current!==e&&(d.current=e,n(e=>{let t={};for(let s of Object.keys(e))t[s]=sd();return t}))},[e]);let c=(0,s.useCallback)(async e=>{let t=l.current[e],s=i.current;if(t){o.current&&n(t=>t[e]?.data!==null?t:{...t,[e]:{...t[e],loading:!0,error:null}});try{let a=await t(s);o.current&&n(t=>({...t,[e]:{data:a,loading:!1,error:null}}))}catch(t){o.current&&n(s=>{let a=t instanceof Error?t.message:"Failed to fetch tab data",r=s[e]?.data??null;return{...s,[e]:{data:r,loading:!1,error:r?null:a}}})}}},[]),u=(0,s.useCallback)(async e=>{let t=r[e];t&&null!==t.data||t&&t.loading||await c(e)},[r,c]);return{tabs:r,fetchTab:u,refreshTab:(0,s.useCallback)(async e=>{await c(e)},[c])}}(i,su),Z=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!Z.current)return;Z.current=!1;let e="overview"===V?W:`${W}/${V}`;e!==D&&window.history.pushState(null,"",e)},[V,W,D]);let X=(0,s.useRef)(D);(0,s.useEffect)(()=>{if(X.current===D||(X.current=D,Z.current))return;let e=D.split("/"),t=e.length>=4?e[3]:void 0,s=t&&F.includes(t)?t:"overview";s!==V&&(G(s),("activity"===s||"plan"===s)&&Q(s))},[D]);let Y=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!Y.current&&(Y.current=!0,!d&&"overview"!==H)){let e=`${W}/${H}`;e!==D&&window.history.replaceState(null,"",e)}},[]);let ee=(0,s.useRef)(!1);(0,s.useEffect)(()=>{ee.current||(ee.current=!0,("activity"===V||"plan"===V)&&Q(V))},[V,Q]);let et=(0,s.useRef)(i);(0,s.useEffect)(()=>{et.current!==i&&(et.current=i,G("overview"))},[i]);let es=(0,s.useRef)(o);(0,s.useEffect)(()=>{if(es.current!==o&&o&&F.includes(o)){es.current=o,G(o),("activity"===o||"plan"===o)&&Q(o);let e="overview"===o?W:`${W}/${o}`;e!==window.location.pathname&&window.history.replaceState(null,"",e)}},[o,F,W,Q]),(0,s.useEffect)(()=>{F.includes(V)||(G("overview"),window.location.pathname!==W&&window.history.replaceState(null,"",W))},[F,V,W]);let ea=(0,s.useRef)(V);ea.current=V;let en=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(!L||0===L.length||(en.current>L.length&&(en.current=0),L.length<=en.current))return;let e=L.slice(en.current);if(en.current=L.length,!e.some(e=>e.featureId===i))return;J("activity");let t=ea.current;"plan"===t&&J(t)},[L,i,J]);let el="running"===l.state||"creating"===l.state;(0,s.useEffect)(()=>{if(!el)return;let e=setInterval(()=>{J("activity")},5e3);return()=>clearInterval(e)},[el,J]);let ei=(0,s.useCallback)(e=>{Z.current=!0,G(e),("activity"===e||"plan"===e)&&Q(e)},[Q]);return(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,t.jsxs)(O.Tabs,{value:V,onValueChange:ei,className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 px-4 pt-4 pb-3","data-testid":"feature-drawer-header",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-4 pr-6",children:[e?(0,t.jsx)("h2",{className:"text-foreground min-w-0 shrink truncate text-base font-semibold tracking-tight",children:e}):null,(0,t.jsx)(O.TabsList,{className:"h-auto shrink-0 gap-0.5 rounded-none border-0 bg-transparent p-0",children:q.map(e=>(0,t.jsx)(O.TabsTrigger,{value:e.key,className:"text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary h-auto rounded-none border-b-2 border-transparent bg-transparent px-2 py-0.5 text-[12px] font-medium shadow-none transition-colors data-[state=active]:bg-transparent data-[state=active]:shadow-none",children:e.label},e.key))})]}),r]}),(0,t.jsx)(U.Separator,{}),(0,t.jsx)(O.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,t.jsx)(ts,{data:l,syncStatus:C,syncLoading:S,syncError:M,onRefreshSync:R,onRebaseOnMain:T,rebaseLoading:I,rebaseError:A})}),(0,t.jsx)(O.TabsContent,{value:"activity",className:"mt-0 flex-1 overflow-y-auto",children:(0,t.jsx)(tS,{timings:K.activity.data?.timings??null,loading:K.activity.loading,error:K.activity.error,rejectionFeedback:K.activity.data?.rejectionFeedback})}),(0,t.jsx)(O.TabsContent,{value:"log",className:"mt-0 flex-1 overflow-hidden",children:(0,t.jsx)(t5,{content:_.content,isConnected:_.isConnected,error:_.error})}),(0,t.jsx)(O.TabsContent,{value:"plan",className:"mt-0 flex-1 overflow-y-auto",children:(0,t.jsx)(si,{plan:K.plan.data,loading:K.plan.loading,error:K.plan.error})}),F.includes("prd-review")?(0,t.jsx)(O.TabsContent,{value:"prd-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:c?(0,t.jsx)(er,{data:c,selections:u??{},onSelect:m??(()=>void 0),onApprove:x??(()=>void 0),onReject:p,isProcessing:h,isRejecting:P,chatInput:$,onChatInputChange:E}):(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,F.includes("tech-decisions")?(0,t.jsx)(O.TabsContent,{value:"tech-decisions",className:"mt-0 flex min-h-0 flex-1 flex-col",children:f?(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(ec,{data:f})}),(0,t.jsx)(sx,{onApprove:g??(()=>void 0),onReject:j,isProcessing:b,isRejecting:P,chatInput:$,onChatInputChange:E})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})})}):null,F.includes("product-decisions")?(0,t.jsx)(O.TabsContent,{value:"product-decisions",className:"mt-0 flex-1 overflow-y-auto",children:null===v?(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):v?(0,t.jsx)(ex,{data:v}):(0,t.jsx)("p",{className:"text-muted-foreground p-4 text-center text-sm",children:"No product decisions available."})}):null,F.includes("merge-review")?(0,t.jsx)(O.TabsContent,{value:"merge-review",className:"mt-0 flex min-h-0 flex-1 flex-col",children:N?(0,t.jsx)(eB,{data:N,readOnly:"maintain"===l.lifecycle,onApprove:y??(()=>void 0),onReject:w,isProcessing:k,isRejecting:P,chatInput:$,onChatInputChange:E}):(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:k?(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-6 w-6 animate-spin"}):(0,t.jsxs)("div",{className:"text-muted-foreground flex flex-col items-center gap-2 text-sm",children:[(0,t.jsx)(B.AlertCircle,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:"Merge review data unavailable"})]})})}):null,F.includes("chat")?(0,t.jsx)(O.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(so.ChatTab,{featureId:i,worktreePath:l.worktreePath})}):null]})})}function sx({onApprove:e,onReject:s,isProcessing:a,isRejecting:r,chatInput:n,onChatInputChange:l}){return(0,t.jsx)(ea,{onReject:s,onApprove:e,approveLabel:"Approve Plan",revisionPlaceholder:"Ask AI to revise the plan...",isProcessing:a,isRejecting:r,chatInput:n,onChatInputChange:l})}var sp=e.i(6564),sh=e.i(39275),sf=e.i(26988);let sg=(0,h.createServerReference)("40491d451b4a9fb185a23d7a24008ec841bda0adf7",h.callServer,void 0,h.findSourceMapURL,"rebaseFeature");var sj=e.i(99045);function sb(e){return"requirements"===e.lifecycle&&"action-required"===e.state?"prd-review":"implementation"===e.lifecycle&&"action-required"===e.state?"tech-decisions":"review"===e.lifecycle&&("action-required"===e.state||"error"===e.state)?"merge-review":"overview"}function sv(e,t,a,n,l,i){let[o,d]=(0,s.useState)(!1),c=(0,s.useRef)(a),u=(0,s.useRef)(n);return c.current=a,u.current=n,(0,s.useEffect)(()=>{if(u.current(),!e)return;let s=!1;return d(!0),t(e).then(e=>{s||c.current(e)}).catch(()=>{!s&&l&&r.toast.error(l)}).finally(()=>{s||d(!1)}),()=>{s=!0}},[e,t,l,i]),o}let sN=(0,h.createServerReference)("404582cb5873665883358d37d4e78fa0d0207eb1de",h.callServer,void 0,h.findSourceMapURL,"getFeatureDrawerData"),sy=(0,h.createServerReference)("403f9d986891f4461ee3a97b14053d5d1b7f01e8e5",h.callServer,void 0,h.findSourceMapURL,"getBranchSyncStatus"),sw=new Map;function sk({view:e,urlTab:h,interactiveAgentEnabled:E=!0}){var L;let z,D,F,B,O,U=(0,w.useFeatureFlags)(),W=(0,a.useRouter)(),H=(0,k.useSoundAction)("reject"),[V,G]=(0,s.useState)(e);(0,s.useEffect)(()=>{G(e)},[e]);let _="feature"===V.type?V.node:null,{events:K}=(0,M.useAgentEventsContext)(),Q=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(Q.current>K.length&&(Q.current=0),!_||K.length<=Q.current)return;let e=K.slice(Q.current);for(let t of(Q.current=K.length,(0,sj.resolveSseEventUpdates)(e)))t.featureId===_.featureId&&"deleting"!==_.state&&(void 0!==t.state||void 0!==t.lifecycle)&&G(e=>{if("feature"!==e.type)return e;let s={...e.node,...void 0!==t.state&&{state:t.state},...void 0!==t.lifecycle&&{lifecycle:t.lifecycle}};return{...e,node:s,initialTab:sb(s)}})},[K,_]);let J=(0,a.usePathname)().startsWith("/feature/");L=_?.featureId??null,z=(0,s.useRef)(J),D=(0,s.useRef)(!1),F=(0,s.useCallback)(async()=>{if(L&&!D.current){D.current=!0;try{let e=await sN(L);if(!e)return;G(t=>(function(e,t){if("feature"!==e.type)return e;let s={...e.node,...t},a=s.state!==e.node.state||s.lifecycle!==e.node.lifecycle;return{...e,node:s,initialTab:a?sb(s):e.initialTab}})(t,e))}catch{}finally{D.current=!1}}},[L,G]),B=(0,s.useRef)(!1),(0,s.useEffect)(()=>{!J||z.current&&B.current||(B.current=!0,F()),z.current=J},[J,F]),(0,s.useEffect)(()=>{if(!J||!L)return;let e=setInterval(()=>{F()},15e3);return()=>clearInterval(e)},[J,L,F]);let Z=(0,s.useCallback)(()=>{W.push("/")},[W]),[X,Y]=(0,s.useState)(""),[ee,et]=(0,s.useState)(null),[es,ea]=(0,s.useState)({}),[er,en]=(0,s.useState)({}),[el,ei]=(0,s.useState)(null),[eo,ed]=(0,s.useState)(void 0),[ec,eu]=(0,s.useState)(null),[em,ex]=(0,s.useState)(!1),[ep,eh]=(0,s.useState)(!1),[ef,eg]=(0,s.useState)(!1),ej=`${_?.featureId}:${_?.state}`,eb=(0,s.useRef)(ej);(0,s.useEffect)(()=>{ej!==eb.current&&(eb.current=ej,eg(!1))},[ej]);let[ev,eN]=(0,s.useState)(!1),ey=(0,s.useRef)(!1),ew="feature"===V.type?V.initialTab:void 0;(0,s.useEffect)(()=>{Y("")},[ew]);let ek=(0,s.useRef)(0),eC=(0,s.useRef)(_?.state),eS=(0,s.useRef)(_?.lifecycle);(_?.state!==eC.current||_?.lifecycle!==eS.current)&&(eC.current=_?.state,eS.current=_?.lifecycle,ek.current+=1);let eM=ek.current,eR=sv(_?.lifecycle==="requirements"&&_?.state==="action-required"?_.featureId:null,v,e=>{if(e.error)return void r.toast.error(e.error);if(e.questionnaire){et(e.questionnaire);let t={};for(let s of e.questionnaire.questions){let e=s.options.find(e=>e.recommended);e&&(t[s.id]=e.id)}ea(t),en(t)}},()=>{ea({}),en({}),et(null)},"Failed to load questionnaire",eM),eT=_?.lifecycle==="implementation"&&_?.state==="action-required"?_.featureId:null,eI=sv(eT,N,e=>{e.error?r.toast.error(e.error):e.techDecisions&&ei(e.techDecisions)},()=>ei(null),"Failed to load tech decisions",eM),eA=sv(eT,v,e=>{e.productDecisions&&ed(e.productDecisions)},()=>ed(void 0),void 0,eM),eP=sv(_?.lifecycle==="review"&&(_?.state==="action-required"||_?.state==="error")||_?.lifecycle==="maintain"&&_?.pr?_.featureId:null,y,e=>{"error"in e?r.toast.error(e.error):eu(e)},()=>eu(null),"Failed to load merge review data",eM),e$=X.trim().length>0,eE=_?.lifecycle==="requirements"&&_?.state==="action-required"&&Object.keys(er).some(e=>er[e]!==es[e]),eL=(0,s.useCallback)(()=>{Y(""),ea({...er})},[er]),{attemptClose:ez}=(0,C.useGuardedDrawerClose)({open:J,isDirty:e$||eE,onClose:Z,onReset:eL}),eD=(0,s.useCallback)(async(e,t,s=[],a)=>{if(_?.featureId){ey.current=!0,eN(!0);try{let n=s.map(e=>e.path).filter(Boolean),l=s.filter(e=>e.notes?.trim()),i=l.length>0?`${e}
|
|
3
|
-
|
|
4
|
-
Image notes:
|
|
5
|
-
${l.map(e=>`- @${e.path}: ${e.notes.trim()}`).join("\n")}`:e,o=await b(_.featureId,i,n);if(!o.rejected)return void r.toast.error(o.error??`Failed to reject ${t.toLowerCase()}`);H.play(),Y(""),r.toast.success(`${t} rejected — agent re-iterating (iteration ${o.iteration})`),o.iterationWarning&&r.toast.warning(`Iteration ${o.iteration} — consider approving or adjusting feedback to avoid excessive iterations`),window.dispatchEvent(new CustomEvent("shep:feature-approved",{detail:{featureId:_.featureId}})),Z(),a?.()}finally{ey.current=!1,eN(!1)}}},[_,Z,H]),eF=(0,s.useCallback)((e,t)=>eD(e,"Requirements",t,()=>ea({})),[eD]),eq=(0,s.useCallback)((e,t)=>eD(e,"Plan",t),[eD]),eB=(0,s.useCallback)((e,t)=>eD(e,"Merge",t),[eD]),eO=(0,s.useCallback)(async e=>{if(!_?.featureId)return;let t=await f(_.featureId);t.approved?(Y(""),r.toast.success(`${e} approved — agent resuming`),window.dispatchEvent(new CustomEvent("shep:feature-approved",{detail:{featureId:_.featureId}})),Z()):r.toast.error(t.error??`Failed to approve ${e.toLowerCase()}`)},[_,Z]),eU=(0,s.useCallback)(async e=>{let t;if("feature"!==V.type||!_)return;if(ee){let e=[];for(let[t,s]of Object.entries(es)){let a=ee.questions.find(e=>e.id===t),r=a?.options.find(e=>e.id===s);a&&r&&e.push({questionId:a.question,selectedOption:r.label})}t={approved:!0,changedSelections:e}}let s=await f(_.featureId,t);s.approved?(Y(""),r.toast.success("Requirements approved — agent resuming"),window.dispatchEvent(new CustomEvent("shep:feature-approved",{detail:{featureId:_.featureId}})),ea({}),Z()):r.toast.error(s.error??"Failed to approve requirements")},[V,_,ee,es,Z]),eW=(0,s.useCallback)(()=>eO("Plan"),[eO]),eH=(0,s.useCallback)(()=>eO("Merge"),[eO]),eV=(0,s.useCallback)(async(e,t,s,a)=>{ex(!0),eh(!1),window.dispatchEvent(new CustomEvent("shep:feature-delete-requested",{detail:{featureId:e,cleanup:t,cascadeDelete:s,closePr:a}})),W.push("/")},[W]),eG=(0,s.useCallback)(e=>{eg(!0),window.dispatchEvent(new CustomEvent("shep:feature-archive-requested",{detail:{featureId:e}})),W.push("/")},[W]),e_=(0,s.useCallback)(e=>{eg(!0),window.dispatchEvent(new CustomEvent("shep:feature-unarchive-requested",{detail:{featureId:e}})),W.push("/")},[W]),eK=(0,s.useCallback)(async e=>{let t=await (0,g.resumeFeature)(e);t.error?r.toast.error(t.error):(r.toast.success("Feature resumed — agent restarting"),window.dispatchEvent(new CustomEvent("shep:feature-approved",{detail:{featureId:e}})),G(e=>"feature"!==e.type?e:{...e,node:{...e.node,state:"running"}}))},[]),eQ=(0,s.useCallback)(async e=>{let t=await (0,j.startFeature)(e);t.error?r.toast.error(t.error):(r.toast.success("Feature started"),G(e=>"feature"!==e.type?e:{...e,node:{...e.node,state:"running"}}))},[]),eJ=_?.repositoryPath&&_?.branch?{featureId:_.featureId,repositoryPath:_.repositoryPath,branch:_.branch,worktreePath:_.worktreePath,specPath:_.specPath}:null,eZ=function(e){let[t,a]=(0,s.useState)(!1),[r,n]=(0,s.useState)(!1),[l,i]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(!1),[m,x]=(0,s.useState)(null),[p,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(null),[j,b]=(0,s.useState)(null),[v,N]=(0,s.useState)(null),y=(0,s.useRef)(null),w=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(null),S=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=[y,w,k,C,S];return()=>{for(let t of e)t.current&&clearTimeout(t.current)}},[]);let M=(0,s.useCallback)(async(t,s,a,r,n)=>{if(e&&!n){r.current&&clearTimeout(r.current),s(!0),a(null);try{let s=await t({repositoryPath:e.repositoryPath,branch:e.branch});if(!s.success){let e=s.error??"An unexpected error occurred";a(e),r.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),r.current=setTimeout(()=>a(null),5e3)}finally{s(!1)}}},[e]);return{openInIde:(0,s.useCallback)(()=>M(sp.openIde,a,x,y,t),[M,t]),openInShell:(0,s.useCallback)(()=>M(sh.openShell,n,h,w,r),[M,r]),openFolder:(0,s.useCallback)(async()=>{if(e&&!l){k.current&&clearTimeout(k.current),i(!0),g(null);try{let t=e.worktreePath??e.repositoryPath,s=await (0,sf.openFolder)(t);if(!s.success){let e=s.error??"An unexpected error occurred";g(e),k.current=setTimeout(()=>g(null),5e3)}}catch(e){g(e instanceof Error?e.message:"An unexpected error occurred"),k.current=setTimeout(()=>g(null),5e3)}finally{i(!1)}}},[e,l]),openSpecsFolder:(0,s.useCallback)(async()=>{if(e?.specPath&&!o){C.current&&clearTimeout(C.current),d(!0),b(null);try{let t=await (0,sf.openFolder)(e.specPath);if(!t.success){let e=t.error??"An unexpected error occurred";b(e),C.current=setTimeout(()=>b(null),5e3)}}catch(e){b(e instanceof Error?e.message:"An unexpected error occurred"),C.current=setTimeout(()=>b(null),5e3)}finally{d(!1)}}},[e,o]),rebaseOnMain:(0,s.useCallback)(async()=>{if(e?.featureId&&!c){S.current&&clearTimeout(S.current),u(!0),N(null);try{let t=await sg(e.featureId);if(!t.success){let e=t.error??"An unexpected error occurred";N(e),S.current=setTimeout(()=>N(null),5e3)}}catch(e){N(e instanceof Error?e.message:"An unexpected error occurred"),S.current=setTimeout(()=>N(null),5e3)}finally{u(!1)}}},[e,c]),ideLoading:t,shellLoading:r,folderLoading:l,specsLoading:o,rebaseLoading:c,ideError:m,shellError:p,folderError:f,specsError:j,rebaseError:v}}(eJ),eX=U.gitRebaseSync&&_?.branch&&_?.remoteUrl?_.featureId:null,{data:eY,loading:e0,error:e1,refresh:e2}=function(e){let[t,a]=(0,s.useState)(()=>{if(!e)return null;let t=sw.get(e);return t?t.data:null}),[r,n]=(0,s.useState)(!1),[l,i]=(0,s.useState)(null),o=(0,s.useRef)(e);o.current=e;let d=(0,s.useCallback)(async e=>{n(!0),i(null);try{let t=await sy(e);if(o.current!==e)return;if(t.success&&t.data){let s=t.data;sw.set(e,{data:s,timestamp:Date.now()}),a(s)}else i(t.error??"Failed to check sync status")}catch{if(o.current!==e)return;i("Failed to check sync status")}finally{o.current===e&&n(!1)}},[]);return(0,s.useEffect)(()=>{if(!e){a(null),i(null);return}let t=sw.get(e);t&&(a(t.data),Date.now()-t.timestamp<3e4)||d(e)},[e,d]),{data:t,loading:r,error:l,refresh:(0,s.useCallback)(()=>{e&&d(e)},[e,d])}}(eX),e5=(0,s.useRef)(eZ.rebaseLoading);(0,s.useEffect)(()=>{!e5.current||eZ.rebaseLoading||eZ.rebaseError||e2(),e5.current=eZ.rebaseLoading},[eZ.rebaseLoading,eZ.rebaseError,e2]);let e3=_?.repositoryPath&&_.branch?{targetId:_.featureId,targetType:"feature",repositoryPath:_.repositoryPath,branch:_.branch}:null,e4=(0,S.useDeployAction)(e3),e6="Booting"===e4.status||"Ready"===e4.status,[e8,e9]=(0,s.useState)(!1),e7=(0,s.useCallback)(()=>{_?.featureId&&(navigator.clipboard.writeText(_.featureId),e9(!0),setTimeout(()=>e9(!1),2e3))},[_?.featureId]);if(_){let e=_.featureId.slice(0,8),s=_.repositoryName??_.repositoryPath.split("/").filter(Boolean).at(-1)??"";O=(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pt-0.5",children:[(0,t.jsx)(u.Code2,{className:"text-muted-foreground size-3.5 shrink-0"}),_.remoteUrl?(0,t.jsxs)("a",{href:_.remoteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs transition-colors","data-testid":"feature-drawer-repo-link",children:[s,(0,t.jsx)(m.ExternalLink,{className:"size-3"})]}):(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:s})]}):null,eJ?(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-1","data-testid":"feature-drawer-actions",children:[_?.state!=="done"?(0,t.jsx)(q,{actions:eZ,repositoryPath:eJ.repositoryPath,worktreePath:eJ.worktreePath,showSpecs:!!eJ.specPath}):null,_?.state!=="done"&&U.envDeploy&&e3?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.TooltipProvider,{children:(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsx)($.ActionButton,{label:e6?"Stop Dev Server":"Start Dev Server",onClick:e6?e4.stop:e4.deploy,loading:e4.deployLoading||e4.stopLoading,error:!!e4.deployError,icon:e6?o.Square:i.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,t.jsx)(A.TooltipContent,{children:e6?"Stop Dev Server":"Start Dev Server"})]})}),e6?(0,t.jsx)(T.DeploymentStatusBadge,{status:e4.status,url:e4.url,targetId:e3?.targetId}):null]}):null,(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs",children:e}),(0,t.jsx)("button",{type:"button",onClick:e7,className:"text-muted-foreground hover:text-foreground inline-flex items-center rounded p-0.5 transition-colors","aria-label":"Copy feature ID","data-testid":"feature-drawer-copy-id",children:e8?(0,t.jsx)(c.Check,{className:"size-3.5 text-green-600"}):(0,t.jsx)(d.Copy,{className:"size-3.5"})})]}),_.featureId?(0,t.jsxs)(t.Fragment,{children:["archived"===_.state?(0,t.jsx)(A.TooltipProvider,{children:(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(I.Button,{variant:"ghost",size:"icon-sm","aria-label":"Unarchive feature",disabled:ef,className:"text-muted-foreground hover:text-primary","data-testid":"feature-drawer-unarchive",onClick:()=>e_(_.featureId),children:ef?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):(0,t.jsx)(p.ArchiveRestore,{className:"size-4"})})}),(0,t.jsx)(A.TooltipContent,{children:"Unarchive feature"})]})}):"deleting"!==_.state?(0,t.jsx)(A.TooltipProvider,{children:(0,t.jsxs)(A.Tooltip,{children:[(0,t.jsx)(A.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(I.Button,{variant:"ghost",size:"icon-sm","aria-label":"Archive feature",disabled:ef,className:"text-muted-foreground hover:text-foreground","data-testid":"feature-drawer-archive",onClick:()=>eG(_.featureId),children:ef?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):(0,t.jsx)(x.Archive,{className:"size-4"})})}),(0,t.jsx)(A.TooltipContent,{children:"Archive feature"})]})}):null,(0,t.jsx)(I.Button,{variant:"ghost",size:"icon-sm","aria-label":"Delete feature",disabled:em,className:"text-muted-foreground hover:text-destructive","data-testid":"feature-drawer-delete",onClick:()=>eh(!0),children:em?(0,t.jsx)(n.Loader2,{className:"size-4 animate-spin"}):(0,t.jsx)(l.Trash2,{className:"size-4"})}),(0,t.jsx)(P.DeleteFeatureDialog,{open:ep,onOpenChange:eh,onConfirm:(e,t,s)=>eV(_.featureId,e,t,s),isDeleting:em,featureName:_.name,featureId:_.featureId,hasChildren:_.hasChildren,hasOpenPr:!!_.pr&&"Open"===_.pr.status})]}):null]}):null]})}let te=null;if("feature"===V.type&&_){let e={..._,..."error"===_.state&&{onRetry:eK},..."pending"===_.state&&{onStart:eQ}};te=(0,t.jsx)(sm,{featureName:_.name,headerContent:O,featureNode:e,featureId:_.featureId,initialTab:V.initialTab,urlTab:h,sseEvents:K,prdData:ee,prdSelections:es,onPrdSelect:(e,t)=>ea(s=>({...s,[e]:t})),onPrdApprove:eU,onPrdReject:eF,isPrdLoading:eR,techData:el,onTechApprove:eW,onTechReject:eq,isTechLoading:eI,productData:eA?null:eo,mergeData:ec,onMergeApprove:eH,onMergeReject:eB,isMergeLoading:eP,syncStatus:eX?eY:void 0,syncLoading:e0,syncError:e1,onRefreshSync:eX?e2:void 0,onRebaseOnMain:eX?eZ.rebaseOnMain:void 0,rebaseLoading:eZ.rebaseLoading,rebaseError:eZ.rebaseError,isRejecting:ev,chatInput:X,onChatInputChange:Y,interactiveAgentEnabled:E})}return(0,t.jsx)(R.BaseDrawer,{open:J,onClose:ez,size:"lg",modal:!1,"data-testid":"feature"===V.type?"feature-drawer":"repository-drawer",children:te})}e.s(["FeatureDrawerClient",()=>sk],36986)}]);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24270,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},34119,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],34119);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",()=>r],94819)},57779,80554,e=>{"use strict";var t=e.i(20314);function r({status:e,className:r=""}){return"idle"===e?null:(0,t.jsx)("span",{className:`absolute -top-0.5 -right-0.5 block rounded-full ${"processing"===e?"h-2.5 w-2.5 animate-pulse bg-blue-500":"h-2 w-2 bg-green-500"} ${r}`})}e.s(["ChatDotIndicator",()=>r],57779);var a=e.i(79054),n=e.i(62885);let i=(0,a.createContext)({getStatus:()=>"idle"});function o({children:e}){let r=function(){let{data:e}=(0,n.useQuery)({queryKey:["turn-statuses"],queryFn:async()=>{let e=await fetch("/api/interactive/chat/turn-statuses");return e.ok?e.json():{}},refetchInterval:5e3});return e??{}}(),o=(0,a.useMemo)(()=>({getStatus:e=>r[e]??"idle"}),[r]);return(0,t.jsx)(i.Provider,{value:o,children:e})}function l(e){return(0,a.useContext)(i).getStatus(e)}e.s(["TurnStatusesProvider",()=>o,"useTurnStatus",()=>l],80554)},32494,e=>{"use strict";let t=(0,e.i(3645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},39443,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let a=(0,e.i(18354).createLogger)("[SSE]");function n(e,t,r,a){if("u"<typeof EventSource)return()=>{};let n=null,i=!1,o=1e3,l=null,s=null;return!function d(){i||(n=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),a("connecting"),n.onopen=()=>{a("connected"),s=setTimeout(()=>{s=null,o=1e3},5e3)},n.onerror=()=>{n?.close(),n=null,a("disconnected"),null!==s&&(clearTimeout(s),s=null);let e=o;o=Math.min(2*e,3e4),l=setTimeout(()=>{l=null,d()},e)},n.addEventListener("notification",e=>{let a=JSON.parse(e.data);t(e=>{let t=[...e,a];return t.length>500?t.slice(-250):t}),r(a)}))}(),()=>{i=!0,null!==l&&(clearTimeout(l),l=null),null!==s&&(clearTimeout(s),s=null),n&&(n.close(),n=null)}}let i=(0,r.createContext)(null);function o({children:e,runId:o}){let{events:l,lastEvent:s,connectionStatus:d}=function(e){let[t,i]=(0,r.useState)([]),[o,l]=(0,r.useState)(null),[s,d]=(0,r.useState)("disconnected"),u=e?.runId,c=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;a.debug("event received:",e.eventType,e),i(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),l(e)}else"status"===t.type&&d(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return n(u,i,l,d);let t=!1,r={current:void 0};function a(e){t||(c.current=e,e.postMessage({type:"subscribe",runId:u}),d("connecting"))}function o(){if(t)return;let e=navigator.serviceWorker.controller;e&&(c.current=e,e.postMessage({type:"subscribe",runId:u}),d("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",o),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let o=e.active??e.installing??e.waiting;if(!o){r.current=n(u,i,l,d);return}if("activated"===o.state)a(o);else{let e=()=>{"activated"===o.state&&(o.removeEventListener("statechange",e),a(o))};o.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=n(u,i,l,d))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",o),c.current?.postMessage({type:"unsubscribe"}),c.current=null,r.current?.()}},[u,f]),{events:t,lastEvent:o,connectionStatus:s}}({runId:o}),u=(0,r.useMemo)(()=>({events:l,lastEvent:s,connectionStatus:d}),[l,s,d]);return(0,t.jsx)(i.Provider,{value:u,children:e})}function l(){let e=(0,r.useContext)(i);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}e.s(["AgentEventsProvider",()=>o,"useAgentEventsContext",()=>l],39443)},55016,e=>{"use strict";let t=(0,e.i(3645).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Clock",()=>t],55016)},71326,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(22528),n=e.i(5978),i=e.i(567),o=e.i(91967),l=e.i(86874),s="AlertDialog",[d,u]=(0,a.createContextScope)(s,[i.createDialogScope]),c=(0,i.createDialogScope)(),f=e=>{let{__scopeAlertDialog:r,...a}=e,n=c(r);return(0,t.jsx)(i.Root,{...n,...a,modal:!0})};f.displayName=s;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Trigger,{...o,...n,ref:r})});p.displayName="AlertDialogTrigger";var g=e=>{let{__scopeAlertDialog:r,...a}=e,n=c(r);return(0,t.jsx)(i.Portal,{...n,...a})};g.displayName="AlertDialogPortal";var h=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Overlay,{...o,...n,ref:r})});h.displayName="AlertDialogOverlay";var b="AlertDialogContent",[m,v]=d(b),x=(0,l.createSlottable)("AlertDialogContent"),y=r.forwardRef((e,a)=>{let{__scopeAlertDialog:l,children:s,...d}=e,u=c(l),f=r.useRef(null),p=(0,n.useComposedRefs)(a,f),g=r.useRef(null);return(0,t.jsx)(i.WarningProvider,{contentName:b,titleName:w,docsSlug:"alert-dialog",children:(0,t.jsx)(m,{scope:l,cancelRef:g,children:(0,t.jsxs)(i.Content,{role:"alertdialog",...u,...d,ref:p,onOpenAutoFocus:(0,o.composeEventHandlers)(d.onOpenAutoFocus,e=>{e.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,t.jsx)(x,{children:s}),(0,t.jsx)(N,{contentRef:f})]})})})});y.displayName=b;var w="AlertDialogTitle",j=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Title,{...o,...n,ref:r})});j.displayName=w;var C="AlertDialogDescription",S=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Description,{...o,...n,ref:r})});S.displayName=C;var k=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...n}=e,o=c(a);return(0,t.jsx)(i.Close,{...o,...n,ref:r})});k.displayName="AlertDialogAction";var D="AlertDialogCancel",P=r.forwardRef((e,r)=>{let{__scopeAlertDialog:a,...o}=e,{cancelRef:l}=v(D,a),s=c(a),d=(0,n.useComposedRefs)(r,l);return(0,t.jsx)(i.Close,{...s,...o,ref:d})});P.displayName=D;var N=({contentRef:e})=>{let t=`\`${b}\` requires a description for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
You can add a description to the \`${b}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
|
-
|
|
5
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${b}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
|
-
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",()=>k,"AlertDialog",()=>f,"AlertDialogAction",()=>k,"AlertDialogCancel",()=>P,"AlertDialogContent",()=>y,"AlertDialogDescription",()=>S,"AlertDialogOverlay",()=>h,"AlertDialogPortal",()=>g,"AlertDialogTitle",()=>j,"AlertDialogTrigger",()=>p,"Cancel",()=>P,"Content",()=>y,"Description",()=>S,"Overlay",()=>h,"Portal",()=>g,"Root",()=>f,"Title",()=>j,"Trigger",()=>p,"createAlertDialogScope",()=>u],28883);var A=e.i(28883),A=A,E=e.i(31777),_=e.i(35364);function O({...e}){return(0,t.jsx)(A.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(A.Portal,{"data-slot":"alert-dialog-portal",...e})}function R({className:e,onClick:r,...a}){return(0,t.jsx)(A.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,E.cn)("fixed inset-0 z-50 bg-black/50",e),onClick:e=>{e.stopPropagation(),r?.(e)},...a})}function M({className:e,size:r="default",...a}){return(0,t.jsxs)(T,{children:[(0,t.jsx)(R,{}),(0,t.jsx)(A.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,E.cn)("bg-background group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...a})]})}function L({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,E.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function z({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,E.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function F({className:e,...r}){return(0,t.jsx)(A.Title,{"data-slot":"alert-dialog-title",className:(0,E.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function I({className:e,...r}){return(0,t.jsx)(A.Description,{"data-slot":"alert-dialog-description",className:(0,E.cn)("text-muted-foreground text-sm",e),...r})}function $({className:e,variant:r="default",size:a="default",...n}){return(0,t.jsx)(_.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(A.Action,{"data-slot":"alert-dialog-action",className:(0,E.cn)(e),...n})})}function U({className:e,variant:r="outline",size:a="default",...n}){return(0,t.jsx)(_.Button,{variant:r,size:a,asChild:!0,children:(0,t.jsx)(A.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,E.cn)(e),...n})})}e.s(["AlertDialog",()=>O,"AlertDialogAction",()=>$,"AlertDialogCancel",()=>U,"AlertDialogContent",()=>M,"AlertDialogDescription",()=>I,"AlertDialogFooter",()=>z,"AlertDialogHeader",()=>L,"AlertDialogTitle",()=>F],71326)},30153,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(71326);let n=(0,r.createContext)(null);function i({children:e}){let i=(0,r.useRef)(null),o=(0,r.useRef)(null),[l,s]=(0,r.useState)(!1),d=(0,r.useCallback)(e=>{i.current=e},[]),u=(0,r.useCallback)(e=>{if(i.current?.isDirty){o.current=e,s(!0);return}e()},[]),c=(0,r.useCallback)(()=>{s(!1),i.current?.onReset(),i.current=null,o.current?.(),o.current=null},[]),f=(0,r.useCallback)(()=>{s(!1),o.current=null},[]),p=(0,r.useCallback)(()=>i.current?.isDirty??!1,[]);return(0,t.jsxs)(n,{value:{setGuard:d,guardedNavigate:u,getIsDirty:p},children:[e,(0,t.jsx)(a.AlertDialog,{open:l,children:(0,t.jsxs)(a.AlertDialogContent,{children:[(0,t.jsxs)(a.AlertDialogHeader,{children:[(0,t.jsx)(a.AlertDialogTitle,{children:"Discard unsaved changes?"}),(0,t.jsx)(a.AlertDialogDescription,{children:"You have unsaved changes. Are you sure you want to discard them?"})]}),(0,t.jsxs)(a.AlertDialogFooter,{children:[(0,t.jsx)(a.AlertDialogAction,{variant:"destructive",onClick:c,children:"Discard"}),(0,t.jsx)(a.AlertDialogCancel,{onClick:f,children:"Keep editing"})]})]})})]})}function o(){let e=(0,r.useContext)(n);if(!e)throw Error("useDrawerCloseGuard must be used within DrawerCloseGuardProvider");return e}function l({open:e,isDirty:t,onClose:a,onReset:n}){let{setGuard:i,guardedNavigate:l}=o();return(0,r.useEffect)(()=>(e?i({isDirty:t,onReset:n}):i(null),()=>i(null)),[e,t,n,i]),{attemptClose:(0,r.useCallback)(()=>{l(()=>{n(),a()})},[l,a,n])}}e.s(["DrawerCloseGuardProvider",()=>i,"useDrawerCloseGuard",()=>o,"useGuardedDrawerClose",()=>l])},48109,e=>{"use strict";let t=(0,e.i(3645).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],48109)},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},27069,e=>{"use strict";function t(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",()=>t])},81975,e=>{"use strict";let t=(0,e.i(3645).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",()=>t],81975)},98127,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({className:e,type:a,...n}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}e.s(["Input",()=>a])},66459,e=>{"use strict";let t=(0,e.i(3645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],12103)},76314,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return s},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function i(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,o(e));else t.set(r,o(a));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},95889,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return d},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(44066)._(e.r(76314)),o=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),s&&"object"==typeof s&&(s=String(i.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${a}${d}${n}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return l(e)}},58464,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return y},NormalizeError:function(){return v},PageNotFoundError:function(){return x},SP:function(){return h},ST:function(){return b},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return c},getLocationOrigin:function(){return d},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=d();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}let h="u">typeof performance,b=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class v extends Error{}class x extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class y extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},51380,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let a=e.r(58464),n=e.r(53626);function i(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},38670,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},24035,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return m},useLinkStatus:function(){return x}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(44066),o=e.r(20314),l=i._(e.r(79054)),s=e.r(95889),d=e.r(18152),u=e.r(80764),c=e.r(58464),f=e.r(99267);e.r(24270);let p=e.r(59624),g=e.r(51380),h=e.r(95555);function b(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function m(t){var r;let a,n,i,[s,m]=(0,l.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,l.useRef)(null),{href:y,as:w,children:j,prefetch:C=null,passHref:S,replace:k,shallow:D,scroll:P,onClick:N,onMouseEnter:A,onTouchStart:E,legacyBehavior:_=!1,onNavigate:O,ref:T,unstable_dynamicOnHover:R,...M}=t;a=j,_&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let L=l.default.useContext(d.AppRouterContext),z=!1!==C,F=!1!==C?null===(r=C)||"auto"===r?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:I,as:$}=l.default.useMemo(()=>{let e=b(y);return{href:e,as:w?b(w):e}},[y,w]);if(_){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=l.default.Children.only(a)}let U=_?n&&"object"==typeof n&&n.ref:T,B=l.default.useCallback(e=>(null!==L&&(x.current=(0,p.mountLinkInstance)(e,I,L,F,z,m)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[z,I,L,F,m]),W={ref:(0,u.useMergedRef)(B,U),onClick(t){_||"function"!=typeof N||N(t),_&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!L||t.defaultPrevented||function(t,r,a,n,i,o,s){if("u">typeof window){let d,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:c}=e.r(81574);l.default.startTransition(()=>{c(a||r,i?"replace":"push",o??!0,n.current)})}}(t,I,$,x,k,P,O)},onMouseEnter(e){_||"function"!=typeof A||A(e),_&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),L&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){_||"function"!=typeof E||E(e),_&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),L&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,c.isAbsoluteUrl)($)?W.href=$:_&&!S&&("a"!==n.type||"href"in n.props)||(W.href=(0,f.addBasePath)($)),i=_?l.default.cloneElement(n,W):(0,o.jsx)("a",{...M,...W,children:a}),(0,o.jsx)(v.Provider,{value:s,children:i})}e.r(38670);let v=(0,l.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,l.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},83241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=e.r(9328);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},90891,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},31218,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let a=e.r(20314),n=e.r(26036),i=e.r(58988),o=e.r(90891),l=e.r(22193);function s({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let s=(0,l.getDeploymentIdQueryOrEmptyString)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},84929,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(20314),n=e.r(79054),i=e.r(83241),o=e.r(31218);function l(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},d=function(e){let t={...s,...e},r=(0,n.lazy)(()=>t.loader().then(l)),d=t.loading;function u(e){let l=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,u=s?n.Suspense:n.Fragment,c=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(o.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(u,{...s?{fallback:l}:{},children:c})}return u.displayName="LoadableComponent",u}},47901,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(81258)._(e.r(84929));function n(e,t){let r={};"function"==typeof e&&(r.loader=e);let n={...r,...t};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(47901),n=e.i(83428),i=e.i(60112),o=e.i(2287),l=e.i(35364);let s=(0,a.default)(()=>e.A(89305).then(e=>e.FileManager),{loadableGenerated:{modules:[15567]},ssr:!1,loading:()=>(0,t.jsx)(d,{})});function d(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(n.Loader2,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function u(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}function c({open:e,onOpenChange:a,onSelect:n,initialPath:d}){let[c,f]=(0,r.useState)([]),[p,g]=(0,r.useState)(""),[h,b]=(0,r.useState)(!1),[m,v]=(0,r.useState)(null),x=(0,r.useRef)(!1),y=(0,r.useCallback)(async e=>{b(!0),v(null);try{let t=await u(e);f(t.entries),g(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";i.toast.error(e)}finally{b(!1)}},[]);(0,r.useEffect)(()=>{e&&!x.current&&(x.current=!0,y(d)),e||(x.current=!1)},[e,d,y]);let w=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&y(t)},[y]),j=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?v(e[0].absolutePath??null):v(null)},[]);function C(){n(null),a(!1)}return(0,t.jsx)(o.Dialog,{open:e,onOpenChange:e=>{e||C()},children:(0,t.jsxs)(o.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(o.DialogHeader,{children:[(0,t.jsx)(o.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(o.DialogDescription,{className:"truncate font-mono text-xs",children:p||"Loading..."})]}),(0,t.jsx)("div",{className:"shep-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:c.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:w,onSelectionChange:j,onRefresh:()=>y(p)},p)}),(0,t.jsxs)(o.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:C,children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"secondary",onClick:function(){p&&(n(p),a(!1))},disabled:!p,children:"Select Current Folder"}),(0,t.jsx)(l.Button,{onClick:function(){m&&(n(m),a(!1))},disabled:!m,children:"Select Folder"})]})]})})}e.s(["ReactFileManagerDialog",()=>c],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00691f054f9c25adaf533f263da1cba714d65b2461",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function a(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",()=>a],78521)},57638,71379,61238,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(94237);let n=(0,e.i(3645).default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);e.s(["default",()=>n],71379);var i=e.i(5240),o=e.i(31777);e.i(35364),e.i(98127),e.i(25235);var l=e.i(48249),s=e.i(90033);function d({...e}){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"sheet",...e})}function u({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function c({className:e,...r}){return(0,t.jsx)(s.Dialog.Overlay,{"data-slot":"sheet-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function f({className:e,children:r,side:a="right",showCloseButton:n=!0,...i}){return(0,t.jsxs)(u,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{"data-slot":"sheet-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===a&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===a&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===a&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===a&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...i,children:[r,n?(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,t.jsx)(l.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})]})}function p({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,o.cn)("flex flex-col gap-1.5 p-4",e),...r})}function g({className:e,...r}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,o.cn)("text-foreground font-semibold",e),...r})}function h({className:e,...r}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,o.cn)("text-muted-foreground text-sm",e),...r})}function b({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,o.cn)("bg-accent animate-pulse rounded-md",e),...r})}e.s(["Skeleton",()=>b],61238);var m=e.i(2828);let v="shep-sidebar-open",x=r.createContext(null);function y(){let e=r.useContext(x);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}function w({defaultOpen:e=!0,open:a,onOpenChange:n,className:i,style:l,children:s,...d}){let u=function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}(),[c,f]=r.useState(!1),[p,g]=r.useState(!1),[h,b]=r.useState(e),y=a??h,w=r.useCallback(e=>{let t="function"==typeof e?e(y):e;n?n(t):b(t);try{localStorage.setItem(v,String(t)),document.cookie=`${v}=${t}; path=/; max-age=31536000; SameSite=Lax`}catch{}},[n,y]),j=r.useCallback(()=>(g(!0),u?f(e=>!e):w(e=>!e)),[u,w,f]);r.useEffect(()=>{try{if(!document.cookie.includes(v)){let e=localStorage.getItem(v);null!=e&&(document.cookie=`${v}=${e}; path=/; max-age=31536000; SameSite=Lax`)}}catch{}},[]),r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),j())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[j]);let C=y?"expanded":"collapsed",S=r.useMemo(()=>({state:C,open:y,setOpen:w,isMobile:u,openMobile:c,setOpenMobile:f,toggleSidebar:j,animated:p}),[C,y,w,u,c,f,j,p]);return(0,t.jsx)(x.Provider,{value:S,children:(0,t.jsx)(m.TooltipProvider,{delayDuration:0,children:(0,t.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},className:(0,o.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",i),...d,children:s})})})}function j({side:e="left",variant:r="sidebar",collapsible:a="offcanvas",className:n,children:i,...l}){let{isMobile:s,state:u,openMobile:c,setOpenMobile:b,animated:m}=y();return"none"===a?(0,t.jsx)("div",{"data-slot":"sidebar",className:(0,o.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...l,children:i}):s?(0,t.jsx)(d,{open:c,onOpenChange:b,...l,children:(0,t.jsxs)(f,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,t.jsxs)(p,{className:"sr-only",children:[(0,t.jsx)(g,{children:"Sidebar"}),(0,t.jsx)(h,{children:"Displays the mobile sidebar."})]}),(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:i})]})}):(0,t.jsxs)("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":"collapsed"===u?a:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[(0,t.jsx)("div",{"data-slot":"sidebar-gap",className:(0,o.cn)("relative w-(--sidebar-width) bg-transparent",m&&"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===r||"inset"===r?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,t.jsx)("div",{"data-slot":"sidebar-container",className:(0,o.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",m&&"transition-[left,right,width] duration-200 ease-linear","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===r||"inset"===r?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...l,children:(0,t.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function C({className:e,...r}){let{toggleSidebar:a}=y();return(0,t.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:(0,o.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...r})}function S({className:e,...r}){return(0,t.jsx)("main",{"data-slot":"sidebar-inset",className:(0,o.cn)("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...r})}function k({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,o.cn)("flex flex-col gap-2 p-2",e),...r})}function D({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,o.cn)("flex flex-col gap-2 p-2",e),...r})}function P({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,o.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})}function N({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,o.cn)("relative flex w-full min-w-0 flex-col p-2",e),...r})}function A({className:e,asChild:r=!1,...a}){let n=r?i.Slot.Root:"div";return(0,t.jsx)(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,o.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a})}function E({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:(0,o.cn)("w-full text-sm",e),...r})}function _({className:e,...r}){return(0,t.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,o.cn)("flex w-full min-w-0 flex-col gap-1",e),...r})}function O({className:e,...r}){return(0,t.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,o.cn)("group/menu-item relative",e),...r})}let T=(0,a.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function R({asChild:e=!1,isActive:r=!1,variant:a="default",size:n="default",tooltip:l,className:s,...d}){let u=e?i.Slot.Root:"button",{isMobile:c,state:f}=y(),p=(0,t.jsx)(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":r,className:(0,o.cn)(T({variant:a,size:n}),s),...d});return l?("string"==typeof l&&(l={children:l}),(0,t.jsxs)(m.Tooltip,{children:[(0,t.jsx)(m.TooltipTrigger,{asChild:!0,children:p}),(0,t.jsx)(m.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==f||c,...l})]})):p}e.s(["Sidebar",()=>j,"SidebarContent",()=>P,"SidebarFooter",()=>D,"SidebarGroup",()=>N,"SidebarGroupContent",()=>E,"SidebarGroupLabel",()=>A,"SidebarHeader",()=>k,"SidebarInset",()=>S,"SidebarMenu",()=>_,"SidebarMenuButton",()=>R,"SidebarMenuItem",()=>O,"SidebarProvider",()=>w,"SidebarRail",()=>C,"useSidebar",()=>y],57638)},5147,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let a={"action-required":"action-needed",running:"in-progress",done:"done",blocked:"blocked",pending:"pending",error:"error",creating:null,deleting:null,archived:null};function n(e){return a[e]}let i=(0,r.createContext)(null);function o({children:e}){let[a,n]=(0,r.useState)([]),[o,l]=(0,r.useState)(!1),s=(0,r.useMemo)(()=>({features:a,setFeatures:n,hasRepositories:o,setHasRepositories:l}),[a,o]);return(0,t.jsx)(i.Provider,{value:s,children:e})}function l(){let e=(0,r.useContext)(i);if(!e)throw Error("useSidebarFeaturesContext must be used within a <SidebarFeaturesProvider>");return e}e.s(["SidebarFeaturesProvider",()=>o,"mapNodeStateToSidebarStatus",()=>n,"useSidebarFeaturesContext",()=>l])},89305,e=>{e.v(t=>Promise.all(["static/chunks/6d7b999c99d6d175.js"].map(t=>e.l(t))).then(()=>t(15567)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16868,e=>{"use strict";var t=e.i(43698);e.s(["PaperclipIcon",()=>t.default])},70471,e=>{"use strict";var t=e.i(16298);e.s(["FileText",()=>t.default])},42076,e=>{"use strict";async function t(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["pickFiles",()=>t])},83843,e=>{"use strict";let t=(0,e.i(3645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],83843)},51911,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(91967),s=e.i(5978),i=e.i(22528),o=e.i(36589),l=e.i(23405),n=e.i(77624),d=e.i(87620),c="Switch",[p,u]=(0,i.createContextScope)(c),[h,m]=p(c),x=a.forwardRef((e,i)=>{let{__scopeSwitch:l,name:n,checked:p,defaultChecked:u,required:m,disabled:x,value:f="on",onCheckedChange:g,form:v,...w}=e,[y,C]=a.useState(null),k=(0,s.useComposedRefs)(i,e=>C(e)),N=a.useRef(!1),T=!y||v||!!y.closest("form"),[S,P]=(0,o.useControllableState)({prop:p,defaultProp:u??!1,onChange:g,caller:c});return(0,t.jsxs)(h,{scope:l,checked:S,disabled:x,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":S,"aria-required":m,"data-state":j(S),"data-disabled":x?"":void 0,disabled:x,value:f,...w,ref:k,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{P(e=>!e),T&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),T&&(0,t.jsx)(b,{control:y,bubbles:!N.current,name:n,value:f,checked:S,required:m,disabled:x,form:v,style:{transform:"translateX(-100%)"}})]})});x.displayName=c;var f="SwitchThumb",g=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...s}=e,i=m(f,r);return(0,t.jsx)(d.Primitive.span,{"data-state":j(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:a})});g.displayName=f;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:i,bubbles:o=!0,...d},c)=>{let p=a.useRef(null),u=(0,s.useComposedRefs)(p,c),h=(0,l.usePrevious)(i),m=(0,n.useSize)(r);return a.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==i&&t){let a=new Event("click",{bubbles:o});t.call(e,i),e.dispatchEvent(a)}},[h,i,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...d,tabIndex:-1,ref:u,style:{...d.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function j(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>x,"Switch",()=>x,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>u],95291);var v=e.i(95291),v=v,w=e.i(31777);function y({className:e,size:a="default",...r}){return(0,t.jsx)(v.Root,{"data-slot":"switch","data-size":a,className:(0,w.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...r,children:(0,t.jsx)(v.Thumb,{"data-slot":"switch-thumb",className:(0,w.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>y],51911)},15203,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(31406),s=e.i(60112),i=e.i(21023);let o=(0,i.createServerReference)("40f0a407b3e01924a5eaeb9fba767be80f4b49ee78",i.callServer,void 0,i.findSourceMapURL,"createFeature");var l=e.i(16868),n=e.i(83843),d=e.i(97667),c=e.i(53360),p=e.i(55016),u=e.i(91925),h=e.i(83428);let m=(0,e.i(3645).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);var x=e.i(70471),f=e.i(31777),g=e.i(8361);e.i(1650);var b=e.i(11495),j=e.i(45811),v=e.i(35364),w=e.i(98127),y=e.i(48306),C=e.i(41957),k=e.i(81846),N=e.i(90382),T=e.i(51911),S=e.i(2828),P=e.i(30153);e.i(50032);var R=e.i(86254);let E=(0,i.createServerReference)("40e9ec516fdf6c900fe222e3a6fd4d75b55d238cc3",i.callServer,void 0,i.findSourceMapURL,"getViewerPermission");var F=e.i(41413),D=e.i(25235),z=e.i(78521);e.i(13322);var L=e.i(61201),A=e.i(75921),I=e.i(60452),O=e.i(42076);let U=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),M=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],q={allowPrd:!1,allowPlan:!1,allowMerge:!1};function B({open:e,onClose:r,onSubmit:s,repositoryPath:i,isSubmitting:o=!1,workflowDefaults:n,features:d,repositories:u,initialParentId:h,currentAgentType:w,currentModel:N,initialDescription:D,canPushDirectly:z}){let L=(0,g.useSoundAction)("create"),A=i&&(!u||0===u.length||u.some(e=>e.path===i))?i:"",I=n?.approvalGates??q,B=n?.push??!1,G=n?.openPr??!1,K=n?.ciWatchEnabled!==!1,H=n?.enableEvidence??!1,V=n?.commitEvidence??!1,[Y,J]=(0,a.useState)(D??"");(0,a.useEffect)(()=>{D&&J(D)},[D]);let[X,Z]=(0,a.useState)([]),[Q,_]=(0,a.useState)({...I}),[ee,et]=(0,a.useState)(B),[ea,er]=(0,a.useState)(G),[es,ei]=(0,a.useState)(n?.ciWatchEnabled!==!1),[eo,el]=(0,a.useState)(H),[en,ed]=(0,a.useState)(V),[ec,ep]=(0,a.useState)(void 0),[eu,eh]=(0,a.useState)(!1),[em,ex]=(0,a.useState)(!1),[ef,eg]=(0,a.useState)(!1),[eb,ej]=(0,a.useState)(!0),[ev,ew]=(0,a.useState)(void 0),[ey,eC]=(0,a.useState)(void 0),[ek,eN]=(0,a.useState)(A||void 0),[eT,eS]=(0,a.useState)(u??[]),[eP,eR]=(0,a.useState)(!1),[eE,eF]=(0,a.useState)(null),[eD,ez]=(0,a.useState)(!1),eL=(0,a.useRef)(crypto.randomUUID()),eA=(0,a.useRef)(0),eI=(0,a.useRef)(null);(0,a.useEffect)(()=>{n&&(_({...n.approvalGates}),et(n.push),er(n.openPr),ei(!1!==n.ciWatchEnabled),el(n.enableEvidence),ed(n.commitEvidence))},[n]),(0,a.useEffect)(()=>{eS(u??[])},[u]),(0,a.useEffect)(()=>{e&&h&&ep(h)},[e,h]);let[eO,eU]=(0,a.useState)(z??!1);(0,a.useEffect)(()=>{eU(z??!1)},[z]);let eM=(0,a.useRef)(ek);(0,a.useEffect)(()=>{ek&&ek!==eM.current&&(eM.current=ek,E(ek).then(e=>eU(e.canPushDirectly)).catch(()=>eU(!1)))},[ek]),(0,a.useEffect)(()=>{eO&&(eg(!1),et(B),er(G),ej(!0))},[eO,B,G]);let eq=(0,a.useCallback)(()=>{J(""),Z([]),_({...I}),et(B),er(G),ei(K),el(H),ed(V),ep(void 0),eN(A||void 0),eS(u??[]),eh(!1),ex(!1),eg(!1),ej(!0),ew(void 0),eC(void 0),eF(null),eA.current=0,eR(!1)},[I,B,G,H,K,V,A,u]),eB=""!==Y.trim()||X.length>0,{attemptClose:e$}=(0,P.useGuardedDrawerClose)({open:e,isDirty:eB,onClose:r,onReset:eq}),eW=(0,a.useCallback)(async e=>{for(let t of(eF(null),e)){if(t.size>0xa00000)return void eF(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!U.has(e))return void eF(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();Z(a=>[...a,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let a=new FormData;a.append("file",t),a.append("sessionId",eL.current);let r=await fetch("/api/attachments/upload",{method:"POST",body:a});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));Z(t=>t.filter(t=>t.id!==e)),eF(t.error??"Upload failed");return}let s=await r.json();Z(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{Z(t=>t.filter(t=>t.id!==e)),eF("Upload failed")}}},[]),eG=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current+=1,1===eA.current&&eR(!0)},[]),eK=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current-=1,0===eA.current&&eR(!1)},[]),eH=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eV=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eA.current=0,eR(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eW(t)},[eW]),eY=(0,a.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let a=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&a.push(t)}a.length>0&&(e.preventDefault(),eW(a))},[eW]),eJ=(0,a.useCallback)(e=>{if(e.preventDefault(),!Y.trim())return;let t=ek??A;t&&(L.play(),s({description:Y.trim(),attachments:X.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:Q.allowPrd??!1,allowPlan:Q.allowPlan??!1,allowMerge:Q.allowMerge??!1},push:!!ef||ee||ea,openPr:!!ef||ea,ciWatchEnabled:es,enableEvidence:eo,commitEvidence:en,fast:eu,forkAndPr:ef,commitSpecs:eb,...em?{pending:em}:{},...ev?{agentType:ev}:{},...ey?{model:ey}:{},...ec?{parentId:ec}:{},sessionId:eL.current}),eq())},[Y,X,Q,ek,A,s,ee,ea,eo,es,en,eu,ef,eb,em,ev,ey,ec,L,eq]),eX=(0,a.useCallback)(async()=>{try{let e=await (0,O.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();Z(a=>[...a,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let a=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eL.current})});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));Z(t=>t.filter(t=>t.id!==e)),eF(t.error??"Upload failed");return}let r=await a.json();Z(t=>t.some(t=>t.id!==e&&t.path===r.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...r,id:e,loading:!1}:t))}catch{Z(t=>t.filter(t=>t.id!==e)),eF("Upload failed")}}}catch{}},[]),eZ=(0,a.useCallback)(e=>{Z(t=>t.filter(t=>t.id!==e))},[]),eQ=(0,a.useCallback)((e,t)=>{Z(a=>a.map(a=>a.id===e?{...a,notes:t}:a))},[]),e_=(0,a.useRef)(null),e0=(0,a.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),e_.current?.requestSubmit())},[]),e1=(0,a.useCallback)(()=>{ez(!0)},[]),e5=(0,a.useCallback)(()=>{setTimeout(()=>{let e=eI.current?.contains(document.activeElement),t=eI.current?.querySelector('[aria-expanded="true"]')!==null;e||t||ez(!1)},0)},[]),e2=d&&d.length>0,e3=!A&&!ek,e4=!A&&void 0!==u;return(0,t.jsx)(b.BaseDrawer,{open:e,onClose:e$,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(j.DrawerTitle,{children:"NEW FEATURE"})]}),o?(0,t.jsx)(j.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",onClick:e$,disabled:o,children:"Cancel"}),(0,t.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!Y.trim()||o||e3,children:o?"Creating...":"+ Create Feature"})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:e_,id:"create-feature-form",onSubmit:eJ,onKeyDown:e0,className:"flex flex-col gap-4",children:[e4?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(C.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)(W,{repositories:eT,value:ek,onChange:eN,onAddRepository:e=>{eS(t=>[...t,e]),eN(e.path)},disabled:o})]}):A?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(C.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"REPOSITORY"}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:u?.find(e=>e.path===A)?.name??A.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":eP?"true":"false",onDragEnter:eG,onDragLeave:eK,onDragOver:eH,onDrop:eV,className:(0,f.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eP&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(C.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,t.jsxs)("div",{ref:eI,onFocus:e1,onBlur:e5,className:(0,f.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eD&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(y.Textarea,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:Y,onChange:e=>J(e.target.value),onPaste:eY,required:!0,disabled:o,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),X.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:X.map(e=>(0,t.jsx)(R.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>eZ(e.id),disabled:o,loading:e.loading,notes:e.notes,onNotesChange:t=>eQ(e.id,t)},e.id))}),eE?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:eE}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(F.AgentModelPicker,{initialAgentType:ev??w??"claude-code",initialModel:ey??N??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{ew(e),eC(t)},disabled:o,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"pending-mode",checked:em,onCheckedChange:ex,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(p.Clock,{className:"h-3.5 w-3.5"}),"Pending"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Create without starting — start manually later."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"fast-mode",checked:eu,onCheckedChange:eh,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(c.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:eX,disabled:o,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(l.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),e2&&void 0!==h?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(C.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,t.jsx)($,{features:d,value:ec,onChange:ep,disabled:o})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:M.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:`approve-${e.id}`,size:"sm",checked:Q[e.id]??!1,onCheckedChange:t=>_(a=>({...a,[e.id]:t})),disabled:o||eu&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(C.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:eu&&("allowPrd"===e.id||"allowPlan"===e.id)?"Skipped in Fast Mode":e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=M.every(e=>Q[e.id]),t={};for(let a of M)t[a.id]=!e;_(t)},disabled:o,className:(0,f.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",M.every(e=>Q[e.id])&&"text-primary"),children:"All"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"EVIDENCE"})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Collect and attach evidence after implementation."})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"enable-evidence",size:"sm",checked:eo,onCheckedChange:e=>{el(e),e||ed(!1)},disabled:o}),(0,t.jsx)(C.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:"Collect"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Capture screenshots and artifacts after implementation."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-evidence",size:"sm",checked:en,onCheckedChange:ed,disabled:o||!eo||!ea&&!ef}),(0,t.jsx)(C.Label,{htmlFor:"commit-evidence",className:(0,f.cn)("cursor-pointer text-xs font-medium",(!eo||!ea&&!ef)&&"opacity-50"),children:"Add to PR"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ea||ef?eo?"Include evidence in the pull request body.":"Requires evidence collection to be enabled":"Requires PR to be enabled"})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:"GIT"}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"push",size:"sm",checked:!!ef||ee||ea,onCheckedChange:e=>{et(e),!e&&ea&&er(!1)},disabled:o||ef}),(0,t.jsx)(C.Label,{htmlFor:"push",className:(0,f.cn)("cursor-pointer text-xs font-medium",ef&&"opacity-50"),children:"Push"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ef?"Enabled — contributing to upstream":"Push branch to remote after implementation."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"open-pr",size:"sm",checked:!!ef||ea,onCheckedChange:e=>{er(e),e||ed(!1)},disabled:o||ef}),(0,t.jsx)(C.Label,{htmlFor:"open-pr",className:(0,f.cn)("cursor-pointer text-xs font-medium",ef&&"opacity-50"),children:"PR"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ef?"Enabled — contributing to upstream":"Open a pull request after pushing."})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"ci-watch",size:"sm",checked:es,onCheckedChange:ei,disabled:o}),(0,t.jsx)(C.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:"Watch"})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Watch CI and auto-fix after push."})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-specs",size:"sm",checked:eb,onCheckedChange:ej,disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(x.FileText,{className:"h-3 w-3"}),"Commit Specs"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Commit specs to repository."})]}),!eO&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"fork-and-pr",size:"sm",checked:ef,onCheckedChange:e=>{eg(e),e&&ej(!1)},disabled:o}),(0,t.jsxs)(C.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(m,{className:"h-3 w-3"}),"Fork & PR"]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:"Contribute via fork (PR to upstream)."})]})]})]})]})]})})})})}function $({features:e,value:r,onChange:s,disabled:i}){let[o,l]=(0,a.useState)(!1),[c,p]=(0,a.useState)(""),u=(0,a.useRef)(null),h=e.find(e=>e.id===r),m=c.trim()?e.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())):e,x=(0,a.useCallback)(e=>{s(e),l(!1),p("")},[s]);return(0,a.useEffect)(()=>{o?setTimeout(()=>u.current?.focus(),0):p("")},[o]),(0,t.jsxs)(N.Popover,{open:o,onOpenChange:l,children:[(0,t.jsx)(N.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":o,"aria-label":"Parent Feature",disabled:i,"data-testid":"parent-feature-combobox",className:(0,f.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!h&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:h?`${h.name} (${h.id.slice(0,8)})`:"Select parent feature..."}),(0,t.jsx)(n.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(N.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(w.Input,{ref:u,placeholder:"Search features...",value:c,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===r,onClick:()=>x(void 0),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===r&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",void 0!==r&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===m.length&&c?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):m.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.id,onClick:()=>x(e.id),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",r===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",r!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}function W({repositories:e,value:r,onChange:s,onAddRepository:i,disabled:o}){let[l,c]=(0,a.useState)(!1),[p,m]=(0,a.useState)(""),[x,g]=(0,a.useState)(!1),[b,j]=(0,a.useState)(null),[v,y]=(0,a.useState)(!1),C=(0,a.useRef)(null),{reactFileManager:k}=(0,A.useFeatureFlags)(),T=e.find(e=>e.path===r),S=p.trim()?e.filter(e=>e.name.toLowerCase().includes(p.toLowerCase())||e.path.toLowerCase().includes(p.toLowerCase())):e,P=(0,a.useCallback)(e=>{s(e),c(!1),m("")},[s]),R=(0,a.useCallback)(async e=>{let t=await (0,I.addRepository)({path:e});if(t.error){j(t.error),g(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};i?.(e),s(e.path),c(!1),m("")}},[i,s]),E=(0,a.useCallback)(async()=>{if(!x){if(k)return void y(!0);g(!0),j(null);try{let e=await (0,z.pickFolder)();if(!e)return void g(!1);await R(e)}catch{y(!0)}finally{g(!1)}}},[x,k,R]),F=(0,a.useCallback)(async e=>{if(y(!1),e){g(!0),j(null);try{await R(e)}catch(e){j(e instanceof Error?e.message:"Failed to add repository")}finally{g(!1)}}},[R]);return(0,a.useEffect)(()=>{l?setTimeout(()=>C.current?.focus(),0):m("")},[l]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(N.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(N.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":l,"aria-label":"Repository",disabled:o,"data-testid":"repository-combobox",className:(0,f.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!T&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:T?T.name:"Select repository..."}),(0,t.jsx)(n.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(N.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(w.Input,{ref:C,placeholder:"Search repositories...",value:p,onChange:e=>m(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===S.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):S.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r===e.path,onClick:()=>P(e.path),className:(0,f.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",r===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,f.cn)("h-4 w-4 shrink-0",r!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(D.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:E,disabled:x,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[x?(0,t.jsx)(h.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(u.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),b?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:b}):null]})})]}),(0,t.jsx)(L.ReactFileManagerDialog,{open:v,onOpenChange:e=>{e||y(!1)},onSelect:F})]})}function G({repositoryPath:e,initialParentId:i,initialDescription:l,features:n,repositories:d,workflowDefaults:c,currentAgentType:p,currentModel:u,canPushDirectly:h}){let m=(0,r.useRouter)(),[x,f]=(0,a.useState)(!1),g=(0,r.usePathname)().startsWith("/create"),b=!x&&g;(0,a.useEffect)(()=>{!g&&x&&f(!1)},[g,x]);let j=(0,a.useCallback)(()=>{m.push("/")},[m]),v=(0,a.useCallback)(e=>{f(!0),m.push("/"),o(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),f(!1)})},[m]);return(0,t.jsx)(B,{open:b,onClose:j,onSubmit:v,repositoryPath:e,features:n,repositories:d,workflowDefaults:c,initialParentId:i,initialDescription:l,isSubmitting:x,currentAgentType:p,currentModel:u,canPushDirectly:h})}e.s(["CreateDrawerClient",()=>G],15203)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76852,e=>{"use strict";var t=e.i(79054),r=e.i(6564),a=e.i(39275),l=e.i(26988),c=e.i(21023);let s=(0,c.createServerReference)("40cff3606219016f24bef4d21359b742dee6c5aa68",c.callServer,void 0,c.findSourceMapURL,"syncRepository");function u(e){let[c,u]=(0,t.useState)(!1),[i,n]=(0,t.useState)(!1),[d,o]=(0,t.useState)(!1),[p,f]=(0,t.useState)(!1),[h,y]=(0,t.useState)(null),[m,v]=(0,t.useState)(null),[k,S]=(0,t.useState)(null),[x,b]=(0,t.useState)(null),R=(0,t.useRef)(null),M=(0,t.useRef)(null),g=(0,t.useRef)(null),C=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),M.current&&clearTimeout(M.current),g.current&&clearTimeout(g.current),C.current&&clearTimeout(C.current)},[]);let T=(0,t.useCallback)(async(t,r,a,l,c)=>{if(e&&!c){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>T(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),u,y,R,c),[T,c,e]),openInShell:(0,t.useCallback)(()=>T(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),n,v,M,i),[T,i,e]),openFolder:(0,t.useCallback)(()=>T(()=>(0,l.openFolder)(e.repositoryPath),o,S,g,d),[T,d,e]),syncMain:(0,t.useCallback)(()=>T(()=>s(e.repositoryId??""),f,b,C,p),[T,p,e]),ideLoading:c,shellLoading:i,folderLoading:d,syncLoading:p,ideError:h,shellError:m,folderError:k,syncError:x}}e.s(["useRepositoryActions",()=>u],76852)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},8986,6564,39275,26988,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986);var r=e.i(21023);let a=(0,r.createServerReference)("4065daa4edfafe9fc8c07f75fefe357d2f8701653e",r.callServer,void 0,r.findSourceMapURL,"openIde");e.s(["openIde",()=>a],6564);let l=(0,r.createServerReference)("40b6e62477e96bc1fd2ebb7d3157e48f3f2266298a",r.callServer,void 0,r.findSourceMapURL,"openShell");e.s(["openShell",()=>l],39275);let c=(0,r.createServerReference)("40865682d29550a7e439c0ea91c2d82c0c6717b4a3",r.callServer,void 0,r.findSourceMapURL,"openFolder");e.s(["openFolder",()=>c],26988)},53360,e=>{"use strict";let t=(0,e.i(3645).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],53360)},97667,e=>{"use strict";var t=e.i(1012);e.s(["CheckIcon",()=>t.default])},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},3214,e=>{"use strict";let t=(0,e.i(3645).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],3214)},10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var r=e.i(80986);e.s(["CheckCircle2",()=>r.default],35e3)},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function a({icon:e,title:a,description:l,action:c,className:s,...u}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",s),...u,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,c?(0,t.jsx)("div",{className:"mt-2",children:c}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},60452,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("40a09ffc06dbb951db11c053380b28d8311978d4e1",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>r])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},3214,e=>{"use strict";let t=(0,e.i(3645).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],3214)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},23405,e=>{"use strict";var t=e.i(79054);function a(e){let a=t.useRef({value:e,previous:e});return t.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}e.s(["usePrevious",()=>a])},58860,44229,e=>{"use strict";let t=(0,e.i(3645).default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",()=>t],58860);var a=e.i(93752);e.s(["Code",()=>a.default],44229)},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},51911,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(91967),s=e.i(5978),i=e.i(22528),c=e.i(36589),n=e.i(23405),d=e.i(77624),u=e.i(87620),l="Switch",[o,h]=(0,i.createContextScope)(l),[p,f]=o(l),k=a.forwardRef((e,i)=>{let{__scopeSwitch:n,name:d,checked:o,defaultChecked:h,required:f,disabled:k,value:y="on",onCheckedChange:m,form:x,...g}=e,[w,S]=a.useState(null),z=(0,s.useComposedRefs)(i,e=>S(e)),M=a.useRef(!1),R=!w||x||!!w.closest("form"),[C,P]=(0,c.useControllableState)({prop:o,defaultProp:h??!1,onChange:m,caller:l});return(0,t.jsxs)(p,{scope:n,checked:C,disabled:k,children:[(0,t.jsx)(u.Primitive.button,{type:"button",role:"switch","aria-checked":C,"aria-required":f,"data-state":v(C),"data-disabled":k?"":void 0,disabled:k,value:y,...g,ref:z,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{P(e=>!e),R&&(M.current=e.isPropagationStopped(),M.current||e.stopPropagation())})}),R&&(0,t.jsx)(b,{control:w,bubbles:!M.current,name:d,value:y,checked:C,required:f,disabled:k,form:x,style:{transform:"translateX(-100%)"}})]})});k.displayName=l;var y="SwitchThumb",m=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...s}=e,i=f(y,r);return(0,t.jsx)(u.Primitive.span,{"data-state":v(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:a})});m.displayName=y;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:i,bubbles:c=!0,...u},l)=>{let o=a.useRef(null),h=(0,s.useComposedRefs)(o,l),p=(0,n.usePrevious)(i),f=(0,d.useSize)(r);return a.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(p!==i&&t){let a=new Event("click",{bubbles:c});t.call(e,i),e.dispatchEvent(a)}},[p,i,c]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...u,tabIndex:-1,ref:h,style:{...u.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>k,"Switch",()=>k,"SwitchThumb",()=>m,"Thumb",()=>m,"createSwitchScope",()=>h],95291);var x=e.i(95291),x=x,g=e.i(31777);function w({className:e,size:a="default",...r}){return(0,t.jsx)(x.Root,{"data-slot":"switch","data-size":a,className:(0,g.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...r,children:(0,t.jsx)(x.Thumb,{"data-slot":"switch-thumb",className:(0,g.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911)}]);
|