@shepai/cli 1.169.1 → 1.170.0
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/Feature.yaml +10 -0
- package/apis/json-schema/SkillInjectionConfig.yaml +17 -0
- package/apis/json-schema/SkillSource.yaml +21 -0
- package/apis/json-schema/SkillSourceType.yaml +7 -0
- package/apis/json-schema/WorkflowConfig.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +8 -0
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.d.ts +39 -0
- package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/skill-injector.interface.js +8 -0
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +1 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
- 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 +22 -3
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +2 -0
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/rebase-feature-on-main.use-case.js +23 -2
- 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 +55 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +50 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +5 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +6 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +2 -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 +27 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-skill-injection-config.js +23 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-injected-skills-to-features.js +19 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +8 -4
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts +21 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.prompt.js +61 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts +16 -0
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/conflict-resolution/conflict-resolution.service.js +47 -4
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +39 -20
- package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts +5 -0
- package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-fork.service.js +34 -0
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +8 -0
- package/dist/packages/core/src/infrastructure/services/skill-injector.service.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/skill-injector.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/skill-injector.service.js +201 -0
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +3 -0
- package/dist/src/presentation/web/app/actions/add-injected-skill.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/add-injected-skill.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/add-injected-skill.js +34 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts +2 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/create-feature.js +3 -1
- package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-workflow-defaults.js +1 -0
- package/dist/src/presentation/web/app/actions/remove-injected-skill.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/remove-injected-skill.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/remove-injected-skill.js +35 -0
- package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-feature-node-data.js +2 -0
- package/dist/src/presentation/web/app/skills/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/skills/page.js +6 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +6 -2
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +1 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +10 -4
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +2 -0
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +12 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +4 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.d.ts +10 -0
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.js +56 -0
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.d.ts +16 -0
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/skills/add-skill-dialog.stories.js +66 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.d.ts +8 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.js +42 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.d.ts +16 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/skills/auto-injected-skills-section.stories.js +69 -0
- package/dist/src/presentation/web/components/features/skills/skills-page-client.d.ts +3 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.js +5 -3
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/skills/skills-page-client.stories.js +27 -0
- package/dist/translations/ar/cli.json +2 -0
- package/dist/translations/ar/web.json +15 -11
- package/dist/translations/de/cli.json +2 -0
- package/dist/translations/de/web.json +35 -17
- package/dist/translations/en/cli.json +2 -0
- package/dist/translations/en/web.json +4 -0
- package/dist/translations/es/cli.json +2 -0
- package/dist/translations/es/web.json +16 -12
- package/dist/translations/fr/cli.json +2 -0
- package/dist/translations/fr/web.json +16 -12
- package/dist/translations/he/cli.json +2 -0
- package/dist/translations/he/web.json +16 -12
- package/dist/translations/pt/cli.json +2 -0
- package/dist/translations/pt/web.json +16 -12
- package/dist/translations/ru/cli.json +2 -0
- package/dist/translations/ru/web.json +16 -12
- 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 +5 -5
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js +1 -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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js +1 -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/build-manifest.json +3 -3
- 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 +1 -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/build-manifest.json +3 -3
- 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 +1 -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/page/build-manifest.json +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js +1 -1
- 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/features/page/build-manifest.json +3 -3
- package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/features/page.js +1 -1
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/settings/page.js +3 -3
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/skills/page/server-reference-manifest.json +52 -22
- package/web/.next/server/app/skills/page.js +3 -2
- 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/build-manifest.json +3 -3
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js +1 -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/build-manifest.json +3 -3
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js +1 -1
- 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/[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/{_0727935d._.js → 403f9_next_8a33ddee._.js} +2 -2
- package/web/.next/server/chunks/ssr/403f9_next_8a33ddee._.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 +3 -3
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__e88da4ee._.js → [root-of-the-server]__1cd4327c._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +1 -0
- 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]__4fb81977._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +1 -1
- 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]__7dcd0917._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__7ffd3598._.js → [root-of-the-server]__92ffd5ee._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +1 -1
- 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/[root-of-the-server]__ba7f5873._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_02e01240._.js +1 -1
- package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_fe058119._.js → _0d7dd23b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fe058119._.js.map → _0d7dd23b._.js.map} +1 -1
- 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/_18886033._.js +1 -1
- package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js +3 -0
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -0
- 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.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/_6f35fb9a._.js +3 -0
- package/web/.next/server/chunks/ssr/_6f35fb9a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_a8b338ec._.js → _77ae079a._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_a8b338ec._.js.map → _77ae079a._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js +1 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_a963dd3c._.js +3 -0
- package/web/.next/server/chunks/ssr/_a963dd3c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ad09f271._.js +1 -1
- package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js +1 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_9b964adc._.js → _deabc145._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_9b964adc._.js.map → _deabc145._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_df737cce._.js +3 -0
- package/web/.next/server/chunks/ssr/_df737cce._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_e3f14907._.js +9 -0
- package/web/.next/server/chunks/ssr/_e3f14907._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ea9e1556._.js +1 -1
- package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js +2 -2
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/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/node_modules__pnpm_1300ae39._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.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_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 +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- 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 +89 -59
- package/web/.next/static/chunks/06a86173379e6c51.js +1 -0
- package/web/.next/static/chunks/{ff9e33615f5c856c.js → 16ed73f9880b7d63.js} +1 -1
- package/web/.next/static/chunks/185e4f36cb6efb24.js +1 -0
- package/web/.next/static/chunks/2b2f3a70ebd6ac1c.js +1 -0
- package/web/.next/static/chunks/{04c874f52a7cd435.js → 3d1df5c349d855eb.js} +1 -1
- package/web/.next/static/chunks/4559a403ee40dd19.js +7 -0
- package/web/.next/static/chunks/74729cbad964be13.js +1 -0
- package/web/.next/static/chunks/{a052c19c18e9eced.js → 74e5b5c7950efbc1.js} +1 -1
- package/web/.next/static/chunks/{d6c39780c2f75ecd.js → 7a6854bb07182777.js} +1 -1
- package/web/.next/static/chunks/8e12deeabf6624e9.js +1 -0
- package/web/.next/static/chunks/9c6f8f49799efd3a.js +1 -0
- package/web/.next/static/chunks/{c5d89c12a73e0461.js → a3802d6f8677cd04.js} +2 -2
- package/web/.next/static/chunks/b0a6fce5425f8d3a.js +3 -0
- package/web/.next/static/chunks/b14085e99b88e7f7.css +1 -0
- package/web/.next/static/chunks/b65e555419a0c664.js +1 -0
- package/web/.next/static/chunks/{562c70303d910295.js → c5a0b452afc8fe47.js} +1 -1
- package/web/.next/static/chunks/ca23a8642f750548.js +5 -0
- package/web/.next/static/chunks/cc5fe8d1d9e1e519.js +5 -0
- package/web/.next/static/chunks/{021c9b0effb6d688.js → f29814a72404ea2b.js} +1 -1
- package/web/.next/static/chunks/{b0e2fb3d4eb42f3d.js → f51250616da82bd2.js} +1 -1
- package/web/.next/static/chunks/{caf7d7e1b439b29e.js → f9da308b3033c57a.js} +1 -1
- package/web/.next/static/chunks/{turbopack-57bb0674e2cd1d31.js → turbopack-b38a68b1b1c41a87.js} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7ffd3598._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e88da4ee._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0727935d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0dc06d07._.js +0 -3
- package/web/.next/server/chunks/ssr/_0dc06d07._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_682fc996._.js +0 -9
- package/web/.next/server/chunks/ssr/_682fc996._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_6892e3b9._.js +0 -3
- package/web/.next/server/chunks/ssr/_6892e3b9._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a1068852._.js +0 -3
- package/web/.next/server/chunks/ssr/_a1068852._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js.map +0 -1
- package/web/.next/static/chunks/20f7cc98a013b11c.js +0 -1
- package/web/.next/static/chunks/4cec255f2754e5ec.js +0 -1
- package/web/.next/static/chunks/5b7275374d2696b3.css +0 -1
- package/web/.next/static/chunks/647140fe96a7c88a.js +0 -1
- package/web/.next/static/chunks/6d6f70ff5151b8cb.js +0 -7
- package/web/.next/static/chunks/84792d40edc4b027.js +0 -5
- package/web/.next/static/chunks/8800875bb3d56192.js +0 -3
- package/web/.next/static/chunks/8d581adafe8d1dd0.js +0 -1
- package/web/.next/static/chunks/982aef195c118996.js +0 -1
- package/web/.next/static/chunks/a6b5e739d2f89c6b.js +0 -1
- package/web/.next/static/chunks/c3ef3b892f7794ec.js +0 -1
- package/web/.next/static/chunks/dc134f3f58cdf850.js +0 -5
- /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → 0KDwNT3AGQmFGIwjHx99r}/_buildManifest.js +0 -0
- /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → 0KDwNT3AGQmFGIwjHx99r}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{lFiCv3l4nIAIpZmj6eehh → 0KDwNT3AGQmFGIwjHx99r}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
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)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34558,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RedirectStatusCode",{enumerable:!0,get:function(){return o}});var n,o=((n={})[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",n);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},54809,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o={REDIRECT_ERROR_CODE:function(){return l},RedirectType:function(){return a},isRedirectError:function(){return c}};for(var u in o)Object.defineProperty(r,u,{enumerable:!0,get:o[u]});let i=e.r(34558),l="NEXT_REDIRECT";var a=((n={}).push="push",n.replace="replace",n);function c(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,n]=t,o=t.slice(2,-2).join(";"),u=Number(t.at(-2));return r===l&&("replace"===n||"push"===n)&&"string"==typeof o&&!isNaN(u)&&u in i.RedirectStatusCode}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},65064,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return d}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class i{disable(){throw u}getStore(){}run(){throw u}exit(){throw u}enterWith(){throw u}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return l?new l:new i}function c(e){return l?l.bind(e):i.bind(e)}function d(){return l?l.snapshot():function(e,...t){return e(...t)}}},82157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ACTION_HEADER:function(){return i},FLIGHT_HEADERS:function(){return p},NEXT_ACTION_NOT_FOUND_HEADER:function(){return j},NEXT_ACTION_REVALIDATED_HEADER:function(){return T},NEXT_DID_POSTPONE_HEADER:function(){return R},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return f},NEXT_HMR_REFRESH_HEADER:function(){return d},NEXT_HTML_REQUEST_ID_HEADER:function(){return v},NEXT_IS_PRERENDER_HEADER:function(){return g},NEXT_REQUEST_ID_HEADER:function(){return h},NEXT_REWRITTEN_PATH_HEADER:function(){return b},NEXT_REWRITTEN_QUERY_HEADER:function(){return O},NEXT_ROUTER_PREFETCH_HEADER:function(){return a},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return c},NEXT_ROUTER_STALE_TIME_HEADER:function(){return y},NEXT_ROUTER_STATE_TREE_HEADER:function(){return l},NEXT_RSC_UNION_QUERY:function(){return E},NEXT_URL:function(){return s},RSC_CONTENT_TYPE_HEADER:function(){return _},RSC_HEADER:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u="rsc",i="next-action",l="next-router-state-tree",a="next-router-prefetch",c="next-router-segment-prefetch",d="next-hmr-refresh",f="__next_hmr_refresh_hash__",s="next-url",_="text/x-component",p=[u,l,a,d,c],E="_rsc",y="x-nextjs-stale-time",R="x-nextjs-postponed",b="x-nextjs-rewritten-path",O="x-nextjs-rewritten-query",g="x-nextjs-prerender",j="x-nextjs-action-not-found",h="x-nextjs-request-id",v="x-nextjs-html-request-id",T="x-action-revalidated";("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},5161,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DEFAULT_SEGMENT_KEY:function(){return f},NOT_FOUND_SEGMENT_KEY:function(){return s},PAGE_SEGMENT_KEY:function(){return d},addSearchParamsIfPageSegment:function(){return a},computeSelectedLayoutSegment:function(){return c},getSegmentValue:function(){return u},getSelectedLayoutSegmentPath:function(){return function e(t,r,n=!0,o=[]){let i;if(n)i=t[1][r];else{let e=t[1];i=e.children??Object.values(e)[0]}if(!i)return o;let l=u(i[0]);return!l||l.startsWith(d)?o:(o.push(l),e(i,r,!1,o))}},isGroupSegment:function(){return i},isParallelRouteSegment:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function u(e){return Array.isArray(e)?e[1]:e}function i(e){return"("===e[0]&&e.endsWith(")")}function l(e){return e.startsWith("@")&&"@children"!==e}function a(e,t){if(e.includes(d)){let e=JSON.stringify(t);return"{}"!==e?d+"?"+e:d}return e}function c(e,t){if(!e||0===e.length)return null;let r="children"===t?e[0]:e[e.length-1];return r===f?null:r}let d="__PAGE__",f="__DEFAULT__",s="/_not-found"},50389,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={UnrecognizedActionError:function(){return u},unstable_isUnrecognizedActionError:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});class u extends Error{constructor(...e){super(...e),this.name="UnrecognizedActionError"}}function i(e){return!!(e&&"object"==typeof e&&e instanceof u)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89637,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(65064).createAsyncLocalStorage)()},54293,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorageInstance}});let n=e.r(89637)},25133,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getRedirectError:function(){return a},getRedirectStatusCodeFromError:function(){return _},getRedirectTypeFromError:function(){return s},getURLFromRedirectError:function(){return f},permanentRedirect:function(){return d},redirect:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(34558),i=e.r(54809),l="u"<typeof window?e.r(54293).actionAsyncStorage:void 0;function a(e,t,r=u.RedirectStatusCode.TemporaryRedirect){let n=Object.defineProperty(Error(i.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n.digest=`${i.REDIRECT_ERROR_CODE};${t};${e};${r};`,n}function c(e,t){throw a(e,t??=l?.getStore()?.isAction?i.RedirectType.push:i.RedirectType.replace,u.RedirectStatusCode.TemporaryRedirect)}function d(e,t=i.RedirectType.replace){throw a(e,t,u.RedirectStatusCode.PermanentRedirect)}function f(e){return(0,i.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function s(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function _(e){if(!(0,i.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18152,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={AppRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return a},LayoutRouterContext:function(){return l},MissingSlotContext:function(){return d},TemplateContext:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(81258)._(e.r(79054)),i=u.default.createContext(null),l=u.default.createContext(null),a=u.default.createContext(null),c=u.default.createContext(null),d=u.default.createContext(new Set)},22193,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getDeploymentId:function(){return u},getDeploymentIdQueryOrEmptyString:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function u(){return!1}function i(){return""}},9338,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useUntrackedPathname",{enumerable:!0,get:function(){return u}});let n=e.r(79054),o=e.r(14869);function u(){return!function(){if("u"<typeof window){let{workUnitAsyncStorage:t}=e.r(3163),r=t.getStore();if(!r)return!1;switch(r.type){case"prerender":case"prerender-client":case"prerender-ppr":let n=r.fallbackRouteParams;return!!n&&n.size>0}}return!1}()?(0,n.useContext)(o.PathnameContext):null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},62949,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={handleHardNavError:function(){return i},useNavFailureHandler:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});e.r(79054);let u=e.r(32801);function i(e){return!!(e&&"u">typeof window)&&!!window.next.__pendingUrl&&(0,u.createHrefFromUrl)(new URL(window.location.href))!==(0,u.createHrefFromUrl)(window.next.__pendingUrl)&&(console.error("Error occurred during navigation, falling back to hard navigation",e),window.location.href=window.next.__pendingUrl.toString(),!0)}function l(){}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},86762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HandleISRError",{enumerable:!0,get:function(){return o}});let n="u"<typeof window?e.r(58988).workAsyncStorage:void 0;function o({error:e}){if(n){let t=n.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}return null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},57351,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ErrorBoundary:function(){return p},ErrorBoundaryHandler:function(){return _}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(81258),i=e.r(20314),l=u._(e.r(79054)),a=e.r(9338),c=e.r(86092);e.r(62949);let d=e.r(86762),f=e.r(41608),s="u">typeof window&&(0,f.isBot)(window.navigator.userAgent);class _ extends l.default.Component{constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,c.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error&&!s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.HandleISRError,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,i.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}}function p({errorComponent:e,errorStyles:t,errorScripts:r,children:n}){let o=(0,a.useUntrackedPathname)();return e?(0,i.jsx)(_,{pathname:o,errorComponent:e,errorStyles:t,errorScripts:r,children:n}):(0,i.jsx)(i.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},10706,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RedirectBoundary:function(){return _},RedirectErrorBoundary:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(44066),i=e.r(20314),l=u._(e.r(79054)),a=e.r(67013),c=e.r(25133),d=e.r(54809);function f({redirect:e,reset:t,redirectType:r}){let n=(0,a.useRouter)();return(0,l.useEffect)(()=>{l.default.startTransition(()=>{r===d.RedirectType.push?n.push(e,{}):n.replace(e,{}),t()})},[e,r,t,n]),null}class s extends l.default.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if((0,d.isRedirectError)(e)){let t=(0,c.getURLFromRedirectError)(e),r=(0,c.getRedirectTypeFromError)(e);return"handled"in e?{redirect:null,redirectType:null}:{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,i.jsx)(f,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}}function _({children:e}){let t=(0,a.useRouter)();return(0,i.jsx)(s,{router:t,children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},99271,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66658,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={MetadataBoundary:function(){return l},OutletBoundary:function(){return c},RootLayoutBoundary:function(){return d},ViewportBoundary:function(){return a}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(42771),i={[u.METADATA_BOUNDARY_NAME]:function({children:e}){return e},[u.VIEWPORT_BOUNDARY_NAME]:function({children:e}){return e},[u.OUTLET_BOUNDARY_NAME]:function({children:e}){return e},[u.ROOT_LAYOUT_BOUNDARY_NAME]:function({children:e}){return e}},l=i[u.METADATA_BOUNDARY_NAME.slice(0)],a=i[u.VIEWPORT_BOUNDARY_NAME.slice(0)],c=i[u.OUTLET_BOUNDARY_NAME.slice(0)],d=i[u.ROOT_LAYOUT_BOUNDARY_NAME.slice(0)]},84210,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(79054)).default.createContext({})},42726,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(20314),o=e.r(86762),u={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},i={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},l=function({error:e}){let t=e?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:e}),(0,n.jsx)("div",{style:u,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:i,children:["Application error: a ",t?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",t?"server logs":"browser console"," for more information)."]}),t?(0,n.jsx)("p",{style:i,children:`Digest: ${t}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|
|
@@ -1 +1 @@
|
|
|
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)("40aa2fb119cfa13ca24df952c93abb49b432e01c14",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),[e4,e5]=(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??e4},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:e4,onChange:e=>{e5(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
|
+
(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 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83843,e=>{"use strict";let a=(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",()=>a],83843)},36479,e=>{"use strict";var a=e.i(20314),t=e.i(79054),s=e.i(31406),r=e.i(60112),o=e.i(21023);let n=(0,o.createServerReference)("4043573be56a5cfef076b71572231bc0b9bf20aa30",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("40c68f6151ae9d3c816a673f36cfc07c3eb4b6d4a4",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(23925),i=e.i(97667),d=e.i(83843),p=e.i(49228),h=e.i(83428);e.i(1650);var u=e.i(11495),m=e.i(45811),x=e.i(35364),f=e.i(98127),b=e.i(41957),v=e.i(66459),g=e.i(31777);let j=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));j.displayName="Command";let w=t.forwardRef(({className:e,...t},s)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(v.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:s,className:(0,g.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));w.displayName="CommandInput";let N=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));N.displayName="CommandList";let y=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));y.displayName="CommandEmpty";let C=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-foreground overflow-hidden p-1",e),...t}));C.displayName="CommandGroup";let S=t.forwardRef(({className:e,selected:t,...s},r)=>(0,a.jsx)("button",{ref:r,type:"button","data-selected":t,className:(0,g.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));S.displayName="CommandItem",t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-border -mx-1 h-px",e),...t})).displayName="CommandSeparator";var k=e.i(90382);function R({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:v,onRepositoryChange:R,branches:L=[],branchesLoading:B=!1}){let[P,E]=(0,t.useState)(""),[D,T]=(0,t.useState)(!1),[U,A]=(0,t.useState)(""),I=(0,t.useRef)(null),[O,F]=(0,t.useState)(!1),[G,K]=(0,t.useState)(""),M=(0,t.useRef)(null),$=l.find(e=>e.path===v),z=!!v;(0,t.useEffect)(()=>{e||(E(""),A(""),T(!1),F(!1),K(""))},[e]),(0,t.useEffect)(()=>{E(""),A("")},[v]);let W=(0,t.useCallback)(e=>{e.preventDefault();let a=P.trim();a&&v&&!o&&r(a,v)},[P,v,o,r]),q=(0,t.useCallback)(()=>{E(""),A(""),s()},[s]),H=(0,t.useCallback)(e=>{E(e),A(e),T(!1)},[]),J=(0,t.useCallback)(e=>{A(e.target.value),D||T(!0)},[D]),Q=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=U.trim();a&&(E(a),T(!1))}"Escape"===e.key&&(T(!1),A(P))},[U,P]),V=(0,t.useCallback)(e=>{R?.(e),F(!1),K("")},[R]),X=L.filter(e=>e.toLowerCase().includes(U.toLowerCase())),Y=G.trim()?l.filter(e=>e.name.toLowerCase().includes(G.toLowerCase())||e.path.toLowerCase().includes(G.toLowerCase())):l;(0,t.useEffect)(()=>{O?setTimeout(()=>M.current?.focus(),0):K("")},[O]);let Z=!P.trim()||!v||o,_=(0,a.jsxs)("div",{children:[(0,a.jsxs)(m.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(p.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(m.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:q,size:"sm",modal:!1,header:_,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:W,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(k.Popover,{open:O,onOpenChange:F,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":O,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,g.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",!$&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:$?$.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:M,placeholder:"Search repositories...",value:G,onChange:e=>K(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===Y.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):Y.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":v===e.path,onClick:()=>V(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",v===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",v!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(k.Popover,{open:D,onOpenChange:T,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":D,disabled:o||!z,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:z?B?"Loading branches...":P||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(j,{children:[(0,a.jsx)(w,{ref:I,placeholder:"Search branches...",value:U,onChange:J,onKeyDown:Q,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(N,{children:[!B&&0===X.length&&(0,a.jsx)(y,{children:0===L.length?"No branches found.":U?"No match — press Enter to use this value.":"No branches available."}),B?(0,a.jsx)(y,{children:(0,a.jsx)(h.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,X.length>0&&(0,a.jsx)(C,{children:X.map(e=>(0,a.jsxs)(S,{selected:e===P,onClick:()=>H(e),children:[(0,a.jsx)(c.Check,{className:(0,g.cn)("me-2 h-4 w-4",e===P?"opacity-100":"opacity-0")}),(0,a.jsx)(p.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:z?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:q,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:Z,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function L({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,p]=(0,t.useState)(!1),[h,u]=(0,t.useState)(),[m,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&p(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let N=(0,t.useCallback)(()=>{c.push("/")},[c]),y=(0,t.useCallback)(e=>{g(e)},[]),C=(0,t.useCallback)((e,a)=>{u(void 0),p(!0),c.push("/"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),p(!1)})},[c]);return(0,a.jsx)(R,{open:w,onClose:N,onSubmit:C,isSubmitting:d,error:h,repositories:o,selectedRepositoryPath:v,onRepositoryChange:y,branches:m,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>L],36479)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83843,e=>{"use strict";let a=(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",()=>a],83843)},36479,e=>{"use strict";var a=e.i(20314),t=e.i(79054),s=e.i(31406),r=e.i(60112),o=e.i(21023);let n=(0,o.createServerReference)("404d622eb7547a026439b80e56c7b1fc60bbea99e7",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("409fa5874f2834de54a3d19a7fdb721076ed0ec6e9",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(23925),i=e.i(97667),d=e.i(83843),p=e.i(49228),h=e.i(83428);e.i(1650);var u=e.i(11495),m=e.i(45811),x=e.i(35364),f=e.i(98127),b=e.i(41957),v=e.i(66459),g=e.i(31777);let j=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));j.displayName="Command";let w=t.forwardRef(({className:e,...t},s)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(v.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:s,className:(0,g.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));w.displayName="CommandInput";let N=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));N.displayName="CommandList";let y=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));y.displayName="CommandEmpty";let C=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("text-foreground overflow-hidden p-1",e),...t}));C.displayName="CommandGroup";let S=t.forwardRef(({className:e,selected:t,...s},r)=>(0,a.jsx)("button",{ref:r,type:"button","data-selected":t,className:(0,g.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));S.displayName="CommandItem",t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,g.cn)("bg-border -mx-1 h-px",e),...t})).displayName="CommandSeparator";var k=e.i(90382);function R({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:v,onRepositoryChange:R,branches:L=[],branchesLoading:B=!1}){let[P,E]=(0,t.useState)(""),[D,T]=(0,t.useState)(!1),[U,A]=(0,t.useState)(""),I=(0,t.useRef)(null),[O,F]=(0,t.useState)(!1),[G,K]=(0,t.useState)(""),M=(0,t.useRef)(null),$=l.find(e=>e.path===v),z=!!v;(0,t.useEffect)(()=>{e||(E(""),A(""),T(!1),F(!1),K(""))},[e]),(0,t.useEffect)(()=>{E(""),A("")},[v]);let W=(0,t.useCallback)(e=>{e.preventDefault();let a=P.trim();a&&v&&!o&&r(a,v)},[P,v,o,r]),q=(0,t.useCallback)(()=>{E(""),A(""),s()},[s]),H=(0,t.useCallback)(e=>{E(e),A(e),T(!1)},[]),J=(0,t.useCallback)(e=>{A(e.target.value),D||T(!0)},[D]),Q=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=U.trim();a&&(E(a),T(!1))}"Escape"===e.key&&(T(!1),A(P))},[U,P]),V=(0,t.useCallback)(e=>{R?.(e),F(!1),K("")},[R]),X=L.filter(e=>e.toLowerCase().includes(U.toLowerCase())),Y=G.trim()?l.filter(e=>e.name.toLowerCase().includes(G.toLowerCase())||e.path.toLowerCase().includes(G.toLowerCase())):l;(0,t.useEffect)(()=>{O?setTimeout(()=>M.current?.focus(),0):K("")},[O]);let Z=!P.trim()||!v||o,_=(0,a.jsxs)("div",{children:[(0,a.jsxs)(m.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(p.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(m.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:q,size:"sm",modal:!1,header:_,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:W,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(k.Popover,{open:O,onOpenChange:F,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":O,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,g.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",!$&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:$?$.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:M,placeholder:"Search repositories...",value:G,onChange:e=>K(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===Y.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):Y.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":v===e.path,onClick:()=>V(e.path),className:(0,g.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",v===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,g.cn)("h-4 w-4 shrink-0",v!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(k.Popover,{open:D,onOpenChange:T,children:[(0,a.jsx)(k.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":D,disabled:o||!z,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:z?B?"Loading branches...":P||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(k.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(j,{children:[(0,a.jsx)(w,{ref:I,placeholder:"Search branches...",value:U,onChange:J,onKeyDown:Q,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(N,{children:[!B&&0===X.length&&(0,a.jsx)(y,{children:0===L.length?"No branches found.":U?"No match — press Enter to use this value.":"No branches available."}),B?(0,a.jsx)(y,{children:(0,a.jsx)(h.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,X.length>0&&(0,a.jsx)(C,{children:X.map(e=>(0,a.jsxs)(S,{selected:e===P,onClick:()=>H(e),children:[(0,a.jsx)(c.Check,{className:(0,g.cn)("me-2 h-4 w-4",e===P?"opacity-100":"opacity-0")}),(0,a.jsx)(p.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:z?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:q,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:Z,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function L({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,p]=(0,t.useState)(!1),[h,u]=(0,t.useState)(),[m,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&p(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let N=(0,t.useCallback)(()=>{c.push("/")},[c]),y=(0,t.useCallback)(e=>{g(e)},[]),C=(0,t.useCallback)((e,a)=>{u(void 0),p(!0),c.push("/"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),p(!1)})},[c]);return(0,a.jsx)(R,{open:w,onClose:N,onSubmit:C,isSubmitting:d,error:h,repositories:o,selectedRepositoryPath:v,onRepositoryChange:y,branches:m,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>L],36479)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30702,e=>{"use strict";let s=(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",()=>s],30702)},38573,e=>{"use strict";let s=(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",()=>s],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},956,e=>{"use strict";var s=e.i(20314),l=e.i(79054),a=e.i(31777);let t=l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("bg-card text-card-foreground rounded-xl border shadow",e),...l}));t.displayName="Card";let r=l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",e),...l}));r.displayName="CardHeader";let i=l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("leading-none font-semibold tracking-tight",e),...l}));i.displayName="CardTitle";let n=l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("text-muted-foreground text-sm",e),...l}));n.displayName="CardDescription";let o=l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",e),...l}));o.displayName="CardContent",l.forwardRef(({className:e,...l},t)=>(0,s.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",e),...l})).displayName="CardFooter",e.s(["Card",()=>t,"CardContent",()=>o,"CardDescription",()=>n,"CardHeader",()=>r,"CardTitle",()=>i])},9443,85871,e=>{"use strict";var s=e.i(20314),l=e.i(31777);function a({title:e,description:a,children:t,className:r}){return(0,s.jsxs)("header",{className:(0,l.cn)("flex items-center justify-between gap-4",r),children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),a?(0,s.jsx)("p",{className:"text-muted-foreground",children:a}):null]}),t?(0,s.jsx)("div",{"data-slot":"actions",children:t}):null]})}e.s(["PageHeader",()=>a],85871),e.s([],9443)},54793,7729,e=>{"use strict";var s=e.i(20314),l=e.i(31777);function a({icon:e,title:a,description:t,action:r,className:i,...n}){return(0,s.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...n,children:[e?(0,s.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,s.jsx)("h3",{className:"text-lg font-semibold",children:a}),t?(0,s.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:t}):null,r?(0,s.jsx)("div",{className:"mt-2",children:r}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},38752,e=>{"use strict";var s=e.i(20314);e.i(1650);var l=e.i(11495),a=e.i(45811),t=e.i(81846),r=e.i(25235),i=e.i(19933);function n({skill:e,onClose:n}){return(0,s.jsx)(l.BaseDrawer,{open:null!==e,onClose:n,size:"sm",modal:!0,"data-testid":"skill-detail-drawer",header:e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.DrawerTitle,{children:e.displayName}),(0,s.jsx)(a.DrawerDescription,{children:e.name})]}):void 0,children:e?(0,s.jsxs)("div",{className:"px-4 pb-4",children:[(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)(t.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),(0,s.jsx)(t.Badge,{variant:"outline",children:e.category}),e.context?(0,s.jsx)(t.Badge,{variant:"outline",children:e.context}):null]}),e.allowedTools?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Separator,{className:"my-4"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:"Allowed Tools"}),(0,s.jsx)("p",{className:"text-muted-foreground mt-1 text-sm",children:e.allowedTools})]})]}):null,e.resources.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Separator,{className:"my-4"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:"Resources"}),(0,s.jsx)("ul",{className:"mt-2 space-y-1.5",children:e.resources.map(e=>(0,s.jsxs)("li",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[(0,s.jsx)(i.FolderOpen,{className:"size-3.5 shrink-0"}),(0,s.jsxs)("span",{children:[e.name,"/ — ",e.fileCount," ",1===e.fileCount?"file":"files"]})]},e.name))})]})]}):null,e.body?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Separator,{className:"my-4"}),(0,s.jsx)("pre",{className:"text-muted-foreground text-sm leading-relaxed whitespace-pre-wrap",children:e.body})]}):null]}):null})}e.s(["SkillDetailDrawer",()=>n])},16919,e=>{"use strict";var s=e.i(20314),l=e.i(79054),a=e.i(66459),t=e.i(12103),r=e.i(98127),i=e.i(35364);e.i(9443);var n=e.i(85871);e.i(54793);var o=e.i(7729),d=e.i(956),c=e.i(81846),m=e.i(19933);function x({skill:e,onSelect:l}){return(0,s.jsxs)(d.Card,{className:"hover:border-primary/50 cursor-pointer transition-colors",role:"button",tabIndex:0,onClick:()=>l(e),onKeyDown:s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),l(e))},"data-testid":`skill-card-${e.name}`,children:[(0,s.jsxs)(d.CardHeader,{className:"pb-3",children:[(0,s.jsx)(d.CardTitle,{className:"text-base",children:e.displayName}),(0,s.jsx)("p",{className:"text-muted-foreground font-mono text-xs",children:e.name})]}),(0,s.jsxs)(d.CardContent,{className:"space-y-3",children:[(0,s.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-sm",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)(c.Badge,{variant:"project"===e.source?"secondary":"outline",children:"project"===e.source?"Project":"Global"}),e.context?(0,s.jsx)(c.Badge,{variant:"outline",children:e.context}):null,e.allowedTools?(0,s.jsx)(c.Badge,{variant:"outline",children:"Tools"}):null,e.resources.length>0?(0,s.jsxs)("span",{className:"text-muted-foreground inline-flex items-center gap-1 text-xs",children:[(0,s.jsx)(m.FolderOpen,{className:"size-3"}),e.resources.length," ",1===e.resources.length?"resource":"resources"]}):null]})]})]})}let u=["Workflow","Code Generation","Analysis","Reference"];function h({skills:e,onSkillSelect:l}){let a=function(e){let s=new Map;for(let l of e){let e=s.get(l.category)??[];e.push(l),s.set(l.category,e)}return s}(e);return(0,s.jsx)("div",{className:"space-y-8",children:u.map(e=>{let t=a.get(e);return t&&0!==t.length?(0,s.jsxs)("section",{children:[(0,s.jsxs)("h2",{className:"mb-4 text-lg font-semibold",children:[e," ",(0,s.jsxs)("span",{className:"text-muted-foreground text-sm font-normal",children:["(",t.length,")"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:t.map(e=>(0,s.jsx)(x,{skill:e,onSelect:l},e.name))})]},e):null})})}let p=[{label:"All",value:null},{label:"Workflow",value:"Workflow"},{label:"Code Generation",value:"Code Generation"},{label:"Analysis",value:"Analysis"},{label:"Reference",value:"Reference"}];function f({activeCategory:e,onCategoryChange:l,counts:a}){return(0,s.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Filter by category",children:p.map(({label:t,value:r})=>(0,s.jsxs)(i.Button,{variant:e===r?"default":"outline",size:"sm",onClick:()=>l(r),children:[t,a&&r?(0,s.jsxs)("span",{className:"ms-1 text-xs opacity-70",children:["(",a[r],")"]}):null]},t))})}var j=e.i(38752),g=e.i(25235),v=e.i(31406),N=e.i(3214),k=e.i(60253),y=e.i(60112),C=e.i(21023);let b=(0,C.createServerReference)("4019659dce48925cbfcf313dbb3aaee6e2c3971a40",C.callServer,void 0,C.findSourceMapURL,"removeInjectedSkill");var w=e.i(2287),S=e.i(41957),R=e.i(68304);let T=(0,C.createServerReference)("406d4061f6398e61df3994a73c87ee6043f35e4269",C.callServer,void 0,C.findSourceMapURL,"addInjectedSkill");function A({open:e,onOpenChange:a,onAdded:t,discoveredSkills:n,existingSkillNames:o}){let[d,c]=(0,l.useState)(!1),[m,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[p,f]=(0,l.useState)(""),j=n.filter(e=>!o.includes(e.name)),g=async e=>{c(!0);let s=await T({name:e.name,type:"local",source:`.claude/skills/${e.name}`});(c(!1),s.success)?(y.toast.success(`Added "${e.name}" to feature skills`),t()):y.toast.error(s.error??"Failed to add skill")},v=async()=>{if(!m.trim()||!u.trim())return void y.toast.error("Name and source are required");c(!0);let e=await T({name:m.trim(),type:"remote",source:u.trim(),...p.trim()&&{remoteSkillName:p.trim()}});(c(!1),e.success)?(y.toast.success(`Added "${m.trim()}" to feature skills`),x(""),h(""),f(""),t()):y.toast.error(e.error??"Failed to add skill")};return(0,s.jsx)(w.Dialog,{open:e,onOpenChange:a,children:(0,s.jsxs)(w.DialogContent,{className:"sm:max-w-md","data-testid":"add-skill-dialog",children:[(0,s.jsx)(w.DialogHeader,{children:(0,s.jsx)(w.DialogTitle,{children:"Add Skill to Features"})}),(0,s.jsxs)(R.Tabs,{defaultValue:"local",children:[(0,s.jsxs)(R.TabsList,{className:"w-full",children:[(0,s.jsx)(R.TabsTrigger,{value:"local",className:"flex-1",children:"Local"}),(0,s.jsx)(R.TabsTrigger,{value:"remote",className:"flex-1",children:"Remote"})]}),(0,s.jsx)(R.TabsContent,{value:"local",className:"mt-4",children:0===j.length?(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"All discovered skills are already configured."}):(0,s.jsx)("div",{className:"flex max-h-60 flex-col gap-2 overflow-y-auto",children:j.map(e=>(0,s.jsxs)("button",{type:"button",className:"hover:bg-accent flex flex-col gap-0.5 rounded-md border p-3 text-left transition-colors",onClick:()=>g(e),disabled:d,"data-testid":`add-local-skill-${e.name}`,children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:e.displayName}),(0,s.jsx)("span",{className:"text-muted-foreground line-clamp-1 text-xs",children:e.description})]},e.name))})}),(0,s.jsx)(R.TabsContent,{value:"remote",className:"mt-4",children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)(S.Label,{htmlFor:"remote-name",children:"Name"}),(0,s.jsx)(r.Input,{id:"remote-name",placeholder:"e.g. remotion-best-practices",value:m,onChange:e=>x(e.target.value),"data-testid":"remote-skill-name"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)(S.Label,{htmlFor:"remote-source",children:"Source (npm package or URL)"}),(0,s.jsx)(r.Input,{id:"remote-source",placeholder:"e.g. @anthropic/remotion-skills",value:u,onChange:e=>h(e.target.value),"data-testid":"remote-skill-source"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)(S.Label,{htmlFor:"remote-skill-name",children:"Skill Name (optional)"}),(0,s.jsx)(r.Input,{id:"remote-skill-name",placeholder:"e.g. remotion-best-practices",value:p,onChange:e=>f(e.target.value),"data-testid":"remote-skill-skill-name"})]}),(0,s.jsx)(w.DialogFooter,{children:(0,s.jsx)(i.Button,{onClick:v,disabled:d||!m.trim()||!u.trim(),"data-testid":"add-remote-skill-submit",children:"Add Remote Skill"})})]})})]})]})})}function D({config:e,discoveredSkills:a}){let t=(0,v.useRouter)(),[r,n]=(0,l.useState)(!1),[o,d]=(0,l.useState)(null),c=(0,l.useMemo)(()=>{let e=new Map;for(let s of a)e.set(s.name,s.description);return e},[a]),m=async e=>{d(e);let s=await b(e);(d(null),s.success)?(y.toast.success(`Removed "${e}" from feature skills`),t.refresh()):y.toast.error(s.error??"Failed to remove skill")};return(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"Feature Skills"}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"Curated skills included in new feature worktrees to guide the agent"})]}),e.skills.length>0?(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:e.skills.map(e=>(0,s.jsx)(F,{skill:e,description:c.get(e.name),onRemove:()=>m(e.name),isRemoving:o===e.name},e.name))}):(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"No skills configured. Add skills to guide the agent when working on new features."}),(0,s.jsx)("div",{children:(0,s.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>n(!0),"data-testid":"add-injected-skill-button",children:[(0,s.jsx)(N.Plus,{className:"mr-1.5 size-4"}),"Add Skill"]})}),(0,s.jsx)(A,{open:r,onOpenChange:n,onAdded:()=>{n(!1),t.refresh()},discoveredSkills:a,existingSkillNames:e.skills.map(e=>e.name)})]})}function F({skill:e,description:l,onRemove:a,isRemoving:t}){return(0,s.jsxs)(d.Card,{"data-testid":`injected-skill-${e.name}`,children:[(0,s.jsxs)(d.CardHeader,{className:"flex flex-row items-start justify-between gap-2 pb-2",children:[(0,s.jsx)("div",{className:"min-w-0",children:(0,s.jsx)(d.CardTitle,{className:"truncate text-sm",children:e.name})}),(0,s.jsx)(i.Button,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:a,disabled:t,"aria-label":`Remove ${e.name}`,"data-testid":`remove-injected-skill-${e.name}`,children:(0,s.jsx)(k.X,{className:"size-4"})})]}),(0,s.jsxs)(d.CardContent,{className:"space-y-2 pt-0",children:[l?(0,s.jsx)("p",{className:"text-muted-foreground line-clamp-2 text-xs",children:l}):null,(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(c.Badge,{variant:"local"===e.type?"secondary":"outline",className:"text-xs",children:"local"===e.type?"Local":"Remote"}),(0,s.jsx)("span",{className:"text-muted-foreground max-w-37.5 truncate text-xs",children:e.source})]})]})]})}function B({skills:e,injectionConfig:d}){let[c,m]=(0,l.useState)(""),[x,u]=(0,l.useState)(null),[p,v]=(0,l.useState)(null),N=(0,l.useMemo)(()=>(function(e){let s={Workflow:0,"Code Generation":0,Analysis:0,Reference:0};for(let l of e)s[l.category]++;return s})(e),[e]),k=(0,l.useMemo)(()=>{let s=c.toLowerCase();return e.filter(e=>{if(x&&e.category!==x)return!1;if(s){let l=e.name.toLowerCase().includes(s),a=e.description.toLowerCase().includes(s);if(!l&&!a)return!1}return!0})},[e,c,x]);return 0===e.length?(0,s.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,s.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,s.jsx)(D,{config:d,discoveredSkills:e}),(0,s.jsx)(g.Separator,{}),(0,s.jsx)(o.EmptyState,{icon:(0,s.jsx)(t.Puzzle,{className:"size-10"}),title:"No skills found",description:"No Claude Code skills are installed. Add skills to .claude/skills/ to get started."})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-6 p-6",children:[(0,s.jsx)(n.PageHeader,{title:"Skills",description:"Claude Code skills available to this project"}),(0,s.jsx)(D,{config:d,discoveredSkills:e}),(0,s.jsx)(g.Separator,{}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(a.Search,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),(0,s.jsx)(r.Input,{placeholder:"Search skills...",value:c,onChange:e=>m(e.target.value),className:"ps-9"})]}),(0,s.jsx)(f,{activeCategory:x,onCategoryChange:u,counts:N}),k.length>0?(0,s.jsx)(h,{skills:k,onSkillSelect:v}):(0,s.jsx)(o.EmptyState,{icon:(0,s.jsx)(a.Search,{className:"size-10"}),title:"No matching skills",description:"No skills match your current search and filter criteria.",action:(0,s.jsx)(i.Button,{variant:"outline",onClick:()=>{m(""),u(null)},children:"Clear filters"})}),(0,s.jsx)(j.SkillDetailDrawer,{skill:p,onClose:()=>v(null)})]})}e.s(["SkillsPageClient",()=>B],16919)}]);
|