@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../../src/presentation/web/app/actions/get-all-agent-models.ts","../../../../../../../src/presentation/web/lib/model-metadata.ts","../../../../../../../src/presentation/web/app/actions/update-agent-and-model.ts","../../../../../../../packages/core/src/infrastructure/services/folder-dialog.service.ts","../../../../../../../src/presentation/web/app/actions/pick-folder.ts","../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts","../../../../../../../src/presentation/web/app/actions/list-github-repositories.ts","../../../../../../../src/presentation/web/app/actions/list-github-organizations.ts","../../../../../../../src/presentation/web/app/actions/import-github-repository.ts","../../../../../../../src/presentation/web/app/actions/deploy-feature.ts","../../../../../../../packages/core/src/infrastructure/services/deployment/deployment-logger.ts","../../../../../../../src/presentation/web/lib/is-same-shep-instance.ts","../../../../../../../src/presentation/web/app/actions/deploy-repository.ts","../../../../../../../src/presentation/web/app/actions/stop-deployment.ts","../../../../../../../src/presentation/web/app/actions/get-deployment-status.ts","../../../../../../../src/presentation/web/app/actions/get-deployment-logs.ts","../../../../../../../src/presentation/web/.next-internal/server/app/%28dashboard%29/chat/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport type { IAgentExecutorFactory } from '@shepai/core/application/ports/output/agents/agent-executor-factory.interface';\n\nexport interface ModelInfo {\n id: string;\n displayName: string;\n description: string;\n}\n\nexport interface AgentModelGroup {\n agentType: string;\n label: string;\n models: ModelInfo[];\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n 'codex-cli': 'Codex CLI',\n cursor: 'Cursor CLI',\n 'gemini-cli': 'Gemini CLI',\n dev: 'Demo',\n};\n\n/** Sort weight — higher = further down. Demo always last. */\nconst AGENT_ORDER: Record<string, number> = {\n 'claude-code': 0,\n 'codex-cli': 1,\n cursor: 2,\n 'gemini-cli': 3,\n dev: 99,\n};\n\nexport async function getAllAgentModels(): Promise<AgentModelGroup[]> {\n try {\n const factory = resolve<IAgentExecutorFactory>('IAgentExecutorFactory');\n const agents = factory.getSupportedAgents();\n return agents\n .map((agentType) => ({\n agentType: agentType as string,\n label: AGENT_LABELS[agentType as string] ?? (agentType as string),\n models: factory.getSupportedModels(agentType).map((id) => ({\n id,\n ...getModelMeta(id),\n })),\n }))\n .map((g) => {\n // Dev agent gets fun demo models\n if (g.agentType === 'dev' && g.models.length === 0) {\n return {\n ...g,\n models: [\n { id: 'gpt-8', ...getModelMeta('gpt-8') },\n { id: 'opus-7', ...getModelMeta('opus-7') },\n ],\n };\n }\n return g;\n })\n .filter((g) => g.models.length > 0)\n .sort((a, b) => (AGENT_ORDER[a.agentType] ?? 50) - (AGENT_ORDER[b.agentType] ?? 50));\n } catch {\n return [];\n }\n}\n","export interface ModelMeta {\n displayName: string;\n description: string;\n}\n\n/**\n * Presentation-layer metadata for known LLM model identifiers.\n * Maps raw model IDs to human-friendly display names and short descriptions.\n */\nconst MODEL_METADATA: Record<string, ModelMeta> = {\n // Claude models\n 'claude-opus-4-6': { displayName: 'Opus 4.6', description: 'Most capable, complex tasks' },\n 'claude-sonnet-4-6': { displayName: 'Sonnet 4.6', description: 'Fast & balanced' },\n 'claude-haiku-4-5': { displayName: 'Haiku 4.5', description: 'Lightweight & quick' },\n\n // Gemini models\n 'gemini-3.1-pro': { displayName: 'Gemini 3.1 Pro', description: 'Advanced reasoning' },\n 'gemini-3-flash': { displayName: 'Gemini 3 Flash', description: 'Ultra-fast responses' },\n 'gemini-2.5-pro': { displayName: 'Gemini 2.5 Pro', description: 'Reliable workhorse' },\n 'gemini-2.5-flash': { displayName: 'Gemini 2.5 Flash', description: 'Speed-optimized' },\n\n // OpenAI models\n 'gpt-5.4-high': { displayName: 'GPT-5.4', description: 'Latest reasoning model' },\n 'gpt-5.2': { displayName: 'GPT-5.2', description: 'Flagship model' },\n 'gpt-5.3-codex': { displayName: 'GPT-5.3 Codex', description: 'Code specialist' },\n\n // Other\n 'composer-1.5': { displayName: 'Composer 1.5', description: 'Multi-file editing' },\n 'grok-code': { displayName: 'Grok Code', description: 'xAI code model' },\n\n // Demo / fun models\n 'gpt-8': { displayName: 'GPT-8', description: 'Writes code before you think it' },\n 'opus-7': { displayName: 'Opus 7', description: 'Achieved consciousness, ships on time' },\n};\n\nconst FALLBACK: ModelMeta = { displayName: '', description: '' };\n\nexport function getModelMeta(modelId: string): ModelMeta {\n const meta = MODEL_METADATA[modelId];\n if (meta) return meta;\n // Fallback: prettify the raw ID\n return {\n ...FALLBACK,\n displayName: modelId\n .replace(/^claude-/, '')\n .replace(/^gemini-/, 'Gemini ')\n .replace(/^gpt-/, 'GPT-')\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase()),\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport {\n resetSettings,\n initializeSettings,\n} from '@shepai/core/infrastructure/services/settings.service';\nimport type { CompleteWebOnboardingUseCase } from '@shepai/core/application/use-cases/settings/complete-web-onboarding.use-case';\nimport type { AgentType } from '@shepai/core/domain/generated/output';\n\nexport async function updateAgentAndModel(\n agentType: string,\n model: string | null\n): Promise<{ ok: boolean; error?: string }> {\n if (!agentType.trim()) {\n return { ok: false, error: 'agent type is required' };\n }\n\n try {\n const useCase = resolve<CompleteWebOnboardingUseCase>('CompleteWebOnboardingUseCase');\n const updatedSettings = await useCase.execute({\n agentType: agentType.trim() as AgentType,\n model,\n });\n\n resetSettings();\n initializeSettings(updatedSettings);\n\n return { ok: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to update agent and model';\n return { ok: false, error: message };\n }\n}\n","import { execSync } from 'node:child_process';\n\nexport interface FolderDialogDeps {\n platform: NodeJS.Platform;\n exec: (cmd: string, opts?: { encoding: BufferEncoding; timeout?: number }) => string;\n}\n\nconst defaultDeps: FolderDialogDeps = {\n platform: process.platform,\n exec: (cmd, opts) => execSync(cmd, opts) as unknown as string,\n};\n\n/**\n * Platform-specific commands that open a native OS folder picker dialog.\n * Each returns the chosen absolute folder path on stdout, or exits non-zero / returns empty on cancel.\n */\nconst PLATFORM_COMMANDS: Record<string, string> = {\n darwin: `osascript -e 'POSIX path of (choose folder with prompt \"Select a repository folder\")'`,\n linux: `zenity --file-selection --directory --title=\"Select a repository folder\" 2>/dev/null`,\n win32: `powershell -NoProfile -Command \"Add-Type -AssemblyName System.Windows.Forms; $f = New-Object System.Windows.Forms.FolderBrowserDialog; $f.Description = 'Select a repository folder'; if ($f.ShowDialog() -eq 'OK') { $f.SelectedPath } else { exit 1 }\"`,\n};\n\nexport class FolderDialogService {\n private deps: FolderDialogDeps;\n\n constructor(deps: Partial<FolderDialogDeps> = {}) {\n this.deps = { ...defaultDeps, ...deps };\n }\n\n /** Returns the OS-specific command string, or null if the platform is unsupported. */\n getCommand(): string | null {\n return PLATFORM_COMMANDS[this.deps.platform] ?? null;\n }\n\n /**\n * Opens a native folder picker dialog and returns the selected absolute path.\n * Returns `null` if the user cancels the dialog.\n * Throws if the platform is unsupported or the command fails unexpectedly.\n */\n pickFolder(): string | null {\n const command = this.getCommand();\n if (!command) {\n throw new Error(`Unsupported platform: ${this.deps.platform}`);\n }\n\n try {\n const result = this.deps.exec(command, { encoding: 'utf-8', timeout: 60_000 });\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n } catch (error: unknown) {\n // User cancelled the dialog — exit code 1 from osascript/zenity/powershell\n if (isExecError(error) && error.status === 1) {\n return null;\n }\n throw error;\n }\n }\n}\n\nfunction isExecError(error: unknown): error is { status: number } {\n return typeof error === 'object' && error !== null && 'status' in error;\n}\n","'use server';\n\nimport { FolderDialogService } from '@shepai/core/infrastructure/services/folder-dialog.service';\n\nexport async function pickFolder(): Promise<{ path: string | null; error?: string }> {\n const service = new FolderDialogService();\n\n try {\n const path = service.pickFolder();\n return { path };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder dialog';\n return { path: null, error: message };\n }\n}\n","/**\n * GitHub Repository Service Interface\n *\n * Output port for GitHub repository operations via the gh CLI.\n * Implementations manage authentication checks, repository cloning,\n * user repository listing, and GitHub URL parsing.\n */\n\n// ---------------------------------------------------------------------------\n// Error classes\n// ---------------------------------------------------------------------------\n\n/**\n * Thrown when the GitHub CLI is not authenticated.\n */\nexport class GitHubAuthError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubAuthError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when a `gh repo clone` operation fails.\n */\nexport class GitHubCloneError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubCloneError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when a GitHub URL cannot be parsed into owner/repo.\n */\nexport class GitHubUrlParseError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubUrlParseError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when listing the user's GitHub repositories fails.\n */\nexport class GitHubRepoListError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubRepoListError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n/**\n * Thrown when checking the viewer's permission on a repository fails.\n */\nexport class GitHubPermissionError extends Error {\n constructor(message: string, cause?: Error) {\n super(message);\n this.name = 'GitHubPermissionError';\n Object.setPrototypeOf(this, new.target.prototype);\n if (cause) this.cause = cause;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\n/**\n * A GitHub repository as returned by `gh repo list --json`.\n */\nexport interface GitHubRepo {\n /** Repository name (e.g. \"my-project\") */\n name: string;\n /** Full owner/repo identifier (e.g. \"octocat/my-project\") */\n nameWithOwner: string;\n /** Repository description (may be empty string) */\n description: string;\n /** Whether the repository is private */\n isPrivate: boolean;\n /** ISO 8601 timestamp of the most recent push */\n pushedAt: string;\n}\n\n/**\n * Options for listing user repositories.\n */\nexport interface ListUserRepositoriesOptions {\n /** Maximum number of repos to return (default: 30) */\n limit?: number;\n /** Filter repos by name substring */\n search?: string;\n /** Owner (user or organization) to list repos for. Omit for the authenticated user's repos. */\n owner?: string;\n}\n\n/**\n * A GitHub organization the authenticated user belongs to.\n */\nexport interface GitHubOrganization {\n /** Organization login handle (e.g. \"my-org\") */\n login: string;\n /** Organization description (may be empty string) */\n description: string;\n}\n\n/**\n * Options for cloning a repository.\n */\nexport interface CloneOptions {\n /** Callback invoked with stderr chunks during clone for progress display */\n onProgress?: (data: string) => void;\n}\n\n/**\n * Result of parsing a GitHub URL.\n */\nexport interface ParsedGitHubUrl {\n /** Repository owner (e.g. \"octocat\") */\n owner: string;\n /** Repository name (e.g. \"my-project\") */\n repo: string;\n /** Combined owner/repo (e.g. \"octocat/my-project\") */\n nameWithOwner: string;\n}\n\n// ---------------------------------------------------------------------------\n// Service interface\n// ---------------------------------------------------------------------------\n\n/**\n * Output port for GitHub repository operations.\n *\n * Implementations use the `gh` CLI for all GitHub interactions.\n */\nexport interface IGitHubRepositoryService {\n /**\n * Verify that the GitHub CLI is authenticated.\n *\n * @throws {GitHubAuthError} if `gh auth status` indicates the user is not logged in\n */\n checkAuth(): Promise<void>;\n\n /**\n * Clone a GitHub repository to a local destination directory.\n *\n * @param nameWithOwner - Full owner/repo identifier (e.g. \"octocat/my-project\")\n * @param destination - Absolute path to clone into\n * @param options - Optional clone configuration (e.g. progress callback)\n * @throws {GitHubCloneError} if the clone subprocess fails\n */\n cloneRepository(\n nameWithOwner: string,\n destination: string,\n options?: CloneOptions\n ): Promise<void>;\n\n /**\n * List the authenticated user's GitHub repositories.\n *\n * When `options.owner` is provided, lists repositories for that user or organization instead.\n *\n * @param options - Optional filtering and pagination\n * @returns Array of GitHub repositories sorted by most recently pushed\n * @throws {GitHubRepoListError} if the list operation fails\n */\n listUserRepositories(options?: ListUserRepositoriesOptions): Promise<GitHubRepo[]>;\n\n /**\n * List organizations the authenticated user belongs to.\n *\n * @returns Array of GitHub organizations\n * @throws {GitHubRepoListError} if the list operation fails\n */\n listOrganizations(): Promise<GitHubOrganization[]>;\n\n /**\n * Parse a GitHub URL or shorthand into its owner/repo components.\n *\n * Supported formats:\n * - `https://github.com/owner/repo`\n * - `https://github.com/owner/repo.git`\n * - `git@github.com:owner/repo.git`\n * - `owner/repo` (shorthand)\n *\n * @param url - The GitHub URL or shorthand to parse\n * @returns Parsed owner, repo, and nameWithOwner\n * @throws {GitHubUrlParseError} if the URL does not match any supported format\n */\n parseGitHubUrl(url: string): ParsedGitHubUrl;\n\n /**\n * Get the authenticated user's permission level on a GitHub repository.\n *\n * Uses `gh repo view --json viewerPermission` with the given repo path\n * as the working directory.\n *\n * @param repoPath - Absolute path to a local clone of the repository\n * @returns The viewer's permission level: \"ADMIN\", \"MAINTAIN\", \"WRITE\", \"TRIAGE\", or \"READ\"\n * @throws {GitHubPermissionError} if the permission check fails (e.g. gh not installed, not authenticated)\n */\n getViewerPermission(repoPath: string): Promise<string>;\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ListGitHubRepositoriesUseCase } from '@shepai/core/application/use-cases/repositories/list-github-repositories.use-case';\nimport type { GitHubRepo } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\nimport { GitHubAuthError } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\n\ninterface ListGitHubRepositoriesInput {\n search?: string;\n limit?: number;\n owner?: string;\n}\n\nexport async function listGitHubRepositories(\n input?: ListGitHubRepositoriesInput\n): Promise<{ repos?: GitHubRepo[]; error?: string }> {\n try {\n const useCase = resolve<ListGitHubRepositoriesUseCase>('ListGitHubRepositoriesUseCase');\n const repos = await useCase.execute(input);\n return { repos };\n } catch (error: unknown) {\n if (error instanceof GitHubAuthError) {\n return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };\n }\n const message = error instanceof Error ? error.message : 'Failed to list repositories';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ListGitHubOrganizationsUseCase } from '@shepai/core/application/use-cases/repositories/list-github-organizations.use-case';\nimport type { GitHubOrganization } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\nimport { GitHubAuthError } from '@shepai/core/application/ports/output/services/github-repository-service.interface';\n\nexport async function listGitHubOrganizations(): Promise<{\n orgs?: GitHubOrganization[];\n error?: string;\n}> {\n try {\n const useCase = resolve<ListGitHubOrganizationsUseCase>('ListGitHubOrganizationsUseCase');\n const orgs = await useCase.execute();\n return { orgs };\n } catch (error: unknown) {\n if (error instanceof GitHubAuthError) {\n return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };\n }\n const message = error instanceof Error ? error.message : 'Failed to list organizations';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ImportGitHubRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/import-github-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\nimport {\n GitHubAuthError,\n GitHubUrlParseError,\n GitHubCloneError,\n} from '@shepai/core/application/ports/output/services/github-repository-service.interface';\n\ninterface ImportGitHubRepositoryInput {\n url: string;\n dest?: string;\n}\n\nexport async function importGitHubRepository(\n input: ImportGitHubRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { url, dest } = input;\n\n if (!url?.trim()) {\n return { error: 'GitHub URL is required' };\n }\n\n try {\n const useCase = resolve<ImportGitHubRepositoryUseCase>('ImportGitHubRepositoryUseCase');\n const repository = await useCase.execute({ url, dest });\n return { repository };\n } catch (error: unknown) {\n if (error instanceof GitHubAuthError) {\n return { error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.' };\n }\n if (error instanceof GitHubUrlParseError) {\n return { error: `Invalid GitHub URL: ${error.message}` };\n }\n if (error instanceof GitHubCloneError) {\n return { error: `Clone failed: ${error.message}` };\n }\n const message = error instanceof Error ? error.message : 'Failed to import repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { resolve } from '@/lib/server-container';\nimport { createDeploymentLogger } from '@shepai/core/infrastructure/services/deployment/deployment-logger';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\nimport { DeploymentState } from '@shepai/core/domain/generated/output';\nimport { isSameShepInstance } from '@/lib/is-same-shep-instance';\n\nconst log = createDeploymentLogger('[deployFeature]');\n\nexport async function deployFeature(\n featureId: string\n): Promise<{ success: boolean; error?: string; state?: DeploymentState }> {\n log.info(`called — featureId=\"${featureId}\"`);\n\n if (!featureId?.trim()) {\n log.warn('rejected — featureId is empty');\n return { success: false, error: 'featureId is required' };\n }\n\n try {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n\n if (!feature) {\n log.warn(`feature not found in repository: \"${featureId}\"`);\n return { success: false, error: `Feature not found: ${featureId}` };\n }\n\n log.info(\n `feature found — repositoryPath=\"${feature.repositoryPath}\", branch=\"${feature.branch}\"`\n );\n\n const worktreePath = computeWorktreePath(feature.repositoryPath, feature.branch);\n log.info(`computed worktreePath=\"${worktreePath}\"`);\n\n if (!existsSync(worktreePath)) {\n log.warn(`worktree path does not exist on disk: \"${worktreePath}\"`);\n return { success: false, error: `Worktree path does not exist: ${worktreePath}` };\n }\n\n if (isSameShepInstance(feature.repositoryPath)) {\n log.warn('rejected — feature belongs to the running shep instance');\n return {\n success: false,\n error: 'Cannot start a dev server for features of the repository Shep is running from',\n };\n }\n\n log.info('worktree path exists, calling deploymentService.start()');\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n deploymentService.start(featureId, worktreePath, 'feature');\n\n log.info('start() returned successfully — state=Booting');\n return { success: true, state: DeploymentState.Booting };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to deploy feature';\n log.error(`error: ${message}`, error);\n return { success: false, error: message };\n }\n}\n","/* eslint-disable no-console */\n\n/**\n * Debug-gated logger for deployment services.\n *\n * - `info` and `debug` only emit when `process.env.DEBUG` is set.\n * - `warn` and `error` always emit (they indicate real problems).\n */\n\nconst noop = () => undefined;\n\nexport function createDeploymentLogger(prefix: string) {\n const isDebug = !!process.env.DEBUG;\n\n return {\n info: isDebug ? (...args: unknown[]) => console.info(prefix, ...args) : noop,\n debug: isDebug ? (...args: unknown[]) => console.debug(prefix, ...args) : noop,\n warn: (...args: unknown[]) => console.warn(prefix, ...args),\n error: (...args: unknown[]) => console.error(prefix, ...args),\n };\n}\n","import { realpathSync } from 'node:fs';\nimport { resolve } from 'node:path';\n\n/**\n * Check if a target path is the same directory (or a worktree of) the\n * currently running shep instance. Starting a dev server there would spawn\n * another shep instance that conflicts with the shared ~/.shep/data DB.\n */\nexport function isSameShepInstance(targetPath: string): boolean {\n const instancePath = process.env.NEXT_PUBLIC_SHEP_INSTANCE_PATH ?? process.cwd();\n\n try {\n const normalizedTarget = realpathSync(resolve(targetPath)).replace(/\\\\/g, '/');\n const normalizedInstance = realpathSync(resolve(instancePath)).replace(/\\\\/g, '/');\n return normalizedTarget === normalizedInstance;\n } catch {\n return false;\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { isAbsolute } from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport { createDeploymentLogger } from '@shepai/core/infrastructure/services/deployment/deployment-logger';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\nimport { DeploymentState } from '@shepai/core/domain/generated/output';\nimport { isSameShepInstance } from '@/lib/is-same-shep-instance';\n\nconst log = createDeploymentLogger('[deployRepository]');\n\nexport async function deployRepository(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; state?: DeploymentState }> {\n log.info(`called — repositoryPath=\"${repositoryPath}\"`);\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n log.warn('rejected — not an absolute path');\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n log.warn(`directory does not exist: \"${repositoryPath}\"`);\n return { success: false, error: `Directory does not exist: ${repositoryPath}` };\n }\n\n if (isSameShepInstance(repositoryPath)) {\n log.warn('rejected — target is the running shep instance');\n return {\n success: false,\n error: 'Cannot start a dev server for the repository Shep is running from',\n };\n }\n\n log.info('directory exists, calling deploymentService.start()');\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n deploymentService.start(repositoryPath, repositoryPath, 'repository');\n\n log.info('start() returned successfully — state=Booting');\n return { success: true, state: DeploymentState.Booting };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to deploy repository';\n log.error(`error: ${message}`, error);\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IDeploymentService } from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function stopDeployment(\n targetId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!targetId?.trim()) {\n return { success: false, error: 'targetId is required' };\n }\n\n try {\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n await deploymentService.stop(targetId);\n\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to stop deployment';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type {\n IDeploymentService,\n DeploymentStatus,\n} from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function getDeploymentStatus(targetId: string): Promise<DeploymentStatus | null> {\n if (!targetId?.trim()) {\n return null;\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n return deploymentService.getStatus(targetId);\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type {\n IDeploymentService,\n LogEntry,\n} from '@shepai/core/application/ports/output/services/deployment-service.interface';\n\nexport async function getDeploymentLogs(targetId: string): Promise<LogEntry[] | null> {\n if (!targetId?.trim()) {\n return null;\n }\n\n const deploymentService = resolve<IDeploymentService>('IDeploymentService');\n return deploymentService.getLogs(targetId);\n}\n","export {getAllAgentModels as '00be1925a7ee6c8edd9d6765e8dfd5278bef00b8dd'} from 'ACTIONS_MODULE0'\nexport {updateAgentAndModel as '60f18c1a274d14ccccae187aea051a34ea7109a3f2'} from 'ACTIONS_MODULE1'\nexport {pickFolder as '00db355623f9a82f16a7bfe7ef272c5301cc25d2a5'} from 'ACTIONS_MODULE2'\nexport {listGitHubRepositories as '404c92b243a09833eab22adcd0602c2b0fed811122'} from 'ACTIONS_MODULE3'\nexport {listGitHubOrganizations as '00264e968c59967d6a7b7c8dd63e04bf16fe93406c'} from 'ACTIONS_MODULE4'\nexport {importGitHubRepository as '4096c790703d3be3a9699ebc780d24629f2b27d02d'} from 'ACTIONS_MODULE5'\nexport {deployFeature as '401d92b5e7b38e2c52ce3020751ce2a7651f4bab28'} from 'ACTIONS_MODULE6'\nexport {deployRepository as '40ed3f33721bbec0330395f13eb8e35c6946b63f0d'} from 'ACTIONS_MODULE7'\nexport {stopDeployment as '40a32015a6e2732f82d9b56c10534c3d6c90f57dfa'} from 'ACTIONS_MODULE8'\nexport {getDeploymentStatus as '40b71b0e6175c67f079c7f2ae48fddfa3b8cb4228a'} from 'ACTIONS_MODULE9'\nexport {openIde as '40d810f655521bcfd1a0d090de990dd80ce2252988'} from 'ACTIONS_MODULE10'\nexport {openShell as '40f77ea85da1294de03c2c791630ff39ab0ab57a91'} from 'ACTIONS_MODULE11'\nexport {openFolder as '409d25d9449bb38ccdf71cfec5f93d2a190e023c53'} from 'ACTIONS_MODULE12'\nexport {syncRepository as '408b77ffe60ff8b77b5191808321421e3b01e0577b'} from 'ACTIONS_MODULE13'\nexport {getDeploymentLogs as '405b02fc02c0a78799cc1930a687e583a9f6b705f9'} from 'ACTIONS_MODULE14'\nexport {isAgentSetupComplete as '00b1dc13b5350971faaa4fed2abfbca7227d9bd772'} from 'ACTIONS_MODULE15'\nexport {checkAgentAuth as '00a3e6227393e52e832b529aa96160791e1530ca3c'} from 'ACTIONS_MODULE16'\nexport {checkToolStatus as '0008356ce74ed83a7fd0d950fffb5dbb16ea027f8b'} from 'ACTIONS_MODULE17'\nexport {archiveFeature as '40844ce4458357852cbeffc1daaa0b1494b477ff48'} from 'ACTIONS_MODULE18'\nexport {deleteFeature as '78f207cc660462bf24842aee8ecd68bbc9daa1915f'} from 'ACTIONS_MODULE19'\nexport {resumeFeature as '4094d96584184edcd253098d1bd0fb11265e5bc82a'} from 'ACTIONS_MODULE20'\nexport {startFeature as '40447f888c103fe07dd5f5050f0d8258e90f7ba41c'} from 'ACTIONS_MODULE21'\nexport {stopFeature as '40e74c796b4ceb336d9af09f0162b4a991a1a0a310'} from 'ACTIONS_MODULE22'\nexport {unarchiveFeature as '40c608cdadf4afccf99b1374c4aa4c364f9de95576'} from 'ACTIONS_MODULE23'\nexport {addRepository as '40b217ef7b1803ea4d6a0b28a2a3cb711e6b28767b'} from 'ACTIONS_MODULE24'\nexport {deleteRepository as '40c2a14f2a6eeb66aa473ed3bb1042ae0b470b48e1'} from 'ACTIONS_MODULE25'\nexport {getFeatureMetadata as '404b956916343d59fcfa1b193342804266da6f1fe4'} from 'ACTIONS_MODULE26'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"6CAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAsB,YAAlB,AAA8B,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,4ECDhB,EAAA,EAAA,CAAA,CAAA,OCOA,IAAM,EAA4C,CAEhD,kBAAmB,CAAE,YAAa,WAAY,YAAa,6BAA8B,EACzF,oBAAqB,CAAE,YAAa,aAAc,YAAa,iBAAkB,EACjF,mBAAoB,CAAE,YAAa,YAAa,YAAa,qBAAsB,EAGnF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,sBAAuB,EACvF,iBAAkB,CAAE,YAAa,iBAAkB,YAAa,oBAAqB,EACrF,mBAAoB,CAAE,YAAa,mBAAoB,YAAa,iBAAkB,EAGtF,eAAgB,CAAE,YAAa,UAAW,YAAa,wBAAyB,EAChF,UAAW,CAAE,YAAa,UAAW,YAAa,gBAAiB,EACnE,gBAAiB,CAAE,YAAa,gBAAiB,YAAa,iBAAkB,EAGhF,eAAgB,CAAE,YAAa,eAAgB,YAAa,oBAAqB,EACjF,YAAa,CAAE,YAAa,YAAa,YAAa,gBAAiB,EAGvE,QAAS,CAAE,YAAa,QAAS,YAAa,iCAAkC,EAChF,SAAU,CAAE,YAAa,SAAU,YAAa,uCAAwC,CAC1F,EAEM,EAAsB,CAAE,YAAa,GAAI,YAAa,EAAG,EAExD,SAAS,EAAa,CAAe,EAC1C,IAAM,EAAO,CAAc,CAAC,EAAQ,QAChC,AAAJ,GAEO,CACL,EAHQ,CAGL,CAAQ,CACX,IAJe,QAIF,EACV,OAAO,CAAC,WAAY,IACpB,OAAO,CAAC,WAAY,WACpB,OAAO,CAAC,QAAS,QACjB,OAAO,CAAC,KAAM,KACd,OAAO,CAAC,QAAU,AAAD,GAAO,EAAE,WAAW,GAC1C,CACF,kBDhCA,IAAM,EAAuC,CAC3C,cAAe,cACf,YAAa,YACb,OAAQ,aACR,aAAc,aACd,IAAK,MACP,EAGM,EAAsC,CAC1C,cAAe,EACf,YAAa,EACb,OAAQ,EACR,aAAc,EACd,IAAK,EACP,EAEO,eAAe,IACpB,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAwB,yBAE/C,OADe,AACR,EADgB,kBAAkB,GAEtC,GAAG,CAAC,AAAC,IAAe,CACnB,OADkB,GACP,EACX,MAAO,CAAY,CAAC,EAAoB,EAAK,EAC7C,OAAQ,EAAQ,kBAAkB,CAAC,GAAW,GAAG,CAAC,AAAC,IAAQ,CAAD,GACxD,EACA,GAAG,EAAa,EAAG,CACrB,CAAC,EACH,CAAC,EACA,GAAG,CAAC,AAAC,GAEJ,AAAoB,AAAhB,UAAE,SAAS,EAAkC,GAAG,CAAvB,EAAE,MAAM,CAAC,MAAM,CACnC,CACL,GAAG,CAAC,CACJ,OAAQ,CACN,CAAE,GAAI,QAAS,GAAG,EAAa,QAAQ,AAAC,EACxC,CAAE,GAAI,SAAU,GAAG,EAAa,SAAS,AAAC,EAE9C,AADG,EAGE,GAER,MAAM,CAAC,AAAC,GAAM,EAAE,MAAM,CAAC,MAAM,CAAG,GAChC,IAAI,CAAC,CAAC,EAAG,IAAM,CAAC,CAAW,CAAC,EAAE,SAAS,CAAC,EAAI,EAAA,CAAE,EAAK,CAAW,CAAZ,AAAa,EAAE,SAAS,CAAC,EAAI,EAAA,CAAE,CACtF,CAAE,KAAM,CACN,MAAO,EAAE,AACX,CACF,iCA/BsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,6CEhCtB,IAAA,EAAA,EAAA,CAAA,CAAA,OAOO,eAAe,EACpB,CAAiB,CACjB,CAAoB,EAEpB,GAAI,CAAC,EAAU,IAAI,GACjB,CADqB,KACd,CAAE,IAAI,EAAO,MAAO,wBAAyB,EAGtD,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAA+B,gCAChD,EAAkB,MAAM,EAAQ,OAAO,CAAC,CAC5C,UAAW,EAAU,IAAI,SACzB,CACF,GAKA,MAHA,CAAA,EAAA,EAAA,aAAA,AAAa,IACb,CAAA,EAAA,EAAA,kBAAA,AAAkB,EAAC,GAEZ,CAAE,IAAI,CAAK,CACpB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,IAAI,EAAO,MADJ,CACW,YADM,MAAQ,EAAM,OAAO,CAAG,kCACtB,CACrC,CACF,iCAvBsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,+CCVtB,IAAA,EAAA,EAAA,CAAA,CAAA,OAOA,IAAM,EAAgC,CACpC,SAAU,QAAQ,QAAQ,CAC1B,KAAM,CAAC,EAAK,IAAS,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,EAAK,EACrC,EAMM,EAA4C,CAChD,OAAQ,CAAC,qFAAqF,CAAC,GAC/F,MAAO,CAAC,oFAAoF,CAAC,CAC7F,MAAO,CAAC,wPAAwP,CAAC,EACnQ,CAEO,OAAM,EACH,IAAuB,AAE/B,aAAY,EAAkC,CAAC,CAAC,CAAE,CAChD,IAAI,CAAC,IAAI,CAAG,CAAE,GAAG,CAAW,CAAE,GAAG,CAAI,AAAC,CACxC,CAGA,YAA4B,CAC1B,OAAO,CAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAI,IAClD,CAOA,YAA4B,CAC1B,IAAM,EAAU,IAAI,CAAC,UAAU,GAC/B,GAAI,CAAC,EACH,MAAM,AAAI,CADE,KACI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA,CAAE,EAG/D,GAAI,CAEF,IAAM,EAAU,AADD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAS,CAAE,SAAU,QAAS,QAAS,GAAO,GACrD,IAAI,GAC3B,OAAO,EAAQ,MAAM,CAAG,EAAI,EAAU,IACxC,CAAE,MAAO,EAAgB,OAEvB,GASoB,AAThB,UASD,OADY,AACL,EATM,GAQa,CACG,AAAU,UAAQ,WAAY,GATnB,GAAG,CAApB,EAAM,MAAM,CACpC,OAAO,IAET,OAAM,CACR,CACF,CACF,CCrDO,eAAe,IACpB,IAAM,EAAU,IAAI,EAEpB,GAAI,CAEF,MAAO,CAAE,KADI,EAAQ,UAAU,EACjB,CAChB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,KAAM,KAAM,MADL,CACY,YADK,MAAQ,EAAM,OAAO,CAAG,8BACrB,CACtC,CACF,iCAVsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,qCCWf,OAAM,UAAwB,MACnC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,kBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,IAAO,IAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CAKO,MAAM,UAAyB,MACpC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,mBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,IAAO,IAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CAKO,MAAM,UAA4B,MACvC,YAAY,CAAe,CAAE,CAAa,CAAE,CAC1C,KAAK,CAAC,GACN,IAAI,CAAC,IAAI,CAAG,sBACZ,OAAO,cAAc,CAAC,IAAI,CAAE,WAAW,SAAS,EAC5C,IAAO,IAAI,CAAC,KAAK,CAAG,CAAA,CAC1B,CACF,CCjCO,eAAe,EACpB,CAAmC,EAEnC,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAO,AAAP,EAAuC,iCAEvD,MAAO,CAAE,MADK,MAAM,EAAQ,OAAO,CAAC,EACrB,CACjB,CAAE,MAAO,EAAgB,CACvB,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,EADoB,gEAC+C,EAGrF,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,6BACjC,CAC1B,CACF,CCpBO,eAAe,IAIpB,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAO,AAAP,EAAwC,kCAExD,MAAO,CAAE,KADI,MAAM,EAAQ,OAAO,EACpB,CAChB,CAAE,MAAO,EAAgB,CACvB,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,EADoB,gEAC+C,EAGrF,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,8BACjC,CAC1B,CACF,CCNO,eAAe,EACpB,CAAkC,EAElC,GAAM,KAAE,CAAG,MAAE,CAAI,CAAE,CAAG,EAEtB,GAAI,CAAC,GAAK,OACR,CADgB,KACT,CAAE,MAAO,wBAAyB,EAG3C,GAAI,CACF,IAAM,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAgC,iCAEvD,MAAO,CAAE,WADU,MAAM,EAAQ,OAAO,CAAC,KAAE,OAAK,CAAK,EACjC,CACtB,CAAE,MAAO,EAAgB,CACvB,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,EADoB,gEAC+C,EAErF,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,CAAC,KADuB,eACH,EAAE,EAAM,OAAO,CAAA,CAAE,AAAC,EAEzD,GAAI,aAAiB,EACnB,MAAO,CAAE,MAAO,CAAC,EADoB,YACN,EAAE,EAAM,OAAO,CAAA,CAAE,AAAC,EAGnD,MAAO,CAAE,MADO,CACA,YADiB,MAAQ,EAAM,OAAO,CAAG,6BACjC,CAC1B,CACF,iCF7BsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,kFCNA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,mFCSA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,6GCdtB,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OCMA,IAAM,EAAO,SAAM,EAEZ,SAAS,EAAuB,CAAc,EACnD,IAAM,EAAU,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAEnC,MAAO,CACL,KAAM,EAAU,CAAC,GAAG,IAAoB,QAAQ,IAAI,CAAC,KAAW,GAAQ,EACxE,MAAO,EAAU,CAAC,GAAG,IAAoB,QAAQ,KAAK,CAAC,KAAW,GAAQ,EAC1E,KAAM,CAAC,GAAG,IAAoB,QAAQ,IAAI,CAAC,KAAW,GACtD,MAAO,CAAC,GAAG,IAAoB,QAAQ,KAAK,CAAC,KAAW,EAC1D,CACF,CDfA,IAAA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA,OEPA,EAAA,EAAA,CAAA,CAAA,OAOO,SAAS,EAAmB,CAAkB,EAGnD,GAAI,CACF,IAAM,EAAmB,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,CAAA,EAAA,EAAA,OAAA,AAAO,EAAC,IAAa,OAAO,CAAC,MAAO,KACpE,EAAqB,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,CAAA,EAAA,EAAA,OAAA,AAAO,EAAC,AAJ7B,qDAI4C,EAJE,KAIK,CAAC,EAJE,GAAG,CAIE,KAC9E,OAAO,IAAqB,CAC9B,CAAE,KAAM,CACN,OAAO,CACT,CACF,kBFPA,IAAM,EAAM,EAAuB,mBAE5B,eAAe,EACpB,CAAiB,EAIjB,GAFA,EAAI,IAAI,CAAC,CAAC,oBAAoB,EAAE,EAAU,CAAC,CAAC,EAExC,CAAC,GAAW,OAEd,CAFsB,MACtB,EAAI,IAAI,CAAC,iCACF,CAAE,SAAS,EAAO,MAAO,uBAAwB,EAG1D,GAAI,CACF,IAAM,EAAc,CAAA,EAAA,EAAA,OAAA,AAAO,EAAqB,sBAC1C,EAAU,MAAM,EAAY,QAAQ,CAAC,GAE3C,GAAI,CAAC,EAEH,OAFY,AACZ,EAAI,IAAI,CAAC,CAAC,kCAAkC,EAAE,EAAU,CAAC,CAAC,EACnD,CAAE,SAAS,EAAO,MAAO,CAAC,mBAAmB,EAAE,EAAA,CAAW,AAAC,EAGpE,EAAI,IAAI,CACN,CAAC,gCAAgC,EAAE,EAAQ,cAAc,CAAC,WAAW,EAAE,EAAQ,MAAM,CAAC,CAAC,CAAC,EAG1F,IAAM,EAAe,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,EAAQ,cAAc,CAAE,EAAQ,MAAM,EAG/E,GAFA,EAAI,IAAI,CAAC,CAAC,uBAAuB,EAAE,EAAa,CAAC,CAAC,EAE9C,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GAEd,OADA,EAAI,GADyB,CACrB,CAAC,CAAC,uCAAuC,EAAE,EAAa,CAAC,CAAC,EAC3D,CAAE,SAAS,EAAO,MAAO,CAAC,8BAA8B,EAAE,EAAA,CAAc,AAAC,EAGlF,GAAI,EAAmB,EAAQ,cAAc,EAE3C,CAF8C,MAC9C,EAAI,IAAI,CAAC,2DACF,CACL,SAAS,EACT,MAAO,+EACT,EAQF,OALA,EAAI,IAAI,CAAC,2DACiB,AAC1B,CAD0B,EAAA,EAAA,OAAA,AAAO,EAAqB,sBACpC,KAAK,CAAC,EAAW,EAAc,WAEjD,EAAI,IAAI,CAAC,iDACF,CAAE,SAAS,EAAM,MAAO,EAAA,eAAe,CAAC,OAAO,AAAC,CACzD,CAAE,MAAO,EAAgB,CACvB,IAAM,EAAU,aAAiB,MAAQ,EAAM,OAAO,CAAG,2BAEzD,OADA,EAAI,KAAK,CAAC,CAAC,OAAO,EAAE,EAAA,CAAS,CAAE,GACxB,CAAE,SAAS,EAAO,MAAO,CAAQ,CAC1C,CACF,iCAlDsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yCGHtB,IAAM,EAAM,EAAuB,sBAE5B,eAAe,EACpB,CAAsB,EAItB,GAFA,EAAI,IAAI,CAAC,CAAC,yBAAyB,EAAE,EAAe,CAAC,CAAC,EAElD,CAAC,GAAkB,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GAEjC,OADA,EAAI,IAAI,CAD0C,AACzC,mCACF,CAAE,SAAS,EAAO,MAAO,yCAA0C,EAG5E,GAAI,CACF,GAAI,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GAEd,OADA,EAAI,IAAI,CADuB,AACtB,CAAC,2BAA2B,EAAE,EAAe,CAAC,CAAC,EACjD,CAAE,SAAS,EAAO,MAAO,CAAC,0BAA0B,EAAE,EAAA,CAAgB,AAAC,EAGhF,GAAI,EAAmB,GAErB,OADA,EAAI,IAAI,CAD8B,AAC7B,kDACF,CACL,QAAS,GACT,MAAO,mEACT,EAQF,OALA,EAAI,IAAI,CAAC,uDACiB,AAC1B,CAD0B,EAAA,EAAA,OAAA,AAAO,EAAqB,sBACpC,KAAK,CAAC,EAAgB,EAAgB,cAExD,EAAI,IAAI,CAAC,iDACF,CAAE,SAAS,EAAM,MAAO,EAAA,eAAe,CAAC,OAAO,AAAC,CACzD,CAAE,MAAO,EAAgB,CACvB,IAAM,EAAU,aAAiB,MAAQ,EAAM,OAAO,CAAG,8BAEzD,OADA,EAAI,KAAK,CAAC,CAAC,OAAO,EAAE,EAAA,CAAS,CAAE,GACxB,CAAE,SAAS,EAAO,MAAO,CAAQ,CAC1C,CACF,CC1CO,eAAe,EACpB,CAAgB,EAEhB,GAAI,CAAC,GAAU,OACb,CADqB,KACd,CAAE,SAAS,EAAO,MAAO,sBAAuB,EAGzD,GAAI,CACF,IAAM,EAAoB,CAAA,EAAA,EAAA,OAAA,AAAO,EAAqB,sBAGtD,OAFA,MAAM,EAAkB,IAAI,CAAC,GAEtB,CAAE,SAAS,CAAK,CACzB,CAAE,MAAO,EAAgB,CAEvB,MAAO,CAAE,SAAS,EAAO,MADT,CACgB,YADC,MAAQ,EAAM,OAAO,CAAG,2BACjB,CAC1C,CACF,CCbO,eAAe,EAAoB,CAAgB,SACxD,AAAK,GAAU,CAAX,MAKG,AADmB,CAJH,AAIG,EAAA,EAAA,OAAA,AAAO,EAAqB,sBAC7B,SAAS,CAAC,GAJ1B,IAKX,iCFHsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,4ECPA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,0ECGA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,wFCNtB,EAAA,EAAA,CAAA,CAAA,OAMO,eAAe,EAAkB,CAAgB,SACtD,AAAK,GAAU,CAAX,MAIsB,AACnB,CALgB,AAIG,EAAA,EAAA,OAAA,AAAO,EAAqB,sBAC7B,OAAO,CAAC,GAJxB,IAKX,0CAPsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,8DCRtB,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
|
|
@@ -1 +0,0 @@
|
|
|
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)("400e70d0fa85038559a7560aac6596f5741d70e13e",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)("403ce2af04e2a1eda43e57ee6b0c7d63a6f9f0ba65",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(88008),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))},[]),e8=(0,r.useCallback)((e,t)=>{et(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]),e6=(0,r.useRef)(null),e9=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),e6.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:e6,id:"create-feature-form",onSubmit:e2,onKeyDown:e9,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=>e8(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)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76852,e=>{"use strict";var t=e.i(79054),r=e.i(74298),l=e.i(83650),a=e.i(58870),c=e.i(21023);let s=(0,c.createServerReference)("408b77ffe60ff8b77b5191808321421e3b01e0577b",c.callServer,void 0,c.findSourceMapURL,"syncRepository");function i(e){let[c,i]=(0,t.useState)(!1),[u,n]=(0,t.useState)(!1),[d,o]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[y,f]=(0,t.useState)(null),[m,k]=(0,t.useState)(null),[v,x]=(0,t.useState)(null),[b,S]=(0,t.useState)(null),R=(0,t.useRef)(null),M=(0,t.useRef)(null),g=(0,t.useRef)(null),C=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),M.current&&clearTimeout(M.current),g.current&&clearTimeout(g.current),C.current&&clearTimeout(C.current)},[]);let T=(0,t.useCallback)(async(t,r,l,a,c)=>{if(e&&!c){a.current&&clearTimeout(a.current),r(!0),l(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";l(t),a.current=setTimeout(()=>l(null),5e3)}}catch(e){l(e instanceof Error?e.message:"An unexpected error occurred"),a.current=setTimeout(()=>l(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>T(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),i,f,R,c),[T,c,e]),openInShell:(0,t.useCallback)(()=>T(()=>(0,l.openShell)({repositoryPath:e.repositoryPath}),n,k,M,u),[T,u,e]),openFolder:(0,t.useCallback)(()=>T(()=>(0,a.openFolder)(e.repositoryPath),o,x,g,d),[T,d,e]),syncMain:(0,t.useCallback)(()=>T(()=>s(e.repositoryId??""),h,S,C,p),[T,p,e]),ideLoading:c,shellLoading:u,folderLoading:d,syncLoading:p,ideError:y,shellError:m,folderError:v,syncError:b}}e.s(["useRepositoryActions",()=>i],76852)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},37260,e=>{"use strict";let t=(0,e.i(3645).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",()=>t],37260)},8986,e=>{"use strict";let t=(0,e.i(3645).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>t],8986)},48923,e=>{"use strict";let t=(0,e.i(3645).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",()=>t],48923)},74298,83650,58870,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("40d810f655521bcfd1a0d090de990dd80ce2252988",t.callServer,void 0,t.findSourceMapURL,"openIde");e.s(["openIde",()=>r],74298);let l=(0,t.createServerReference)("40f77ea85da1294de03c2c791630ff39ab0ab57a91",t.callServer,void 0,t.findSourceMapURL,"openShell");e.s(["openShell",()=>l],83650);let a=(0,t.createServerReference)("409d25d9449bb38ccdf71cfec5f93d2a190e023c53",t.callServer,void 0,t.findSourceMapURL,"openFolder");e.s(["openFolder",()=>a],58870)},58481,e=>{"use strict";let t=(0,e.i(3645).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",()=>t],58481)},97667,e=>{"use strict";var t=e.i(1012);e.s(["CheckIcon",()=>t.default])},10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},95812,35e3,e=>{"use strict";let t=(0,e.i(3645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],95812);var r=e.i(80986);e.s(["CheckCircle2",()=>r.default],35e3)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},88008,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("40b217ef7b1803ea4d6a0b28a2a3cb711e6b28767b",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>r])},54793,7729,e=>{"use strict";var t=e.i(20314),r=e.i(31777);function l({icon:e,title:l,description:a,action:c,className:s,...i}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",s),...i,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:l}),a?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:a}):null,c?(0,t.jsx)("div",{className:"mt-2",children:c}):null]})}e.s(["EmptyState",()=>l],7729),e.s([],54793)}]);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3214,e=>{"use strict";let t=(0,e.i(3645).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],3214)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},80986,e=>{"use strict";let t=(0,e.i(3645).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",()=>t])},54277,30090,e=>{"use strict";let t=(0,e.i(3645).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["default",()=>t],30090),e.s(["CircleX",()=>t],54277)},34119,94819,e=>{"use strict";var t=e.i(80986);e.s(["CircleCheck",()=>t.default],34119);let r=(0,e.i(3645).default)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Ban",()=>r],94819)},57779,80554,e=>{"use strict";var t=e.i(20314);function r({status:e,className:r=""}){return"idle"===e?null:(0,t.jsx)("span",{className:`absolute -top-0.5 -right-0.5 block rounded-full ${"awaiting_input"===e?"h-2.5 w-2.5 animate-pulse bg-amber-500":"processing"===e?"h-2.5 w-2.5 animate-pulse bg-blue-500":"h-2 w-2 bg-green-500"} ${r}`})}e.s(["ChatDotIndicator",()=>r],57779);var i=e.i(79054),a=e.i(62885);let n=(0,i.createContext)({getStatus:()=>"idle"});function s({children:e}){let r=function(){let{data:e}=(0,a.useQuery)({queryKey:["turn-statuses"],queryFn:async()=>{let e=await fetch("/api/interactive/chat/turn-statuses");return e.ok?e.json():{}},refetchInterval:2e3});return e??{}}(),s=(0,i.useMemo)(()=>({getStatus:e=>r[e]??"idle"}),[r]);return(0,t.jsx)(n.Provider,{value:s,children:e})}function l(e){return(0,i.useContext)(n).getStatus(e)}e.s(["TurnStatusesProvider",()=>s,"useTurnStatus",()=>l],80554)},79687,e=>{"use strict";var t=e.i(14748);e.s(["AlertCircle",()=>t.default])},39443,e=>{"use strict";var t=e.i(20314),r=e.i(79054);let i=(0,e.i(18354).createLogger)("[SSE]");function a(e,t,r,i){if("u"<typeof EventSource)return()=>{};let a=null,n=!1,s=1e3,l=null,o=null;return!function u(){n||(a=new EventSource(e?`/api/agent-events?runId=${encodeURIComponent(e)}`:"/api/agent-events"),i("connecting"),a.onopen=()=>{i("connected"),o=setTimeout(()=>{o=null,s=1e3},5e3)},a.onerror=()=>{a?.close(),a=null,i("disconnected"),null!==o&&(clearTimeout(o),o=null);let e=s;s=Math.min(2*e,3e4),l=setTimeout(()=>{l=null,u()},e)},a.addEventListener("notification",e=>{let i=JSON.parse(e.data);t(e=>{let t=[...e,i];return t.length>500?t.slice(-250):t}),r(i)}))}(),()=>{n=!0,null!==l&&(clearTimeout(l),l=null),null!==o&&(clearTimeout(o),o=null),a&&(a.close(),a=null)}}let n=(0,r.createContext)(null);function s({children:e,runId:s}){let{events:l,lastEvent:o,connectionStatus:u}=function(e){let[t,n]=(0,r.useState)([]),[s,l]=(0,r.useState)(null),[o,u]=(0,r.useState)("disconnected"),c=e?.runId,d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=e.data;if(t&&"object"==typeof t)if("notification"===t.type){let e=t.data;i.debug("event received:",e.eventType,e),n(t=>{let r=[...t,e];return r.length>500?r.slice(-250):r}),l(e)}else"status"===t.type&&u(t.status)},[]);return(0,r.useEffect)(()=>{let e="u">typeof location&&new URLSearchParams(location.search).has("sse");if(!navigator.serviceWorker||e)return a(c,n,l,u);let t=!1,r={current:void 0};function i(e){t||(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}function s(){if(t)return;let e=navigator.serviceWorker.controller;e&&(d.current=e,e.postMessage({type:"subscribe",runId:c}),u("connecting"))}return navigator.serviceWorker.addEventListener("message",f),navigator.serviceWorker.addEventListener("controllerchange",s),navigator.serviceWorker.register("/agent-events-sw.js",{scope:"/"}).then(e=>{if(t)return;let s=e.active??e.installing??e.waiting;if(!s){r.current=a(c,n,l,u);return}if("activated"===s.state)i(s);else{let e=()=>{"activated"===s.state&&(s.removeEventListener("statechange",e),i(s))};s.addEventListener("statechange",e)}}).catch(()=>{t||(r.current=a(c,n,l,u))}),()=>{t=!0,navigator.serviceWorker.removeEventListener("message",f),navigator.serviceWorker.removeEventListener("controllerchange",s),d.current?.postMessage({type:"unsubscribe"}),d.current=null,r.current?.()}},[c,f]),{events:t,lastEvent:s,connectionStatus:o}}({runId:s}),c=(0,r.useMemo)(()=>({events:l,lastEvent:o,connectionStatus:u}),[l,o,u]);return(0,t.jsx)(n.Provider,{value:c,children:e})}function l(){let e=(0,r.useContext)(n);if(!e)throw Error("useAgentEventsContext must be used within an <AgentEventsProvider>");return e}e.s(["AgentEventsProvider",()=>s,"useAgentEventsContext",()=>l],39443)},81846,e=>{"use strict";var t=e.i(20314),r=e.i(94237),i=e.i(31777);let a=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function n({className:e,variant:r,...n}){return(0,t.jsx)("div",{className:(0,i.cn)(a({variant:r}),e),...n})}e.s(["Badge",()=>n])},12103,e=>{"use strict";let t=(0,e.i(3645).default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);e.s(["Puzzle",()=>t],12103)},53360,e=>{"use strict";let t=(0,e.i(3645).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",()=>t],53360)},55016,e=>{"use strict";let t=(0,e.i(3645).default)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Clock",()=>t],55016)},71326,e=>{"use strict";var t=e.i(20314),r=e.i(79054),i=e.i(22528),a=e.i(5978),n=e.i(567),s=e.i(91967),l=e.i(86874),o="AlertDialog",[u,c]=(0,i.createContextScope)(o,[n.createDialogScope]),d=(0,n.createDialogScope)(),f=e=>{let{__scopeAlertDialog:r,...i}=e,a=d(r);return(0,t.jsx)(n.Root,{...a,...i,modal:!0})};f.displayName=o;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Trigger,{...s,...a,ref:r})});p.displayName="AlertDialogTrigger";var g=e=>{let{__scopeAlertDialog:r,...i}=e,a=d(r);return(0,t.jsx)(n.Portal,{...a,...i})};g.displayName="AlertDialogPortal";var h=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Overlay,{...s,...a,ref:r})});h.displayName="AlertDialogOverlay";var v="AlertDialogContent",[m,y]=u(v),x=(0,l.createSlottable)("AlertDialogContent"),b=r.forwardRef((e,i)=>{let{__scopeAlertDialog:l,children:o,...u}=e,c=d(l),f=r.useRef(null),p=(0,a.useComposedRefs)(i,f),g=r.useRef(null);return(0,t.jsx)(n.WarningProvider,{contentName:v,titleName:w,docsSlug:"alert-dialog",children:(0,t.jsx)(m,{scope:l,cancelRef:g,children:(0,t.jsxs)(n.Content,{role:"alertdialog",...c,...u,ref:p,onOpenAutoFocus:(0,s.composeEventHandlers)(u.onOpenAutoFocus,e=>{e.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,t.jsx)(x,{children:o}),(0,t.jsx)(T,{contentRef:f})]})})})});b.displayName=v;var w="AlertDialogTitle",C=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Title,{...s,...a,ref:r})});C.displayName=w;var k="AlertDialogDescription",A=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Description,{...s,...a,ref:r})});A.displayName=k;var D=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Close,{...s,...a,ref:r})});D.displayName="AlertDialogAction";var R="AlertDialogCancel",j=r.forwardRef((e,r)=>{let{__scopeAlertDialog:i,...s}=e,{cancelRef:l}=y(R,i),o=d(i),u=(0,a.useComposedRefs)(r,l);return(0,t.jsx)(n.Close,{...o,...s,ref:u})});j.displayName=R;var T=({contentRef:e})=>{let t=`\`${v}\` requires a description for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
You can add a description to the \`${v}\` by passing a \`${k}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
|
-
|
|
5
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${v}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
|
-
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null};e.s(["Action",()=>D,"AlertDialog",()=>f,"AlertDialogAction",()=>D,"AlertDialogCancel",()=>j,"AlertDialogContent",()=>b,"AlertDialogDescription",()=>A,"AlertDialogOverlay",()=>h,"AlertDialogPortal",()=>g,"AlertDialogTitle",()=>C,"AlertDialogTrigger",()=>p,"Cancel",()=>j,"Content",()=>b,"Description",()=>A,"Overlay",()=>h,"Portal",()=>g,"Root",()=>f,"Title",()=>C,"Trigger",()=>p,"createAlertDialogScope",()=>c],28883);var S=e.i(28883),S=S,z=e.i(31777),E=e.i(35364);function M({...e}){return(0,t.jsx)(S.Root,{"data-slot":"alert-dialog",...e})}function N({...e}){return(0,t.jsx)(S.Portal,{"data-slot":"alert-dialog-portal",...e})}function P({className:e,onClick:r,...i}){return(0,t.jsx)(S.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,z.cn)("fixed inset-0 z-50 bg-black/50",e),onClick:e=>{e.stopPropagation(),r?.(e)},...i})}function I({className:e,size:r="default",...i}){return(0,t.jsxs)(N,{children:[(0,t.jsx)(P,{}),(0,t.jsx)(S.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,z.cn)("bg-background group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg",e),...i})]})}function F({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,z.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function O({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,z.cn)("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function L({className:e,...r}){return(0,t.jsx)(S.Title,{"data-slot":"alert-dialog-title",className:(0,z.cn)("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function H({className:e,...r}){return(0,t.jsx)(S.Description,{"data-slot":"alert-dialog-description",className:(0,z.cn)("text-muted-foreground text-sm",e),...r})}function G({className:e,variant:r="default",size:i="default",...a}){return(0,t.jsx)(E.Button,{variant:r,size:i,asChild:!0,children:(0,t.jsx)(S.Action,{"data-slot":"alert-dialog-action",className:(0,z.cn)(e),...a})})}function K({className:e,variant:r="outline",size:i="default",...a}){return(0,t.jsx)(E.Button,{variant:r,size:i,asChild:!0,children:(0,t.jsx)(S.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,z.cn)(e),...a})})}e.s(["AlertDialog",()=>M,"AlertDialogAction",()=>G,"AlertDialogCancel",()=>K,"AlertDialogContent",()=>I,"AlertDialogDescription",()=>H,"AlertDialogFooter",()=>O,"AlertDialogHeader",()=>F,"AlertDialogTitle",()=>L],71326)},30153,e=>{"use strict";var t=e.i(20314),r=e.i(79054),i=e.i(71326);let a=(0,r.createContext)(null);function n({children:e}){let n=(0,r.useRef)(null),s=(0,r.useRef)(null),[l,o]=(0,r.useState)(!1),u=(0,r.useCallback)(e=>{n.current=e},[]),c=(0,r.useCallback)(e=>{if(n.current?.isDirty){s.current=e,o(!0);return}e()},[]),d=(0,r.useCallback)(()=>{o(!1),n.current?.onReset(),n.current=null,s.current?.(),s.current=null},[]),f=(0,r.useCallback)(()=>{o(!1),s.current=null},[]),p=(0,r.useCallback)(()=>n.current?.isDirty??!1,[]);return(0,t.jsxs)(a,{value:{setGuard:u,guardedNavigate:c,getIsDirty:p},children:[e,(0,t.jsx)(i.AlertDialog,{open:l,children:(0,t.jsxs)(i.AlertDialogContent,{children:[(0,t.jsxs)(i.AlertDialogHeader,{children:[(0,t.jsx)(i.AlertDialogTitle,{children:"Discard unsaved changes?"}),(0,t.jsx)(i.AlertDialogDescription,{children:"You have unsaved changes. Are you sure you want to discard them?"})]}),(0,t.jsxs)(i.AlertDialogFooter,{children:[(0,t.jsx)(i.AlertDialogAction,{variant:"destructive",onClick:d,children:"Discard"}),(0,t.jsx)(i.AlertDialogCancel,{onClick:f,children:"Keep editing"})]})]})})]})}function s(){let e=(0,r.useContext)(a);if(!e)throw Error("useDrawerCloseGuard must be used within DrawerCloseGuardProvider");return e}function l({open:e,isDirty:t,onClose:i,onReset:a}){let{setGuard:n,guardedNavigate:l}=s();return(0,r.useEffect)(()=>(e?n({isDirty:t,onReset:a}):n(null),()=>n(null)),[e,t,a,n]),{attemptClose:(0,r.useCallback)(()=>{l(()=>{a(),i()})},[l,i,a])}}e.s(["DrawerCloseGuardProvider",()=>n,"useDrawerCloseGuard",()=>s,"useGuardedDrawerClose",()=>l])},48109,e=>{"use strict";let t=(0,e.i(3645).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],48109)},32494,e=>{"use strict";let t=(0,e.i(3645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},26370,48829,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",()=>r],26370);let i=(0,t.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>i],48829)},19933,e=>{"use strict";let t=(0,e.i(3645).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],19933)},66033,e=>{"use strict";var t=e.i(79054),r=e.i(20314),i=t.createContext(void 0),a=e=>{let{dir:t,children:a}=e;return(0,r.jsx)(i.Provider,{value:t,children:a})};function n(e){let r=t.useContext(i);return e||r||"ltr"}e.s(["DirectionProvider",()=>a,"Provider",()=>a,"useDirection",()=>n])},87342,e=>{"use strict";var t=e.i(79054),r=e.i(22528),i=e.i(5978),a=e.i(86874),n=e.i(20314);function s(e){let s=e+"CollectionProvider",[l,o]=(0,r.createContextScope)(s),[u,c]=l(s,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:r,children:i}=e,a=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,n.jsx)(u,{scope:r,itemMap:s,collectionRef:a,children:i})};d.displayName=s;let f=e+"CollectionSlot",p=(0,a.createSlot)(f),g=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,s=c(f,r),l=(0,i.useComposedRefs)(t,s.collectionRef);return(0,n.jsx)(p,{ref:l,children:a})});g.displayName=f;let h=e+"CollectionItemSlot",v="data-radix-collection-item",m=(0,a.createSlot)(h),y=t.default.forwardRef((e,r)=>{let{scope:a,children:s,...l}=e,o=t.default.useRef(null),u=(0,i.useComposedRefs)(r,o),d=c(h,a);return t.default.useEffect(()=>(d.itemMap.set(o,{ref:o,...l}),()=>void d.itemMap.delete(o))),(0,n.jsx)(m,{...{[v]:""},ref:u,children:s})});return y.displayName=h,[{Provider:d,Slot:g,ItemSlot:y},function(r){let i=c(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},o]}var l=new WeakMap;function o(e,t){var r,i;let a,n,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,i=t,a=r.length,(s=(n=u(i))>=0?n:a+n)<0||s>=a?-1:s);return -1===l?void 0:e[l]}function u(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],l.set(this,!0)}set(e,t){return l.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,a=this.has(t),n=this.#e.length,s=u(e),l=s>=0?s:n+s,o=l<0||l>=n?-1:l;if(o===this.size||a&&o===this.size-1||-1===o)return this.set(t,r),this;let c=this.size+ +!a;s<0&&l++;let d=[...this.#e],f=!1;for(let e=l;e<c;e++)if(l===e){let n=d[e];d[e]===t&&(n=d[e+1]),a&&this.delete(t),i=this.get(n),this.set(t,r)}else{f||d[e-1]!==t||(f=!0);let r=d[f?e:e-1],a=i;i=this.get(r),this.delete(r),this.set(r,a)}return this}with(t,r,i){let a=new e(this);return a.insert(t,r,i),a}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],a=0;for(let e of this)Reflect.apply(t,r,[e,a,this])&&i.push(e),a++;return new e(i)}map(t,r){let i=[],a=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,a,this])]),a++;return new e(i)}reduce(...e){let[t,r]=e,i=0,a=r??this.at(0);for(let r of this)a=0===i&&1===e.length?r:Reflect.apply(t,this,[a,r,i,this]),i++;return a}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let a=this.at(r);i=r===this.size-1&&1===e.length?a:Reflect.apply(t,this,[i,a,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,a=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(a=r-1);for(let e=t;e<=a;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>s])},51080,e=>{"use strict";var t=e.i(79054),r=e.i(91967),i=e.i(87342),a=e.i(5978),n=e.i(22528),s=e.i(13123),l=e.i(87620),o=e.i(29297),u=e.i(36589),c=e.i(66033),d=e.i(20314),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},g="RovingFocusGroup",[h,v,m]=(0,i.createCollection)(g),[y,x]=(0,n.createContextScope)(g,[m]),[b,w]=y(g),C=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(k,{...e,ref:t})})}));C.displayName=g;var k=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:n,orientation:s,loop:h=!1,dir:m,currentTabStopId:y,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:C,preventScrollOnEntryFocus:k=!1,...A}=e,D=t.useRef(null),R=(0,a.useComposedRefs)(i,D),T=(0,c.useDirection)(m),[S,z]=(0,u.useControllableState)({prop:y,defaultProp:x??null,onChange:w,caller:g}),[E,M]=t.useState(!1),N=(0,o.useCallbackRef)(C),P=v(n),I=t.useRef(!1),[F,O]=t.useState(0);return t.useEffect(()=>{let e=D.current;if(e)return e.addEventListener(f,N),()=>e.removeEventListener(f,N)},[N]),(0,d.jsx)(b,{scope:n,orientation:s,dir:T,loop:h,currentTabStopId:S,onItemFocus:t.useCallback(e=>z(e),[z]),onItemShiftTab:t.useCallback(()=>M(!0),[]),onFocusableItemAdd:t.useCallback(()=>O(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>O(e=>e-1),[]),children:(0,d.jsx)(l.Primitive.div,{tabIndex:E||0===F?-1:0,"data-orientation":s,...A,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!I.current;if(e.target===e.currentTarget&&t&&!E){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),k)}}I.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>M(!1))})})}),A="RovingFocusGroupItem",D=t.forwardRef((e,i)=>{let{__scopeRovingFocusGroup:a,focusable:n=!0,active:o=!1,tabStopId:u,children:c,...f}=e,p=(0,s.useId)(),g=u||p,m=w(A,a),y=m.currentTabStopId===g,x=v(a),{onFocusableItemAdd:b,onFocusableItemRemove:C,currentTabStopId:k}=m;return t.useEffect(()=>{if(n)return b(),()=>C()},[n,b,C]),(0,d.jsx)(h.ItemSlot,{scope:a,id:g,focusable:n,active:o,children:(0,d.jsx)(l.Primitive.span,{tabIndex:y?0:-1,"data-orientation":m.orientation,...f,ref:i,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{n?m.onItemFocus(g):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m.onItemFocus(g)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var i;let a=(i=e.key,"rtl"!==r?i:"ArrowLeft"===i?"ArrowRight":"ArrowRight"===i?"ArrowLeft":i);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return R[a]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){var r,i;"prev"===t&&a.reverse();let n=a.indexOf(e.currentTarget);a=m.loop?(r=a,i=n+1,r.map((e,t)=>r[(i+t)%r.length])):a.slice(n+1)}setTimeout(()=>j(a))}}),children:"function"==typeof c?c({isCurrentTabStop:y,hasTabStop:null!=k}):c})})});D.displayName=A;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e,t=!1){let r=document.activeElement;for(let i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>D,"Root",()=>C,"createRovingFocusGroupScope",()=>x])},68304,e=>{"use strict";var t=e.i(20314),r=e.i(79054),i=e.i(91967),a=e.i(22528),n=e.i(51080),s=e.i(85995),l=e.i(87620),o=e.i(66033),u=e.i(36589),c=e.i(13123),d="Tabs",[f,p]=(0,a.createContextScope)(d,[n.createRovingFocusGroupScope]),g=(0,n.createRovingFocusGroupScope)(),[h,v]=f(d),m=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:a,onValueChange:n,defaultValue:s,orientation:f="horizontal",dir:p,activationMode:g="automatic",...v}=e,m=(0,o.useDirection)(p),[y,x]=(0,u.useControllableState)({prop:a,onChange:n,defaultProp:s??"",caller:d});return(0,t.jsx)(h,{scope:i,baseId:(0,c.useId)(),value:y,onValueChange:x,orientation:f,dir:m,activationMode:g,children:(0,t.jsx)(l.Primitive.div,{dir:m,"data-orientation":f,...v,ref:r})})});m.displayName=d;var y="TabsList",x=r.forwardRef((e,r)=>{let{__scopeTabs:i,loop:a=!0,...s}=e,o=v(y,i),u=g(i);return(0,t.jsx)(n.Root,{asChild:!0,...u,orientation:o.orientation,dir:o.dir,loop:a,children:(0,t.jsx)(l.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:r})})});x.displayName=y;var b="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:a,value:s,disabled:o=!1,...u}=e,c=v(b,a),d=g(a),f=A(c.baseId,s),p=D(c.baseId,s),h=s===c.value;return(0,t.jsx)(n.Item,{asChild:!0,...d,focusable:!o,active:h,children:(0,t.jsx)(l.Primitive.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:f,...u,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(s)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(s)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;h||o||!e||c.onValueChange(s)})})})});w.displayName=b;var C="TabsContent",k=r.forwardRef((e,i)=>{let{__scopeTabs:a,value:n,forceMount:o,children:u,...c}=e,d=v(C,a),f=A(d.baseId,n),p=D(d.baseId,n),g=n===d.value,h=r.useRef(g);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(s.Presence,{present:o||g,children:({present:r})=>(0,t.jsx)(l.Primitive.div,{"data-state":g?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:p,tabIndex:0,...c,ref:i,style:{...e.style,animationDuration:h.current?"0s":void 0},children:r&&u})})});function A(e,t){return`${e}-trigger-${t}`}function D(e,t){return`${e}-content-${t}`}k.displayName=C,e.s(["Content",()=>k,"List",()=>x,"Root",()=>m,"Tabs",()=>m,"TabsContent",()=>k,"TabsList",()=>x,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>p],43133);var R=e.i(43133),R=R,j=e.i(31777);let T=R.Root,S=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(R.List,{ref:i,className:(0,j.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));S.displayName=R.List.displayName;let z=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(R.Trigger,{ref:i,className:(0,j.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));z.displayName=R.Trigger.displayName;let E=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(R.Content,{ref:i,className:(0,j.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));E.displayName=R.Content.displayName,e.s(["Tabs",()=>T,"TabsContent",()=>E,"TabsList",()=>S,"TabsTrigger",()=>z],68304)},39200,e=>{"use strict";let t=(0,e.i(3645).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>t],39200)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),i=e.i(79054),n=e.i(23925),s=e.i(26370),a=e.i(38573),l=e.i(49228),r=e.i(74294),o=e.i(3645);let c=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),d=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var g=e.i(32494),m=e.i(10714),m=m,h=e.i(3214),p=e.i(30702);let f=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var x=e.i(58860),v=e.i(48109);let b=(0,o.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var w=e.i(60112);e.i(41001);var j=e.i(64780),y=e.i(31777),S=e.i(41957),k=e.i(51911),C=e.i(47373),M=e.i(21023);let I=(0,M.createServerReference)("402eed7d4c5ce9630632f90d98ca516aa89780935e",M.callServer,void 0,M.findSourceMapURL,"updateSettingsAction");var N=e.i(17406),T=e.i(98804),A=e.i(44229),D=e.i(83902);function F(e){return(0,t.jsx)(A.Code,{className:(0,y.cn)("h-4 w-4",e.className),...e})}function P({className:e}){return(0,t.jsx)(T.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,y.cn)("rounded-sm object-contain",e)})}function E({className:e}){return(0,t.jsx)(T.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,y.cn)("rounded-sm object-contain",e)})}function R({className:e}){return(0,t.jsx)(T.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,y.cn)("rounded-sm object-contain",e)})}function z({className:e}){return(0,t.jsx)(T.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,y.cn)("rounded-sm object-contain",e)})}function B({className:e,...i}){return(0,t.jsx)(D.Rocket,{className:(0,y.cn)("h-4 w-4",e),...i})}P.displayName="VsCodeIcon",E.displayName="CursorEditorIcon",R.displayName="WindsurfIcon",z.displayName="ZedIcon",B.displayName="AntigravityIcon";let L={vscode:P,cursor:E,windsurf:R,zed:z,antigravity:B};var _=e.i(41413),K=e.i(956);let V=[{value:N.Language.English,label:"English",nativeName:"English"},{value:N.Language.Russian,label:"Русский",nativeName:"Русский"},{value:N.Language.Portuguese,label:"Português",nativeName:"Português"},{value:N.Language.Spanish,label:"Español",nativeName:"Español"},{value:N.Language.Arabic,label:"العربية",nativeName:"العربية"},{value:N.Language.Hebrew,label:"עברית",nativeName:"עברית"},{value:N.Language.French,label:"Français",nativeName:"Français"},{value:N.Language.German,label:"Deutsch",nativeName:"Deutsch"}];function W({language:e}){let{t:s,i18n:a}=(0,j.useTranslation)("web"),[l,r]=(0,i.useState)(e),[o,c]=(0,i.useTransition)(),[d,u]=(0,i.useState)(!1),m=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(m.current&&!o){u(!0);let e=setTimeout(()=>u(!1),2e3);return()=>clearTimeout(e)}m.current=o},[o]),(0,t.jsxs)(K.Card,{id:"language",className:"scroll-mt-6","data-testid":"language-settings-section",children:[(0,t.jsxs)(K.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Globe,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)(K.CardTitle,{children:s("settings.language.title")})]}),o?(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:s("common:labels.saving")}):null,d&&!o?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),s("common:labels.saved")]}):null]}),(0,t.jsx)(K.CardDescription,{children:s("settings.language.description")})]}),(0,t.jsx)(K.CardContent,{className:"space-y-4",children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"display-language",children:s("settings.language.label")}),(0,t.jsxs)(C.Select,{value:l,onValueChange:function(e){r(e),a.changeLanguage(e);let t="ar"===e||"he"===e?"rtl":"ltr";document.documentElement.lang=e,document.documentElement.dir=t,c(async()=>{let t=await I({user:{preferredLanguage:e}});t.success||w.toast.error(t.error??s("settings.language.failedToSave","Failed to save language settings"))})},children:[(0,t.jsx)(C.SelectTrigger,{id:"display-language","data-testid":"language-select",children:(0,t.jsx)(C.SelectValue,{placeholder:s("settings.language.placeholder")})}),(0,t.jsx)(C.SelectContent,{children:V.map(e=>(0,t.jsx)(C.SelectItem,{value:e.value,children:e.nativeName},e.value))})]})]})})]})}var H=e.i(27069),O=e.i(91967),q=e.i(5978),G=e.i(22528),U=e.i(36589),$=e.i(66033),Z=e.i(23405),X=e.i(77624),Y=e.i(87620),J=e.i(87342),Q=["PageUp","PageDown"],ee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],et={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ei="Slider",[en,es,ea]=(0,J.createCollection)(ei),[el,er]=(0,G.createContextScope)(ei,[ea]),[eo,ec]=el(ei),ed=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:l=100,step:r=1,orientation:o="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:f,...x}=e,v=i.useRef(new Set),b=i.useRef(0),w="horizontal"===o,[j=[],y]=(0,U.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),S=i.useRef(j);function k(e,t,{commit:i}={commit:!1}){let n,s=(String(r).split(".")[1]||"").length,o=Math.round((Math.round((e-a)/r)*r+a)*(n=Math.pow(10,s)))/n,c=(0,H.clamp)(o,[a,l]);y((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*r))return e;{b.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&h(n),t?n:e}})}return(0,t.jsx)(eo,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:l,valueIndexToChangeRef:b,thumbs:v.current,values:j,orientation:o,form:f,children:(0,t.jsx)(en.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(en.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?em:eh,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,O.composeEventHandlers)(x.onPointerDown,()=>{c||(S.current=j)}),min:a,max:l,inverted:p,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(j,e);k(e,t)},onSlideMove:c?void 0:function(e){k(e,b.current)},onSlideEnd:c?void 0:function(){let e=S.current[b.current];j[b.current]!==e&&h(j)},onHomeKeyDown:()=>!c&&k(a,0,{commit:!0}),onEndKeyDown:()=>!c&&k(l,j.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=Q.includes(e.key)||e.shiftKey&&ee.includes(e.key),n=b.current;k(j[n]+r*(i?10:1)*t,n,{commit:!0})}}})})})})});ed.displayName=ei;var[eu,eg]=el(ei,{startEdge:"left",endEdge:"right",size:"width",direction:1}),em=i.forwardRef((e,n)=>{let{min:s,max:a,dir:l,inverted:r,onSlideStart:o,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[m,h]=i.useState(null),p=(0,q.useComposedRefs)(n,e=>h(e)),f=i.useRef(void 0),x=(0,$.useDirection)(l),v="ltr"===x,b=v&&!r||!v&&r;function w(e){let t=f.current||m.getBoundingClientRect(),i=eC([0,t.width],b?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(eu,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(ep,{dir:x,"data-orientation":"horizontal",...g,ref:p,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);o?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=et[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),eh=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:l,onSlideStart:r,onSlideMove:o,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),m=(0,q.useComposedRefs)(n,g),h=i.useRef(void 0),p=!l;function f(e){let t=h.current||g.current.getBoundingClientRect(),i=eC([0,t.height],p?[a,s]:[s,a]);return h.current=t,i(e-t.top)}return(0,t.jsx)(eu,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,t.jsx)(ep,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);r?.(t)},onSlideMove:e=>{let t=f(e.clientY);o?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=et[p?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),ep=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:l,onHomeKeyDown:r,onEndKeyDown:o,onStepKeyDown:c,...d}=e,u=ec(ei,n);return(0,t.jsx)(Y.Primitive.span,{...d,ref:i,onKeyDown:(0,O.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(r(e),e.preventDefault()):"End"===e.key?(o(e),e.preventDefault()):Q.concat(ee).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,O.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,O.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,O.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),ef="SliderTrack",ex=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=ec(ef,n);return(0,t.jsx)(Y.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});ex.displayName=ef;var ev="SliderRange",eb=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,l=ec(ev,s),r=eg(ev,s),o=i.useRef(null),c=(0,q.useComposedRefs)(n,o),d=l.values.length,u=l.values.map(e=>ek(e,l.min,l.max)),g=d>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(Y.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...a,ref:c,style:{...e.style,[r.startEdge]:g+"%",[r.endEdge]:m+"%"}})});eb.displayName=ev;var ew="SliderThumb",ej=i.forwardRef((e,n)=>{let s=es(e.__scopeSlider),[a,l]=i.useState(null),r=(0,q.useComposedRefs)(n,e=>l(e)),o=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(ey,{...e,ref:r,index:o})}),ey=i.forwardRef((e,n)=>{var s,a,l,r,o;let c,d,{__scopeSlider:u,index:g,name:m,...h}=e,p=ec(ew,u),f=eg(ew,u),[x,v]=i.useState(null),b=(0,q.useComposedRefs)(n,e=>v(e)),w=!x||p.form||!!x.closest("form"),j=(0,X.useSize)(x),y=p.values[g],S=void 0===y?0:ek(y,p.min,p.max),k=(s=g,(a=p.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=j?.[f.size],M=C?(l=C,r=S,o=f.direction,d=eC([0,50],[0,c=l/2]),(c-d(r)*o)*o):0;return i.useEffect(()=>{if(x)return p.thumbs.add(x),()=>{p.thumbs.delete(x)}},[x,p.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${S}% + ${M}px)`},children:[(0,t.jsx)(en.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(Y.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":p.min,"aria-valuenow":y,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...h,ref:b,style:void 0===y?{display:"none"}:e.style,onFocus:(0,O.composeEventHandlers)(e.onFocus,()=>{p.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eS,{name:m??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:y},g)]})});ej.displayName=ew;var eS=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let l=i.useRef(null),r=(0,q.useComposedRefs)(l,a),o=(0,Z.usePrevious)(n);return i.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(o!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[o,n]),(0,t.jsx)(Y.Primitive.input,{style:{display:"none"},...s,ref:r,defaultValue:n})});function ek(e,t,i){return(0,H.clamp)(100/(i-t)*(e-t),[0,100])}function eC(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eS.displayName="RadioBubbleInput",e.s(["Range",()=>eb,"Root",()=>ed,"Slider",()=>ed,"SliderRange",()=>eb,"SliderThumb",()=>ej,"SliderTrack",()=>ex,"Thumb",()=>ej,"Track",()=>ex,"createSliderScope",()=>er],29991);var eM=e.i(29991),eM=eM;function eI({className:e,defaultValue:n,value:s,min:a=0,max:l=100,...r}){let o=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,l],[s,n,a,l]);return(0,t.jsxs)(eM.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:l,className:(0,y.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...r,children:[(0,t.jsx)(eM.Track,{"data-slot":"slider-track",className:(0,y.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(eM.Range,{"data-slot":"slider-range",className:(0,y.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(e,i)=>(0,t.jsx)(eM.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let eN=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eT=eN.length-1;function eA(e){let t=0,i=Math.abs(e-eN[0]);for(let n=1;n<eN.length;n++){let s=Math.abs(e-eN[n]);s<i&&(i=s,t=n)}return t}function eD({id:e,testId:n,value:s,onChange:a,onBlur:l,defaultSeconds:r=1800}){var o;let c,d,u=(""===s?r:parseInt(s,10))||r,[g,m]=(0,i.useState)(()=>eA(u)),h=eA(u);h!==g&&eN[g]!==u&&m(h);let p=(0,i.useCallback)(([e])=>{m(e),a(String(eN[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eI,{id:e,"data-testid":n,min:0,max:eT,step:1,value:[g],onValueChange:p,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((o=eN[g])/3600),d=Math.round(o%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}let eF=[{value:N.EditorType.VsCode,label:"VS Code"},{value:N.EditorType.Cursor,label:"Cursor"},{value:N.EditorType.Windsurf,label:"Windsurf"},{value:N.EditorType.Zed,label:"Zed"},{value:N.EditorType.Antigravity,label:"Antigravity"}],eP=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],eE=[{id:"language",labelKey:"settings.sections.language",icon:g.Globe},{id:"agent",labelKey:"settings.sections.agent",icon:s.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:a.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:l.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:r.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:x.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:c},{id:"feature-flags",labelKey:"settings.sections.flags",icon:d},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:v.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:b},{id:"database",labelKey:"settings.sections.database",icon:u}];function eR({label:e,description:i,htmlFor:n,children:s}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(S.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}function ez({label:e,description:i,id:n,testId:s,checked:a,onChange:l,disabled:r}){return(0,t.jsx)(eR,{label:e,description:i,htmlFor:n,children:(0,t.jsx)(k.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:l,disabled:r,className:(0,y.cn)("cursor-pointer",r&&"cursor-not-allowed opacity-50")})})}function eB({icon:e,title:i,description:n,badge:s,testId:a,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function eL({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:l,min:r=1,max:o,step:c=1,suffix:d}){let{t:u}=(0,j.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(r,(g??parseInt(l,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(m.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:l,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(l,10),s(String(null!=o?Math.min(o,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(h.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function e_({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function eK({children:e,links:i}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=i&&i.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:i.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(p.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function eV({settings:e,shepHome:o,dbFileSize:g,availableTerminals:m}){let{t:h}=(0,j.useTranslation)("web"),{showSaving:p,showSaved:S,save:k}=function(){let{t:e}=(0,j.useTranslation)("web"),[t,n]=(0,i.useTransition)(),[s,a]=(0,i.useState)(!1),[l,r]=(0,i.useState)(!1),o=(0,i.useRef)(null),c=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{t&&!s&&(a(!0),c.current=!1,o.current=setTimeout(()=>{o.current=null,c.current&&(a(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!t&&s&&(c.current=!0,o.current||(a(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[t,s]),{showSaving:s,showSaved:l,save:(0,i.useCallback)(t=>{n(async()=>{let i=await I(t);i.success||w.toast.error(i.error??e("settings.failedToSave"))})},[n,e])}}(),M=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,inventory:!1},[T,A]=(0,i.useState)(e.agent.type),[D,P]=(0,i.useState)(e.environment.defaultEditor),[E,R]=(0,i.useState)(e.environment.shellPreference),[z,B]=(0,i.useState)(e.environment.terminalPreference??N.TerminalType.System),K=m?m.filter(e=>e.available):[{id:N.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}],[V,H]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[O,q]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[G,U]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[$,Z]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[X,Y]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[J,Q]=(0,i.useState)(e.workflow.enableEvidence),[ee,et]=(0,i.useState)(e.workflow.commitEvidence),[ei,en]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[es,ea]=(0,i.useState)(!1!==e.workflow.hideCiStatus),[el,er]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[eo,ec]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[ed,eu]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10)),[eg,em]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[eh,ep]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[ef,ex]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[ev,eb]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),ew=e.workflow.stageTimeouts,[ej,ey]=(0,i.useState)(String(Math.round((ew?.analyzeMs??18e5)/1e3))),[eS,ek]=(0,i.useState)(String(Math.round((ew?.requirementsMs??18e5)/1e3))),[eC,eM]=(0,i.useState)(String(Math.round((ew?.researchMs??18e5)/1e3))),[eI,eN]=(0,i.useState)(String(Math.round((ew?.planMs??18e5)/1e3))),[eT,eA]=(0,i.useState)(String(Math.round((ew?.implementMs??18e5)/1e3))),[eV,eW]=(0,i.useState)(String(Math.round((ew?.fastImplementMs??18e5)/1e3))),[eH,eO]=(0,i.useState)(String(Math.round((ew?.mergeMs??18e5)/1e3))),eq=e.workflow.analyzeRepoTimeouts,[eG,eU]=(0,i.useState)(String(Math.round((eq?.analyzeMs??6e5)/1e3))),e$=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[eZ,eX]=(0,i.useState)(e$.enabled),[eY,eJ]=(0,i.useState)(String(e$.autoTimeoutMinutes)),[eQ,e0]=(0,i.useState)(String(e$.maxConcurrentSessions)),e1=e.fabLayout??{swapPosition:!1},[e3,e2]=(0,i.useState)(e1.swapPosition),[e5,e4]=(0,i.useState)(e.notifications.inApp.enabled),[e8,e6]=(0,i.useState)({...e.notifications.events}),[e9,e7]=(0,i.useState)({...M}),te=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",tt=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",ti=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",tn=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",ts=ew?.analyzeMs!=null?String(Math.round(ew.analyzeMs/1e3)):"",ta=ew?.requirementsMs!=null?String(Math.round(ew.requirementsMs/1e3)):"",tl=ew?.researchMs!=null?String(Math.round(ew.researchMs/1e3)):"",tr=ew?.planMs!=null?String(Math.round(ew.planMs/1e3)):"",to=ew?.implementMs!=null?String(Math.round(ew.implementMs/1e3)):"",tc=ew?.fastImplementMs!=null?String(Math.round(ew.fastImplementMs/1e3)):"",td=ew?.mergeMs!=null?String(Math.round(ew.mergeMs/1e3)):"",tu=eq?.analyzeMs!=null?String(Math.round(eq.analyzeMs/1e3)):"";function tg(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function tm(e){if(void 0===e)return;let t=tg(e);return null!=t?1e3*t:void 0}function th(e={}){let t=tg(e.ciTimeout??eh),i=e.autoArchiveEnabled??eo,n=parseInt(e.autoArchiveDelay??ed,10);return{workflow:{openPrOnImplementationComplete:e.openPr??V,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??O,allowPrd:e.allowPrd??G,allowPlan:e.allowPlan??$,allowMerge:e.allowMerge??X},enableEvidence:e.enableEvidence??J,commitEvidence:e.commitEvidence??ee,ciWatchEnabled:e.ciWatchEnabled??ei,hideCiStatus:e.hideCiStatus??es,defaultFastMode:e.defaultFastMode??el,autoArchiveDelayMinutes:i?Number.isNaN(n)||n<1?10:n:0,ciMaxFixAttempts:tg(e.ciMaxFix??eg),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:tg(e.ciLogMax??ef),ciWatchPollIntervalSeconds:tg(e.ciPollInterval??ev),stageTimeouts:{analyzeMs:tm(e.analyzeTimeout??ej),requirementsMs:tm(e.requirementsTimeout??eS),researchMs:tm(e.researchTimeout??eC),planMs:tm(e.planTimeout??eI),implementMs:tm(e.implementTimeout??eT),fastImplementMs:tm(e.fastImplementTimeout??eV),mergeMs:tm(e.mergeTimeout??eH)},analyzeRepoTimeouts:{analyzeMs:tm(e.analyzeRepoTimeout??eG)}}}}function tp(e={}){return{notifications:{inApp:{enabled:e.inApp??e5},events:e.events??e8}}}let[tf,tx]=(0,i.useState)("agent");(0,i.useEffect)(()=>{let e=eE.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&tx(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[]);let tv=(0,i.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:h("settings.title")}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,y.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",p?"opacity-100":"opacity-0"),children:h("settings.saving")}),(0,t.jsxs)("span",{className:(0,y.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",S&&!p?"opacity-100":"opacity-0"),children:[(0,t.jsx)(n.Check,{className:"h-3 w-3"}),h("settings.saved")]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:eE.map(e=>{let i=e.icon,n=tf===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>tv(e.id),className:(0,y.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",n?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:h(e.labelKey)})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)("div",{id:"section-language",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:(0,t.jsx)(W,{language:e.user?.preferredLanguage??N.Language.English})}),(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eB,{icon:s.Bot,title:h("settings.agent.sectionTitle"),description:h("settings.agent.sectionDescription"),testId:"agent-settings-section",children:(0,t.jsx)(eR,{label:h("settings.agent.agentAndModel"),description:h("settings.agent.agentAndModelDescription"),htmlFor:"agent-model-picker",children:(0,t.jsx)(_.AgentModelPicker,{initialAgentType:T,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>A(e),className:"w-55"})})}),(0,t.jsx)(eK,{links:[{label:h("settings.agent.links.agentSystem"),href:"https://github.com/shep-ai/shep/blob/main/docs/architecture/agent-system.md"},{label:h("settings.agent.links.addingAgents"),href:"https://github.com/shep-ai/shep/blob/main/docs/development/adding-agents.md"},{label:h("settings.agent.links.configurationGuide"),href:"https://github.com/shep-ai/shep/blob/main/docs/guides/configuration.md"}],children:h("settings.agent.hint")})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:a.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",children:[(0,t.jsx)(eR,{label:h("settings.environment.defaultEditor"),description:h("settings.environment.defaultEditorDescription"),htmlFor:"default-editor",children:(0,t.jsxs)(C.Select,{value:D,onValueChange:e=>{P(e),k({environment:{defaultEditor:e,shellPreference:E,terminalPreference:z}})},children:[(0,t.jsx)(C.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(C.SelectValue,{})}),(0,t.jsx)(C.SelectContent,{children:eF.map(e=>{var i;let n=(i=e.value)&&i in L?L[i]:F;return(0,t.jsx)(C.SelectItem,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(eR,{label:h("settings.environment.shell"),description:h("settings.environment.shellDescription"),htmlFor:"shell-preference",children:(0,t.jsxs)(C.Select,{value:E,onValueChange:e=>{R(e),k({environment:{defaultEditor:D,shellPreference:e,terminalPreference:z}})},children:[(0,t.jsx)(C.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(C.SelectValue,{})}),(0,t.jsx)(C.SelectContent,{children:eP.map(e=>(0,t.jsx)(C.SelectItem,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(eR,{label:h("settings.environment.terminal"),description:h("settings.environment.terminalDescription"),htmlFor:"terminal-preference",children:(0,t.jsxs)(C.Select,{value:z,onValueChange:e=>{B(e),k({environment:{defaultEditor:D,shellPreference:E,terminalPreference:e}})},children:[(0,t.jsx)(C.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(C.SelectValue,{})}),(0,t.jsx)(C.SelectContent,{children:K.map(e=>(0,t.jsx)(C.SelectItem,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(eK,{links:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/shep-ai/shep/blob/main/docs/guides/configuration.md"}],children:h("settings.environment.hint")})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:l.GitBranch,title:h("settings.workflow.title"),description:h("settings.workflow.sectionDescription"),testId:"workflow-settings-section",children:[(0,t.jsx)(ez,{label:h("settings.workflow.defaultFastMode"),description:h("settings.workflow.defaultFastModeDescription"),id:"default-fast-mode",testId:"switch-default-fast-mode",checked:el,onChange:e=>{er(e),k(th({defaultFastMode:e}))}}),(0,t.jsx)(e_,{children:h("settings.workflow.subsections.approve")}),(0,t.jsx)(ez,{label:h("settings.workflow.autoApprovePrd"),description:h("settings.workflow.autoApprovePrdDescription"),id:"allow-prd",testId:"switch-allow-prd",checked:G,onChange:e=>{U(e),k(th({allowPrd:e}))}}),(0,t.jsx)(ez,{label:h("settings.workflow.autoApprovePlan"),description:h("settings.workflow.autoApprovePlanDescription"),id:"allow-plan",testId:"switch-allow-plan",checked:$,onChange:e=>{Z(e),k(th({allowPlan:e}))}}),(0,t.jsx)(ez,{label:h("settings.workflow.autoApproveMerge"),description:h("settings.workflow.autoApproveMergeDescription"),id:"allow-merge",testId:"switch-allow-merge",checked:X,onChange:e=>{Y(e),k(th({allowMerge:e}))}}),(0,t.jsx)(e_,{children:h("settings.workflow.subsections.evidence")}),(0,t.jsx)(ez,{label:h("settings.workflow.collectEvidence"),description:h("settings.workflow.collectEvidenceDescription"),id:"enable-evidence",testId:"switch-enable-evidence",checked:J,onChange:e=>{Q(e),e?k(th({enableEvidence:e})):(et(!1),k(th({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(ez,{label:h("settings.workflow.addEvidenceToPr"),description:h("settings.workflow.addEvidenceToPrDescription"),id:"commit-evidence",testId:"switch-commit-evidence",checked:ee,disabled:!J||!V,onChange:e=>{et(e),k(th({commitEvidence:e}))}}),(0,t.jsx)(e_,{children:h("settings.workflow.subsections.git")}),(0,t.jsx)(ez,{label:h("settings.workflow.pushOnComplete"),description:h("settings.workflow.pushOnCompleteDescription"),id:"push-on-complete",testId:"switch-push-on-complete",checked:O,onChange:e=>{q(e),k(th({pushOnComplete:e}))}}),(0,t.jsx)(ez,{label:h("settings.workflow.openPrOnComplete"),description:h("settings.workflow.openPrOnCompleteDescription"),id:"open-pr",testId:"switch-open-pr",checked:V,onChange:e=>{H(e),e?k(th({openPr:e})):(et(!1),k(th({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(ez,{label:h("settings.workflow.watchCiAfterPush"),description:h("settings.workflow.watchCiAfterPushDescription"),id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:ei,onChange:e=>{en(e),k(th({ciWatchEnabled:e}))}}),(0,t.jsx)(e_,{children:"Archive"}),(0,t.jsx)(ez,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:eo,onChange:e=>{ec(e),k(th({autoArchiveEnabled:e}))}}),(0,t.jsx)(eR,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1–1440)",htmlFor:"auto-archive-delay",children:(0,t.jsx)(eL,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:ed,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{eu(e)},onBlur:()=>{if(!eo)return;let e=parseInt(ed,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));eu(String(t)),k(th({autoArchiveDelay:String(t)}))}})})]}),(0,t.jsx)(eK,{links:[{label:h("settings.workflow.links.approvalGates"),href:"https://github.com/shep-ai/shep/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:h("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/shep-ai/shep/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:h("settings.workflow.hint")})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:r.Activity,title:h("settings.ci.title"),description:h("settings.ci.description"),testId:"ci-settings-section",children:[(0,t.jsx)(eR,{label:h("settings.ci.maxFixAttempts"),description:h("settings.ci.maxFixAttemptsDescription"),htmlFor:"ci-max-fix",children:(0,t.jsx)(eL,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:eg,onChange:em,onBlur:()=>{eg!==te&&k(th({ciMaxFix:eg}))},min:1,max:10})}),(0,t.jsx)(eR,{label:h("settings.ci.watchTimeout"),description:h("settings.ci.watchTimeoutDescription"),htmlFor:"ci-timeout",children:(0,t.jsx)(eL,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:eh,onChange:ep,onBlur:()=>{eh!==tt&&k(th({ciTimeout:eh}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(eR,{label:h("settings.ci.maxLogSize"),description:h("settings.ci.maxLogSizeDescription"),htmlFor:"ci-log-max",children:(0,t.jsx)(eL,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:ef,onChange:ex,onBlur:()=>{ef!==ti&&k(th({ciLogMax:ef}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(eR,{label:h("settings.ci.pollInterval"),description:h("settings.ci.pollIntervalDescription"),htmlFor:"ci-poll-interval",children:(0,t.jsx)(eL,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:ev,onChange:eb,onBlur:()=>{ev!==tn&&k(th({ciPollInterval:ev}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(ez,{label:h("settings.ci.hideCiStatus"),description:h("settings.ci.hideCiStatusDescription"),id:"hide-ci-status",testId:"switch-hide-ci-status",checked:es,onChange:e=>{ea(e),k(th({hideCiStatus:e}))}})]}),(0,t.jsx)(eK,{links:[{label:h("settings.ci.links.cicdPipeline"),href:"https://github.com/shep-ai/shep/blob/main/docs/development/cicd.md"},{label:h("settings.ci.links.ciSecurityGates"),href:"https://github.com/shep-ai/shep/blob/main/specs/003-cicd-security-gates/spec.md"}],children:h("settings.ci.hint")})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:x.Timer,title:h("settings.stageTimeouts.title"),description:h("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(e_,{children:h("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.analyze"),description:h("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(eD,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ej,onChange:ey,onBlur:()=>{ej!==ts&&k(th({analyzeTimeout:ej}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.requirements"),description:h("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(eD,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eS,onChange:ek,onBlur:()=>{eS!==ta&&k(th({requirementsTimeout:eS}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.research"),description:h("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(eD,{id:"timeout-research",testId:"timeout-research-input",value:eC,onChange:eM,onBlur:()=>{eC!==tl&&k(th({researchTimeout:eC}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.plan"),description:h("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(eD,{id:"timeout-plan",testId:"timeout-plan-input",value:eI,onChange:eN,onBlur:()=>{eI!==tr&&k(th({planTimeout:eI}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.implement"),description:h("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(eD,{id:"timeout-implement",testId:"timeout-implement-input",value:eT,onChange:eA,onBlur:()=>{eT!==to&&k(th({implementTimeout:eT}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.fastImplement"),description:h("settings.stageTimeouts.fastImplementDescription"),htmlFor:"timeout-fast-implement",children:(0,t.jsx)(eD,{id:"timeout-fast-implement",testId:"timeout-fast-implement-input",value:eV,onChange:eW,onBlur:()=>{eV!==tc&&k(th({fastImplementTimeout:eV}))},defaultSeconds:1800})}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.merge"),description:h("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(eD,{id:"timeout-merge",testId:"timeout-merge-input",value:eH,onChange:eO,onBlur:()=>{eH!==td&&k(th({mergeTimeout:eH}))},defaultSeconds:1800})}),(0,t.jsx)(e_,{children:h("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(eR,{label:h("settings.stageTimeouts.analyze"),description:h("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(eD,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:eG,onChange:eU,onBlur:()=>{eG!==tu&&k(th({analyzeRepoTimeout:eG}))},defaultSeconds:600})})]}),(0,t.jsx)(eK,{children:h("settings.stageTimeouts.hint")})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:c,title:h("settings.notifications.title"),description:h("settings.notifications.sectionDescription"),testId:"notification-settings-section",children:[(0,t.jsx)(e_,{children:h("settings.notifications.channels")}),(0,t.jsx)(ez,{label:h("settings.notifications.inAppLabel"),description:h("settings.notifications.inAppDescription"),id:"notif-in-app",testId:"switch-in-app",checked:e5,onChange:e=>{e4(e),k(tp({inApp:e}))}}),(0,t.jsx)(e_,{children:h("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(ez,{label:h("settings.notifications.events.agentStarted"),id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:e8.agentStarted,onChange:e=>{let t={...e8,agentStarted:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.phaseCompleted"),id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:e8.phaseCompleted,onChange:e=>{let t={...e8,phaseCompleted:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.waitingApproval"),id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:e8.waitingApproval,onChange:e=>{let t={...e8,waitingApproval:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.agentCompleted"),id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:e8.agentCompleted,onChange:e=>{let t={...e8,agentCompleted:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.agentFailed"),id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:e8.agentFailed,onChange:e=>{let t={...e8,agentFailed:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(e_,{children:h("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(ez,{label:h("settings.notifications.events.prMerged"),id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:e8.prMerged,onChange:e=>{let t={...e8,prMerged:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.prClosed"),id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:e8.prClosed,onChange:e=>{let t={...e8,prClosed:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.prChecksPassed"),id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:e8.prChecksPassed,onChange:e=>{let t={...e8,prChecksPassed:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.prChecksFailed"),id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:e8.prChecksFailed,onChange:e=>{let t={...e8,prChecksFailed:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.prBlocked"),id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:e8.prBlocked,onChange:e=>{let t={...e8,prBlocked:e};e6(t),k(tp({events:t}))}}),(0,t.jsx)(ez,{label:h("settings.notifications.events.mergeReviewReady"),id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:e8.mergeReviewReady,onChange:e=>{let t={...e8,mergeReviewReady:e};e6(t),k(tp({events:t}))}})]}),(0,t.jsx)(eK,{links:[{label:h("settings.notifications.links.notificationSystem"),href:"https://github.com/shep-ai/shep/blob/main/specs/021-agent-notifications/spec.yaml"}],children:h("settings.notifications.hint")})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:d,title:h("settings.featureFlags.title"),description:h("settings.featureFlags.sectionDescription"),badge:h("settings.featureFlags.badge"),testId:"feature-flags-settings-section",children:[(0,t.jsx)(ez,{label:h("settings.featureFlags.skills"),description:h("settings.featureFlags.skillsDescription"),id:"flag-skills",testId:"switch-flag-skills",checked:e9.skills,onChange:e=>{let t={...e9,skills:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.deployments"),description:h("settings.featureFlags.deploymentsDescription"),id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:e9.envDeploy,onChange:e=>{let t={...e9,envDeploy:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.debug"),description:h("settings.featureFlags.debugDescription"),id:"flag-debug",testId:"switch-flag-debug",checked:e9.debug,onChange:e=>{let t={...e9,debug:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.githubImport"),description:h("settings.featureFlags.githubImportDescription"),id:"flag-githubImport",testId:"switch-flag-githubImport",checked:e9.githubImport,onChange:e=>{let t={...e9,githubImport:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.adoptBranch"),description:h("settings.featureFlags.adoptBranchDescription"),id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:e9.adoptBranch,onChange:e=>{let t={...e9,adoptBranch:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.gitRebaseSync"),description:h("settings.featureFlags.gitRebaseSyncDescription"),id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:e9.gitRebaseSync,onChange:e=>{let t={...e9,gitRebaseSync:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.reactFileManager"),description:h("settings.featureFlags.reactFileManagerDescription"),id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:e9.reactFileManager,onChange:e=>{let t={...e9,reactFileManager:e};e7(t),k({featureFlags:t})}}),(0,t.jsx)(ez,{label:h("settings.featureFlags.inventory"),description:h("settings.featureFlags.inventoryDescription"),id:"flag-inventory",testId:"switch-flag-inventory",checked:e9.inventory,onChange:e=>{let t={...e9,inventory:e};e7(t),k({featureFlags:t})}})]}),(0,t.jsx)(eK,{children:h("settings.featureFlags.hint")})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:v.MessageSquare,title:h("settings.interactiveAgent.title"),description:h("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",children:[(0,t.jsx)(ez,{label:h("settings.interactiveAgent.enableChatTab"),description:h("settings.interactiveAgent.enableChatTabDescription"),id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:eZ,onChange:e=>{eX(e),k({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(eY,10)||15,maxConcurrentSessions:parseInt(eQ,10)||3}})}}),(0,t.jsx)(eR,{label:h("settings.interactiveAgent.autoTimeout"),description:h("settings.interactiveAgent.autoTimeoutDescription"),htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(eL,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:eY,placeholder:"15",min:1,max:120,suffix:"min",onChange:eJ,onBlur:()=>{let e=parseInt(eY,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));eJ(String(t)),k({interactiveAgent:{enabled:eZ,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(eQ,10)||3}})}})}),(0,t.jsx)(eR,{label:h("settings.interactiveAgent.maxConcurrentSessions"),description:h("settings.interactiveAgent.maxConcurrentSessionsDescription"),htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(eL,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:eQ,placeholder:"3",min:1,max:10,onChange:e0,onBlur:()=>{let e=parseInt(eQ,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));e0(String(t)),k({interactiveAgent:{enabled:eZ,autoTimeoutMinutes:parseInt(eY,10)||15,maxConcurrentSessions:t}})}})})]}),(0,t.jsx)(eK,{children:h("settings.interactiveAgent.hint")})]}),(0,t.jsxs)("div",{id:"section-fab-layout",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(eB,{icon:b,title:h("settings.fabLayout.title"),description:h("settings.fabLayout.description"),testId:"fab-layout-settings-section",children:(0,t.jsx)(ez,{label:h("settings.fabLayout.swapPosition"),description:h("settings.fabLayout.swapPositionDescription"),id:"fab-swap-position",testId:"switch-fab-swap-position",checked:e3,onChange:e=>{e2(e),k({fabLayout:{swapPosition:e}})}})}),(0,t.jsx)(eK,{children:h("settings.fabLayout.hint")})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(eB,{icon:u,title:h("settings.database.title"),description:h("settings.database.sectionDescription"),testId:"database-settings-section",children:[(0,t.jsx)(eR,{label:h("settings.database.location"),description:h("settings.database.locationDescription"),children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(eR,{label:h("settings.database.size"),children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:g})})]}),(0,t.jsx)(eK,{links:[{label:h("settings.database.links.settingsService"),href:"https://github.com/shep-ai/shep/blob/main/docs/architecture/settings-service.md"},{label:h("settings.database.links.settingsSpec"),href:"https://github.com/shep-ai/shep/blob/main/specs/005-global-settings-service/spec.md"}],children:h("settings.database.hint")})]})]})]})}e.s(["SettingsPageClient",()=>eV],41952)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,956,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(31777);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("bg-card text-card-foreground rounded-xl border shadow",e),...a}));s.displayName="Card";let i=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",e),...a}));i.displayName="CardHeader";let d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("leading-none font-semibold tracking-tight",e),...a}));d.displayName="CardTitle";let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("text-muted-foreground text-sm",e),...a}));c.displayName="CardDescription";let l=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("p-6 pt-0",e),...a}));l.displayName="CardContent",a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("flex items-center p-6 pt-0",e),...a})).displayName="CardFooter",e.s(["Card",()=>s,"CardContent",()=>l,"CardDescription",()=>c,"CardHeader",()=>i,"CardTitle",()=>d])},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},74294,58860,44229,e=>{"use strict";var t=e.i(3645);let a=(0,t.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",()=>a],74294);let r=(0,t.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",()=>r],58860);var s=e.i(93752);e.s(["Code",()=>s.default],44229)},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},51911,e=>{"use strict";var t=e.i(20314),a=e.i(79054),r=e.i(91967),s=e.i(5978),i=e.i(22528),d=e.i(36589),c=e.i(23405),l=e.i(77624),n=e.i(87620),o="Switch",[u,p]=(0,i.createContextScope)(o),[f,h]=u(o),m=a.forwardRef((e,i)=>{let{__scopeSwitch:c,name:l,checked:u,defaultChecked:p,required:h,disabled:m,value:y="on",onCheckedChange:k,form:g,...v}=e,[w,C]=a.useState(null),R=(0,s.useComposedRefs)(i,e=>C(e)),N=a.useRef(!1),j=!w||g||!!w.closest("form"),[z,S]=(0,d.useControllableState)({prop:u,defaultProp:p??!1,onChange:k,caller:o});return(0,t.jsxs)(f,{scope:c,checked:z,disabled:m,children:[(0,t.jsx)(n.Primitive.button,{type:"button",role:"switch","aria-checked":z,"aria-required":h,"data-state":x(z),"data-disabled":m?"":void 0,disabled:m,value:y,...v,ref:R,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{S(e=>!e),j&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),j&&(0,t.jsx)(b,{control:w,bubbles:!N.current,name:l,value:y,checked:z,required:h,disabled:m,form:g,style:{transform:"translateX(-100%)"}})]})});m.displayName=o;var y="SwitchThumb",k=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...s}=e,i=h(y,r);return(0,t.jsx)(n.Primitive.span,{"data-state":x(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:a})});k.displayName=y;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:i,bubbles:d=!0,...n},o)=>{let u=a.useRef(null),p=(0,s.useComposedRefs)(u,o),f=(0,c.usePrevious)(i),h=(0,l.useSize)(r);return a.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==i&&t){let a=new Event("click",{bubbles:d});t.call(e,i),e.dispatchEvent(a)}},[f,i,d]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...n,tabIndex:-1,ref:p,style:{...n.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function x(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>k,"Thumb",()=>k,"createSwitchScope",()=>p],95291);var g=e.i(95291),g=g,v=e.i(31777);function w({className:e,size:a="default",...r}){return(0,t.jsx)(g.Root,{"data-slot":"switch","data-size":a,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),...r,children:(0,t.jsx)(g.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",()=>w],51911)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95230,e=>{"use strict";let t=(0,e.i(3645).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",()=>t])},41413,e=>{"use strict";var t=e.i(20314),s=e.i(79054),r=e.i(23925),i=e.i(11345),n=e.i(76016),a=e.i(62763),o=e.i(1998),l=e.i(86782),u=e.i(29847),c=e.i(35364),h=e.i(90382),d=e.i(31777);function p({initialAgentType:e,initialModel:p,agentType:f,model:m,onAgentModelChange:y,onSave:v,saveError:b,saving:g,disabled:x,className:w,mode:S}){let[j,T]=s.useState(!1),[R,k]=s.useState([]),[C,O]=s.useState(!0),[I,E]=s.useState(f??e),[F,M]=s.useState(m??p),[Q,N]=s.useState(!1),[D,P]=s.useState(null),[U,A]=s.useState(0),[q,L]=s.useState(null);s.useEffect(()=>{(0,a.getAllAgentModels)().then(k).finally(()=>O(!1))},[]),s.useEffect(()=>{E(f??e)},[f,e]),s.useEffect(()=>{M(m??p)},[m,p]);let H=s.useRef(j);s.useEffect(()=>{let e=H.current;if(H.current=j,e&&!j){let e=setTimeout(()=>{A(0),L(null)},150);return()=>clearTimeout(e)}},[j]);let K=async(e,t)=>{if(T(!1),e===I&&t===F)return;if(P(null),"override"===S){E(e),M(t),y?.(e,t);return}let s=v??(async(e,t)=>(0,o.updateAgentAndModel)(e,t||null));N(!0);try{let r=await s(e,t);if(r&&"ok"in r&&!r.ok)return void P(r.error??"Failed to save");E(e),M(t),y?.(e,t)}catch{P("Failed to save")}finally{N(!1)}},z=b??D,B=(0,l.getAgentTypeIcon)(I),_=R.find(e=>e.agentType===I)?.label??I,V=F?(0,u.getModelMeta)(F).displayName||F:null,G=q?R.find(e=>e.agentType===q):null;return(0,t.jsxs)("div",{className:(0,d.cn)("flex flex-col gap-1",w),children:[(0,t.jsxs)(h.Popover,{open:j,onOpenChange:T,children:[(0,t.jsx)(h.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(c.Button,{type:"button",variant:"outline",role:"combobox","aria-expanded":j,disabled:(x??!1)||C||(g??!1)||Q,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(B,{className:"h-4 w-4 shrink-0"}),C?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:_}),V?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:V})]}):null]})]})})}),(0,t.jsx)(h.PopoverContent,{className:"z-[70] w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===U?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),R.map(e=>{let s=(0,l.getAgentTypeIcon)(e.agentType),i=I===e.agentType,a=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,d.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",i&&"bg-accent/50"),onClick:()=>{a?(L(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>A(1))})):K(e.agentType,"")},children:[(0,t.jsx)(s,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-start",children:e.label}),i&&!a?(0,t.jsx)(r.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,a?(0,t.jsx)(n.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:G?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{A(0),setTimeout(()=>L(null),220)},children:[(0,t.jsx)(i.ChevronLeft,{className:"h-3.5 w-3.5"}),G.label]}),G.models.map(e=>{let s=I===G.agentType&&F===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,d.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-start transition-colors","hover:bg-accent hover:text-accent-foreground",s&&"bg-accent/50"),onClick:()=>K(G.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),s?(0,t.jsx)(r.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!z&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:z})]})}e.s(["AgentModelPicker",()=>p])},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},43698,e=>{"use strict";let t=(0,e.i(3645).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["default",()=>t])},64764,80436,17087,e=>{"use strict";var t=e.i(15506);e.s(["Loader2Icon",()=>t.default],64764);var s=e.i(95230);e.s(["DownloadIcon",()=>s.default],80436);let r=(0,e.i(3645).default)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]]);e.s(["StickyNoteIcon",()=>r],17087)},48306,e=>{"use strict";var t=e.i(20314),s=e.i(31777);function r({className:e,...r}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,s.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}e.s(["Textarea",()=>r])},28267,57484,e=>{"use strict";var t=e.i(1693);e.s(["VisuallyHidden",0,t],28267);let s=(0,e.i(3645).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["FileIcon",()=>s],57484)},16298,e=>{"use strict";let t=(0,e.i(3645).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",()=>t])},50032,86254,e=>{"use strict";var t=e.i(20314),s=e.i(60253),r=e.i(64764),i=e.i(80436),n=e.i(17087),a=e.i(31777),o=e.i(2287),l=e.i(48306),u=e.i(2828),c=e.i(28267),h=e.i(57484),d=e.i(16298),d=d;let p=(0,e.i(3645).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var f=e.i(93752),f=f;e.i(35364);let m=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),y=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function v(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(+(0!==t))} ${["B","KB","MB","GB"][t]}`}let b=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function g(e,t){let s=new URLSearchParams({path:e,mimeType:t});return`/api/attachments/preview?${s.toString()}`}function x({name:e,size:x,mimeType:w,path:S,onRemove:j,loading:T=!1,disabled:R=!1,notes:k,onNotesChange:C}){let O,I,E=(O=e.lastIndexOf("."))>=0?e.slice(O).toLowerCase():"",F=m.has(E)?p:".pdf"===E?d.default:y.has(E)?f.default:h.FileIcon,M=".pdf"===E?"bg-red-50 text-red-600":m.has(E)?"bg-blue-50 text-blue-600":y.has(E)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600",Q=(I=e.lastIndexOf("."))>=0&&b.has(e.slice(I).toLowerCase());if(T)return(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-md border",children:(0,t.jsx)(r.Loader2Icon,{className:"text-muted-foreground h-5 w-5 animate-spin"})});if(Q){let r=(0,t.jsxs)("button",{type:"button",className:"relative block cursor-pointer rounded-md",children:[(0,t.jsx)("img",{src:g(S,w),alt:e,title:e,className:"h-12 w-12 rounded-md border object-cover transition-opacity hover:opacity-80"}),k?(0,t.jsx)("span",{className:"ring-background absolute -right-1 -bottom-1 flex h-4 w-4 items-center justify-center rounded-full bg-amber-500 text-white shadow-sm ring-2",children:(0,t.jsx)(n.StickyNoteIcon,{className:"h-2.5 w-2.5"})}):null]});return(0,t.jsx)(u.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(o.Dialog,{children:[(0,t.jsxs)(u.Tooltip,{children:[(0,t.jsxs)("div",{className:"group relative",children:[(0,t.jsx)(u.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(o.DialogTrigger,{asChild:!0,children:r})}),!R&&(0,t.jsx)("button",{type:"button",onClick:j,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${e}`,children:(0,t.jsx)(s.X,{className:"h-3 w-3"})})]}),k?(0,t.jsx)(u.TooltipContent,{side:"bottom",className:"max-w-[220px] border border-amber-200 bg-amber-50 text-amber-950 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100",children:(0,t.jsx)("p",{className:"line-clamp-3 text-xs leading-snug",children:k})}):null]}),(0,t.jsxs)(o.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,t.jsx)(c.VisuallyHidden.Root,{children:(0,t.jsxs)(o.DialogTitle,{children:["Preview: ",e]})}),(0,t.jsx)("div",{className:"relative bg-black/90",children:(0,t.jsx)("img",{src:g(S,w),alt:e,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,t.jsxs)("div",{className:"bg-background flex flex-col gap-2 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:v(x)})]}),(0,t.jsx)("a",{href:g(S,w),download:e,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${e}`,children:(0,t.jsx)(i.DownloadIcon,{className:"h-4 w-4"})})]}),C?(0,t.jsx)(l.Textarea,{placeholder:"Add notes about this image…",value:k??"",onChange:e=>C(e.target.value),rows:2,className:"resize-none text-sm","aria-label":"Image notes"}):k?(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:k}):null]})]})]})})}return(0,t.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-full border py-1 ps-2 pe-3",children:[(0,t.jsx)("div",{className:(0,a.cn)("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",M),children:(0,t.jsx)(F,{className:"h-3 w-3"})}),(0,t.jsx)("span",{className:"max-w-[120px] truncate text-sm",children:e}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:v(x)}),!R&&(0,t.jsx)("button",{type:"button",onClick:j,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${e}`,children:(0,t.jsx)(s.X,{className:"h-3 w-3"})})]})}e.s(["AttachmentChip",()=>x],86254),e.s([],50032)},99105,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],99105)},33548,e=>{"use strict";let t=(0,e.i(3645).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],33548)},67669,e=>{"use strict";let t=(0,e.i(3645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],67669)},94365,e=>{"use strict";let t=(0,e.i(3645).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",()=>t],94365)},4520,77501,e=>{"use strict";var t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};e.s(["Subscribable",()=>t],77501);var s=new class extends t{#e;#t;#s;constructor(){super(),this.#s=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",()=>s],4520)},3,68911,e=>{"use strict";e.i(44172);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#r=t;#i=!1;setTimeoutProvider(e){this.#r=e}setTimeout(e,t){return this.#r.setTimeout(e,t)}clearTimeout(e){this.#r.clearTimeout(e)}setInterval(e,t){return this.#r.setInterval(e,t)}clearInterval(e){this.#r.clearInterval(e)}};function r(e){setTimeout(e,0)}e.s(["systemSetTimeoutZero",()=>r,"timeoutManager",()=>s],68911);var i="u"<typeof window||"Deno"in globalThis;function n(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:s="all",exact:r,fetchStatus:i,predicate:n,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==p(a,t.options))return!1}else if(!m(t.queryKey,a))return!1}if("all"!==s){let e=t.isActive();if("active"===s&&!e||"inactive"===s&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!n||!!n(t))}function d(e,t){let{exact:s,status:r,predicate:i,mutationKey:n}=e;if(n){if(!t.options.mutationKey)return!1;if(s){if(f(t.options.mutationKey)!==f(n))return!1}else if(!m(t.options.mutationKey,n))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function p(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,(e,t)=>g(t)?Object.keys(t).sort().reduce((e,s)=>(e[s]=t[s],e),{}):t)}function m(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(s=>m(e[s],t[s]))}var y=Object.prototype.hasOwnProperty;function v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let s in e)if(e[s]!==t[s])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g(e){if(!x(e))return!1;let t=e.constructor;if(void 0===t)return!0;let s=t.prototype;return!!x(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function x(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise(t=>{s.setTimeout(t,e)})}function S(e,t,s){return"function"==typeof s.structuralSharing?s.structuralSharing(e,t):!1!==s.structuralSharing?function e(t,s,r=0){if(t===s)return t;if(r>500)return s;let i=b(t)&&b(s);if(!i&&!(g(t)&&g(s)))return s;let n=(i?t:Object.keys(t)).length,a=i?s:Object.keys(s),o=a.length,l=i?Array(o):{},u=0;for(let c=0;c<o;c++){let o=i?c:a[c],h=t[o],d=s[o];if(h===d){l[o]=h,(i?c<n:y.call(t,o))&&u++;continue}if(null===h||null===d||"object"!=typeof h||"object"!=typeof d){l[o]=d;continue}let p=e(h,d,r+1);l[o]=p,p===h&&u++}return n===o&&u===n?t:l}(e,t):t}function j(e,t,s=0){let r=[...e,t];return s&&r.length>s?r.slice(1):r}function T(e,t,s=0){let r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var R=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==R?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function C(e,t){return"function"==typeof e?e(...t):!!e}function O(e,t,s){let r,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),i||(i=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),e}e.s(["addConsumeAwareSignal",()=>O,"addToEnd",()=>j,"addToStart",()=>T,"ensureQueryFn",()=>k,"functionalUpdate",()=>a,"hashKey",()=>f,"hashQueryKeyByOptions",()=>p,"isServer",()=>i,"isValidTimeout",()=>o,"matchMutation",()=>d,"matchQuery",()=>h,"noop",()=>n,"partialMatchKey",()=>m,"replaceData",()=>S,"resolveEnabled",()=>c,"resolveStaleTime",()=>u,"shallowEqualObjects",()=>v,"shouldThrowError",()=>C,"skipToken",()=>R,"sleep",()=>w,"timeUntilStale",()=>l],3)},65617,e=>{"use strict";let t;var s=e.i(3),r=(t=()=>s.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",()=>r])},6786,e=>{"use strict";let t,s,r,i,n,a;var o=e.i(68911).systemSetTimeoutZero,l=(t=[],s=0,r=e=>{e()},i=e=>{e()},n=o,{batch:e=>{let a;s++;try{a=e()}finally{let e;--s||(e=t,t=[],e.length&&n(()=>{i(()=>{e.forEach(e=>{r(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{s?t.push(e):n(()=>{r(e)})},setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{n=e}});e.s(["notifyManager",()=>l])},13598,20820,e=>{"use strict";var t=e.i(77501),s=new class extends t.Subscribable{#n=!0;#t;#s;constructor(){super(),this.#s=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function r(){let e,t,s=new Promise((s,r)=>{e=s,t=r});function r(e){Object.assign(s,e),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},s.reject=e=>{r({status:"rejected",reason:e}),t(e)},s}e.s(["onlineManager",()=>s],13598),e.i(3),e.s(["pendingThenable",()=>r],20820)},28574,20979,19644,34682,e=>{"use strict";e.i(44172);var t=e.i(3),s=e.i(6786),r=e.i(4520),i=e.i(13598),n=e.i(20820),a=e.i(65617);function o(e){return Math.min(1e3*2**e,3e4)}function l(e){return(e??"online")!=="online"||i.onlineManager.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let s,c=!1,h=0,d=(0,n.pendingThenable)(),p=()=>r.focusManager.isFocused()&&("always"===e.networkMode||i.onlineManager.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),m=e=>{"pending"===d.status&&(s?.(),d.resolve(e))},y=e=>{"pending"===d.status&&(s?.(),d.reject(e))},v=()=>new Promise(t=>{s=e=>{("pending"!==d.status||p())&&t(e)},e.onPause?.()}).then(()=>{s=void 0,"pending"===d.status&&e.onContinue?.()}),b=()=>{let s;if("pending"!==d.status)return;let r=0===h?e.initialPromise:void 0;try{s=r??e.fn()}catch(e){s=Promise.reject(e)}Promise.resolve(s).then(m).catch(s=>{if("pending"!==d.status)return;let r=e.retry??3*!a.environmentManager.isServer(),i=e.retryDelay??o,n="function"==typeof i?i(h,s):i,l=!0===r||"number"==typeof r&&h<r||"function"==typeof r&&r(h,s);c||!l?y(s):(h++,e.onFail?.(h,s),(0,t.sleep)(n).then(()=>p()?void 0:v()).then(()=>{c?y(s):b()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let s=new u(t);y(s),e.onCancel?.(s)}},continue:()=>(s?.(),d),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:f,start:()=>(f()?b():v().then(b),d)}}e.s(["CancelledError",()=>u,"canFetch",()=>l,"createRetryer",()=>c],20979);var h=e.i(68911),d=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(a.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){this.#a&&(h.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",()=>d],19644);var p=class extends d{#o;#l;#u;#c;#h;#d;#p;constructor(e){super(),this.#p=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#o=y(this.options),this.state=e.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=y(this.options);void 0!==e.data&&(this.setState(m(e.data,e.dataUpdatedAt)),this.#o=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,s){let r=(0,t.replaceData)(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){let s=this.#h?.promise;return this.#h?.cancel(e),s?s.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#o}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#p||this.#m()?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#m(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}async fetch(e,s){let r;if("idle"!==this.state.fetchStatus&&this.#h?.status()!=="rejected"){if(void 0!==this.state.data&&s?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,i.signal)})},a=()=>{let e,r=(0,t.ensureQueryFn)(this.options,s),i=(n(e={client:this.#c,queryKey:this.queryKey,meta:this.meta}),e);return(this.#p=!1,this.options.persister)?this.options.persister(r,i,this):r(i)},o=(n(r={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:a}),r);this.options.behavior?.onFetch(o,this),this.#l=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#f({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=c({initialPromise:s?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof u&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#h.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof u){if(e.silent)return this.#h.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#f({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#f(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...f(t.data,this.options),fetchMeta:e.meta??null};case"success":let s={...t,...m(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?s:void 0,s;case"error":let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),s.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function f(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:l(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function m(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function y(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,s=void 0!==t,r=s?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}e.s(["Query",()=>p,"fetchState",()=>f],28574);var v=e.i(79054),b=e.i(20314),g=v.createContext(void 0),x=e=>{let t=v.useContext(g);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},w=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,b.jsx)(g.Provider,{value:e,children:t}));e.s(["QueryClientProvider",()=>w,"useQueryClient",()=>x],34682)},62885,e=>{"use strict";let t;var s=e.i(4520),r=e.i(65617),i=e.i(6786),n=e.i(28574),a=e.i(77501),o=e.i(20820),l=e.i(3),u=e.i(68911),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#y=null,this.#v=(0,o.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#c;#b=void 0;#g=void 0;#x=void 0;#w;#S;#v;#y;#j;#T;#R;#k;#C;#O;#I=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#b.addObserver(this),h(this.#b,this.options)?this.#E():this.updateResult(),this.#F())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#b,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#b,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#M(),this.#Q(),this.#b.removeObserver(this)}setOptions(e){let t=this.options,s=this.#b;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.resolveEnabled)(this.options.enabled,this.#b))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#b.setOptions(this.options),t._defaulted&&!(0,l.shallowEqualObjects)(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#b,observer:this});let r=this.hasListeners();r&&p(this.#b,s,this.options,t)&&this.#E(),this.updateResult(),r&&(this.#b!==s||(0,l.resolveEnabled)(this.options.enabled,this.#b)!==(0,l.resolveEnabled)(t.enabled,this.#b)||(0,l.resolveStaleTime)(this.options.staleTime,this.#b)!==(0,l.resolveStaleTime)(t.staleTime,this.#b))&&this.#D();let i=this.#P();r&&(this.#b!==s||(0,l.resolveEnabled)(this.options.enabled,this.#b)!==(0,l.resolveEnabled)(t.enabled,this.#b)||i!==this.#O)&&this.#U(i)}getOptimisticResult(e){var t,s;let r=this.#c.getQueryCache().build(this.#c,e),i=this.createResult(r,e);return t=this,s=i,(0,l.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#x=i,this.#S=this.options,this.#w=this.#b.state),i}getCurrentResult(){return this.#x}trackResult(e,t){return new Proxy(e,{get:(e,s)=>(this.trackProp(s),t?.(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#v.status||this.#v.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,s))})}trackProp(e){this.#I.add(e)}getCurrentQuery(){return this.#b}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#c.defaultQueryOptions(e),s=this.#c.getQueryCache().build(this.#c,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#E({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#x))}#E(e){this.#N();let t=this.#b.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.noop)),t}#D(){this.#M();let e=(0,l.resolveStaleTime)(this.options.staleTime,this.#b);if(r.environmentManager.isServer()||this.#x.isStale||!(0,l.isValidTimeout)(e))return;let t=(0,l.timeUntilStale)(this.#x.dataUpdatedAt,e);this.#k=u.timeoutManager.setTimeout(()=>{this.#x.isStale||this.updateResult()},t+1)}#P(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#b):this.options.refetchInterval)??!1}#U(e){this.#Q(),this.#O=e,!r.environmentManager.isServer()&&!1!==(0,l.resolveEnabled)(this.options.enabled,this.#b)&&(0,l.isValidTimeout)(this.#O)&&0!==this.#O&&(this.#C=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||s.focusManager.isFocused())&&this.#E()},this.#O))}#F(){this.#D(),this.#U(this.#P())}#M(){this.#k&&(u.timeoutManager.clearTimeout(this.#k),this.#k=void 0)}#Q(){this.#C&&(u.timeoutManager.clearInterval(this.#C),this.#C=void 0)}createResult(e,t){let s,r=this.#b,i=this.options,a=this.#x,u=this.#w,c=this.#S,d=e!==r?e.state:this.#g,{state:m}=e,y={...m},v=!1;if(t._optimisticResults){let s=this.hasListeners(),a=!s&&h(e,t),o=s&&p(e,r,t,i);(a||o)&&(y={...y,...(0,n.fetchState)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:x}=y;s=y.data;let w=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===x){let e;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=a.data,w=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#R?.state.data,this.#R):t.placeholderData,void 0!==e&&(x="success",s=(0,l.replaceData)(a?.data,e,t),v=!0)}if(t.select&&void 0!==s&&!w)if(a&&s===u?.data&&t.select===this.#j)s=this.#T;else try{this.#j=t.select,s=t.select(s),s=(0,l.replaceData)(a?.data,s,t),this.#T=s,this.#y=null}catch(e){this.#y=e}this.#y&&(b=this.#y,s=this.#T,g=Date.now(),x="error");let S="fetching"===y.fetchStatus,j="pending"===x,T="error"===x,R=j&&S,k=void 0!==s,C={status:x,fetchStatus:y.fetchStatus,isPending:j,isSuccess:"success"===x,isError:T,isInitialLoading:R,isLoading:R,data:s,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:y.dataUpdateCount>d.dataUpdateCount||y.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!j,isLoadingError:T&&!k,isPaused:"paused"===y.fetchStatus,isPlaceholderData:v,isRefetchError:T&&k,isStale:f(e,t),refetch:this.refetch,promise:this.#v,isEnabled:!1!==(0,l.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==C.data,s="error"===C.status&&!t,i=e=>{s?e.reject(C.error):t&&e.resolve(C.data)},n=()=>{i(this.#v=C.promise=(0,o.pendingThenable)())},a=this.#v;switch(a.status){case"pending":e.queryHash===r.queryHash&&i(a);break;case"fulfilled":(s||C.data!==a.value)&&n();break;case"rejected":s&&C.error===a.reason||n()}}return C}updateResult(){let e=this.#x,t=this.createResult(this.#b,this.options);if(this.#w=this.#b.state,this.#S=this.options,void 0!==this.#w.data&&(this.#R=this.#b),(0,l.shallowEqualObjects)(t,e))return;this.#x=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#I.size)return!0;let r=new Set(s??this.#I);return this.options.throwOnError&&r.add("error"),Object.keys(this.#x).some(t=>this.#x[t]!==e[t]&&r.has(t))};this.#A({listeners:s()})}#N(){let e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#b)return;let t=this.#b;this.#b=e,this.#g=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#F()}#A(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#x)}),this.#c.getQueryCache().notify({query:this.#b,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,s){if(!1!==(0,l.resolveEnabled)(t.enabled,e)&&"static"!==(0,l.resolveStaleTime)(t.staleTime,e)){let r="function"==typeof s?s(e):s;return"always"===r||!1!==r&&f(e,t)}return!1}function p(e,t,s,r){return(e!==t||!1===(0,l.resolveEnabled)(r.enabled,e))&&(!s.suspense||"error"!==e.state.status)&&f(e,s)}function f(e,t){return!1!==(0,l.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,l.resolveStaleTime)(t.staleTime,e))}e.i(44172);var m=e.i(79054),y=e.i(34682);e.i(20314);var v=m.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=m.createContext(!1);b.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function x(e,t){return function(e,t,s){let n,a=m.useContext(b),o=m.useContext(v),u=(0,y.useQueryClient)(s),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let h=u.getQueryCache().get(c.queryHash);if(c._optimisticResults=a?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...s)=>e(t(...s)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}n=h?.state.error&&"function"==typeof c.throwOnError?(0,l.shouldThrowError)(c.throwOnError,[h.state.error,h]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||n)&&!o.isReset()&&(c.retryOnMount=!1),m.useEffect(()=>{o.clearReset()},[o]);let d=!u.getQueryCache().get(c.queryHash),[p]=m.useState(()=>new t(u,c)),f=p.getOptimisticResult(c),x=!a&&!1!==e.subscribed;if(m.useSyncExternalStore(m.useCallback(e=>{let t=x?p.subscribe(i.notifyManager.batchCalls(e)):l.noop;return p.updateResult(),t},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),m.useEffect(()=>{p.setOptions(c)},[c,p]),c?.suspense&&f.isPending)throw g(c,p,o);if((({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||(0,l.shouldThrowError)(s,[e.error,r])))({result:f,errorResetBoundary:o,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw f.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!r.environmentManager.isServer()&&f.isLoading&&f.isFetching&&!a){let e=d?g(c,p,o):h?.promise;e?.catch(l.noop).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?f:p.trackResult(f)}(e,c,t)}e.s(["useQuery",()=>x],62885)}]);
|