@shepai/cli 1.170.0 → 1.171.0-pr527.e2ee839
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/apis/json-schema/ActionDispositionEntry.yaml +14 -0
- package/apis/json-schema/DependencyFinding.yaml +28 -0
- package/apis/json-schema/DependencyRiskType.yaml +11 -0
- package/apis/json-schema/DependencyRules.yaml +38 -0
- package/apis/json-schema/EffectivePolicySnapshot.yaml +24 -0
- package/apis/json-schema/ReleaseIntegrityCheck.yaml +22 -0
- package/apis/json-schema/ReleaseIntegrityCheckType.yaml +9 -0
- package/apis/json-schema/ReleaseIntegrityResult.yaml +16 -0
- package/apis/json-schema/ReleaseRules.yaml +21 -0
- package/apis/json-schema/SecurityActionCategory.yaml +10 -0
- package/apis/json-schema/SecurityActionDisposition.yaml +8 -0
- package/apis/json-schema/SecurityConfig.yaml +17 -0
- package/apis/json-schema/SecurityEvent.yaml +36 -0
- package/apis/json-schema/SecurityMode.yaml +8 -0
- package/apis/json-schema/SecurityPolicy.yaml +24 -0
- package/apis/json-schema/SecuritySeverity.yaml +9 -0
- package/apis/json-schema/Settings.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +15 -1
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +3 -1
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts +76 -0
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.js +11 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +38 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +9 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts +77 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.js +13 -0
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +11 -0
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
- 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 +2 -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 +2 -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 +2 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +1 -0
- 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 +2 -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 +2 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts +71 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.js +215 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts +24 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js +56 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts +36 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.js +76 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts +14 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.js +46 -0
- package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.d.ts +1 -0
- package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.js +59 -2
- package/dist/packages/core/src/domain/errors/security-violation.error.d.ts +15 -0
- package/dist/packages/core/src/domain/errors/security-violation.error.d.ts.map +1 -0
- package/dist/packages/core/src/domain/errors/security-violation.error.js +20 -0
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +5 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +259 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +43 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +57 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.js +55 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +3 -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 +14 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.js +31 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts +29 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.js +53 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts +24 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.js +96 -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 +12 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +12 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts +22 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.js +30 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +10 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +34 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +7 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +19 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts +45 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.js +70 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +10 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +10 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +101 -1
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts +53 -0
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.js +241 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.js +194 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts +28 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.js +50 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.js +147 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.js +174 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +61 -0
- package/dist/src/presentation/cli/commands/security.command.d.ts +16 -0
- package/dist/src/presentation/cli/commands/security.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/security.command.js +118 -0
- package/dist/src/presentation/cli/commands/upgrade.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/upgrade.command.js +68 -3
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/web/app/actions/security.d.ts +28 -0
- package/dist/src/presentation/web/app/actions/security.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/security.js +59 -0
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts +3 -1
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-graph-nodes.js +2 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +3 -1
- 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.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +2 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts +3 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +3 -2
- package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts +6 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.js +29 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.js +53 -0
- package/dist/src/presentation/web/components/common/security-badge.d.ts +7 -0
- package/dist/src/presentation/web/components/common/security-badge.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/security-badge.js +30 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.d.ts +12 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.js +20 -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 +16 -3
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts +6 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.js +60 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.js +116 -0
- package/dist/translations/ar/cli.json +22 -0
- package/dist/translations/ar/web.json +43 -1
- package/dist/translations/de/cli.json +22 -0
- package/dist/translations/de/web.json +43 -1
- package/dist/translations/en/cli.json +22 -0
- package/dist/translations/en/web.json +43 -1
- package/dist/translations/es/cli.json +22 -0
- package/dist/translations/es/web.json +43 -1
- package/dist/translations/fr/cli.json +22 -0
- package/dist/translations/fr/web.json +43 -1
- package/dist/translations/he/cli.json +22 -0
- package/dist/translations/he/web.json +43 -1
- package/dist/translations/pt/cli.json +22 -0
- package/dist/translations/pt/web.json +43 -1
- package/dist/translations/ru/cli.json +22 -0
- package/dist/translations/ru/web.json +43 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- 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 +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -1
- 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 +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +2 -1
- 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 +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -1
- 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 +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -1
- 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 +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -1
- 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 +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +2 -1
- 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 +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -1
- 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 +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -1
- 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 +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js +2 -1
- 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 +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -1
- 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 +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -1
- 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 +27 -27
- package/web/.next/server/app/(dashboard)/page.js +2 -1
- 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 +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +2 -1
- 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 +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -1
- 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 +6 -6
- 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/api/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +33 -18
- package/web/.next/server/app/settings/page.js +1 -1
- 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 +13 -13
- package/web/.next/server/app/skills/page.js +2 -1
- 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 +11 -11
- package/web/.next/server/app/tools/page.js +2 -1
- 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 +6 -6
- 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]__c78383b1._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.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__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +3 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -0
- 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 +2 -2
- 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]__1f389e5d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.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]__51ec77a8._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9a9cb046._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9a9cb046._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_02580450._.js +3 -0
- package/web/.next/server/chunks/ssr/_02580450._.js.map +1 -0
- 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/_1594e369._.js +9 -0
- package/web/.next/server/chunks/ssr/_1594e369._.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/_21d37090._.js +3 -0
- package/web/.next/server/chunks/ssr/_21d37090._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5119a3df._.js +1 -1
- package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -1
- 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/{_0d7dd23b._.js → _767748d2._.js} +2 -2
- package/web/.next/server/chunks/ssr/_767748d2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_df737cce._.js +1 -1
- package/web/.next/server/chunks/ssr/{_77ae079a._.js → _ee42a212._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_77ae079a._.js.map → _ee42a212._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js +4 -0
- package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ff04802c._.js +3 -0
- package/web/.next/server/chunks/ssr/_ff04802c._.js.map +1 -0
- 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/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +5 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -0
- 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 +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
- 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_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.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/src_presentation_web_e1cd1869._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -0
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
- 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 +74 -59
- package/web/.next/static/chunks/051873309d87fb45.css +1 -0
- package/web/.next/static/chunks/{8e12deeabf6624e9.js → 16fa4d3877c28fe2.js} +1 -1
- package/web/.next/static/chunks/23d80bb760e7dc4c.js +1 -0
- package/web/.next/static/chunks/30a0ba9015f94405.js +7 -0
- package/web/.next/static/chunks/{7a6854bb07182777.js → 39f6ad3f9005703a.js} +1 -1
- package/web/.next/static/chunks/3aba9d2242420cb5.js +1 -0
- package/web/.next/static/chunks/7a6f56f37aaa17ea.js +1 -0
- package/web/.next/static/chunks/{b0a6fce5425f8d3a.js → 7e05e7e25220ee9a.js} +1 -1
- package/web/.next/static/chunks/{f9da308b3033c57a.js → 89dd90bf14488ec0.js} +1 -1
- package/web/.next/static/chunks/{2b2f3a70ebd6ac1c.js → 9374d251360e808b.js} +1 -1
- package/web/.next/static/chunks/{f29814a72404ea2b.js → 9423dc2310202fda.js} +1 -1
- package/web/.next/static/chunks/a794cf7a1a5648dd.js +1 -0
- package/web/.next/static/chunks/{3d1df5c349d855eb.js → a8edb9423086e83f.js} +1 -1
- package/web/.next/static/chunks/ae81796726a9bba3.js +1 -0
- package/web/.next/static/chunks/{a3802d6f8677cd04.js → b9c62932ed987239.js} +2 -2
- package/web/.next/static/chunks/{c5a0b452afc8fe47.js → d1c3e0ee8e788c87.js} +1 -1
- package/web/.next/static/chunks/{ca23a8642f750548.js → e8c3c12f92e9a521.js} +2 -2
- package/web/.next/static/chunks/f3d5e0ae13def35a.js +1 -0
- package/web/.next/static/chunks/{d5366257d6b9f855.js → fb8dadb64c0ffc6b.js} +1 -1
- package/web/.next/static/chunks/fd232b88b5b50b2e.js +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_02e01240._.js +0 -4
- package/web/.next/server/chunks/ssr/_02e01240._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0d7dd23b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_18886033._.js +0 -4
- package/web/.next/server/chunks/ssr/_18886033._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js +0 -4
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_43ba79e7._.js +0 -3
- package/web/.next/server/chunks/ssr/_43ba79e7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js +0 -4
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a963dd3c._.js +0 -3
- package/web/.next/server/chunks/ssr/_a963dd3c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ad09f271._.js +0 -4
- package/web/.next/server/chunks/ssr/_ad09f271._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js +0 -4
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_deabc145._.js +0 -3
- package/web/.next/server/chunks/ssr/_deabc145._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e3f14907._.js +0 -9
- package/web/.next/server/chunks/ssr/_e3f14907._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ea9e1556._.js +0 -4
- package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js +0 -6
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +0 -6
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js +0 -4
- package/web/.next/server/chunks/ssr/_f8b45233._.js.map +0 -1
- package/web/.next/static/chunks/06a86173379e6c51.js +0 -1
- package/web/.next/static/chunks/16ed73f9880b7d63.js +0 -1
- package/web/.next/static/chunks/4559a403ee40dd19.js +0 -7
- package/web/.next/static/chunks/74e5b5c7950efbc1.js +0 -1
- package/web/.next/static/chunks/8b0a9cb5109fe899.js +0 -1
- package/web/.next/static/chunks/9c6f8f49799efd3a.js +0 -1
- package/web/.next/static/chunks/b14085e99b88e7f7.css +0 -1
- package/web/.next/static/chunks/b65e555419a0c664.js +0 -1
- package/web/.next/static/chunks/f51250616da82bd2.js +0 -1
- /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_buildManifest.js +0 -0
- /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87292,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(31406);e.i(41001);var r=e.i(64780),i=e.i(84840),n=e.i(57638),o=e.i(3645);let l=(0,o.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),c=(0,o.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),u=(0,o.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),d=(0,o.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),h=(0,o.default)("volume-off",[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]]);var m=e.i(53360);let p=(0,o.default)("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var f=e.i(81975),g=e.i(12103),x=e.i(39200);let b=(0,o.default)("table-properties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);var y=e.i(35340),v=e.i(24035),w=e.i(8361);function j({icon:e,label:a,href:s,active:r=!1}){let i=(0,w.useSoundAction)("navigate");return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"sidebar-nav-item",children:(0,t.jsx)(n.SidebarMenuButton,{asChild:!0,isActive:r,tooltip:a,children:(0,t.jsxs)(v.default,{href:s,onClick:()=>i.play(),children:[(0,t.jsx)(e,{}),(0,t.jsx)("span",{children:a})]})})})}var C=e.i(71379),C=C,k=e.i(35364),N=e.i(31777);function S({className:e}){let{toggleSidebar:a,open:s}=(0,n.useSidebar)(),r=(0,w.useSoundAction)("expand"),i=(0,w.useSoundAction)("collapse");return(0,t.jsx)("div",{className:(0,N.cn)("flex",e),children:(0,t.jsx)(k.Button,{"data-testid":"sidebar-collapse-toggle",variant:"ghost",size:"icon",className:"size-7 cursor-pointer group-data-[collapsible=icon]:size-8!",onClick:()=>{s?i.play():r.play(),a()},"aria-label":s?"Collapse sidebar":"Expand sidebar",children:(0,t.jsx)(C.default,{className:"size-4"})})})}function M({className:e,size:a=24,variant:s="default"}){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 194 200",width:a,height:a,className:(0,N.cn)("shrink-0","dev"===s&&"text-cyan-400",e),"aria-hidden":"true",children:(0,t.jsx)("g",{transform:"matrix(1, 0, 0, 1, -111, -208)",children:(0,t.jsx)("path",{d:"M 198 406 C196,405 194,403 193,401 C192,399 191,398 186,398 C178,397 174,394 170,387 L 168 381 L 163 381 C156,381 150,377 147,370 C144,364 143,359 146,353 C148,348 148,347 147,347 C145,347 140,343 138,339 C133,329 139,314 149,311 L 152 311 L 149 307 C145,302 145,294 149,290 C151,288 152,287 151,286 C150,283 152,278 155,276 C156,275 159,274 162,273 C165,273 166,273 168,276 C171,278 171,280 172,287 C173,294 174,297 177,304 C180,309 182,314 183,316 C186,327 193,336 199,339 C204,342 211,342 216,340 C222,336 231,324 234,314 C235,312 237,307 239,302 C240,298 242,292 242,289 C243,281 245,278 247,275 C250,273 251,273 255,273 C261,274 264,278 264,282 C264,284 264,286 263,287 C262,287 263,288 265,290 C272,295 272,303 267,309 L 265 312 L 269 314 C276,317 279,323 279,332 C279,339 277,343 272,347 C268,351 268,351 269,354 C272,358 271,366 269,371 C266,376 259,381 254,381 C252,381 251,382 248,386 C242,395 234,400 227,399 C224,398 223,398 221,401 C220,403 217,405 216,406 C211,409 203,409 198,406 ZM 136 271 C123,267 115,262 113,256 C111,251 111,251 113,251 C118,254 124,254 132,252 C136,252 141,251 144,251 C149,251 157,253 162,256 C166,258 166,258 166,264 L 166 269 L 160 270 C149,272 142,272 136,271 ZM 264 271 C263,271 259,270 256,270 L 250 270 L 250 265 C249,259 250,257 259,254 C265,251 272,251 289,252 C297,253 299,253 302,252 C305,250 305,250 305,252 C305,255 301,262 297,264 C289,270 272,273 264,271 ZM 162 249 C160,247 159,245 159,242 C159,236 164,230 169,230 C170,230 171,228 171,225 C171,216 176,210 184,209 C189,209 195,211 195,213 C195,214 196,213 197,212 C201,209 204,208 208,208 C212,208 217,210 219,212 C220,214 220,213 223,211 C226,208 234,208 239,211 C243,214 246,221 246,226 C245,230 245,230 247,230 C253,230 258,238 257,244 C256,249 251,252 245,252 C241,252 237,251 234,248 C232,247 232,247 228,249 C225,251 222,252 220,252 C216,252 212,250 210,247 C209,246 209,246 206,248 C201,252 192,253 185,248 C183,247 183,247 178,249 C172,253 166,253 162,249 ZM 116 249 C112,248 114,247 119,247 C122,247 127,246 130,245 C138,242 146,242 152,245 L 158 248 L 148 247 C142,247 138,247 133,248 C128,250 120,250 116,249 ZM 284 248 C281,247 277,247 270,247 L 260 248 L 263 246 C269,243 276,242 284,245 C289,246 295,247 298,247 C303,247 304,247 303,248 C301,250 289,250 284,248 Z",fill:"currentColor"})})})}var T=e.i(2828);function E({version:e,branch:s,commitHash:i,isDev:n=!1,packageName:o="@shepai/cli",description:l,instancePath:c}){let{t:u}=(0,r.useTranslation)("web"),d=i?.slice(0,7),{latest:h,updateAvailable:m}=function(e){let[t,s]=(0,a.useState)(null),[r,i]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/npm-version");if(!t.ok)return;let a=await t.json();!e&&a.latest&&s(a.latest)}catch{}finally{e||i(!1)}}(),()=>{e=!0}},[]);let n=null!==t&&function(e,t){let a=e=>e.split("-")[0].split(".").map(Number),s=a(e),r=a(t);for(let e=0;e<3;e++){let t=s[e]??0,a=r[e]??0;if(t>a)return 1;if(t<a)return -1}return 0}(t,e)>0;return{latest:t,updateAvailable:n,loading:r}}(e),{status:p,startUpgrade:f}=function(){let[e,t]=(0,a.useState)("idle"),[s,r]=(0,a.useState)(""),[i,n]=(0,a.useState)(),o=(0,a.useRef)(null),l=(0,a.useRef)(!1),c=(0,a.useCallback)(()=>{if("upgrading"===e||"restarting"===e)return;t("upgrading"),r(""),n(void 0),l.current=!1;let a=new AbortController;return o.current=a,fetch("/api/cli-upgrade",{method:"POST",signal:a.signal}).then(async e=>{if(!e.ok||!e.body){t("error"),n(`Server returned ${e.status}`);return}let a=e.body.getReader(),s=new TextDecoder,i="";for(;;){let{done:e,value:o}=await a.read();if(e)break;let c=(i+=s.decode(o,{stream:!0})).split("\n");for(let e of(i=c.pop()??"",c)){if(e.startsWith("event: restarting")){l.current=!0,t("restarting"),function(e,t){let a=Date.now()+3e4,s=()=>{Date.now()>a||fetch("/api/version",{method:"GET",cache:"no-store"}).then(e=>{e.ok?window.location.reload():setTimeout(s,500)}).catch(()=>{setTimeout(s,500)})};setTimeout(s,500)}(0,0);continue}if(!e.startsWith("event: done")&&e.startsWith("data: ")){let a=e.slice(6);try{let e=JSON.parse(a);"upgraded"===e.status?t("upgraded"):"up-to-date"===e.status?t("up-to-date"):"error"===e.status&&(t("error"),n(e.errorMessage))}catch{r(e=>e+a)}}}}}).catch(e=>{l.current||e instanceof DOMException&&"AbortError"===e.name||(t("error"),n(e instanceof Error?e.message:"Upgrade failed"))}),()=>{a.abort()}},[e]);return{status:e,output:s,errorMessage:i,startUpgrade:c}}(),g=n?`${e}-dev`:`v${e}`,x="upgrading"===p,b="restarting"===p,y="upgraded"===p;return(0,t.jsx)(T.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground/80 hover:text-muted-foreground relative cursor-default text-[11px] leading-tight transition-colors","data-testid":"version-label",children:[g,!m||y||b?null:(0,t.jsx)("span",{className:"absolute -top-0.5 -right-1.5 size-1.5 rounded-full bg-emerald-400","data-testid":"update-dot"})]})}),(0,t.jsxs)(T.TooltipContent,{side:"right",className:"max-w-[280px] space-y-1 p-3 text-start",children:[(0,t.jsx)("div",{className:"mb-1.5 text-xs font-semibold",children:o}),l?(0,t.jsx)("div",{className:"text-[10px] leading-snug opacity-70",children:l}):null,(0,t.jsxs)("div",{className:"border-t border-white/10 pt-1.5",children:[(0,t.jsx)(A,{label:u("versionBadge.version"),value:g}),n&&s?(0,t.jsx)(A,{label:u("versionBadge.branch"),value:s}):null,n&&d?(0,t.jsx)(A,{label:u("versionBadge.commit"),value:d,mono:!0}):null,n&&c?(0,t.jsx)(A,{label:u("versionBadge.path"),value:c,mono:!0}):null,h?(0,t.jsx)(A,{label:"Latest",value:`v${h}`,highlight:m}):null]}),b?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-restarting",children:"Restarting..."})}):y?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-success",children:"Upgraded successfully"})}):"error"===p?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-red-400","data-testid":"upgrade-error",children:"Upgrade failed"})}):m?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("button",{type:"button",onClick:f,disabled:x||b,className:"inline-flex items-center gap-1 text-[10px] font-medium text-emerald-400 transition-colors hover:text-emerald-300 disabled:opacity-50","data-testid":"upgrade-button",children:x?"Upgrading...":b?"Restarting...":`Upgrade to v${h}`})}):null]})]})})}function A({label:e,value:a,highlight:s,mono:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[(0,t.jsx)("span",{className:"opacity-60",children:e}),(0,t.jsx)("span",{className:[s?"font-medium text-emerald-400":"",r||!s?"font-mono":""].filter(Boolean).join(" "),children:a})]})}function P({startedAt:e}){let[s,r]=(0,a.useState)(()=>Date.now()-e);return(0,a.useEffect)(()=>{let t=setInterval(()=>{(0,a.startTransition)(()=>r(Date.now()-e))},1e3);return()=>clearInterval(t)},[e]),(0,t.jsx)("span",{"data-testid":"elapsed-time",className:"tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t>=3600){let e=Math.floor(t/3600);return`${e}h`}let a=Math.floor(t/60);return`${String(a).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}(s)})}var D=e.i(51251),L=e.i(83428),O=e.i(34119),q=e.i(94819),I=e.i(54277),Q=e.i(55016);let R={"action-needed":{icon:D.CircleAlert,iconClass:"text-amber-500",bgClass:"bg-amber-500/10",labelKey:"sidebar.statusActionNeeded"},"in-progress":{icon:L.Loader2,iconClass:"text-blue-500 animate-spin",bgClass:"bg-blue-500/10",labelKey:"sidebar.statusInProgress"},pending:{icon:Q.Clock,iconClass:"text-slate-400",bgClass:"bg-slate-400/10",labelKey:"sidebar.statusPending"},blocked:{icon:q.Ban,iconClass:"text-gray-400",bgClass:"bg-gray-400/10",labelKey:"sidebar.statusBlocked"},error:{icon:I.CircleX,iconClass:"text-red-500",bgClass:"bg-red-500/10",labelKey:"sidebar.statusError"},done:{icon:O.CircleCheck,iconClass:"text-emerald-500",bgClass:"bg-emerald-500/10",labelKey:"sidebar.statusDone"}},z=["action-needed","error","blocked","in-progress","pending","done"];var F=e.i(86782),K=e.i(29847);function H({name:e,status:a,startedAt:s,duration:r,agentType:i,modelId:o,onClick:l}){let{icon:c,iconClass:u}=R[a],d=i?(0,F.getAgentTypeIcon)(i):null;return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"feature-list-item",children:(0,t.jsxs)(n.SidebarMenuButton,{size:"sm",onClick:l,tooltip:e,className:"cursor-pointer",children:[(0,t.jsx)(c,{className:u}),(0,t.jsx)("span",{className:"flex-1 truncate font-medium",children:e}),"in-progress"===a&&null!=s?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:(0,t.jsx)(P,{startedAt:s})}):null,"done"===a&&r?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:r}):null,d?(0,t.jsx)(T.TooltipProvider,{children:(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"ml-auto shrink-0",children:(0,t.jsx)(d,{className:"h-3.5 w-3.5"})})}),(0,t.jsxs)(T.TooltipContent,{side:"right",children:[(0,t.jsx)("span",{className:"font-medium",children:F.agentTypeLabels[i]??i}),o?(0,t.jsxs)("span",{className:"ms-1 opacity-70",children:["· ",(0,K.getModelMeta)(o).displayName||o]}):null]})]})}):null]})})}var B=e.i(73709);let _="shep-animations-enabled",$="shep:animations-toggle",G="no-animations",U="shep-theme";function X({label:e,count:a,children:s}){return(0,t.jsxs)(n.SidebarGroup,{"data-testid":"feature-status-group",className:"px-2 py-1",children:[(0,t.jsxs)(n.SidebarGroupLabel,{className:"text-muted-foreground h-6 px-2 text-[0.65rem] font-semibold tracking-wider uppercase",children:[e,(0,t.jsx)("span",{"aria-label":`${a} items`,className:"bg-sidebar-accent text-sidebar-accent-foreground ms-1.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:a})]}),(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)(n.SidebarMenu,{className:"gap-0.5",children:s})})]})}var W=e.i(99105),Z=e.i(81542),Y=e.i(3214);function V({repoName:e,featureCount:s,children:r,defaultOpen:i=!0,onAddFeature:n}){let[o,l]=(0,a.useState)(i);return(0,t.jsxs)("div",{"data-testid":"repo-group",className:"group/repo mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(!o),className:(0,N.cn)("text-sidebar-foreground hover:bg-sidebar-accent flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs font-semibold","transition-colors duration-100"),"aria-expanded":o,children:[(0,t.jsx)(W.ChevronDown,{className:(0,N.cn)("text-muted-foreground h-3.5 w-3.5 shrink-0 transition-transform duration-200",!o&&"-rotate-90")}),(0,t.jsx)(Z.GitFork,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{"aria-label":`${s} features`,className:"bg-sidebar-accent text-sidebar-accent-foreground ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:s})]}),n?(0,t.jsx)("button",{type:"button","data-testid":"repo-add-feature",onClick:e=>{e.stopPropagation(),n()},className:(0,N.cn)("text-muted-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent shrink-0 rounded-md p-1 opacity-0 transition-all duration-100 group-hover/repo:opacity-100","focus-visible:ring-ring focus-visible:opacity-100 focus-visible:ring-1 focus-visible:outline-none"),"aria-label":`Add feature to ${e}`,children:(0,t.jsx)(Y.Plus,{className:"h-3.5 w-3.5"})}):null]}),o?(0,t.jsx)("div",{className:"pl-2",children:r}):null]})}function J({label:e,className:a}){return(0,t.jsx)(n.SidebarGroup,{"data-testid":"sidebar-section-header",className:(0,N.cn)("px-2 py-1",a),children:(0,t.jsx)("div",{className:"text-sidebar-foreground flex h-7 w-full shrink-0 items-center px-2 text-sm font-medium",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})})})}let ee={version:"unknown",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform",branch:"",commitHash:"",instancePath:"",isDev:!1};function et({features:e,featureFlags:i,onFeatureClick:o,onAddFeature:v}){let{t:C,i18n:k}=(0,r.useTranslation)("web"),N=(0,s.usePathname)(),{state:A}=(0,n.useSidebar)(),P="collapsed"===A,{mounted:D,visible:L}=function(e,t){let[s,r]=(0,a.useState)(!e),[i,n]=(0,a.useState)(!e);return(0,a.useEffect)(()=>{if(!e){r(!0);let e=requestAnimationFrame(()=>n(!0));return()=>cancelAnimationFrame(e)}n(!1);let t=window.setTimeout(()=>r(!1),200);return()=>window.clearTimeout(t)},[e,200]),{mounted:s,visible:i}}(P,0),O=function(){let[e,t]=(0,a.useState)(ee);return(0,a.useEffect)(()=>{let e=!1;return async function(){try{let a=await fetch("/api/version");if(!a.ok)return;let s=await a.json();e||t(s)}catch{}}(),()=>{e=!0}},[]),e}(),{enabled:q,toggle:I}=(0,B.useSoundEnabled)(),{enabled:Q,toggle:F}=function(){let[e,t]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem(_)&&(t(!1),document.body.classList.add(G));let e=e=>{let a=e.detail;t(a),document.body.classList.toggle(G,!a)};return window.addEventListener($,e),()=>window.removeEventListener($,e)},[]);let s=(0,a.useCallback)(()=>{let a=!e;localStorage.setItem(_,String(a)),t(a),document.body.classList.toggle(G,!a),window.dispatchEvent(new CustomEvent($,{detail:a}))},[e]);return{enabled:e,toggle:s}}(),{resolvedTheme:K,theme:W,setTheme:Z}=function(){let[e,t]=(0,a.useState)("system"),[s,r]=(0,a.useState)("light"),i=(0,a.useCallback)(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),n=(0,a.useCallback)(e=>"system"===e?i():e,[i]),o=(0,a.useCallback)(e=>{if("u"<typeof document)return;let t=document.documentElement;t.classList.remove("light","dark"),t.classList.add(e),r(e)},[]),l=(0,a.useCallback)(e=>{t(e),"u">typeof localStorage&&localStorage.setItem(U,e),o(n(e))},[n,o]);return(0,a.useEffect)(()=>{let e=localStorage.getItem(U)??"system";t(e),o(n(e))},[n,o]),(0,a.useEffect)(()=>{let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{"system"===e&&o(n("system"))};return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,n,o]),{theme:e,resolvedTheme:s,setTheme:l}}(),Y=(0,w.useSoundAction)("toggle-on"),et=(0,w.useSoundAction)("toggle-off"),ea=(0,w.useSoundAction)("navigate"),es=(0,a.useMemo)(()=>{let t=new Map;for(let a of e){let e=a.repositoryPath,s=t.get(e);s||(s={repoName:a.repositoryName,features:[]},t.set(e,s)),s.features.push(a)}return Array.from(t.entries()).map(([e,{repoName:t,features:a}])=>({repoPath:e,repoName:t,featureCount:a.length,statusGroups:z.map(e=>({statusKey:e,label:C(R[e].labelKey),items:a.filter(t=>t.status===e)})).filter(e=>e.items.length>0)}))},[e,C]);return(0,t.jsxs)(n.Sidebar,{"data-testid":"app-sidebar","data-no-drawer-close":!0,collapsible:"icon",side:"rtl"===k.dir()?"right":"left",children:[(0,t.jsx)(n.SidebarHeader,{children:(0,t.jsxs)(n.SidebarMenu,{children:[(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsxs)("div",{className:"flex h-8 items-center group-data-[collapsible=icon]:justify-center",children:[D?(0,t.jsxs)("div",{className:["flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2 transition-opacity duration-200 ease-out",L?"opacity-100":"opacity-0"].join(" "),"aria-hidden":!L,children:[(0,t.jsx)(M,{className:"shrink-0",size:20,variant:O.isDev?"dev":"default"}),(0,t.jsx)("span",{className:"truncate text-sm font-semibold tracking-tight",children:"Shep"}),(0,t.jsx)(E,{version:O.version,branch:O.branch||void 0,commitHash:O.commitHash||void 0,isDev:O.isDev,packageName:O.packageName,description:O.description,instancePath:O.instancePath||void 0})]}):null,(0,t.jsx)(S,{className:"shrink-0 transition-all duration-200"})]})}),(0,t.jsx)(j,{icon:l,label:C("navigation.controlCenter"),href:"/",active:"/"===N}),i.inventory?(0,t.jsx)(j,{icon:b,label:C("navigation.inventory"),href:"/features",active:"/features"===N}):null,(0,t.jsx)(j,{icon:f.Wrench,label:C("navigation.tools"),href:"/tools",active:"/tools"===N}),i.skills?(0,t.jsx)(j,{icon:g.Puzzle,label:C("navigation.skills"),href:"/skills",active:"/skills"===N}):null,(0,t.jsx)(j,{icon:x.Settings,label:C("navigation.settings"),href:"/settings",active:"/settings"===N})]})}),(0,t.jsx)(n.SidebarContent,{children:D?(0,t.jsxs)("div",{className:["flex min-h-0 flex-1 flex-col overflow-hidden transition-opacity duration-200 ease-out [&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none",L?"opacity-100":"opacity-0"].join(" "),children:[(0,t.jsx)(J,{label:C("sidebar.features")}),(0,t.jsx)(y.ScrollArea,{className:"min-h-0 flex-1",children:es.map(({repoPath:e,repoName:a,featureCount:s,statusGroups:r})=>(0,t.jsx)(V,{repoName:a,featureCount:s,onAddFeature:v?()=>v(e):void 0,children:r.map(({statusKey:e,label:a,items:s})=>(0,t.jsx)(X,{label:a,count:s.length,children:s.map(e=>(0,t.jsx)(H,{name:e.name,status:e.status,startedAt:e.startedAt,duration:e.duration,agentType:e.agentType,modelId:e.modelId,onClick:o?()=>o(e.featureId):void 0},e.featureId))},e))},e))})]}):null}),(0,t.jsx)(n.SidebarFooter,{className:"border-t p-2",children:(0,t.jsx)(n.SidebarMenu,{children:(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsxs)(T.TooltipProvider,{children:[(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:e=>{let t="system"===W?"dark"===K?"light":"dark":"dark"===W?"light":"dark";"dark"!==("system"===W?K:W)?Y.play():et.play();let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"startViewTransition"in document&&!a?(document.documentElement.style.setProperty("--x",`${e.clientX}px`),document.documentElement.style.setProperty("--y",`${e.clientY}px`),document.startViewTransition(()=>{Z(t)})):Z(t)},"aria-label":"dark"===K?C("sidebar.switchToLight"):C("sidebar.switchToDark"),children:[(0,t.jsx)(u,{className:"h-4 w-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,t.jsx)(c,{className:"absolute h-4 w-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"})]})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:"dark"===K?C("sidebar.switchToLight"):C("sidebar.switchToDark")})]}),!P&&(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{ea.play(),I()},"aria-label":q?C("sidebar.muteSounds"):C("sidebar.unmuteSounds"),children:q?(0,t.jsx)(d,{className:"h-4 w-4"}):(0,t.jsx)(h,{className:"h-4 w-4"})})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:q?C("sidebar.muteSounds"):C("sidebar.unmuteSounds")})]}),!P&&(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{ea.play(),F()},"aria-label":Q?"Disable animations":"Enable animations",children:Q?(0,t.jsx)(m.Zap,{className:"h-4 w-4"}):(0,t.jsx)(p,{className:"h-4 w-4"})})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:Q?"Disable animations":"Enable animations"})]})]})})})})}),(0,t.jsx)(n.SidebarRail,{})]})}e.i(13322);var ea=e.i(61201),es=e.i(48109),er=e.i(60253),ei=e.i(26370);let en=(0,o.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);var eo=e.i(87538);let el=(0,o.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var ec=e.i(28112),eu=e.i(57779),ed=e.i(80554),eh=e.i(62639);let em="shep-global-chat";function ep(){try{let e=localStorage.getItem(em);if(!e)return{pos:null,size:null};let t=JSON.parse(e),a=t.size??null;return a&&(a.w<360||a.h<300)&&(a={w:Math.max(360,a.w),h:Math.max(300,a.h)}),{pos:t.pos??null,size:a}}catch{return{pos:null,size:null}}}function ef(){let{t:e}=(0,r.useTranslation)("web"),[s,i]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),d=(0,ed.useTurnStatus)("global"),{swapPosition:h}=(0,eh.useFabLayout)(),{state:m}=(0,n.useSidebar)(),[p,f]=(0,a.useState)(()=>ep().pos),[g,x]=(0,a.useState)(()=>ep().size),b=(0,a.useCallback)(e=>{f(t=>"function"==typeof e?e(t):e)},[]),y=(0,a.useCallback)(e=>{x(t=>"function"==typeof e?e(t):e)},[]),v=(0,a.useRef)(null),w=(0,a.useRef)(null),j=(0,a.useRef)(null),C=(0,a.useCallback)(()=>{i(e=>(e||l(!0),!e))},[]),S=(0,a.useRef)({pos:null,size:null}),M=(0,a.useCallback)(()=>{s||(i(!0),l(!0)),u(e=>(e?(b(S.current.pos),y(S.current.size)):S.current={pos:p,size:g},!e))},[s,p,g,b,y]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&("k"===e.key||"K"===e.key)&&(e.preventDefault(),c&&u(!1),C(),requestAnimationFrame(()=>{setTimeout(()=>{let e=v.current?.querySelector("textarea");e?.focus()},100)})),(e.metaKey||e.ctrlKey)&&e.shiftKey&&("m"===e.key||"M"===e.key)&&(e.preventDefault(),M())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[C,M,c]),(0,a.useEffect)(()=>{let e=setTimeout(()=>(function(e,t){try{localStorage.setItem(em,JSON.stringify({pos:e,size:t}))}catch{}})(p,g),300);return()=>clearTimeout(e)},[p,g]);let T=(0,a.useCallback)((e,t,a)=>({x:Math.max(-a+100,Math.min(e,window.innerWidth-100)),y:Math.max(0,Math.min(t,window.innerHeight-48))}),[]),E=(0,a.useCallback)(e=>{e.preventDefault();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=p?.x??a.left,r=p?.y??a.top;w.current={startX:e.clientX,startY:e.clientY,startPosX:s,startPosY:r};let i=g?.w??a.width,n=e=>{if(!w.current)return;let t=e.clientX-w.current.startX,a=e.clientY-w.current.startY;b(T(w.current.startPosX+t,w.current.startPosY+a,i))},o=()=>{w.current=null,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",o)},[p,g,b,T]),A=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=g?.w??a.width,r=g?.h??a.height,i=e.clientX,n=e.clientY,o=p?.y??a.top;j.current={startX:i,startY:n,startW:s,startH:r},p||b({x:a.left,y:a.top});let l=e=>{if(!j.current)return;let t=e.clientX-i,l=e.clientY-n,c=Math.max(360,s+t),u=Math.max(300,r-l),d=Math.max(0,o+l);y({w:c,h:u}),b(e=>T(e?.x??a.left,d,c))},c=()=>{j.current=null,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},[g,p,b,y,T]),P=(0,a.useCallback)(()=>{i(!1),u(!1)},[]),D=c?{}:p?{position:"fixed",left:p.x,top:p.y,width:g?.w??520,height:g?.h??"70vh"}:{width:g?.w??520,height:g?.h??"70vh"};return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsxs)("div",{ref:v,className:(0,N.cn)(c?"bg-background fixed inset-0 z-[60] flex flex-col overflow-hidden dark:bg-neutral-900":(0,N.cn)(!p&&(h?"fixed start-8 bottom-24":"fixed end-8 bottom-24"),"z-[60] flex flex-col overflow-hidden rounded-lg","border-border/60 border dark:border-white/10","bg-background dark:bg-neutral-900","shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]"),"transition-opacity duration-300 ease-out",s?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:D,children:[c?null:(0,t.jsx)("div",{className:"h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent"}),c?null:(0,t.jsx)("div",{onMouseDown:A,className:"absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize"}),(0,t.jsxs)("div",{onMouseDown:c?void 0:E,className:(0,N.cn)("relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]",!c&&"cursor-grab active:cursor-grabbing"),children:[(0,t.jsx)("div",{className:"from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent"}),c?null:(0,t.jsx)(en,{className:"text-foreground/15 relative h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("div",{className:"relative flex h-5 w-5 items-center justify-center",children:(0,t.jsx)(ei.Bot,{className:"text-foreground/50 h-4 w-4"})}),(0,t.jsxs)("div",{className:"relative flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-foreground/90 text-base font-bold tracking-tight",children:"Shep"}),(0,t.jsx)("span",{className:"text-foreground/30 text-xs font-medium tracking-widest uppercase",children:"global"})]}),(0,t.jsxs)("div",{className:"relative ms-auto flex items-center gap-0.5",children:[(0,t.jsx)("button",{type:"button",onClick:M,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:c?"Restore (⌘⇧M)":"Maximize (⌘⇧M)",children:c?(0,t.jsx)(el,{className:"h-3.5 w-3.5"}):(0,t.jsx)(eo.Maximize2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:P,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:"Close (⌘⇧K)",children:(0,t.jsx)(er.X,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(ec.ChatTab,{featureId:"global"})}),c?null:(0,t.jsx)("div",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=e.clientX,r=e.clientY,i=g?.w??a.width,n=g?.h??a.height;p||b({x:a.left,y:a.top});let o=e=>{let t=window.innerHeight-(p?.y??a.top);y({w:Math.max(360,i+(e.clientX-s)),h:Math.max(300,Math.min(n+(e.clientY-r),t))})},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},className:"absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize"})]}):null,(0,t.jsxs)(eg,{swapPosition:h,sidebarState:m,isMaximized:c,children:[(0,t.jsxs)(k.Button,{size:"icon",onClick:C,className:(0,N.cn)("relative h-14 w-14 rounded-full shadow-lg","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95",s?"bg-violet-600 text-white hover:bg-violet-500":"bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400",!s&&"processing"===d&&"chat-fab-spinning",!s&&"unread"===d&&"chat-fab-glow-unread",!s&&"awaiting_input"===d&&"chat-fab-glow-awaiting"),children:[(0,t.jsx)(es.MessageSquare,{className:(0,N.cn)("absolute h-7 w-7 stroke-[2.5] transition-all duration-200",s?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100")}),(0,t.jsx)(er.X,{className:(0,N.cn)("absolute h-6 w-6 stroke-[2.5] transition-all duration-200",s?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0")}),!s&&(0,t.jsx)(eu.ChatDotIndicator,{status:d,className:"end-0 top-0"})]}),(0,t.jsx)("div",{className:"pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100",children:(0,t.jsxs)("div",{className:"bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg",children:[(0,t.jsx)("p",{className:"text-background text-xs font-medium whitespace-nowrap",children:e("chat.shepChat")}),(0,t.jsxs)("p",{className:"text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]",children:[(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⌘"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⇧"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"K"})]})]})})]})]})}function eg({swapPosition:e,sidebarState:a,isMaximized:s,children:i}){let{i18n:n}=(0,r.useTranslation)("web"),o="rtl"===n.dir();if(!e)return(0,t.jsx)("div",{className:(0,N.cn)("group/fab fixed end-8 bottom-6 z-30",s&&"hidden"),children:i});let l="expanded"===a?"calc(var(--sidebar-width) + 32px)":"calc(var(--sidebar-width-icon) + 32px)";return(0,t.jsx)("div",{className:(0,N.cn)("group/fab fixed bottom-6 z-30",s&&"hidden"),style:o?{right:l,transition:"right 200ms ease-in-out"}:{left:l,transition:"left 200ms ease-in-out"},children:i})}var ex=e.i(78521),eb=e.i(2287),ey=e.i(68304),ev=e.i(98127),ew=e.i(41957);let ej=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function eC({onSubmit:e,loading:s=!1}){let[r,i]=(0,a.useState)(""),[n,o]=(0,a.useState)("");function l(){let t=r.trim();t?ej.test(t.trim())?(o(""),e(t)):o("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):o("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(ew.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(ev.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:r,onChange:e=>{i(e.target.value),n&&o("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),l())},disabled:s,"aria-invalid":!!n,"aria-describedby":n?"github-url-error":void 0}),(0,t.jsx)(k.Button,{onClick:l,disabled:s||!r.trim(),size:"sm",children:s?(0,t.jsx)(L.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),n?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:n}):null]})}let ek=(0,o.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var eN=e.i(32494),eS=e.i(66459),eM=e.i(79687),eT=e.i(81846),eE=e.i(61238),eA=e.i(47373),eP=e.i(21023);let eD=(0,eP.createServerReference)("404c92b243a09833eab22adcd0602c2b0fed811122",eP.callServer,void 0,eP.findSourceMapURL,"listGitHubRepositories"),eL=(0,eP.createServerReference)("00264e968c59967d6a7b7c8dd63e04bf16fe93406c",eP.callServer,void 0,eP.findSourceMapURL,"listGitHubOrganizations"),eO="__personal__";function eq({onSelect:e,loading:s=!1,fetchRepos:r=eD,fetchOrgs:i=eL}){let[n,o]=(0,a.useState)([]),[l,c]=(0,a.useState)([]),[u,d]=(0,a.useState)(!0),[h,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,x]=(0,a.useState)(eO),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await i();e.orgs&&c(e.orgs)}catch{}}()},[i]);let y=(0,a.useCallback)(async(e,t)=>{d(!0),m("");try{let a={};e&&(a.search=e),t&&t!==eO&&(a.owner=t);let s=await r(Object.keys(a).length>0?a:void 0);s.error?(m(s.error),o([])):o(s.repos??[])}catch{m("Failed to fetch repositories"),o([])}finally{d(!1)}},[r]);return((0,a.useEffect)(()=>{y(p||void 0,g)},[y,g]),h&&!u)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(eM.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:h})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[l.length>0?(0,t.jsxs)(eA.Select,{value:g,onValueChange:function(e){x(e),f("")},disabled:s,children:[(0,t.jsx)(eA.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(eA.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(eA.SelectContent,{children:[(0,t.jsx)(eA.SelectItem,{value:eO,children:"My repositories"}),l.map(e=>(0,t.jsx)(eA.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(eS.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(ev.Input,{placeholder:"Search repositories...",value:p,onChange:e=>{var t;f(t=e.target.value),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{y(t||void 0,g)},300)},className:"ps-9",disabled:s,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:u?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eE.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(eE.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.map(a=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(a.nameWithOwner),disabled:s,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a.nameWithOwner}),(0,t.jsx)(eT.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ek,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eN.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),a.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:a.description}):null]}),s?(0,t.jsx)(L.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let eI=(0,eP.createServerReference)("4096c790703d3be3a9699ebc780d24629f2b27d02d",eP.callServer,void 0,eP.findSourceMapURL,"importGitHubRepository");function eQ({open:e,onOpenChange:s,onImportComplete:r}){let[i,n]=(0,a.useState)(!1),[o,l]=(0,a.useState)("");async function c(e){n(!0),l("");try{let t=await eI({url:e});t.error?l(t.error):t.repository&&(r(t.repository),s(!1))}catch{l("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(eb.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(eb.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(eb.DialogHeader,{children:[(0,t.jsx)(eb.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(eb.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(ey.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(ey.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(ey.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(ey.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(ey.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(eC,{onSubmit:c,loading:i})}),(0,t.jsx)(ey.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(eq,{onSelect:c,loading:i})})]}),o?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:o}):null]})})}var eR=e.i(39443),ez=e.i(30153),eF=e.i(5147),eK=e.i(60112),eH=e.i(17406);let eB={[eH.NotificationSeverity.Success]:"success",[eH.NotificationSeverity.Error]:"error",[eH.NotificationSeverity.Warning]:"warning",[eH.NotificationSeverity.Info]:"info"},e_={[eH.NotificationSeverity.Success]:"notification-success",[eH.NotificationSeverity.Error]:"notification-error",[eH.NotificationSeverity.Warning]:"notification-warning",[eH.NotificationSeverity.Info]:"notification-info"};var e$=e.i(75921);function eG({children:e,sidebarOpen:r}){let i=(0,s.useRouter)(),{guardedNavigate:o}=(0,ez.useDrawerCloseGuard)(),l=(0,e$.useFeatureFlags)();!function(){let e=(0,s.useRouter)(),{events:t}=(0,eR.useAgentEventsContext)(),r=(0,w.useSoundAction)("notification-success"),i=(0,w.useSoundAction)("notification-error"),n=(0,w.useSoundAction)("notification-warning"),o=(0,w.useSoundAction)("notification-info"),l=(0,a.useMemo)(()=>({"notification-success":r,"notification-error":i,"notification-warning":n,"notification-info":o}),[r,i,n,o]),c=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(t.length<=c.current)return;let a=t.slice(c.current);for(let s of(c.current=t.length,a)){if(s.eventType!==eH.NotificationEventType.MergeReviewReady&&s.severity!==eH.NotificationSeverity.Error&&s.severity!==eH.NotificationSeverity.Warning&&s.severity!==eH.NotificationSeverity.Success)continue;!function(e,t){let a=eB[e.severity]??"info",s=e.eventType===eH.NotificationEventType.WaitingApproval||e.eventType===eH.NotificationEventType.MergeReviewReady;eK.toast[a](e.featureName,{description:e.message,...s&&t&&{action:{label:"Review",onClick:()=>{t(`/feature/${e.featureId}`)}}}})}(s,t=>e.push(t));let t=e_[s.severity];l[t]?.play()}},[t,l,e])}();let{features:c}=(0,eF.useSidebarFeaturesContext)(),u=(0,a.useCallback)(e=>{o(()=>i.push(`/feature/${e}`))},[i,o]),d=(0,a.useCallback)(e=>{o(()=>i.push(`/create?repo=${encodeURIComponent(e)}`))},[i,o]),[h,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{if(!h){if(l.reactFileManager)return void x(!0);m(!0);try{let e=await (0,ex.pickFolder)();e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}}))}catch{x(!0)}finally{m(!1)}}},[h,l.reactFileManager]);(0,a.useEffect)(()=>{let e=()=>{b()};return window.addEventListener("shep:pick-folder",e),()=>window.removeEventListener("shep:pick-folder",e)},[b]),(0,a.useEffect)(()=>{let e=()=>f(!0);return window.addEventListener("shep:open-github-import",e),()=>window.removeEventListener("shep:open-github-import",e)},[]);let y=(0,a.useCallback)(e=>{e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}})),x(!1)},[]),v=(0,a.useCallback)(e=>{e.path&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e.path}}))},[]);return(0,t.jsxs)(n.SidebarProvider,{defaultOpen:r??!1,children:[(0,t.jsx)(et,{features:c,featureFlags:l,onFeatureClick:u,onAddFeature:d}),(0,t.jsx)(n.SidebarInset,{children:(0,t.jsxs)("div",{className:"relative h-full",children:[(0,t.jsx)("main",{className:"h-full",children:e}),(0,t.jsx)(ef,{}),l.githubImport?(0,t.jsx)(eQ,{open:p,onOpenChange:f,onImportComplete:v}):null]})}),(0,t.jsx)(ea.ReactFileManagerDialog,{open:g,onOpenChange:e=>{e||x(!1)},onSelect:y})]})}function eU({children:e}){return(0,t.jsx)(ed.TurnStatusesProvider,{children:e})}function eX({children:e,sidebarOpen:a}){let{i18n:s}=(0,r.useTranslation)(),n=s.dir();return(0,t.jsx)(i.Direction.Provider,{dir:n,children:(0,t.jsx)(eR.AgentEventsProvider,{children:(0,t.jsx)(ez.DrawerCloseGuardProvider,{children:(0,t.jsx)(eF.SidebarFeaturesProvider,{children:(0,t.jsx)(eU,{children:(0,t.jsx)(eG,{sidebarOpen:a,children:e})})})})})})}e.s(["AppShell",()=>eX],87292)},25251,e=>{"use strict";var t=e.i(20314),a=e.i(60112);let s=({...e})=>(0,t.jsx)(a.Toaster,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});e.s(["Toaster",()=>s])},4858,e=>{"use strict";var t=e.i(20314),a=e.i(3),s=e.i(28574),r=e.i(6786),i=e.i(77501),n=class extends i.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let i=t.queryKey,n=t.queryHash??(0,a.hashQueryKeyByOptions)(i,t),o=this.get(n);return o||(o=new s.Query({client:e,queryKey:i,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.matchQuery)(e,t)):t}notify(e){r.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(87975),l=i,c=class extends l.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#a=new Map,this.#s=0}#t;#a;#s;build(e,t,a){let s=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#t.add(e);let t=u(e);if("string"==typeof t){let a=this.#a.get(t);a?a.push(e):this.#a.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=u(e);if("string"==typeof t){let a=this.#a.get(t);if(a)if(a.length>1){let t=a.indexOf(e);-1!==t&&a.splice(t,1)}else a[0]===e&&this.#a.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let a=this.#a.get(t),s=a?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let a=this.#a.get(t)?.find(t=>t!==e&&t.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){r.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#a.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.matchMutation)(e,t))}notify(e){r.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return r.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.noop))))}};function u(e){return e.options.scope?.id}var d=e.i(4520),h=e.i(13598);function m(e){return{onFetch:(t,s)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,u=async()=>{let s=!1,u=(0,a.ensureQueryFn)(t.options,t.fetchOptions),d=async(e,r,i)=>{let n;if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let o=(n={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta},(0,a.addConsumeAwareSignal)(n,()=>t.signal,()=>s=!0),n),l=await u(o),{maxPages:c}=t.options,d=i?a.addToStart:a.addToEnd;return{pages:d(e.pages,l,c),pageParams:d(e.pageParams,r,c)}};if(i&&n.length){let e="backward"===i,t={pages:n,pageParams:o},a=(e?function(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}:p)(r,t);l=await d(t,a,e)}else{let t=e??n.length;do{let e=0===c?o[0]??r.initialPageParam:p(r,l);if(c>0&&null==e)break;l=await d(l,e),c++}while(c<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=u}}}function p(e,{pages:t,pageParams:a}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}var f=class{#r;#i;#n;#o;#l;#c;#u;#d;constructor(e={}){this.#r=e.queryCache||new n,this.#i=e.mutationCache||new c,this.#n=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=d.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#d=h.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#r.build(this,t),r=s.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let r=this.defaultQueryOptions({queryKey:e}),i=this.#r.get(r.queryHash),n=i?.state.data,o=(0,a.functionalUpdate)(t,n);if(void 0!==o)return this.#r.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,a){return r.notifyManager.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,a)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;r.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let a=this.#r;return r.notifyManager.batch(()=>(a.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(r.notifyManager.batch(()=>this.#r.findAll(e).map(e=>e.cancel(s)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return r.notifyManager.batch(()=>(this.#r.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(r.notifyManager.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#r.build(this,t);return s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#i}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#l.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#i.clear()}},g=e.i(34682),x=e.i(79054);function b({children:e}){let[a]=(0,x.useState)(()=>new f({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1}}}));return(0,t.jsx)(g.QueryClientProvider,{client:a,children:e})}e.s(["QueryProvider",()=>b],4858)},10644,e=>{"use strict";let t;var a=e.i(20314),s=e.i(79054);e.i(41001);var r=e.i(14827),i=e.i(99065),n=e.i(83100),o=e.i(37465),l=e.i(51193),c=e.i(55431),u=e.i(60280),d=e.i(40266),h=e.i(50784),m=e.i(28191),p=e.i(71363),f=e.i(53493),g=e.i(22307),x=e.i(44225),b=e.i(62305),y=e.i(51943),v=e.i(88158),w=e.i(39711),j=e.i(32456);let C=((t=i.default.createInstance()).use(n.initReactI18next).init({lng:"en",fallbackLng:"en",defaultNS:"common",ns:["common","web"],resources:{en:{common:o.default,web:l.default},ru:{common:c.default,web:u.default},pt:{common:d.default,web:h.default},es:{common:m.default,web:p.default},ar:{common:f.default,web:g.default},he:{common:x.default,web:b.default},fr:{common:y.default,web:v.default},de:{common:w.default,web:j.default}},interpolation:{escapeValue:!1},react:{useSuspense:!1}}),t),k={ar:{family:"Noto Sans Arabic",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap"},he:{family:"Noto Sans Hebrew",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;500;600;700&display=swap"}};function N(e){let t=k[e];if(document.documentElement.classList.remove("font-rtl-arabic","font-rtl-hebrew"),!t)return void document.documentElement.style.removeProperty("--font-rtl");document.documentElement.style.setProperty("--font-rtl",`"${t.family}"`),document.documentElement.classList.add("ar"===e?"font-rtl-arabic":"font-rtl-hebrew");let a=`rtl-font-${e}`;if(!document.getElementById(a)){let e=document.createElement("link");e.id=a,e.rel="stylesheet",e.href=t.cssUrl,document.head.appendChild(e)}}function S({initialLanguage:e,children:t}){return(0,s.useEffect)(()=>{C.language!==e&&C.changeLanguage(e),N(e)},[e]),(0,s.useEffect)(()=>{function e(e){N(e)}return C.on("languageChanged",e),()=>{C.off("languageChanged",e)}},[]),(0,a.jsx)(r.I18nextProvider,{i18n:C,children:t})}e.s(["I18nProvider",()=>S],10644)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87292,e=>{"use strict";var t=e.i(20314),a=e.i(79054),s=e.i(31406);e.i(41001);var r=e.i(64780),i=e.i(84840),n=e.i(57638),o=e.i(3645);let l=(0,o.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),c=(0,o.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),u=(0,o.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),d=(0,o.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),h=(0,o.default)("volume-off",[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]]);var m=e.i(53360);let f=(0,o.default)("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var p=e.i(81975),g=e.i(12103),x=e.i(39200);let b=(0,o.default)("table-properties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);var y=e.i(35340),v=e.i(24035),w=e.i(8361);function j({icon:e,label:a,href:s,active:r=!1}){let i=(0,w.useSoundAction)("navigate");return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"sidebar-nav-item",children:(0,t.jsx)(n.SidebarMenuButton,{asChild:!0,isActive:r,tooltip:a,children:(0,t.jsxs)(v.default,{href:s,onClick:()=>i.play(),children:[(0,t.jsx)(e,{}),(0,t.jsx)("span",{children:a})]})})})}var C=e.i(71379),C=C,k=e.i(35364),N=e.i(31777);function S({className:e}){let{toggleSidebar:a,open:s}=(0,n.useSidebar)(),r=(0,w.useSoundAction)("expand"),i=(0,w.useSoundAction)("collapse");return(0,t.jsx)("div",{className:(0,N.cn)("flex",e),children:(0,t.jsx)(k.Button,{"data-testid":"sidebar-collapse-toggle",variant:"ghost",size:"icon",className:"size-7 cursor-pointer group-data-[collapsible=icon]:size-8!",onClick:()=>{s?i.play():r.play(),a()},"aria-label":s?"Collapse sidebar":"Expand sidebar",children:(0,t.jsx)(C.default,{className:"size-4"})})})}function M({className:e,size:a=24,variant:s="default"}){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 194 200",width:a,height:a,className:(0,N.cn)("shrink-0","dev"===s&&"text-cyan-400",e),"aria-hidden":"true",children:(0,t.jsx)("g",{transform:"matrix(1, 0, 0, 1, -111, -208)",children:(0,t.jsx)("path",{d:"M 198 406 C196,405 194,403 193,401 C192,399 191,398 186,398 C178,397 174,394 170,387 L 168 381 L 163 381 C156,381 150,377 147,370 C144,364 143,359 146,353 C148,348 148,347 147,347 C145,347 140,343 138,339 C133,329 139,314 149,311 L 152 311 L 149 307 C145,302 145,294 149,290 C151,288 152,287 151,286 C150,283 152,278 155,276 C156,275 159,274 162,273 C165,273 166,273 168,276 C171,278 171,280 172,287 C173,294 174,297 177,304 C180,309 182,314 183,316 C186,327 193,336 199,339 C204,342 211,342 216,340 C222,336 231,324 234,314 C235,312 237,307 239,302 C240,298 242,292 242,289 C243,281 245,278 247,275 C250,273 251,273 255,273 C261,274 264,278 264,282 C264,284 264,286 263,287 C262,287 263,288 265,290 C272,295 272,303 267,309 L 265 312 L 269 314 C276,317 279,323 279,332 C279,339 277,343 272,347 C268,351 268,351 269,354 C272,358 271,366 269,371 C266,376 259,381 254,381 C252,381 251,382 248,386 C242,395 234,400 227,399 C224,398 223,398 221,401 C220,403 217,405 216,406 C211,409 203,409 198,406 ZM 136 271 C123,267 115,262 113,256 C111,251 111,251 113,251 C118,254 124,254 132,252 C136,252 141,251 144,251 C149,251 157,253 162,256 C166,258 166,258 166,264 L 166 269 L 160 270 C149,272 142,272 136,271 ZM 264 271 C263,271 259,270 256,270 L 250 270 L 250 265 C249,259 250,257 259,254 C265,251 272,251 289,252 C297,253 299,253 302,252 C305,250 305,250 305,252 C305,255 301,262 297,264 C289,270 272,273 264,271 ZM 162 249 C160,247 159,245 159,242 C159,236 164,230 169,230 C170,230 171,228 171,225 C171,216 176,210 184,209 C189,209 195,211 195,213 C195,214 196,213 197,212 C201,209 204,208 208,208 C212,208 217,210 219,212 C220,214 220,213 223,211 C226,208 234,208 239,211 C243,214 246,221 246,226 C245,230 245,230 247,230 C253,230 258,238 257,244 C256,249 251,252 245,252 C241,252 237,251 234,248 C232,247 232,247 228,249 C225,251 222,252 220,252 C216,252 212,250 210,247 C209,246 209,246 206,248 C201,252 192,253 185,248 C183,247 183,247 178,249 C172,253 166,253 162,249 ZM 116 249 C112,248 114,247 119,247 C122,247 127,246 130,245 C138,242 146,242 152,245 L 158 248 L 148 247 C142,247 138,247 133,248 C128,250 120,250 116,249 ZM 284 248 C281,247 277,247 270,247 L 260 248 L 263 246 C269,243 276,242 284,245 C289,246 295,247 298,247 C303,247 304,247 303,248 C301,250 289,250 284,248 Z",fill:"currentColor"})})})}var T=e.i(2828);function E({version:e,branch:s,commitHash:i,isDev:n=!1,packageName:o="@shepai/cli",description:l,instancePath:c}){let{t:u}=(0,r.useTranslation)("web"),d=i?.slice(0,7),{latest:h,updateAvailable:m}=function(e){let[t,s]=(0,a.useState)(null),[r,i]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/npm-version");if(!t.ok)return;let a=await t.json();!e&&a.latest&&s(a.latest)}catch{}finally{e||i(!1)}}(),()=>{e=!0}},[]);let n=null!==t&&function(e,t){let a=e=>e.split("-")[0].split(".").map(Number),s=a(e),r=a(t);for(let e=0;e<3;e++){let t=s[e]??0,a=r[e]??0;if(t>a)return 1;if(t<a)return -1}return 0}(t,e)>0;return{latest:t,updateAvailable:n,loading:r}}(e),{status:f,startUpgrade:p}=function(){let[e,t]=(0,a.useState)("idle"),[s,r]=(0,a.useState)(""),[i,n]=(0,a.useState)(),o=(0,a.useRef)(null),l=(0,a.useRef)(!1),c=(0,a.useCallback)(()=>{if("upgrading"===e||"restarting"===e)return;t("upgrading"),r(""),n(void 0),l.current=!1;let a=new AbortController;return o.current=a,fetch("/api/cli-upgrade",{method:"POST",signal:a.signal}).then(async e=>{if(!e.ok||!e.body){t("error"),n(`Server returned ${e.status}`);return}let a=e.body.getReader(),s=new TextDecoder,i="";for(;;){let{done:e,value:o}=await a.read();if(e)break;let c=(i+=s.decode(o,{stream:!0})).split("\n");for(let e of(i=c.pop()??"",c)){if(e.startsWith("event: restarting")){l.current=!0,t("restarting"),function(e,t){let a=Date.now()+3e4,s=()=>{Date.now()>a||fetch("/api/version",{method:"GET",cache:"no-store"}).then(e=>{e.ok?window.location.reload():setTimeout(s,500)}).catch(()=>{setTimeout(s,500)})};setTimeout(s,500)}(0,0);continue}if(!e.startsWith("event: done")&&e.startsWith("data: ")){let a=e.slice(6);try{let e=JSON.parse(a);"upgraded"===e.status?t("upgraded"):"up-to-date"===e.status?t("up-to-date"):"error"===e.status&&(t("error"),n(e.errorMessage))}catch{r(e=>e+a)}}}}}).catch(e=>{l.current||e instanceof DOMException&&"AbortError"===e.name||(t("error"),n(e instanceof Error?e.message:"Upgrade failed"))}),()=>{a.abort()}},[e]);return{status:e,output:s,errorMessage:i,startUpgrade:c}}(),g=n?`${e}-dev`:`v${e}`,x="upgrading"===f,b="restarting"===f,y="upgraded"===f;return(0,t.jsx)(T.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground/80 hover:text-muted-foreground relative cursor-default text-[11px] leading-tight transition-colors","data-testid":"version-label",children:[g,!m||y||b?null:(0,t.jsx)("span",{className:"absolute -top-0.5 -right-1.5 size-1.5 rounded-full bg-emerald-400","data-testid":"update-dot"})]})}),(0,t.jsxs)(T.TooltipContent,{side:"right",className:"max-w-[280px] space-y-1 p-3 text-start",children:[(0,t.jsx)("div",{className:"mb-1.5 text-xs font-semibold",children:o}),l?(0,t.jsx)("div",{className:"text-[10px] leading-snug opacity-70",children:l}):null,(0,t.jsxs)("div",{className:"border-t border-white/10 pt-1.5",children:[(0,t.jsx)(A,{label:u("versionBadge.version"),value:g}),n&&s?(0,t.jsx)(A,{label:u("versionBadge.branch"),value:s}):null,n&&d?(0,t.jsx)(A,{label:u("versionBadge.commit"),value:d,mono:!0}):null,n&&c?(0,t.jsx)(A,{label:u("versionBadge.path"),value:c,mono:!0}):null,h?(0,t.jsx)(A,{label:"Latest",value:`v${h}`,highlight:m}):null]}),b?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-restarting",children:"Restarting..."})}):y?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-success",children:"Upgraded successfully"})}):"error"===f?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-red-400","data-testid":"upgrade-error",children:"Upgrade failed"})}):m?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("button",{type:"button",onClick:p,disabled:x||b,className:"inline-flex items-center gap-1 text-[10px] font-medium text-emerald-400 transition-colors hover:text-emerald-300 disabled:opacity-50","data-testid":"upgrade-button",children:x?"Upgrading...":b?"Restarting...":`Upgrade to v${h}`})}):null]})]})})}function A({label:e,value:a,highlight:s,mono:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[(0,t.jsx)("span",{className:"opacity-60",children:e}),(0,t.jsx)("span",{className:[s?"font-medium text-emerald-400":"",r||!s?"font-mono":""].filter(Boolean).join(" "),children:a})]})}function P({startedAt:e}){let[s,r]=(0,a.useState)(()=>Date.now()-e);return(0,a.useEffect)(()=>{let t=setInterval(()=>{(0,a.startTransition)(()=>r(Date.now()-e))},1e3);return()=>clearInterval(t)},[e]),(0,t.jsx)("span",{"data-testid":"elapsed-time",className:"tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t>=3600){let e=Math.floor(t/3600);return`${e}h`}let a=Math.floor(t/60);return`${String(a).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}(s)})}var D=e.i(51251),L=e.i(83428),O=e.i(34119),q=e.i(94819),I=e.i(54277),Q=e.i(55016);let R={"action-needed":{icon:D.CircleAlert,iconClass:"text-amber-500",bgClass:"bg-amber-500/10",labelKey:"sidebar.statusActionNeeded"},"in-progress":{icon:L.Loader2,iconClass:"text-blue-500 animate-spin",bgClass:"bg-blue-500/10",labelKey:"sidebar.statusInProgress"},pending:{icon:Q.Clock,iconClass:"text-slate-400",bgClass:"bg-slate-400/10",labelKey:"sidebar.statusPending"},blocked:{icon:q.Ban,iconClass:"text-gray-400",bgClass:"bg-gray-400/10",labelKey:"sidebar.statusBlocked"},error:{icon:I.CircleX,iconClass:"text-red-500",bgClass:"bg-red-500/10",labelKey:"sidebar.statusError"},done:{icon:O.CircleCheck,iconClass:"text-emerald-500",bgClass:"bg-emerald-500/10",labelKey:"sidebar.statusDone"}},z=["action-needed","error","blocked","in-progress","pending","done"];var F=e.i(86782),K=e.i(29847);function H({name:e,status:a,startedAt:s,duration:r,agentType:i,modelId:o,onClick:l}){let{icon:c,iconClass:u}=R[a],d=i?(0,F.getAgentTypeIcon)(i):null;return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"feature-list-item",children:(0,t.jsxs)(n.SidebarMenuButton,{size:"sm",onClick:l,tooltip:e,className:"cursor-pointer",children:[(0,t.jsx)(c,{className:u}),(0,t.jsx)("span",{className:"flex-1 truncate font-medium",children:e}),"in-progress"===a&&null!=s?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:(0,t.jsx)(P,{startedAt:s})}):null,"done"===a&&r?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:r}):null,d?(0,t.jsx)(T.TooltipProvider,{children:(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"ml-auto shrink-0",children:(0,t.jsx)(d,{className:"h-3.5 w-3.5"})})}),(0,t.jsxs)(T.TooltipContent,{side:"right",children:[(0,t.jsx)("span",{className:"font-medium",children:F.agentTypeLabels[i]??i}),o?(0,t.jsxs)("span",{className:"ms-1 opacity-70",children:["· ",(0,K.getModelMeta)(o).displayName||o]}):null]})]})}):null]})})}var B=e.i(73709);let _="shep-animations-enabled",$="shep:animations-toggle",G="no-animations",U="shep-theme";function X({label:e,count:a,children:s}){return(0,t.jsxs)(n.SidebarGroup,{"data-testid":"feature-status-group",className:"px-2 py-1",children:[(0,t.jsxs)(n.SidebarGroupLabel,{className:"text-muted-foreground h-6 px-2 text-[0.65rem] font-semibold tracking-wider uppercase",children:[e,(0,t.jsx)("span",{"aria-label":`${a} items`,className:"bg-sidebar-accent text-sidebar-accent-foreground ms-1.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:a})]}),(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)(n.SidebarMenu,{className:"gap-0.5",children:s})})]})}var W=e.i(99105),Z=e.i(81542),Y=e.i(3214);function V({repoName:e,featureCount:s,children:r,defaultOpen:i=!0,onAddFeature:n}){let[o,l]=(0,a.useState)(i);return(0,t.jsxs)("div",{"data-testid":"repo-group",className:"group/repo mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(!o),className:(0,N.cn)("text-sidebar-foreground hover:bg-sidebar-accent flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs font-semibold","transition-colors duration-100"),"aria-expanded":o,children:[(0,t.jsx)(W.ChevronDown,{className:(0,N.cn)("text-muted-foreground h-3.5 w-3.5 shrink-0 transition-transform duration-200",!o&&"-rotate-90")}),(0,t.jsx)(Z.GitFork,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{"aria-label":`${s} features`,className:"bg-sidebar-accent text-sidebar-accent-foreground ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:s})]}),n?(0,t.jsx)("button",{type:"button","data-testid":"repo-add-feature",onClick:e=>{e.stopPropagation(),n()},className:(0,N.cn)("text-muted-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent shrink-0 rounded-md p-1 opacity-0 transition-all duration-100 group-hover/repo:opacity-100","focus-visible:ring-ring focus-visible:opacity-100 focus-visible:ring-1 focus-visible:outline-none"),"aria-label":`Add feature to ${e}`,children:(0,t.jsx)(Y.Plus,{className:"h-3.5 w-3.5"})}):null]}),o?(0,t.jsx)("div",{className:"pl-2",children:r}):null]})}function J({label:e,className:a}){return(0,t.jsx)(n.SidebarGroup,{"data-testid":"sidebar-section-header",className:(0,N.cn)("px-2 py-1",a),children:(0,t.jsx)("div",{className:"text-sidebar-foreground flex h-7 w-full shrink-0 items-center px-2 text-sm font-medium",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})})})}let ee={version:"unknown",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform",branch:"",commitHash:"",instancePath:"",isDev:!1};function et({features:e,featureFlags:i,onFeatureClick:o,onAddFeature:v}){let{t:C,i18n:k}=(0,r.useTranslation)("web"),N=(0,s.usePathname)(),{state:A}=(0,n.useSidebar)(),P="collapsed"===A,{mounted:D,visible:L}=function(e,t){let[s,r]=(0,a.useState)(!e),[i,n]=(0,a.useState)(!e);return(0,a.useEffect)(()=>{if(!e){r(!0);let e=requestAnimationFrame(()=>n(!0));return()=>cancelAnimationFrame(e)}n(!1);let t=window.setTimeout(()=>r(!1),200);return()=>window.clearTimeout(t)},[e,200]),{mounted:s,visible:i}}(P,0),O=function(){let[e,t]=(0,a.useState)(ee);return(0,a.useEffect)(()=>{let e=!1;return async function(){try{let a=await fetch("/api/version");if(!a.ok)return;let s=await a.json();e||t(s)}catch{}}(),()=>{e=!0}},[]),e}(),{enabled:q,toggle:I}=(0,B.useSoundEnabled)(),{enabled:Q,toggle:F}=function(){let[e,t]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem(_)&&(t(!1),document.body.classList.add(G));let e=e=>{let a=e.detail;t(a),document.body.classList.toggle(G,!a)};return window.addEventListener($,e),()=>window.removeEventListener($,e)},[]);let s=(0,a.useCallback)(()=>{let a=!e;localStorage.setItem(_,String(a)),t(a),document.body.classList.toggle(G,!a),window.dispatchEvent(new CustomEvent($,{detail:a}))},[e]);return{enabled:e,toggle:s}}(),{resolvedTheme:K,theme:W,setTheme:Z}=function(){let[e,t]=(0,a.useState)("system"),[s,r]=(0,a.useState)("light"),i=(0,a.useCallback)(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),n=(0,a.useCallback)(e=>"system"===e?i():e,[i]),o=(0,a.useCallback)(e=>{if("u"<typeof document)return;let t=document.documentElement;t.classList.remove("light","dark"),t.classList.add(e),r(e)},[]),l=(0,a.useCallback)(e=>{t(e),"u">typeof localStorage&&localStorage.setItem(U,e),o(n(e))},[n,o]);return(0,a.useEffect)(()=>{let e=localStorage.getItem(U)??"system";t(e),o(n(e))},[n,o]),(0,a.useEffect)(()=>{let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{"system"===e&&o(n("system"))};return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,n,o]),{theme:e,resolvedTheme:s,setTheme:l}}(),Y=(0,w.useSoundAction)("toggle-on"),et=(0,w.useSoundAction)("toggle-off"),ea=(0,w.useSoundAction)("navigate"),es=(0,a.useMemo)(()=>{let t=new Map;for(let a of e){let e=a.repositoryPath,s=t.get(e);s||(s={repoName:a.repositoryName,features:[]},t.set(e,s)),s.features.push(a)}return Array.from(t.entries()).map(([e,{repoName:t,features:a}])=>({repoPath:e,repoName:t,featureCount:a.length,statusGroups:z.map(e=>({statusKey:e,label:C(R[e].labelKey),items:a.filter(t=>t.status===e)})).filter(e=>e.items.length>0)}))},[e,C]);return(0,t.jsxs)(n.Sidebar,{"data-testid":"app-sidebar","data-no-drawer-close":!0,collapsible:"icon",side:"rtl"===k.dir()?"right":"left",children:[(0,t.jsx)(n.SidebarHeader,{children:(0,t.jsxs)(n.SidebarMenu,{children:[(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsxs)("div",{className:"flex h-8 items-center group-data-[collapsible=icon]:justify-center",children:[D?(0,t.jsxs)("div",{className:["flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2 transition-opacity duration-200 ease-out",L?"opacity-100":"opacity-0"].join(" "),"aria-hidden":!L,children:[(0,t.jsx)(M,{className:"shrink-0",size:20,variant:O.isDev?"dev":"default"}),(0,t.jsx)("span",{className:"truncate text-sm font-semibold tracking-tight",children:"Shep"}),(0,t.jsx)(E,{version:O.version,branch:O.branch||void 0,commitHash:O.commitHash||void 0,isDev:O.isDev,packageName:O.packageName,description:O.description,instancePath:O.instancePath||void 0})]}):null,(0,t.jsx)(S,{className:"shrink-0 transition-all duration-200"})]})}),(0,t.jsx)(j,{icon:l,label:C("navigation.controlCenter"),href:"/",active:"/"===N}),i.inventory?(0,t.jsx)(j,{icon:b,label:C("navigation.inventory"),href:"/features",active:"/features"===N}):null,(0,t.jsx)(j,{icon:p.Wrench,label:C("navigation.tools"),href:"/tools",active:"/tools"===N}),i.skills?(0,t.jsx)(j,{icon:g.Puzzle,label:C("navigation.skills"),href:"/skills",active:"/skills"===N}):null,(0,t.jsx)(j,{icon:x.Settings,label:C("navigation.settings"),href:"/settings",active:"/settings"===N})]})}),(0,t.jsx)(n.SidebarContent,{children:D?(0,t.jsxs)("div",{className:["flex min-h-0 flex-1 flex-col overflow-hidden transition-opacity duration-200 ease-out [&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none",L?"opacity-100":"opacity-0"].join(" "),children:[(0,t.jsx)(J,{label:C("sidebar.features")}),(0,t.jsx)(y.ScrollArea,{className:"min-h-0 flex-1",children:es.map(({repoPath:e,repoName:a,featureCount:s,statusGroups:r})=>(0,t.jsx)(V,{repoName:a,featureCount:s,onAddFeature:v?()=>v(e):void 0,children:r.map(({statusKey:e,label:a,items:s})=>(0,t.jsx)(X,{label:a,count:s.length,children:s.map(e=>(0,t.jsx)(H,{name:e.name,status:e.status,startedAt:e.startedAt,duration:e.duration,agentType:e.agentType,modelId:e.modelId,onClick:o?()=>o(e.featureId):void 0},e.featureId))},e))},e))})]}):null}),(0,t.jsx)(n.SidebarFooter,{className:"border-t p-2",children:(0,t.jsx)(n.SidebarMenu,{children:(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsxs)(T.TooltipProvider,{children:[(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:e=>{let t="system"===W?"dark"===K?"light":"dark":"dark"===W?"light":"dark";"dark"!==("system"===W?K:W)?Y.play():et.play();let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"startViewTransition"in document&&!a?(document.documentElement.style.setProperty("--x",`${e.clientX}px`),document.documentElement.style.setProperty("--y",`${e.clientY}px`),document.startViewTransition(()=>{Z(t)})):Z(t)},"aria-label":"dark"===K?C("sidebar.switchToLight"):C("sidebar.switchToDark"),children:[(0,t.jsx)(u,{className:"h-4 w-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,t.jsx)(c,{className:"absolute h-4 w-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"})]})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:"dark"===K?C("sidebar.switchToLight"):C("sidebar.switchToDark")})]}),!P&&(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{ea.play(),I()},"aria-label":q?C("sidebar.muteSounds"):C("sidebar.unmuteSounds"),children:q?(0,t.jsx)(d,{className:"h-4 w-4"}):(0,t.jsx)(h,{className:"h-4 w-4"})})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:q?C("sidebar.muteSounds"):C("sidebar.unmuteSounds")})]}),!P&&(0,t.jsxs)(T.Tooltip,{children:[(0,t.jsx)(T.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{ea.play(),F()},"aria-label":Q?"Disable animations":"Enable animations",children:Q?(0,t.jsx)(m.Zap,{className:"h-4 w-4"}):(0,t.jsx)(f,{className:"h-4 w-4"})})}),(0,t.jsx)(T.TooltipContent,{side:"top",children:Q?"Disable animations":"Enable animations"})]})]})})})})}),(0,t.jsx)(n.SidebarRail,{})]})}e.i(13322);var ea=e.i(61201),es=e.i(48109),er=e.i(60253),ei=e.i(26370);let en=(0,o.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);var eo=e.i(87538);let el=(0,o.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var ec=e.i(28112),eu=e.i(57779),ed=e.i(80554),eh=e.i(62639);let em="shep-global-chat";function ef(){try{let e=localStorage.getItem(em);if(!e)return{pos:null,size:null};let t=JSON.parse(e),a=t.size??null;return a&&(a.w<360||a.h<300)&&(a={w:Math.max(360,a.w),h:Math.max(300,a.h)}),{pos:t.pos??null,size:a}}catch{return{pos:null,size:null}}}function ep(){let{t:e}=(0,r.useTranslation)("web"),[s,i]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),d=(0,ed.useTurnStatus)("global"),{swapPosition:h}=(0,eh.useFabLayout)(),{state:m}=(0,n.useSidebar)(),[f,p]=(0,a.useState)(()=>ef().pos),[g,x]=(0,a.useState)(()=>ef().size),b=(0,a.useCallback)(e=>{p(t=>"function"==typeof e?e(t):e)},[]),y=(0,a.useCallback)(e=>{x(t=>"function"==typeof e?e(t):e)},[]),v=(0,a.useRef)(null),w=(0,a.useRef)(null),j=(0,a.useRef)(null),C=(0,a.useCallback)(()=>{i(e=>(e||l(!0),!e))},[]),S=(0,a.useRef)({pos:null,size:null}),M=(0,a.useCallback)(()=>{s||(i(!0),l(!0)),u(e=>(e?(b(S.current.pos),y(S.current.size)):S.current={pos:f,size:g},!e))},[s,f,g,b,y]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&("k"===e.key||"K"===e.key)&&(e.preventDefault(),c&&u(!1),C(),requestAnimationFrame(()=>{setTimeout(()=>{let e=v.current?.querySelector("textarea");e?.focus()},100)})),(e.metaKey||e.ctrlKey)&&e.shiftKey&&("m"===e.key||"M"===e.key)&&(e.preventDefault(),M())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[C,M,c]),(0,a.useEffect)(()=>{let e=setTimeout(()=>(function(e,t){try{localStorage.setItem(em,JSON.stringify({pos:e,size:t}))}catch{}})(f,g),300);return()=>clearTimeout(e)},[f,g]);let T=(0,a.useCallback)((e,t,a)=>({x:Math.max(-a+100,Math.min(e,window.innerWidth-100)),y:Math.max(0,Math.min(t,window.innerHeight-48))}),[]),E=(0,a.useCallback)(e=>{e.preventDefault();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=f?.x??a.left,r=f?.y??a.top;w.current={startX:e.clientX,startY:e.clientY,startPosX:s,startPosY:r};let i=g?.w??a.width,n=e=>{if(!w.current)return;let t=e.clientX-w.current.startX,a=e.clientY-w.current.startY;b(T(w.current.startPosX+t,w.current.startPosY+a,i))},o=()=>{w.current=null,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",o)},[f,g,b,T]),A=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=g?.w??a.width,r=g?.h??a.height,i=e.clientX,n=e.clientY,o=f?.y??a.top;j.current={startX:i,startY:n,startW:s,startH:r},f||b({x:a.left,y:a.top});let l=e=>{if(!j.current)return;let t=e.clientX-i,l=e.clientY-n,c=Math.max(360,s+t),u=Math.max(300,r-l),d=Math.max(0,o+l);y({w:c,h:u}),b(e=>T(e?.x??a.left,d,c))},c=()=>{j.current=null,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},[g,f,b,y,T]),P=(0,a.useCallback)(()=>{i(!1),u(!1)},[]),D=c?{}:f?{position:"fixed",left:f.x,top:f.y,width:g?.w??520,height:g?.h??"70vh"}:{width:g?.w??520,height:g?.h??"70vh"};return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsxs)("div",{ref:v,className:(0,N.cn)(c?"bg-background fixed inset-0 z-[60] flex flex-col overflow-hidden dark:bg-neutral-900":(0,N.cn)(!f&&(h?"fixed start-8 bottom-24":"fixed end-8 bottom-24"),"z-[60] flex flex-col overflow-hidden rounded-lg","border-border/60 border dark:border-white/10","bg-background dark:bg-neutral-900","shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]"),"transition-opacity duration-300 ease-out",s?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:D,children:[c?null:(0,t.jsx)("div",{className:"h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent"}),c?null:(0,t.jsx)("div",{onMouseDown:A,className:"absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize"}),(0,t.jsxs)("div",{onMouseDown:c?void 0:E,className:(0,N.cn)("relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]",!c&&"cursor-grab active:cursor-grabbing"),children:[(0,t.jsx)("div",{className:"from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent"}),c?null:(0,t.jsx)(en,{className:"text-foreground/15 relative h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("div",{className:"relative flex h-5 w-5 items-center justify-center",children:(0,t.jsx)(ei.Bot,{className:"text-foreground/50 h-4 w-4"})}),(0,t.jsxs)("div",{className:"relative flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-foreground/90 text-base font-bold tracking-tight",children:"Shep"}),(0,t.jsx)("span",{className:"text-foreground/30 text-xs font-medium tracking-widest uppercase",children:"global"})]}),(0,t.jsxs)("div",{className:"relative ms-auto flex items-center gap-0.5",children:[(0,t.jsx)("button",{type:"button",onClick:M,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:c?"Restore (⌘⇧M)":"Maximize (⌘⇧M)",children:c?(0,t.jsx)(el,{className:"h-3.5 w-3.5"}):(0,t.jsx)(eo.Maximize2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:P,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:"Close (⌘⇧K)",children:(0,t.jsx)(er.X,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(ec.ChatTab,{featureId:"global"})}),c?null:(0,t.jsx)("div",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let t=v.current;if(!t)return;let a=t.getBoundingClientRect(),s=e.clientX,r=e.clientY,i=g?.w??a.width,n=g?.h??a.height;f||b({x:a.left,y:a.top});let o=e=>{let t=window.innerHeight-(f?.y??a.top);y({w:Math.max(360,i+(e.clientX-s)),h:Math.max(300,Math.min(n+(e.clientY-r),t))})},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},className:"absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize"})]}):null,(0,t.jsxs)(eg,{swapPosition:h,sidebarState:m,isMaximized:c,children:[(0,t.jsxs)(k.Button,{size:"icon",onClick:C,className:(0,N.cn)("relative h-14 w-14 rounded-full shadow-lg","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95",s?"bg-violet-600 text-white hover:bg-violet-500":"bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400",!s&&"processing"===d&&"chat-fab-spinning",!s&&"unread"===d&&"chat-fab-glow-unread",!s&&"awaiting_input"===d&&"chat-fab-glow-awaiting"),children:[(0,t.jsx)(es.MessageSquare,{className:(0,N.cn)("absolute h-7 w-7 stroke-[2.5] transition-all duration-200",s?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100")}),(0,t.jsx)(er.X,{className:(0,N.cn)("absolute h-6 w-6 stroke-[2.5] transition-all duration-200",s?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0")}),!s&&(0,t.jsx)(eu.ChatDotIndicator,{status:d,className:"end-0 top-0"})]}),(0,t.jsx)("div",{className:"pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100",children:(0,t.jsxs)("div",{className:"bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg",children:[(0,t.jsx)("p",{className:"text-background text-xs font-medium whitespace-nowrap",children:e("chat.shepChat")}),(0,t.jsxs)("p",{className:"text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]",children:[(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⌘"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⇧"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"K"})]})]})})]})]})}function eg({swapPosition:e,sidebarState:a,isMaximized:s,children:i}){let{i18n:n}=(0,r.useTranslation)("web"),o="rtl"===n.dir();if(!e)return(0,t.jsx)("div",{className:(0,N.cn)("group/fab fixed end-8 bottom-6 z-30",s&&"hidden"),children:i});let l="expanded"===a?"calc(var(--sidebar-width) + 32px)":"calc(var(--sidebar-width-icon) + 32px)";return(0,t.jsx)("div",{className:(0,N.cn)("group/fab fixed bottom-6 z-30",s&&"hidden"),style:o?{right:l,transition:"right 200ms ease-in-out"}:{left:l,transition:"left 200ms ease-in-out"},children:i})}var ex=e.i(78521),eb=e.i(2287),ey=e.i(68304),ev=e.i(98127),ew=e.i(41957);let ej=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function eC({onSubmit:e,loading:s=!1}){let[r,i]=(0,a.useState)(""),[n,o]=(0,a.useState)("");function l(){let t=r.trim();t?ej.test(t.trim())?(o(""),e(t)):o("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):o("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(ew.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(ev.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:r,onChange:e=>{i(e.target.value),n&&o("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),l())},disabled:s,"aria-invalid":!!n,"aria-describedby":n?"github-url-error":void 0}),(0,t.jsx)(k.Button,{onClick:l,disabled:s||!r.trim(),size:"sm",children:s?(0,t.jsx)(L.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),n?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:n}):null]})}let ek=(0,o.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var eN=e.i(32494),eS=e.i(66459),eM=e.i(79687),eT=e.i(81846),eE=e.i(61238),eA=e.i(47373),eP=e.i(21023);let eD=(0,eP.createServerReference)("406ef754ccda793fa206f899d837caecaa63e43abd",eP.callServer,void 0,eP.findSourceMapURL,"listGitHubRepositories"),eL=(0,eP.createServerReference)("0075e98fc3dab02ce5f174218a97d9c76ef663a90f",eP.callServer,void 0,eP.findSourceMapURL,"listGitHubOrganizations"),eO="__personal__";function eq({onSelect:e,loading:s=!1,fetchRepos:r=eD,fetchOrgs:i=eL}){let[n,o]=(0,a.useState)([]),[l,c]=(0,a.useState)([]),[u,d]=(0,a.useState)(!0),[h,m]=(0,a.useState)(""),[f,p]=(0,a.useState)(""),[g,x]=(0,a.useState)(eO),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await i();e.orgs&&c(e.orgs)}catch{}}()},[i]);let y=(0,a.useCallback)(async(e,t)=>{d(!0),m("");try{let a={};e&&(a.search=e),t&&t!==eO&&(a.owner=t);let s=await r(Object.keys(a).length>0?a:void 0);s.error?(m(s.error),o([])):o(s.repos??[])}catch{m("Failed to fetch repositories"),o([])}finally{d(!1)}},[r]);return((0,a.useEffect)(()=>{y(f||void 0,g)},[y,g]),h&&!u)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(eM.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:h})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[l.length>0?(0,t.jsxs)(eA.Select,{value:g,onValueChange:function(e){x(e),p("")},disabled:s,children:[(0,t.jsx)(eA.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(eA.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(eA.SelectContent,{children:[(0,t.jsx)(eA.SelectItem,{value:eO,children:"My repositories"}),l.map(e=>(0,t.jsx)(eA.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(eS.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(ev.Input,{placeholder:"Search repositories...",value:f,onChange:e=>{var t;p(t=e.target.value),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{y(t||void 0,g)},300)},className:"ps-9",disabled:s,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:u?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eE.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(eE.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.map(a=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(a.nameWithOwner),disabled:s,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a.nameWithOwner}),(0,t.jsx)(eT.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ek,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eN.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),a.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:a.description}):null]}),s?(0,t.jsx)(L.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let eI=(0,eP.createServerReference)("407046bf6ef3fab7f7d3e050dbc6737e7408da7ca6",eP.callServer,void 0,eP.findSourceMapURL,"importGitHubRepository");function eQ({open:e,onOpenChange:s,onImportComplete:r}){let[i,n]=(0,a.useState)(!1),[o,l]=(0,a.useState)("");async function c(e){n(!0),l("");try{let t=await eI({url:e});t.error?l(t.error):t.repository&&(r(t.repository),s(!1))}catch{l("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(eb.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(eb.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(eb.DialogHeader,{children:[(0,t.jsx)(eb.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(eb.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(ey.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(ey.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(ey.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(ey.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(ey.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(eC,{onSubmit:c,loading:i})}),(0,t.jsx)(ey.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(eq,{onSelect:c,loading:i})})]}),o?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:o}):null]})})}var eR=e.i(39443),ez=e.i(30153),eF=e.i(5147),eK=e.i(60112),eH=e.i(17406);let eB={[eH.NotificationSeverity.Success]:"success",[eH.NotificationSeverity.Error]:"error",[eH.NotificationSeverity.Warning]:"warning",[eH.NotificationSeverity.Info]:"info"},e_={[eH.NotificationSeverity.Success]:"notification-success",[eH.NotificationSeverity.Error]:"notification-error",[eH.NotificationSeverity.Warning]:"notification-warning",[eH.NotificationSeverity.Info]:"notification-info"};var e$=e.i(75921);function eG({children:e,sidebarOpen:r}){let i=(0,s.useRouter)(),{guardedNavigate:o}=(0,ez.useDrawerCloseGuard)(),l=(0,e$.useFeatureFlags)();!function(){let e=(0,s.useRouter)(),{events:t}=(0,eR.useAgentEventsContext)(),r=(0,w.useSoundAction)("notification-success"),i=(0,w.useSoundAction)("notification-error"),n=(0,w.useSoundAction)("notification-warning"),o=(0,w.useSoundAction)("notification-info"),l=(0,a.useMemo)(()=>({"notification-success":r,"notification-error":i,"notification-warning":n,"notification-info":o}),[r,i,n,o]),c=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(t.length<=c.current)return;let a=t.slice(c.current);for(let s of(c.current=t.length,a)){if(s.eventType!==eH.NotificationEventType.MergeReviewReady&&s.severity!==eH.NotificationSeverity.Error&&s.severity!==eH.NotificationSeverity.Warning&&s.severity!==eH.NotificationSeverity.Success)continue;!function(e,t){let a=eB[e.severity]??"info",s=e.eventType===eH.NotificationEventType.WaitingApproval||e.eventType===eH.NotificationEventType.MergeReviewReady;eK.toast[a](e.featureName,{description:e.message,...s&&t&&{action:{label:"Review",onClick:()=>{t(`/feature/${e.featureId}`)}}}})}(s,t=>e.push(t));let t=e_[s.severity];l[t]?.play()}},[t,l,e])}();let{features:c}=(0,eF.useSidebarFeaturesContext)(),u=(0,a.useCallback)(e=>{o(()=>i.push(`/feature/${e}`))},[i,o]),d=(0,a.useCallback)(e=>{o(()=>i.push(`/create?repo=${encodeURIComponent(e)}`))},[i,o]),[h,m]=(0,a.useState)(!1),[f,p]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{if(!h){if(l.reactFileManager)return void x(!0);m(!0);try{let e=await (0,ex.pickFolder)();e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}}))}catch{x(!0)}finally{m(!1)}}},[h,l.reactFileManager]);(0,a.useEffect)(()=>{let e=()=>{b()};return window.addEventListener("shep:pick-folder",e),()=>window.removeEventListener("shep:pick-folder",e)},[b]),(0,a.useEffect)(()=>{let e=()=>p(!0);return window.addEventListener("shep:open-github-import",e),()=>window.removeEventListener("shep:open-github-import",e)},[]);let y=(0,a.useCallback)(e=>{e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}})),x(!1)},[]),v=(0,a.useCallback)(e=>{e.path&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e.path}}))},[]);return(0,t.jsxs)(n.SidebarProvider,{defaultOpen:r??!1,children:[(0,t.jsx)(et,{features:c,featureFlags:l,onFeatureClick:u,onAddFeature:d}),(0,t.jsx)(n.SidebarInset,{children:(0,t.jsxs)("div",{className:"relative h-full",children:[(0,t.jsx)("main",{className:"h-full",children:e}),(0,t.jsx)(ep,{}),l.githubImport?(0,t.jsx)(eQ,{open:f,onOpenChange:p,onImportComplete:v}):null]})}),(0,t.jsx)(ea.ReactFileManagerDialog,{open:g,onOpenChange:e=>{e||x(!1)},onSelect:y})]})}function eU({children:e}){return(0,t.jsx)(ed.TurnStatusesProvider,{children:e})}function eX({children:e,sidebarOpen:a}){let{i18n:s}=(0,r.useTranslation)(),n=s.dir();return(0,t.jsx)(i.Direction.Provider,{dir:n,children:(0,t.jsx)(eR.AgentEventsProvider,{children:(0,t.jsx)(ez.DrawerCloseGuardProvider,{children:(0,t.jsx)(eF.SidebarFeaturesProvider,{children:(0,t.jsx)(eU,{children:(0,t.jsx)(eG,{sidebarOpen:a,children:e})})})})})})}e.s(["AppShell",()=>eX],87292)},25251,e=>{"use strict";var t=e.i(20314),a=e.i(60112);let s=({...e})=>(0,t.jsx)(a.Toaster,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});e.s(["Toaster",()=>s])},4858,e=>{"use strict";var t=e.i(20314),a=e.i(3),s=e.i(28574),r=e.i(6786),i=e.i(77501),n=class extends i.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let i=t.queryKey,n=t.queryHash??(0,a.hashQueryKeyByOptions)(i,t),o=this.get(n);return o||(o=new s.Query({client:e,queryKey:i,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.matchQuery)(e,t)):t}notify(e){r.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){r.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(87975),l=i,c=class extends l.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#a=new Map,this.#s=0}#t;#a;#s;build(e,t,a){let s=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#t.add(e);let t=u(e);if("string"==typeof t){let a=this.#a.get(t);a?a.push(e):this.#a.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=u(e);if("string"==typeof t){let a=this.#a.get(t);if(a)if(a.length>1){let t=a.indexOf(e);-1!==t&&a.splice(t,1)}else a[0]===e&&this.#a.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let a=this.#a.get(t),s=a?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let a=this.#a.get(t)?.find(t=>t!==e&&t.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){r.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#a.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.matchMutation)(e,t))}notify(e){r.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return r.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.noop))))}};function u(e){return e.options.scope?.id}var d=e.i(4520),h=e.i(13598);function m(e){return{onFetch:(t,s)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,u=async()=>{let s=!1,u=(0,a.ensureQueryFn)(t.options,t.fetchOptions),d=async(e,r,i)=>{let n;if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let o=(n={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?"backward":"forward",meta:t.options.meta},(0,a.addConsumeAwareSignal)(n,()=>t.signal,()=>s=!0),n),l=await u(o),{maxPages:c}=t.options,d=i?a.addToStart:a.addToEnd;return{pages:d(e.pages,l,c),pageParams:d(e.pageParams,r,c)}};if(i&&n.length){let e="backward"===i,t={pages:n,pageParams:o},a=(e?function(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}:f)(r,t);l=await d(t,a,e)}else{let t=e??n.length;do{let e=0===c?o[0]??r.initialPageParam:f(r,l);if(c>0&&null==e)break;l=await d(l,e),c++}while(c<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=u}}}function f(e,{pages:t,pageParams:a}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}var p=class{#r;#i;#n;#o;#l;#c;#u;#d;constructor(e={}){this.#r=e.queryCache||new n,this.#i=e.mutationCache||new c,this.#n=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=d.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#d=h.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#r.build(this,t),r=s.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let r=this.defaultQueryOptions({queryKey:e}),i=this.#r.get(r.queryHash),n=i?.state.data,o=(0,a.functionalUpdate)(t,n);if(void 0!==o)return this.#r.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,a){return r.notifyManager.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,a)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;r.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let a=this.#r;return r.notifyManager.batch(()=>(a.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(r.notifyManager.batch(()=>this.#r.findAll(e).map(e=>e.cancel(s)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return r.notifyManager.batch(()=>(this.#r.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(r.notifyManager.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#r.build(this,t);return s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#i}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#l.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#i.clear()}},g=e.i(34682),x=e.i(79054);function b({children:e}){let[a]=(0,x.useState)(()=>new p({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1}}}));return(0,t.jsx)(g.QueryClientProvider,{client:a,children:e})}e.s(["QueryProvider",()=>b],4858)},10644,e=>{"use strict";let t;var a=e.i(20314),s=e.i(79054);e.i(41001);var r=e.i(14827),i=e.i(99065),n=e.i(83100),o=e.i(37465),l=e.i(51193),c=e.i(55431),u=e.i(60280),d=e.i(40266),h=e.i(50784),m=e.i(28191),f=e.i(71363),p=e.i(53493),g=e.i(22307),x=e.i(44225),b=e.i(62305),y=e.i(51943),v=e.i(88158),w=e.i(39711),j=e.i(32456);let C=((t=i.default.createInstance()).use(n.initReactI18next).init({lng:"en",fallbackLng:"en",defaultNS:"common",ns:["common","web"],resources:{en:{common:o.default,web:l.default},ru:{common:c.default,web:u.default},pt:{common:d.default,web:h.default},es:{common:m.default,web:f.default},ar:{common:p.default,web:g.default},he:{common:x.default,web:b.default},fr:{common:y.default,web:v.default},de:{common:w.default,web:j.default}},interpolation:{escapeValue:!1},react:{useSuspense:!1}}),t),k={ar:{family:"Noto Sans Arabic",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap"},he:{family:"Noto Sans Hebrew",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;500;600;700&display=swap"}};function N(e){let t=k[e];if(document.documentElement.classList.remove("font-rtl-arabic","font-rtl-hebrew"),!t)return void document.documentElement.style.removeProperty("--font-rtl");document.documentElement.style.setProperty("--font-rtl",`"${t.family}"`),document.documentElement.classList.add("ar"===e?"font-rtl-arabic":"font-rtl-hebrew");let a=`rtl-font-${e}`;if(!document.getElementById(a)){let e=document.createElement("link");e.id=a,e.rel="stylesheet",e.href=t.cssUrl,document.head.appendChild(e)}}function S({initialLanguage:e,children:t}){return(0,s.useEffect)(()=>{C.language!==e&&C.changeLanguage(e),N(e)},[e]),(0,s.useEffect)(()=>{function e(e){N(e)}return C.on("languageChanged",e),()=>{C.off("languageChanged",e)}},[]),(0,a.jsx)(r.I18nextProvider,{i18n:C,children:t})}e.s(["I18nProvider",()=>S],10644)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59311,e=>{"use strict";let t=(0,e.i(3645).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>t],59311)},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),r=e.i(79054),a=e.i(91967),s=e.i(5978),i=e.i(22528),o=e.i(36589),l=e.i(23405),n=e.i(77624),c=e.i(87620),d="Switch",[p,u]=(0,i.createContextScope)(d),[h,m]=p(d),x=r.forwardRef((e,i)=>{let{__scopeSwitch:l,name:n,checked:p,defaultChecked:u,required:m,disabled:x,value:f="on",onCheckedChange:g,form:j,...v}=e,[k,C]=r.useState(null),y=(0,s.useComposedRefs)(i,e=>C(e)),N=r.useRef(!1),D=!k||j||!!k.closest("form"),[T,S]=(0,o.useControllableState)({prop:p,defaultProp:u??!1,onChange:g,caller:d});return(0,t.jsxs)(h,{scope:l,checked:T,disabled:x,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":T,"aria-required":m,"data-state":w(T),"data-disabled":x?"":void 0,disabled:x,value:f,...v,ref:y,onClick:(0,a.composeEventHandlers)(e.onClick,e=>{S(e=>!e),D&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),D&&(0,t.jsx)(b,{control:k,bubbles:!N.current,name:n,value:f,checked:T,required:m,disabled:x,form:j,style:{transform:"translateX(-100%)"}})]})});x.displayName=d;var f="SwitchThumb",g=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...s}=e,i=m(f,a);return(0,t.jsx)(c.Primitive.span,{"data-state":w(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:r})});g.displayName=f;var b=r.forwardRef(({__scopeSwitch:e,control:a,checked:i,bubbles:o=!0,...c},d)=>{let p=r.useRef(null),u=(0,s.useComposedRefs)(p,d),h=(0,l.usePrevious)(i),m=(0,n.useSize)(a);return r.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==i&&t){let r=new Event("click",{bubbles:o});t.call(e,i),e.dispatchEvent(r)}},[h,i,o]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...c,tabIndex:-1,ref:u,style:{...c.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function w(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>x,"Switch",()=>x,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>u],95291);var j=e.i(95291),j=j,v=e.i(31777);function k({className:e,size:r="default",...a}){return(0,t.jsx)(j.Root,{"data-slot":"switch","data-size":r,className:(0,v.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),...a,children:(0,t.jsx)(j.Thumb,{"data-slot":"switch-thumb",className:(0,v.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 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]")})})}e.s(["Switch",()=>k],51911)},15203,e=>{"use strict";var t=e.i(20314),r=e.i(79054),a=e.i(31406),s=e.i(60112),i=e.i(21023);let o=(0,i.createServerReference)("404e2a9af4caff7731c833d342a9dabb9429cf7f9b",i.callServer,void 0,i.findSourceMapURL,"createFeature");e.i(41001);var l=e.i(64780),n=e.i(16868),c=e.i(83843),d=e.i(97667),p=e.i(53360),u=e.i(55016),h=e.i(91925),m=e.i(83428),x=e.i(81542),f=e.i(70471),g=e.i(12103),b=e.i(59311),w=e.i(31777),j=e.i(8361);e.i(1650);var v=e.i(11495),k=e.i(45811),C=e.i(35364),y=e.i(98127),N=e.i(48306),D=e.i(41957),T=e.i(81846),S=e.i(90382),P=e.i(51911),F=e.i(2828),z=e.i(30153);e.i(50032);var E=e.i(86254);let L=(0,i.createServerReference)("407f9c9f52480d814d142d29f5d641dcdc28ca4862",i.callServer,void 0,i.findSourceMapURL,"getViewerPermission");var R=e.i(41413),M=e.i(25235),I=e.i(78521);e.i(13322);var U=e.i(61201),A=e.i(75921),O=e.i(7004),B=e.i(42076);let $=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"]),q={allowPrd:!1,allowPlan:!1,allowMerge:!1};function G({open:e,onClose:a,onSubmit:s,repositoryPath:i,isSubmitting:o=!1,workflowDefaults:c,features:d,repositories:h,initialParentId:m,currentAgentType:y,currentModel:S,initialDescription:M,canPushDirectly:I}){let U=(0,j.useSoundAction)("create"),{t:A}=(0,l.useTranslation)("web"),O=i&&(!h||0===h.length||h.some(e=>e.path===i))?i:"",G=c?.approvalGates??q,H=c?.push??!1,Z=c?.openPr??!1,J=c?.ciWatchEnabled!==!1,V=c?.enableEvidence??!1,X=c?.commitEvidence??!1,Q=c?.fast!==!1,[Y,_]=(0,r.useState)(M??"");(0,r.useEffect)(()=>{M&&_(M)},[M]);let[ee,et]=(0,r.useState)([]),[er,ea]=(0,r.useState)({...G}),[es,ei]=(0,r.useState)(H),[eo,el]=(0,r.useState)(Z),[en,ec]=(0,r.useState)(c?.ciWatchEnabled!==!1),[ed,ep]=(0,r.useState)(V),[eu,eh]=(0,r.useState)(X),[em,ex]=(0,r.useState)(void 0),[ef,eg]=(0,r.useState)(Q),[eb,ew]=(0,r.useState)(!1),[ej,ev]=(0,r.useState)(!1),[ek,eC]=(0,r.useState)(!0),[ey,eN]=(0,r.useState)(!0),[eD,eT]=(0,r.useState)(c?.injectSkills??!1),[eS,eP]=(0,r.useState)(void 0),[eF,ez]=(0,r.useState)(void 0),[eE,eL]=(0,r.useState)(O||void 0),[eR,eM]=(0,r.useState)(h??[]),[eI,eU]=(0,r.useState)(!1),[eA,eO]=(0,r.useState)(null),[eB,e$]=(0,r.useState)(!1),eq=(0,r.useRef)(crypto.randomUUID()),eG=(0,r.useRef)(0),eK=(0,r.useRef)(null);(0,r.useEffect)(()=>{c&&(ea({...c.approvalGates}),ei(c.push),el(c.openPr),ec(!1!==c.ciWatchEnabled),ep(c.enableEvidence),eh(c.commitEvidence),eg(!1!==c.fast),eT(c.injectSkills??!1))},[c]),(0,r.useEffect)(()=>{eM(h??[])},[h]),(0,r.useEffect)(()=>{e&&m&&ex(m)},[e,m]);let[eW,eH]=(0,r.useState)(I??!1);(0,r.useEffect)(()=>{eH(I??!1)},[I]);let eZ=(0,r.useRef)(eE);(0,r.useEffect)(()=>{eE&&eE!==eZ.current&&(eZ.current=eE,L(eE).then(e=>eH(e.canPushDirectly)).catch(()=>eH(!1)))},[eE]),(0,r.useEffect)(()=>{eW&&(ev(!1),ei(H),el(Z),eC(!0))},[eW,H,Z]);let eJ=(0,r.useCallback)(()=>{_(""),et([]),ea({...G}),ei(H),el(Z),ec(J),ep(V),eh(X),ex(void 0),eL(O||void 0),eM(h??[]),eg(Q),ew(!1),ev(!1),eC(!0),eN(!0),eP(void 0),ez(void 0),eO(null),eG.current=0,eU(!1)},[G,H,Z,V,J,X,Q,O,h]),eV=""!==Y.trim()||ee.length>0,{attemptClose:eX}=(0,z.useGuardedDrawerClose)({open:e,isDirty:eV,onClose:a,onReset:eJ}),eQ=(0,r.useCallback)(async e=>{for(let t of(eO(null),e)){if(t.size>0xa00000)return void eO(`"${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&&!$.has(e))return void eO(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();et(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eq.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));et(t=>t.filter(t=>t.id!==e)),eO(t.error??"Upload failed");return}let s=await a.json();et(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{et(t=>t.filter(t=>t.id!==e)),eO("Upload failed")}}},[]),eY=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eG.current+=1,1===eG.current&&eU(!0)},[]),e_=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eG.current-=1,0===eG.current&&eU(!1)},[]),e0=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),e1=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eG.current=0,eU(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eQ(t)},[eQ]),e5=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),eQ(r))},[eQ]),e2=(0,r.useCallback)(e=>{if(e.preventDefault(),!Y.trim())return;let t=eE??O;t&&(U.play(),s({description:Y.trim(),attachments:ee.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:er.allowPrd??!1,allowPlan:er.allowPlan??!1,allowMerge:er.allowMerge??!1},push:!!ej||es||eo,openPr:!!ej||eo,ciWatchEnabled:en,enableEvidence:ed,commitEvidence:eu,fast:ef,forkAndPr:ej,commitSpecs:ek,rebaseBeforeBranch:ey,injectSkills:eD,...eb?{pending:eb}:{},...eS?{agentType:eS}:{},...eF?{model:eF}:{},...em?{parentId:em}:{},sessionId:eq.current}),eJ())},[Y,ee,er,eE,O,s,es,eo,ed,en,eu,ef,ej,ek,ey,eD,eb,eS,eF,em,U,eJ]),e3=(0,r.useCallback)(async()=>{try{let e=await (0,B.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();et(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eq.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));et(t=>t.filter(t=>t.id!==e)),eO(t.error??"Upload failed");return}let a=await r.json();et(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{et(t=>t.filter(t=>t.id!==e)),eO("Upload failed")}}}catch{}},[]),e4=(0,r.useCallback)(e=>{et(t=>t.filter(t=>t.id!==e))},[]),e9=(0,r.useCallback)((e,t)=>{et(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]),e8=(0,r.useRef)(null),e6=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),e8.current?.requestSubmit())},[]),e7=(0,r.useCallback)(()=>{e$(!0)},[]),te=(0,r.useCallback)(()=>{setTimeout(()=>{let e=eK.current?.contains(document.activeElement),t=eK.current?.querySelector('[aria-expanded="true"]')!==null;e||t||e$(!1)},0)},[]),tt=d&&d.length>0,tr=!O&&!eE,ta=!O&&void 0!==h,ts=[{id:"allowPrd",label:A("createDrawer.prd"),description:A("createDrawer.prdDescription")},{id:"allowPlan",label:A("createDrawer.plan"),description:A("createDrawer.planDescription")},{id:"allowMerge",label:A("createDrawer.merge"),description:A("createDrawer.mergeDescription")}];return(0,t.jsx)(v.BaseDrawer,{open:e,onClose:eX,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)(k.DrawerTitle,{children:A("createDrawer.title")})]}),o?(0,t.jsx)(k.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(T.Badge,{variant:"secondary",children:A("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(C.Button,{variant:"outline",onClick:eX,disabled:o,children:A("createDrawer.cancel")}),(0,t.jsx)(C.Button,{type:"submit",form:"create-feature-form",disabled:!Y.trim()||o||tr,children:o?A("createDrawer.creating"):A("createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(F.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:e8,id:"create-feature-form",onSubmit:e2,onKeyDown:e6,className:"flex flex-col gap-4",children:[ta?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(D.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:A("createDrawer.repository")}),(0,t.jsx)(W,{repositories:eR,value:eE,onChange:eL,onAddRepository:e=>{eM(t=>[...t,e]),eL(e.path)},disabled:o})]}):O?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(D.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:A("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:h?.find(e=>e.path===O)?.name??O.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":A("createDrawer.fileDropZone"),"data-drag-over":eI?"true":"false",onDragEnter:eY,onDragLeave:e_,onDragOver:e0,onDrop:e1,className:(0,w.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eI&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(D.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:A("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:eK,onFocus:e7,onBlur:te,className:(0,w.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eB&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(N.Textarea,{id:"feature-description",placeholder:A("createDrawer.featurePlaceholder"),value:Y,onChange:e=>_(e.target.value),onPaste:e5,required:!0,disabled:o,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),ee.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:ee.map(e=>(0,t.jsx)(E.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>e4(e.id),disabled:o,loading:e.loading,notes:e.notes,onNotesChange:t=>e9(e.id,t)},e.id))}),eA?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:eA}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(R.AgentModelPicker,{initialAgentType:eS??y??"claude-code",initialModel:eF??S??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(e,t)=>{eP(e),ez(t)},disabled:o,className:"w-55"}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(P.Switch,{id:"pending-mode",checked:eb,onCheckedChange:ew,disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(u.Clock,{className:"h-3.5 w-3.5"}),A("createDrawer.pendingMode")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.pendingModeDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(P.Switch,{id:"fast-mode",checked:ef,onCheckedChange:eg,disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(p.Zap,{className:"h-3.5 w-3.5"}),A("createDrawer.fastModeLabel")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.fastModeDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:e3,disabled:o,"aria-label":A("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(n.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("chat.attachFiles")})]})]})]})]}),tt&&void 0!==m?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(D.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:A("createDrawer.parentFeature")}),(0,t.jsx)(K,{features:d,value:em,onChange:ex,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)(F.Tooltip,{children:[(0,t.jsx)(F.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:A("createDrawer.approve")})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:ts.map(e=>(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:`approve-${e.id}`,size:"sm",checked:er[e.id]??!1,onCheckedChange:t=>ea(r=>({...r,[e.id]:t})),disabled:o||ef&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(D.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:ef&&("allowPrd"===e.id||"allowPlan"===e.id)?A("createDrawer.skippedInFastMode"):e.description})]},e.id))}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=ts.every(e=>er[e.id]),t={};for(let r of ts)t[r.id]=!e;ea(t)},disabled:o,className:(0,w.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",ts.every(e=>er[e.id])&&"text-primary"),children:A("createDrawer.all")})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.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:A("createDrawer.evidence")})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"enable-evidence",size:"sm",checked:ed,onCheckedChange:e=>{ep(e),e||eh(!1)},disabled:o}),(0,t.jsx)(D.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:A("createDrawer.collect")})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.collectDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"commit-evidence",size:"sm",checked:eu,onCheckedChange:eh,disabled:o||!ed||!eo&&!ej}),(0,t.jsx)(D.Label,{htmlFor:"commit-evidence",className:(0,w.cn)("cursor-pointer text-xs font-medium",(!ed||!eo&&!ej)&&"opacity-50"),children:A("createDrawer.addToPr")})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:eo||ej?ed?A("createDrawer.addToPrDescription"):A("createDrawer.requiresEvidence"):A("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.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:A("createDrawer.skills")})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.skillsDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"inject-skills",size:"sm",checked:eD,onCheckedChange:eT,disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"inject-skills",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(g.Puzzle,{className:"h-3 w-3"}),A("createDrawer.injectSkills")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.injectSkillsDescription")})]})})]}),(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:A("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"push",size:"sm",checked:!!ej||es||eo,onCheckedChange:e=>{ei(e),!e&&eo&&el(!1)},disabled:o||ej}),(0,t.jsx)(D.Label,{htmlFor:"push",className:(0,w.cn)("cursor-pointer text-xs font-medium",ej&&"opacity-50"),children:A("createDrawer.push")})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:ej?"Enabled — contributing to upstream":A("createDrawer.pushDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"open-pr",size:"sm",checked:!!ej||eo,onCheckedChange:e=>{el(e),e||eh(!1)},disabled:o||ej}),(0,t.jsx)(D.Label,{htmlFor:"open-pr",className:(0,w.cn)("cursor-pointer text-xs font-medium",ej&&"opacity-50"),children:A("createDrawer.pr")})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:ej?"Enabled — contributing to upstream":A("createDrawer.prDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"ci-watch",size:"sm",checked:en,onCheckedChange:ec,disabled:o}),(0,t.jsx)(D.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:A("createDrawer.watch")})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"rebase-before-branch",size:"sm",checked:ey,onCheckedChange:eN,disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(b.RefreshCw,{className:"h-3 w-3"}),A("createDrawer.sync")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.syncDescription")})]}),(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"commit-specs",size:"sm",checked:ek,onCheckedChange:eC,disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(f.FileText,{className:"h-3 w-3"}),A("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.commitSpecsDescription")})]}),!eW&&(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(P.Switch,{id:"fork-and-pr",size:"sm",checked:ej,onCheckedChange:e=>{ev(e),e&&eC(!1)},disabled:o}),(0,t.jsxs)(D.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(x.GitFork,{className:"h-3 w-3"}),A("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(F.TooltipContent,{side:"bottom",children:A("createDrawer.forkAndPrDescription")})]})]})]})]})]})})})})}function K({features:e,value:a,onChange:s,disabled:i}){let{t:o}=(0,l.useTranslation)("web"),[n,p]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),m=(0,r.useRef)(null),x=e.find(e=>e.id===a),f=u.trim()?e.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.id.toLowerCase().includes(u.toLowerCase())):e,g=(0,r.useCallback)(e=>{s(e),p(!1),h("")},[s]);return(0,r.useEffect)(()=>{n?setTimeout(()=>m.current?.focus(),0):h("")},[n]),(0,t.jsxs)(S.Popover,{open:n,onOpenChange:p,children:[(0,t.jsx)(S.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":n,"aria-label":"Parent Feature",disabled:i,"data-testid":"parent-feature-combobox",className:(0,w.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",!x&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:x?`${x.name} (${x.id.slice(0,8)})`:o("createDrawer.selectParent")}),(0,t.jsx)(c.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(S.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)(y.Input,{ref:m,placeholder:o("createDrawer.searchFeatures"),value:u,onChange:e=>h(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===a,onClick:()=>g(void 0),className:(0,w.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===a&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(d.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:o("createDrawer.noParent")})]}),0===f.length&&u?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:o("createDrawer.noFeaturesFound")}):f.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>g(e.id),className:(0,w.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",a!==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:a,onChange:s,onAddRepository:i,disabled:o}){let[n,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),[b,j]=(0,r.useState)(null),[v,k]=(0,r.useState)(!1),C=(0,r.useRef)(null),{reactFileManager:N}=(0,A.useFeatureFlags)(),{t:D}=(0,l.useTranslation)("web"),T=e.find(e=>e.path===a),P=u.trim()?e.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.path.toLowerCase().includes(u.toLowerCase())):e,F=(0,r.useCallback)(e=>{s(e),p(!1),x("")},[s]),z=(0,r.useCallback)(async e=>{let t=await (0,O.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),p(!1),x("")}},[i,s]),E=(0,r.useCallback)(async()=>{if(!f){if(N)return void k(!0);g(!0),j(null);try{let e=await (0,I.pickFolder)();if(!e)return void g(!1);await z(e)}catch{k(!0)}finally{g(!1)}}},[f,N,z]),L=(0,r.useCallback)(async e=>{if(k(!1),e){g(!0),j(null);try{await z(e)}catch(e){j(e instanceof Error?e.message:"Failed to add repository")}finally{g(!1)}}},[z]);return(0,r.useEffect)(()=>{n?setTimeout(()=>C.current?.focus(),0):x("")},[n]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(S.Popover,{open:n,onOpenChange:p,children:[(0,t.jsx)(S.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":n,"aria-label":"Repository",disabled:o,"data-testid":"repository-combobox",className:(0,w.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)(c.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(S.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)(y.Input,{ref:C,placeholder:D("createDrawer.searchRepositories"),value:u,onChange:e=>x(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===P.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):P.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.path,onClick:()=>F(e.path),className:(0,w.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(d.CheckIcon,{className:(0,w.cn)("h-4 w-4 shrink-0",a!==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)(M.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:E,disabled:f,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:[f?(0,t.jsx)(m.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(h.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)(U.ReactFileManagerDialog,{open:v,onOpenChange:e=>{e||k(!1)},onSelect:L})]})}function H({repositoryPath:e,initialParentId:i,initialDescription:l,features:n,repositories:c,workflowDefaults:d,currentAgentType:p,currentModel:u,canPushDirectly:h}){let m=(0,a.useRouter)(),[x,f]=(0,r.useState)(!1),g=(0,a.usePathname)().startsWith("/create"),b=!x&&g;(0,r.useEffect)(()=>{!g&&x&&f(!1)},[g,x]);let w=(0,r.useCallback)(()=>{m.push("/")},[m]),j=(0,r.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)(G,{open:b,onClose:w,onSubmit:j,repositoryPath:e,features:n,repositories:c,workflowDefaults:d,initialParentId:i,initialDescription:l,isSubmitting:x,currentAgentType:p,currentModel:u,canPushDirectly:h})}e.s(["CreateDrawerClient",()=>H],15203)}]);
|