@shipit-ai/cli 1.170.0 → 1.171.0-pr14.f3119d9
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/ClaudeCodeProxyConfig.yaml +20 -0
- package/apis/json-schema/CodexCliProxyConfig.yaml +8 -0
- package/apis/json-schema/GeminiCliProxyConfig.yaml +8 -0
- package/apis/json-schema/LiteLLMProxyConfig.yaml +10 -1
- package/apis/json-schema/LiteLLMProxyRoutingMode.yaml +8 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +61 -1
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +6 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +7 -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 +63 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-litellm-proxy-agent-config.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-litellm-proxy-agent-config.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/055-add-litellm-proxy-agent-config.js +32 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-litellm-proxy-multi-agent.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-litellm-proxy-multi-agent.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-litellm-proxy-multi-agent.js +20 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +40 -5
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-provider.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/agent-executor-provider.service.js +15 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +4 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +53 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/codex-cli-executor.service.js +20 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/gemini-cli-executor.service.js +23 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +13 -0
- package/dist/src/presentation/web/components/features/plugins/plugins-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/plugins/plugins-page-client.js +11 -2
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -1
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.d.ts +6 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.js +141 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.stories.d.ts +23 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-routing-section.stories.js +138 -0
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.js +5 -8
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +2 -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 +6 -2
- package/dist/src/presentation/web/components/features/tools/tools-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/tools/tools-page-client.js +23 -4
- package/dist/translations/ar/web.json +23 -1
- package/dist/translations/de/web.json +23 -1
- package/dist/translations/en/web.json +23 -1
- package/dist/translations/es/web.json +23 -1
- package/dist/translations/fr/web.json +23 -1
- package/dist/translations/he/web.json +23 -1
- package/dist/translations/pt/web.json +23 -1
- package/dist/translations/ru/web.json +23 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +3 -3
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/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/plugins/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/plugins/page.js.nft.json +1 -1
- package/web/.next/server/app/plugins/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +12 -12
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js +1 -1
- package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_04j9155.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~v1~b9._.js → [root-of-the-server]__0dec29w._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__0~v1~b9._.js.map → [root-of-the-server]__0dec29w._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
- package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_083k45~._.js +1 -1
- package/web/.next/server/chunks/ssr/_083k45~._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0kaec~c._.js +3 -0
- package/web/.next/server/chunks/ssr/_0kaec~c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0kt18~b._.js → _0o.xc6x._.js} +2 -2
- package/web/.next/server/chunks/ssr/_0o.xc6x._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
- package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0pe4xxp._.js +3 -0
- package/web/.next/server/chunks/ssr/{_0_17.-n._.js.map → _0pe4xxp._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_0.ra89t._.js → _0qzbo16._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0.ra89t._.js.map → _0qzbo16._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0rcx2-c._.js +1 -1
- package/web/.next/server/chunks/ssr/_0rcx2-c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0tcccbb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0u3d8.n._.js +1 -1
- package/web/.next/server/chunks/ssr/_0u3d8.n._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_069ybyi._.js → _0~8-lk4._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_069ybyi._.js.map → _0~8-lk4._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_10joy2y._.js +1 -1
- package/web/.next/server/chunks/ssr/_10joy2y._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_0aji.op._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +55 -55
- package/web/.next/static/chunks/0.s8cxri-_s9l.js +1 -0
- package/web/.next/static/chunks/0.t4xofiq1qbj.js +1 -0
- package/web/.next/static/chunks/{0nkujbu62z1jl.js → 012cnd7koqv6d.js} +1 -1
- package/web/.next/static/chunks/{0xzs6jdtkmbic.js → 0_k-z-d49zhw~.js} +1 -1
- package/web/.next/static/chunks/{0e.8n42~fpeqa.js → 0gw4qzmevvmuc.js} +1 -1
- package/web/.next/static/chunks/0inayq2zzadja.js +1 -0
- package/web/.next/static/chunks/{16jgc8hqxrp.u.js → 0ldmb2eone0~9.js} +1 -1
- package/web/.next/static/chunks/{0dprl~vdhvhk7.js → 0lnabm2~w~t8l.js} +1 -1
- package/web/.next/static/chunks/{0xo.hi4px83w2.js → 0nfd9bvcnbcgl.js} +1 -1
- package/web/.next/static/chunks/{0vq.b40jzhi7r.js → 0oi3upfcl.i9b.js} +3 -3
- package/web/.next/static/chunks/{0lwuepa24tqxy.js → 0pbdwrze43_nm.js} +1 -1
- package/web/.next/static/chunks/{024vi1xxw5ccj.js → 0pcv7b7r_i0kf.js} +1 -1
- package/web/.next/static/chunks/{09lcrhxslt-u8.js → 0qr6ln9~~0i6l.js} +1 -1
- package/web/.next/static/chunks/{0jt5jzg88skg5.js → 0uedn731lt53r.js} +1 -1
- package/web/.next/static/chunks/0ug478hm-8bog.js +5 -0
- package/web/.next/static/chunks/{043zp6fpfaz07.js → 0vt8ws6wr7vt3.js} +3 -3
- package/web/.next/static/chunks/{01zrwm.x3kpdo.js → 0~55~7rclqhnx.js} +1 -1
- package/web/.next/static/chunks/{0rb5cx51f5u8h.js → 10i30120evrx0.js} +1 -1
- package/web/.next/static/chunks/10rtagfoabp3b.js +1 -0
- package/web/.next/static/chunks/{0~4c6tnw7xnnl.js → 14r7f--1t3pub.js} +1 -1
- package/web/.next/server/chunks/ssr/_0_17.-n._.js +0 -3
- package/web/.next/server/chunks/ssr/_0kt18~b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_12uy.45._.js +0 -3
- package/web/.next/server/chunks/ssr/_12uy.45._.js.map +0 -1
- package/web/.next/static/chunks/0aq9-lg.5r.nk.js +0 -5
- package/web/.next/static/chunks/0lz-oq74e_ciu.js +0 -1
- package/web/.next/static/chunks/0tdbctvrma.oi.js +0 -1
- package/web/.next/static/chunks/0wd.i4f822qoa.js +0 -1
- package/web/.next/static/chunks/13q1peb_t9vj8.js +0 -1
- /package/web/.next/static/{kDUolP-Zj2jCRleGJJGX0 → SgvKsxSQLhFmy9g__tHMe}/_buildManifest.js +0 -0
- /package/web/.next/static/{kDUolP-Zj2jCRleGJJGX0 → SgvKsxSQLhFmy9g__tHMe}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{kDUolP-Zj2jCRleGJJGX0 → SgvKsxSQLhFmy9g__tHMe}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15203,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(33109),s=e.i(60112),i=e.i(96976);let o=(0,i.createServerReference)("40a061cd48b7a2c2da3901f690354129cae6a01b8a",i.callServer,void 0,i.findSourceMapURL,"createFeature");e.i(26759);var n=e.i(97164);e.i(1650);var l=e.i(11495),c=e.i(45811),d=e.i(35364),p=e.i(41957),u=e.i(81846),h=e.i(2828),m=e.i(8361),x=e.i(30153);let f=(0,i.createServerReference)("402090a84e8f04b92fdca4f891f4cb32793cb1e1b2",i.callServer,void 0,i.findSourceMapURL,"getViewerPermission");var g=e.i(42076);let b=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),j={allowPrd:!1,allowPlan:!1,allowMerge:!1};var v=e.i(82639),w=e.i(22570),C=e.i(45977),y=e.i(31777),D=e.i(48306),N=e.i(51911);e.i(50032);var T=e.i(86254),k=e.i(9749);function P({description:e,onDescriptionChange:a,attachments:s,onRemoveFile:i,onNotesChange:o,onPaste:l,onDragEnter:c,onDragLeave:d,onDragOver:u,onDrop:m,onAddFiles:x,isDragOver:f,uploadError:g,isPromptFocused:b,onPromptFocus:j,onPromptBlur:S,fast:F,onFastChange:E,pending:R,onPendingChange:L,overrideAgent:M,overrideModel:A,currentAgentType:I,currentModel:O,onAgentModelChange:z,isSubmitting:U}){let{t:B}=(0,n.useTranslation)("web"),_=(0,r.useRef)(null);return(0,t.jsxs)("div",{role:"region","aria-label":B("createDrawer.fileDropZone"),"data-drag-over":f?"true":"false",onDragEnter:c,onDragLeave:d,onDragOver:u,onDrop:m,className:(0,y.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",f&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(p.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:B("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:_,onFocus:j,onBlur:()=>{setTimeout(()=>{let e=_.current?.contains(document.activeElement),t=_.current?.querySelector('[aria-expanded="true"]')!==null;e||t||S()},0)},className:(0,y.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",b&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(D.Textarea,{id:"feature-description",placeholder:B("createDrawer.featurePlaceholder"),value:e,onChange:e=>a(e.target.value),onPaste:l,required:!0,disabled:U,"aria-invalid":!!g,"aria-describedby":g?"feature-upload-error":void 0,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),s.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:s.map(e=>(0,t.jsx)(T.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>i(e.id),disabled:U,loading:e.loading,notes:e.notes,onNotesChange:t=>o(e.id,t)},e.id))}),g?(0,t.jsx)("p",{id:"feature-upload-error",className:"text-destructive px-3 pb-2 text-xs",role:"alert",children:g}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(k.AgentModelPicker,{initialAgentType:M??I??"claude-code",initialModel:A??O??"claude-sonnet-4-6",mode:"override",onAgentModelChange:z,disabled:U,className:"w-55"}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(N.Switch,{id:"pending-mode",checked:R,onCheckedChange:L,disabled:U}),(0,t.jsxs)(p.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(C.Clock,{className:"h-3.5 w-3.5"}),B("createDrawer.pendingMode")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("createDrawer.pendingModeDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(N.Switch,{id:"fast-mode",checked:F,onCheckedChange:E,disabled:U}),(0,t.jsxs)(p.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(w.Zap,{className:"h-3.5 w-3.5"}),B("createDrawer.fastModeLabel")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("createDrawer.fastModeDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:x,disabled:U,"aria-label":B("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(v.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("chat.attachFiles")})]})]})]})]})}var S=e.i(8791),F=e.i(13867),E=e.i(96612),R=e.i(27381),L=e.i(47373);let M=(0,i.createServerReference)("40bed5069aa67bf9f032f528cd3b1601d77d0540a2",i.callServer,void 0,i.findSourceMapURL,"getAgentPermissionOptions"),A=["allowPrd","allowPlan","allowMerge"];function I({approvalGates:e,onApprovalGatesChange:r,enableEvidence:a,onEnableEvidenceChange:s,commitEvidence:i,onCommitEvidenceChange:o,push:l,onPushChange:c,openPr:d,onOpenPrChange:u,ciWatchEnabled:m,onCiWatchChange:x,rebaseBeforeBranch:f,onRebaseBeforeBranchChange:g,commitSpecs:b,onCommitSpecsChange:j,forkAndPr:v,onForkAndPrChange:w,canPush:C,fast:D,computedPush:T,computedOpenPr:k,isSubmitting:P,agentType:R,permissionMode:L,onPermissionModeChange:M}){let{t:z}=(0,n.useTranslation)("web"),U=[{id:"allowPrd",label:z("createDrawer.prd"),description:z("createDrawer.prdDescription")},{id:"allowPlan",label:z("createDrawer.plan"),description:z("createDrawer.planDescription")},{id:"allowMerge",label:z("createDrawer.merge"),description:z("createDrawer.mergeDescription")}];return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:z("createDrawer.approve")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:U.map(a=>(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:`approve-${a.id}`,size:"sm",checked:e[a.id]??!1,onCheckedChange:t=>r({...e,[a.id]:t}),disabled:P||D&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,t.jsx)(p.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:D&&("allowPrd"===a.id||"allowPlan"===a.id)?z("createDrawer.skippedInFastMode"):a.description})]},a.id))}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=A.every(t=>e[t]),a={};for(let e of A)a[e]=!t;r(a)},disabled:P,className:(0,y.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",A.every(t=>e[t])&&"text-primary"),children:z("createDrawer.all")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:z("createDrawer.evidence")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"enable-evidence",size:"sm",checked:a,onCheckedChange:e=>{s(e),e||o(!1)},disabled:P}),(0,t.jsx)(p.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:z("createDrawer.collect")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.collectDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"commit-evidence",size:"sm",checked:i,onCheckedChange:o,disabled:P||!a||!d&&!v}),(0,t.jsx)(p.Label,{htmlFor:"commit-evidence",className:(0,y.cn)("cursor-pointer text-xs font-medium",(!a||!d&&!v)&&"opacity-50"),children:z("createDrawer.addToPr")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:d||v?a?z("createDrawer.addToPrDescription"):z("createDrawer.requiresEvidence"):z("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:z("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"push",size:"sm",checked:T,onCheckedChange:e=>{c(e),!e&&d&&u(!1)},disabled:P||v}),(0,t.jsx)(p.Label,{htmlFor:"push",className:(0,y.cn)("cursor-pointer text-xs font-medium",v&&"opacity-50"),children:z("createDrawer.push")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:v?"Enabled — contributing to upstream":z("createDrawer.pushDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"open-pr",size:"sm",checked:k,onCheckedChange:e=>{u(e),e||o(!1)},disabled:P||v}),(0,t.jsx)(p.Label,{htmlFor:"open-pr",className:(0,y.cn)("cursor-pointer text-xs font-medium",v&&"opacity-50"),children:z("createDrawer.pr")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:v?"Enabled — contributing to upstream":z("createDrawer.prDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"ci-watch",size:"sm",checked:m,onCheckedChange:x,disabled:P}),(0,t.jsx)(p.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:z("createDrawer.watch")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"rebase-before-branch",size:"sm",checked:f,onCheckedChange:g,disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(E.RefreshCw,{className:"h-3 w-3"}),z("createDrawer.sync")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.syncDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"commit-specs",size:"sm",checked:b,onCheckedChange:j,disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(F.FileText,{className:"h-3 w-3"}),z("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.commitSpecsDescription")})]}),!C&&(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"fork-and-pr",size:"sm",checked:v,onCheckedChange:e=>{w(e),e&&j(!1)},disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(S.GitFork,{className:"h-3 w-3"}),z("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.forkAndPrDescription")})]})]})]}),R&&M?(0,t.jsx)(O,{agentType:R,permissionMode:L,onPermissionModeChange:M,isSubmitting:P}):null]})}function O({agentType:e,permissionMode:a,onPermissionModeChange:s,isSubmitting:i}){let{t:o}=(0,n.useTranslation)("web"),[l,c]=(0,r.useState)([]);return((0,r.useEffect)(()=>{let t=!1;return M(e).then(e=>{t||c(e)}),()=>{t=!0}},[e]),0===l.length)?null:(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground flex w-16 shrink-0 cursor-default items-center gap-1 text-xs font-semibold tracking-wider",children:[(0,t.jsx)(R.Shield,{className:"h-3 w-3"}),o("feature.create.permissionMode")]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:o("settings.agent.permissions.description",{agent:e})})]}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)(L.Select,{value:a??"__default__",onValueChange:e=>s("__default__"===e?void 0:e),disabled:i,children:[(0,t.jsx)(L.SelectTrigger,{id:"permission-mode","data-testid":"permission-mode-select",className:"h-7 text-xs",children:(0,t.jsx)(L.SelectValue,{})}),(0,t.jsxs)(L.SelectContent,{children:[(0,t.jsx)(L.SelectItem,{value:"__default__",children:o("feature.create.permissionModeDefault")}),l.map(e=>(0,t.jsx)(L.SelectItem,{value:e.value,children:e.label},e.value))]})]})})]})}var z=e.i(56060),U=e.i(91653),B=e.i(98127),_=e.i(90382);function G({features:e,value:a,onChange:s,disabled:i}){let{t:o}=(0,n.useTranslation)("web"),[l,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(""),u=(0,r.useRef)(null),h=e.find(e=>e.id===a),m=d.trim()?e.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())||e.id.toLowerCase().includes(d.toLowerCase())):e,x=(0,r.useCallback)(e=>{s(e),c(!1),p("")},[s]);return(0,r.useEffect)(()=>{l?setTimeout(()=>u.current?.focus(),0):p("")},[l]),(0,t.jsxs)(_.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(_.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":l,"aria-label":"Parent Feature",disabled:i,"data-testid":"parent-feature-combobox",className:(0,y.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!h&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:h?`${h.name} (${h.id.slice(0,8)})`:o("createDrawer.selectParent")}),(0,t.jsx)(z.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(_.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(B.Input,{ref:u,placeholder:o("createDrawer.searchFeatures"),value:d,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===a,onClick:()=>x(void 0),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===a&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:o("createDrawer.noParent")})]}),0===m.length&&d?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:o("createDrawer.noFeaturesFound")}):m.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>x(e.id),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",a!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}var W=e.i(47930),$=e.i(79561),q=e.i(25235),K=e.i(75921),V=e.i(88329),Z=e.i(78521);e.i(13322);var J=e.i(61201);function H({repositories:e,value:a,onChange:s,onAddRepository:i,disabled:o}){let[l,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[m,x]=(0,r.useState)(null),[f,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),{reactFileManager:j}=(0,K.useFeatureFlags)(),{t:v}=(0,n.useTranslation)("web"),w=e.find(e=>e.path===a),C=d.trim()?e.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())||e.path.toLowerCase().includes(d.toLowerCase())):e,D=(0,r.useCallback)(e=>{s(e),c(!1),p("")},[s]),N=(0,r.useCallback)(async e=>{let t=await (0,V.addRepository)({path:e});if(t.error){x(t.error),h(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};i?.(e),s(e.path),c(!1),p("")}},[i,s]),T=(0,r.useCallback)(async()=>{if(!u){if(j)return void g(!0);h(!0),x(null);try{let e=await (0,Z.pickFolder)();if(!e)return void h(!1);await N(e)}catch{g(!0)}finally{h(!1)}}},[u,j,N]),k=(0,r.useCallback)(async e=>{if(g(!1),e){h(!0),x(null);try{await N(e)}catch(e){x(e instanceof Error?e.message:"Failed to add repository")}finally{h(!1)}}},[N]);return(0,r.useEffect)(()=>{l?setTimeout(()=>b.current?.focus(),0):p("")},[l]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(_.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(_.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":l,"aria-label":"Repository","aria-invalid":!!m,"aria-describedby":m?"add-repository-error-msg":void 0,disabled:o,"data-testid":"repository-combobox",className:(0,y.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",!w&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:w?w.name:"Select repository..."}),(0,t.jsx)(z.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(_.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(B.Input,{ref:b,placeholder:v("createDrawer.searchRepositories"),value:d,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===C.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):C.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.path,onClick:()=>D(e.path),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",a!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(q.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:T,disabled:u,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[u?(0,t.jsx)($.LoaderCircle,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(W.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),m?(0,t.jsx)("p",{id:"add-repository-error-msg",className:"px-3 pb-2 text-xs text-red-500",role:"alert","data-testid":"add-repository-error",children:m}):null]})})]}),(0,t.jsx)(J.ReactFileManagerDialog,{open:f,onOpenChange:e=>{e||g(!1)},onSelect:k})]})}function Q({open:e,onClose:a,onSubmit:s,repositoryPath:i,isSubmitting:o=!1,workflowDefaults:v,features:w,repositories:C,initialParentId:y,currentAgentType:D,currentModel:N,initialDescription:T,canPushDirectly:k}){let{t:S}=(0,n.useTranslation)("web"),F=function({open:e,onClose:t,onSubmit:a,repositoryPath:s,workflowDefaults:i,repositories:o,initialParentId:n,currentAgentType:l,currentModel:c,initialDescription:d,canPushDirectly:p}){let u=(0,m.useSoundAction)("create"),h=s&&(!o||0===o.length||o.some(e=>e.path===s))?s:"",v=i?.approvalGates??j,w=i?.push??!1,C=i?.openPr??!1,y=i?.ciWatchEnabled!==!1,D=i?.enableEvidence??!1,N=i?.commitEvidence??!1,T=i?.fast!==!1,[k,P]=(0,r.useState)(d??"");(0,r.useEffect)(()=>{d&&P(d)},[d]);let[S,F]=(0,r.useState)([]),[E,R]=(0,r.useState)({...v}),[L,M]=(0,r.useState)(w),[A,I]=(0,r.useState)(C),[O,z]=(0,r.useState)(i?.ciWatchEnabled!==!1),[U,B]=(0,r.useState)(D),[_,G]=(0,r.useState)(N),[W,$]=(0,r.useState)(void 0),[q,K]=(0,r.useState)(T),[V,Z]=(0,r.useState)(!1),[J,H]=(0,r.useState)(!1),[Q,X]=(0,r.useState)(!0),[Y,ee]=(0,r.useState)(!0),[et,er]=(0,r.useState)(void 0),[ea,es]=(0,r.useState)(void 0),[ei,eo]=(0,r.useState)(void 0),[en,el]=(0,r.useState)(h||void 0),[ec,ed]=(0,r.useState)(o??[]),[ep,eu]=(0,r.useState)(!1),[eh,em]=(0,r.useState)(null),[ex,ef]=(0,r.useState)(!1),eg=(0,r.useRef)(crypto.randomUUID()),eb=(0,r.useRef)(0);(0,r.useEffect)(()=>{i&&(R({...i.approvalGates}),M(i.push),I(i.openPr),z(!1!==i.ciWatchEnabled),B(i.enableEvidence),G(i.commitEvidence),K(!1!==i.fast))},[i]),(0,r.useEffect)(()=>{ed(o??[])},[o]),(0,r.useEffect)(()=>{e&&n&&$(n)},[e,n]);let[ej,ev]=(0,r.useState)(p??!1);(0,r.useEffect)(()=>{ev(p??!1)},[p]);let ew=(0,r.useRef)(en);(0,r.useEffect)(()=>{en&&en!==ew.current&&(ew.current=en,f(en).then(e=>ev(e.canPushDirectly)).catch(()=>ev(!1)))},[en]),(0,r.useEffect)(()=>{ej&&(H(!1),M(w),I(C),X(!0))},[ej,w,C]);let eC=(0,r.useCallback)(()=>{P(""),F([]),R({...v}),M(w),I(C),z(y),B(D),G(N),$(void 0),el(h||void 0),ed(o??[]),K(T),Z(!1),H(!1),X(!0),ee(!0),er(void 0),es(void 0),eo(void 0),em(null),eb.current=0,eu(!1)},[v,w,C,D,y,N,T,h,o]),ey=""!==k.trim()||S.length>0,{attemptClose:eD}=(0,x.useGuardedDrawerClose)({open:e,isDirty:ey,onClose:t,onReset:eC}),eN=(0,r.useCallback)(async e=>{for(let t of(em(null),e)){if(t.size>0xa00000)return void em(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!b.has(e))return void em(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();F(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eg.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));F(t=>t.filter(t=>t.id!==e)),em(t.error??"Upload failed");return}let s=await a.json();F(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{F(t=>t.filter(t=>t.id!==e)),em("Upload failed")}}},[]),eT=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current+=1,1===eb.current&&eu(!0)},[]),ek=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current-=1,0===eb.current&&eu(!1)},[]),eP=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eS=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current=0,eu(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eN(t)},[eN]),eF=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),eN(r))},[eN]),eE=(0,r.useCallback)(e=>{if(e.preventDefault(),!k.trim())return;let t=en??h;t&&(u.play(),a({description:k.trim(),attachments:S.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:E.allowPrd??!1,allowPlan:E.allowPlan??!1,allowMerge:E.allowMerge??!1},push:!!J||L||A,openPr:!!J||A,ciWatchEnabled:O,enableEvidence:U,commitEvidence:_,fast:q,forkAndPr:J,commitSpecs:Q,rebaseBeforeBranch:Y,...V?{pending:V}:{},...et?{agentType:et}:{},...ea?{model:ea}:{},...ei?{permissionMode:ei}:{},...W?{parentId:W}:{},sessionId:eg.current}),eC())},[k,S,E,en,h,a,L,A,U,O,_,q,J,Q,Y,V,et,ea,ei,W,u,eC]),eR=(0,r.useCallback)(async()=>{try{let e=await (0,g.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();F(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eg.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));F(t=>t.filter(t=>t.id!==e)),em(t.error??"Upload failed");return}let a=await r.json();F(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{F(t=>t.filter(t=>t.id!==e)),em("Upload failed")}}}catch{}},[]),eL=(0,r.useCallback)(e=>{F(t=>t.filter(t=>t.id!==e))},[]),eM=(0,r.useCallback)((e,t)=>{F(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]);return{validRepoPath:h,canPush:ej,isDirty:ey,computedPush:!!J||L||A,computedOpenPr:!!J||A,description:k,setDescription:P,attachments:S,approvalGates:E,setApprovalGates:R,push:L,setPush:M,openPr:A,setOpenPr:I,ciWatchEnabled:O,setCiWatchEnabled:z,enableEvidence:U,setEnableEvidence:B,commitEvidence:_,setCommitEvidence:G,parentId:W,setParentId:$,fast:q,setFast:K,pending:V,setPending:Z,forkAndPr:J,setForkAndPr:H,commitSpecs:Q,setCommitSpecs:X,rebaseBeforeBranch:Y,setRebaseBeforeBranch:ee,overrideAgent:et,setOverrideAgent:er,overrideModel:ea,setOverrideModel:es,permissionMode:ei,setPermissionMode:eo,selectedRepoPath:en,setSelectedRepoPath:el,localRepos:ec,setLocalRepos:ed,isDragOver:ep,uploadError:eh,isPromptFocused:ex,setIsPromptFocused:ef,sessionIdRef:eg,currentAgentType:l,currentModel:c,attemptClose:eD,handleFiles:eN,handleDragEnter:eT,handleDragLeave:ek,handleDragOver:eP,handleDrop:eS,handlePaste:eF,handleSubmit:eE,handleAddFiles:eR,handleRemoveFile:eL,handleNotesChange:eM,resetForm:eC}}({open:e,onClose:a,onSubmit:s,repositoryPath:i,workflowDefaults:v,repositories:C,initialParentId:y,currentAgentType:D,currentModel:N,initialDescription:T,canPushDirectly:k}),E=(0,r.useRef)(null),R=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),E.current?.requestSubmit())},[]),L=w&&w.length>0,M=!F.validRepoPath&&void 0!==C,A=!F.validRepoPath&&!F.selectedRepoPath;return(0,t.jsx)(l.BaseDrawer,{open:e,onClose:F.attemptClose,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(c.DrawerTitle,{children:S("createDrawer.title")})]}),o?(0,t.jsx)(c.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(u.Badge,{variant:"secondary",children:S("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(d.Button,{variant:"outline",onClick:F.attemptClose,disabled:o,children:S("createDrawer.cancel")}),(0,t.jsx)(d.Button,{type:"submit",form:"create-feature-form",disabled:!F.description.trim()||o||A,children:S(o?"createDrawer.creating":"createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(h.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:E,id:"create-feature-form",onSubmit:F.handleSubmit,onKeyDown:R,className:"flex flex-col gap-4",children:[M?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(p.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.repository")}),(0,t.jsx)(H,{repositories:F.localRepos,value:F.selectedRepoPath,onChange:F.setSelectedRepoPath,onAddRepository:e=>{F.setLocalRepos(t=>[...t,e]),F.setSelectedRepoPath(e.path)},disabled:o})]}):F.validRepoPath?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(p.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:C?.find(e=>e.path===F.validRepoPath)?.name??F.validRepoPath.split("/").pop()})]}):null,(0,t.jsx)(P,{description:F.description,onDescriptionChange:F.setDescription,attachments:F.attachments,onRemoveFile:F.handleRemoveFile,onNotesChange:F.handleNotesChange,onPaste:F.handlePaste,onDragEnter:F.handleDragEnter,onDragLeave:F.handleDragLeave,onDragOver:F.handleDragOver,onDrop:F.handleDrop,onAddFiles:F.handleAddFiles,isDragOver:F.isDragOver,uploadError:F.uploadError,isPromptFocused:F.isPromptFocused,onPromptFocus:()=>F.setIsPromptFocused(!0),onPromptBlur:()=>F.setIsPromptFocused(!1),fast:F.fast,onFastChange:F.setFast,pending:F.pending,onPendingChange:F.setPending,overrideAgent:F.overrideAgent,overrideModel:F.overrideModel,currentAgentType:D,currentModel:N,onAgentModelChange:(e,t)=>{F.setOverrideAgent(e),F.setOverrideModel(t)},isSubmitting:o}),L&&void 0!==y?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(p.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.parentFeature")}),(0,t.jsx)(G,{features:w,value:F.parentId,onChange:F.setParentId,disabled:o})]}):null,(0,t.jsx)(I,{approvalGates:F.approvalGates,onApprovalGatesChange:F.setApprovalGates,enableEvidence:F.enableEvidence,onEnableEvidenceChange:F.setEnableEvidence,commitEvidence:F.commitEvidence,onCommitEvidenceChange:F.setCommitEvidence,push:F.push,onPushChange:F.setPush,openPr:F.openPr,onOpenPrChange:F.setOpenPr,ciWatchEnabled:F.ciWatchEnabled,onCiWatchChange:F.setCiWatchEnabled,rebaseBeforeBranch:F.rebaseBeforeBranch,onRebaseBeforeBranchChange:F.setRebaseBeforeBranch,commitSpecs:F.commitSpecs,onCommitSpecsChange:F.setCommitSpecs,forkAndPr:F.forkAndPr,onForkAndPrChange:F.setForkAndPr,canPush:F.canPush,fast:F.fast,computedPush:F.computedPush,computedOpenPr:F.computedOpenPr,isSubmitting:o,agentType:F.overrideAgent??D,permissionMode:F.permissionMode,onPermissionModeChange:F.setPermissionMode})]})})})})}e.s(["CreateDrawerClient",0,function({repositoryPath:e,initialParentId:i,initialDescription:n,features:l,repositories:c,workflowDefaults:d,currentAgentType:p,currentModel:u,canPushDirectly:h}){let m=(0,a.useRouter)(),[x,f]=(0,r.useState)(!1),g=(0,a.usePathname)().startsWith("/create"),b=!x&&g;(0,r.useEffect)(()=>{!g&&x&&f(!1)},[g,x]);let j=(0,r.useCallback)(()=>{m.push("/")},[m]),v=(0,r.useCallback)(e=>{f(!0),m.push("/"),o(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),f(!1)})},[m]);return(0,t.jsx)(Q,{open:b,onClose:j,onSubmit:v,repositoryPath:e,features:l,repositories:c,workflowDefaults:d,initialParentId:i,initialDescription:n,isSubmitting:x,currentAgentType:p,currentModel:u,canPushDirectly:h})}],15203)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15203,e=>{"use strict";var t=e.i(96871),r=e.i(16539),a=e.i(33109),s=e.i(60112),i=e.i(96976);let o=(0,i.createServerReference)("406cd7b9283d77f5b71056937cc940bfd7db6ffa77",i.callServer,void 0,i.findSourceMapURL,"createFeature");e.i(26759);var n=e.i(97164);e.i(1650);var l=e.i(11495),c=e.i(45811),d=e.i(35364),p=e.i(41957),u=e.i(81846),h=e.i(2828),m=e.i(8361),x=e.i(30153);let f=(0,i.createServerReference)("40115ba32afc0c6090259c7e63c43db572edf61abe",i.callServer,void 0,i.findSourceMapURL,"getViewerPermission");var g=e.i(42076);let b=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),j={allowPrd:!1,allowPlan:!1,allowMerge:!1};var v=e.i(82639),w=e.i(22570),C=e.i(45977),y=e.i(31777),D=e.i(48306),N=e.i(51911);e.i(50032);var T=e.i(86254),k=e.i(9749);function P({description:e,onDescriptionChange:a,attachments:s,onRemoveFile:i,onNotesChange:o,onPaste:l,onDragEnter:c,onDragLeave:d,onDragOver:u,onDrop:m,onAddFiles:x,isDragOver:f,uploadError:g,isPromptFocused:b,onPromptFocus:j,onPromptBlur:S,fast:F,onFastChange:E,pending:R,onPendingChange:L,overrideAgent:M,overrideModel:A,currentAgentType:I,currentModel:O,onAgentModelChange:z,isSubmitting:U}){let{t:B}=(0,n.useTranslation)("web"),_=(0,r.useRef)(null);return(0,t.jsxs)("div",{role:"region","aria-label":B("createDrawer.fileDropZone"),"data-drag-over":f?"true":"false",onDragEnter:c,onDragLeave:d,onDragOver:u,onDrop:m,className:(0,y.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",f&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(p.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:B("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:_,onFocus:j,onBlur:()=>{setTimeout(()=>{let e=_.current?.contains(document.activeElement),t=_.current?.querySelector('[aria-expanded="true"]')!==null;e||t||S()},0)},className:(0,y.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",b&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(D.Textarea,{id:"feature-description",placeholder:B("createDrawer.featurePlaceholder"),value:e,onChange:e=>a(e.target.value),onPaste:l,required:!0,disabled:U,"aria-invalid":!!g,"aria-describedby":g?"feature-upload-error":void 0,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),s.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:s.map(e=>(0,t.jsx)(T.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>i(e.id),disabled:U,loading:e.loading,notes:e.notes,onNotesChange:t=>o(e.id,t)},e.id))}),g?(0,t.jsx)("p",{id:"feature-upload-error",className:"text-destructive px-3 pb-2 text-xs",role:"alert",children:g}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(k.AgentModelPicker,{initialAgentType:M??I??"claude-code",initialModel:A??O??"claude-sonnet-4-6",mode:"override",onAgentModelChange:z,disabled:U,className:"w-55"}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(N.Switch,{id:"pending-mode",checked:R,onCheckedChange:L,disabled:U}),(0,t.jsxs)(p.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(C.Clock,{className:"h-3.5 w-3.5"}),B("createDrawer.pendingMode")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("createDrawer.pendingModeDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(N.Switch,{id:"fast-mode",checked:F,onCheckedChange:E,disabled:U}),(0,t.jsxs)(p.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(w.Zap,{className:"h-3.5 w-3.5"}),B("createDrawer.fastModeLabel")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("createDrawer.fastModeDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:x,disabled:U,"aria-label":B("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(v.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:B("chat.attachFiles")})]})]})]})]})}var S=e.i(8791),F=e.i(13867),E=e.i(96612),R=e.i(27381),L=e.i(47373);let M=(0,i.createServerReference)("401a61cc1dba62a8f9882f25ab67ed17cd219b1fe1",i.callServer,void 0,i.findSourceMapURL,"getAgentPermissionOptions"),A=["allowPrd","allowPlan","allowMerge"];function I({approvalGates:e,onApprovalGatesChange:r,enableEvidence:a,onEnableEvidenceChange:s,commitEvidence:i,onCommitEvidenceChange:o,push:l,onPushChange:c,openPr:d,onOpenPrChange:u,ciWatchEnabled:m,onCiWatchChange:x,rebaseBeforeBranch:f,onRebaseBeforeBranchChange:g,commitSpecs:b,onCommitSpecsChange:j,forkAndPr:v,onForkAndPrChange:w,canPush:C,fast:D,computedPush:T,computedOpenPr:k,isSubmitting:P,agentType:R,permissionMode:L,onPermissionModeChange:M}){let{t:z}=(0,n.useTranslation)("web"),U=[{id:"allowPrd",label:z("createDrawer.prd"),description:z("createDrawer.prdDescription")},{id:"allowPlan",label:z("createDrawer.plan"),description:z("createDrawer.planDescription")},{id:"allowMerge",label:z("createDrawer.merge"),description:z("createDrawer.mergeDescription")}];return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:z("createDrawer.approve")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:U.map(a=>(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:`approve-${a.id}`,size:"sm",checked:e[a.id]??!1,onCheckedChange:t=>r({...e,[a.id]:t}),disabled:P||D&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,t.jsx)(p.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:D&&("allowPrd"===a.id||"allowPlan"===a.id)?z("createDrawer.skippedInFastMode"):a.description})]},a.id))}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=A.every(t=>e[t]),a={};for(let e of A)a[e]=!t;r(a)},disabled:P,className:(0,y.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",A.every(t=>e[t])&&"text-primary"),children:z("createDrawer.all")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:z("createDrawer.evidence")})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"enable-evidence",size:"sm",checked:a,onCheckedChange:e=>{s(e),e||o(!1)},disabled:P}),(0,t.jsx)(p.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:z("createDrawer.collect")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.collectDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"commit-evidence",size:"sm",checked:i,onCheckedChange:o,disabled:P||!a||!d&&!v}),(0,t.jsx)(p.Label,{htmlFor:"commit-evidence",className:(0,y.cn)("cursor-pointer text-xs font-medium",(!a||!d&&!v)&&"opacity-50"),children:z("createDrawer.addToPr")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:d||v?a?z("createDrawer.addToPrDescription"):z("createDrawer.requiresEvidence"):z("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:z("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"push",size:"sm",checked:T,onCheckedChange:e=>{c(e),!e&&d&&u(!1)},disabled:P||v}),(0,t.jsx)(p.Label,{htmlFor:"push",className:(0,y.cn)("cursor-pointer text-xs font-medium",v&&"opacity-50"),children:z("createDrawer.push")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:v?"Enabled — contributing to upstream":z("createDrawer.pushDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"open-pr",size:"sm",checked:k,onCheckedChange:e=>{u(e),e||o(!1)},disabled:P||v}),(0,t.jsx)(p.Label,{htmlFor:"open-pr",className:(0,y.cn)("cursor-pointer text-xs font-medium",v&&"opacity-50"),children:z("createDrawer.pr")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:v?"Enabled — contributing to upstream":z("createDrawer.prDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"ci-watch",size:"sm",checked:m,onCheckedChange:x,disabled:P}),(0,t.jsx)(p.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:z("createDrawer.watch")})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"rebase-before-branch",size:"sm",checked:f,onCheckedChange:g,disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(E.RefreshCw,{className:"h-3 w-3"}),z("createDrawer.sync")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.syncDescription")})]}),(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"commit-specs",size:"sm",checked:b,onCheckedChange:j,disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(F.FileText,{className:"h-3 w-3"}),z("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.commitSpecsDescription")})]}),!C&&(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(N.Switch,{id:"fork-and-pr",size:"sm",checked:v,onCheckedChange:e=>{w(e),e&&j(!1)},disabled:P}),(0,t.jsxs)(p.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(S.GitFork,{className:"h-3 w-3"}),z("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:z("createDrawer.forkAndPrDescription")})]})]})]}),R&&M?(0,t.jsx)(O,{agentType:R,permissionMode:L,onPermissionModeChange:M,isSubmitting:P}):null]})}function O({agentType:e,permissionMode:a,onPermissionModeChange:s,isSubmitting:i}){let{t:o}=(0,n.useTranslation)("web"),[l,c]=(0,r.useState)([]);return((0,r.useEffect)(()=>{let t=!1;return M(e).then(e=>{t||c(e)}),()=>{t=!0}},[e]),0===l.length)?null:(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground flex w-16 shrink-0 cursor-default items-center gap-1 text-xs font-semibold tracking-wider",children:[(0,t.jsx)(R.Shield,{className:"h-3 w-3"}),o("feature.create.permissionMode")]})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",children:o("settings.agent.permissions.description",{agent:e})})]}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsxs)(L.Select,{value:a??"__default__",onValueChange:e=>s("__default__"===e?void 0:e),disabled:i,children:[(0,t.jsx)(L.SelectTrigger,{id:"permission-mode","data-testid":"permission-mode-select",className:"h-7 text-xs",children:(0,t.jsx)(L.SelectValue,{})}),(0,t.jsxs)(L.SelectContent,{children:[(0,t.jsx)(L.SelectItem,{value:"__default__",children:o("feature.create.permissionModeDefault")}),l.map(e=>(0,t.jsx)(L.SelectItem,{value:e.value,children:e.label},e.value))]})]})})]})}var z=e.i(56060),U=e.i(91653),B=e.i(98127),_=e.i(90382);function G({features:e,value:a,onChange:s,disabled:i}){let{t:o}=(0,n.useTranslation)("web"),[l,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(""),u=(0,r.useRef)(null),h=e.find(e=>e.id===a),m=d.trim()?e.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())||e.id.toLowerCase().includes(d.toLowerCase())):e,x=(0,r.useCallback)(e=>{s(e),c(!1),p("")},[s]);return(0,r.useEffect)(()=>{l?setTimeout(()=>u.current?.focus(),0):p("")},[l]),(0,t.jsxs)(_.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(_.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":l,"aria-label":"Parent Feature",disabled:i,"data-testid":"parent-feature-combobox",className:(0,y.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!h&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:h?`${h.name} (${h.id.slice(0,8)})`:o("createDrawer.selectParent")}),(0,t.jsx)(z.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(_.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(B.Input,{ref:u,placeholder:o("createDrawer.searchFeatures"),value:d,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===a,onClick:()=>x(void 0),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===a&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",void 0!==a&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:o("createDrawer.noParent")})]}),0===m.length&&d?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:o("createDrawer.noFeaturesFound")}):m.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.id,onClick:()=>x(e.id),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",a!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}var W=e.i(47930),$=e.i(79561),q=e.i(25235),K=e.i(75921),V=e.i(37986),Z=e.i(78521);e.i(13322);var J=e.i(61201);function H({repositories:e,value:a,onChange:s,onAddRepository:i,disabled:o}){let[l,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[m,x]=(0,r.useState)(null),[f,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),{reactFileManager:j}=(0,K.useFeatureFlags)(),{t:v}=(0,n.useTranslation)("web"),w=e.find(e=>e.path===a),C=d.trim()?e.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())||e.path.toLowerCase().includes(d.toLowerCase())):e,D=(0,r.useCallback)(e=>{s(e),c(!1),p("")},[s]),N=(0,r.useCallback)(async e=>{let t=await (0,V.addRepository)({path:e});if(t.error){x(t.error),h(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};i?.(e),s(e.path),c(!1),p("")}},[i,s]),T=(0,r.useCallback)(async()=>{if(!u){if(j)return void g(!0);h(!0),x(null);try{let e=await (0,Z.pickFolder)();if(!e)return void h(!1);await N(e)}catch{g(!0)}finally{h(!1)}}},[u,j,N]),k=(0,r.useCallback)(async e=>{if(g(!1),e){h(!0),x(null);try{await N(e)}catch(e){x(e instanceof Error?e.message:"Failed to add repository")}finally{h(!1)}}},[N]);return(0,r.useEffect)(()=>{l?setTimeout(()=>b.current?.focus(),0):p("")},[l]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(_.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(_.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":l,"aria-label":"Repository","aria-invalid":!!m,"aria-describedby":m?"add-repository-error-msg":void 0,disabled:o,"data-testid":"repository-combobox",className:(0,y.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",!w&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:w?w.name:"Select repository..."}),(0,t.jsx)(z.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(_.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(B.Input,{ref:b,placeholder:v("createDrawer.searchRepositories"),value:d,onChange:e=>p(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===C.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):C.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a===e.path,onClick:()=>D(e.path),className:(0,y.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",a===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(U.CheckIcon,{className:(0,y.cn)("h-4 w-4 shrink-0",a!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsx)("span",{className:"truncate",children:e.name}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(q.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:T,disabled:u,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[u?(0,t.jsx)($.LoaderCircle,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(W.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),m?(0,t.jsx)("p",{id:"add-repository-error-msg",className:"px-3 pb-2 text-xs text-red-500",role:"alert","data-testid":"add-repository-error",children:m}):null]})})]}),(0,t.jsx)(J.ReactFileManagerDialog,{open:f,onOpenChange:e=>{e||g(!1)},onSelect:k})]})}function Q({open:e,onClose:a,onSubmit:s,repositoryPath:i,isSubmitting:o=!1,workflowDefaults:v,features:w,repositories:C,initialParentId:y,currentAgentType:D,currentModel:N,initialDescription:T,canPushDirectly:k}){let{t:S}=(0,n.useTranslation)("web"),F=function({open:e,onClose:t,onSubmit:a,repositoryPath:s,workflowDefaults:i,repositories:o,initialParentId:n,currentAgentType:l,currentModel:c,initialDescription:d,canPushDirectly:p}){let u=(0,m.useSoundAction)("create"),h=s&&(!o||0===o.length||o.some(e=>e.path===s))?s:"",v=i?.approvalGates??j,w=i?.push??!1,C=i?.openPr??!1,y=i?.ciWatchEnabled!==!1,D=i?.enableEvidence??!1,N=i?.commitEvidence??!1,T=i?.fast!==!1,[k,P]=(0,r.useState)(d??"");(0,r.useEffect)(()=>{d&&P(d)},[d]);let[S,F]=(0,r.useState)([]),[E,R]=(0,r.useState)({...v}),[L,M]=(0,r.useState)(w),[A,I]=(0,r.useState)(C),[O,z]=(0,r.useState)(i?.ciWatchEnabled!==!1),[U,B]=(0,r.useState)(D),[_,G]=(0,r.useState)(N),[W,$]=(0,r.useState)(void 0),[q,K]=(0,r.useState)(T),[V,Z]=(0,r.useState)(!1),[J,H]=(0,r.useState)(!1),[Q,X]=(0,r.useState)(!0),[Y,ee]=(0,r.useState)(!0),[et,er]=(0,r.useState)(void 0),[ea,es]=(0,r.useState)(void 0),[ei,eo]=(0,r.useState)(void 0),[en,el]=(0,r.useState)(h||void 0),[ec,ed]=(0,r.useState)(o??[]),[ep,eu]=(0,r.useState)(!1),[eh,em]=(0,r.useState)(null),[ex,ef]=(0,r.useState)(!1),eg=(0,r.useRef)(crypto.randomUUID()),eb=(0,r.useRef)(0);(0,r.useEffect)(()=>{i&&(R({...i.approvalGates}),M(i.push),I(i.openPr),z(!1!==i.ciWatchEnabled),B(i.enableEvidence),G(i.commitEvidence),K(!1!==i.fast))},[i]),(0,r.useEffect)(()=>{ed(o??[])},[o]),(0,r.useEffect)(()=>{e&&n&&$(n)},[e,n]);let[ej,ev]=(0,r.useState)(p??!1);(0,r.useEffect)(()=>{ev(p??!1)},[p]);let ew=(0,r.useRef)(en);(0,r.useEffect)(()=>{en&&en!==ew.current&&(ew.current=en,f(en).then(e=>ev(e.canPushDirectly)).catch(()=>ev(!1)))},[en]),(0,r.useEffect)(()=>{ej&&(H(!1),M(w),I(C),X(!0))},[ej,w,C]);let eC=(0,r.useCallback)(()=>{P(""),F([]),R({...v}),M(w),I(C),z(y),B(D),G(N),$(void 0),el(h||void 0),ed(o??[]),K(T),Z(!1),H(!1),X(!0),ee(!0),er(void 0),es(void 0),eo(void 0),em(null),eb.current=0,eu(!1)},[v,w,C,D,y,N,T,h,o]),ey=""!==k.trim()||S.length>0,{attemptClose:eD}=(0,x.useGuardedDrawerClose)({open:e,isDirty:ey,onClose:t,onReset:eC}),eN=(0,r.useCallback)(async e=>{for(let t of(em(null),e)){if(t.size>0xa00000)return void em(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!b.has(e))return void em(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();F(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eg.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));F(t=>t.filter(t=>t.id!==e)),em(t.error??"Upload failed");return}let s=await a.json();F(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{F(t=>t.filter(t=>t.id!==e)),em("Upload failed")}}},[]),eT=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current+=1,1===eb.current&&eu(!0)},[]),ek=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current-=1,0===eb.current&&eu(!1)},[]),eP=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eS=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eb.current=0,eu(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&eN(t)},[eN]),eF=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),eN(r))},[eN]),eE=(0,r.useCallback)(e=>{if(e.preventDefault(),!k.trim())return;let t=en??h;t&&(u.play(),a({description:k.trim(),attachments:S.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:E.allowPrd??!1,allowPlan:E.allowPlan??!1,allowMerge:E.allowMerge??!1},push:!!J||L||A,openPr:!!J||A,ciWatchEnabled:O,enableEvidence:U,commitEvidence:_,fast:q,forkAndPr:J,commitSpecs:Q,rebaseBeforeBranch:Y,...V?{pending:V}:{},...et?{agentType:et}:{},...ea?{model:ea}:{},...ei?{permissionMode:ei}:{},...W?{parentId:W}:{},sessionId:eg.current}),eC())},[k,S,E,en,h,a,L,A,U,O,_,q,J,Q,Y,V,et,ea,ei,W,u,eC]),eR=(0,r.useCallback)(async()=>{try{let e=await (0,g.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();F(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eg.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));F(t=>t.filter(t=>t.id!==e)),em(t.error??"Upload failed");return}let a=await r.json();F(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{F(t=>t.filter(t=>t.id!==e)),em("Upload failed")}}}catch{}},[]),eL=(0,r.useCallback)(e=>{F(t=>t.filter(t=>t.id!==e))},[]),eM=(0,r.useCallback)((e,t)=>{F(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]);return{validRepoPath:h,canPush:ej,isDirty:ey,computedPush:!!J||L||A,computedOpenPr:!!J||A,description:k,setDescription:P,attachments:S,approvalGates:E,setApprovalGates:R,push:L,setPush:M,openPr:A,setOpenPr:I,ciWatchEnabled:O,setCiWatchEnabled:z,enableEvidence:U,setEnableEvidence:B,commitEvidence:_,setCommitEvidence:G,parentId:W,setParentId:$,fast:q,setFast:K,pending:V,setPending:Z,forkAndPr:J,setForkAndPr:H,commitSpecs:Q,setCommitSpecs:X,rebaseBeforeBranch:Y,setRebaseBeforeBranch:ee,overrideAgent:et,setOverrideAgent:er,overrideModel:ea,setOverrideModel:es,permissionMode:ei,setPermissionMode:eo,selectedRepoPath:en,setSelectedRepoPath:el,localRepos:ec,setLocalRepos:ed,isDragOver:ep,uploadError:eh,isPromptFocused:ex,setIsPromptFocused:ef,sessionIdRef:eg,currentAgentType:l,currentModel:c,attemptClose:eD,handleFiles:eN,handleDragEnter:eT,handleDragLeave:ek,handleDragOver:eP,handleDrop:eS,handlePaste:eF,handleSubmit:eE,handleAddFiles:eR,handleRemoveFile:eL,handleNotesChange:eM,resetForm:eC}}({open:e,onClose:a,onSubmit:s,repositoryPath:i,workflowDefaults:v,repositories:C,initialParentId:y,currentAgentType:D,currentModel:N,initialDescription:T,canPushDirectly:k}),E=(0,r.useRef)(null),R=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),E.current?.requestSubmit())},[]),L=w&&w.length>0,M=!F.validRepoPath&&void 0!==C,A=!F.validRepoPath&&!F.selectedRepoPath;return(0,t.jsx)(l.BaseDrawer,{open:e,onClose:F.attemptClose,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(c.DrawerTitle,{children:S("createDrawer.title")})]}),o?(0,t.jsx)(c.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(u.Badge,{variant:"secondary",children:S("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(d.Button,{variant:"outline",onClick:F.attemptClose,disabled:o,children:S("createDrawer.cancel")}),(0,t.jsx)(d.Button,{type:"submit",form:"create-feature-form",disabled:!F.description.trim()||o||A,children:S(o?"createDrawer.creating":"createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(h.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:E,id:"create-feature-form",onSubmit:F.handleSubmit,onKeyDown:R,className:"flex flex-col gap-4",children:[M?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(p.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.repository")}),(0,t.jsx)(H,{repositories:F.localRepos,value:F.selectedRepoPath,onChange:F.setSelectedRepoPath,onAddRepository:e=>{F.setLocalRepos(t=>[...t,e]),F.setSelectedRepoPath(e.path)},disabled:o})]}):F.validRepoPath?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(p.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:C?.find(e=>e.path===F.validRepoPath)?.name??F.validRepoPath.split("/").pop()})]}):null,(0,t.jsx)(P,{description:F.description,onDescriptionChange:F.setDescription,attachments:F.attachments,onRemoveFile:F.handleRemoveFile,onNotesChange:F.handleNotesChange,onPaste:F.handlePaste,onDragEnter:F.handleDragEnter,onDragLeave:F.handleDragLeave,onDragOver:F.handleDragOver,onDrop:F.handleDrop,onAddFiles:F.handleAddFiles,isDragOver:F.isDragOver,uploadError:F.uploadError,isPromptFocused:F.isPromptFocused,onPromptFocus:()=>F.setIsPromptFocused(!0),onPromptBlur:()=>F.setIsPromptFocused(!1),fast:F.fast,onFastChange:F.setFast,pending:F.pending,onPendingChange:F.setPending,overrideAgent:F.overrideAgent,overrideModel:F.overrideModel,currentAgentType:D,currentModel:N,onAgentModelChange:(e,t)=>{F.setOverrideAgent(e),F.setOverrideModel(t)},isSubmitting:o}),L&&void 0!==y?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(p.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:S("createDrawer.parentFeature")}),(0,t.jsx)(G,{features:w,value:F.parentId,onChange:F.setParentId,disabled:o})]}):null,(0,t.jsx)(I,{approvalGates:F.approvalGates,onApprovalGatesChange:F.setApprovalGates,enableEvidence:F.enableEvidence,onEnableEvidenceChange:F.setEnableEvidence,commitEvidence:F.commitEvidence,onCommitEvidenceChange:F.setCommitEvidence,push:F.push,onPushChange:F.setPush,openPr:F.openPr,onOpenPrChange:F.setOpenPr,ciWatchEnabled:F.ciWatchEnabled,onCiWatchChange:F.setCiWatchEnabled,rebaseBeforeBranch:F.rebaseBeforeBranch,onRebaseBeforeBranchChange:F.setRebaseBeforeBranch,commitSpecs:F.commitSpecs,onCommitSpecsChange:F.setCommitSpecs,forkAndPr:F.forkAndPr,onForkAndPrChange:F.setForkAndPr,canPush:F.canPush,fast:F.fast,computedPush:F.computedPush,computedOpenPr:F.computedOpenPr,isSubmitting:o,agentType:F.overrideAgent??D,permissionMode:F.permissionMode,onPermissionModeChange:F.setPermissionMode})]})})})})}e.s(["CreateDrawerClient",0,function({repositoryPath:e,initialParentId:i,initialDescription:n,features:l,repositories:c,workflowDefaults:d,currentAgentType:p,currentModel:u,canPushDirectly:h}){let m=(0,a.useRouter)(),[x,f]=(0,r.useState)(!1),g=(0,a.usePathname)().startsWith("/create"),b=!x&&g;(0,r.useEffect)(()=>{!g&&x&&f(!1)},[g,x]);let j=(0,r.useCallback)(()=>{m.push("/")},[m]),v=(0,r.useCallback)(e=>{f(!0),m.push("/"),o(e).then(t=>{t.error?s.toast.error(t.error):window.dispatchEvent(new CustomEvent("shipit-ai:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.feature.repositoryPath,parentId:e.parentId}}))}).catch(()=>{s.toast.error("Failed to create feature"),f(!1)})},[m]);return(0,t.jsx)(Q,{open:b,onClose:j,onSubmit:v,repositoryPath:e,features:l,repositories:c,workflowDefaults:d,initialParentId:i,initialDescription:n,isSubmitting:x,currentAgentType:p,currentModel:u,canPushDirectly:h})}],15203)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[38702,16223,a=>{"use strict";var b=a.i(53083),c=a.i(85536);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g,...h}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",g),...h,children:[a?(0,b.jsx)("div",{className:"text-muted-foreground",children:a}):null,(0,b.jsx)("h3",{className:"text-lg font-semibold",children:d}),e?(0,b.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:e}):null,f?(0,b.jsx)("div",{className:"mt-2",children:f}):null]})}],16223),a.s([],38702)},55628,a=>{"use strict";var b=a.i(11321),c=a.i(80720),d=a.i(99986),e=a.i(65822),f=a.i(6120);let g=(0,f.createServerReference)("40bcce76e841141cd8d5df1027db29237885f36a41",f.callServer,void 0,f.findSourceMapURL,"syncRepository");a.s(["useRepositoryActions",0,function(a){let[f,h]=(0,b.useState)(!1),[i,j]=(0,b.useState)(!1),[k,l]=(0,b.useState)(!1),[m,n]=(0,b.useState)(!1),[o,p]=(0,b.useState)(null),[q,r]=(0,b.useState)(null),[s,t]=(0,b.useState)(null),[u,v]=(0,b.useState)(null),w=(0,b.useRef)(null),x=(0,b.useRef)(null),y=(0,b.useRef)(null),z=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{w.current&&clearTimeout(w.current),x.current&&clearTimeout(x.current),y.current&&clearTimeout(y.current),z.current&&clearTimeout(z.current)},[]);let A=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>A(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),h,p,w,f),[A,f,a]),openInShell:(0,b.useCallback)(()=>A(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),j,r,x,i),[A,i,a]),openFolder:(0,b.useCallback)(()=>A(()=>(0,e.openFolder)(a.repositoryPath),l,t,y,k),[A,k,a]),syncMain:(0,b.useCallback)(()=>A(()=>g(a.repositoryId??""),n,v,z,m),[A,m,a]),ideLoading:f,shellLoading:i,folderLoading:k,syncLoading:m,ideError:o,shellError:q,folderError:s,syncError:u}}],55628)},2,a=>{"use strict";let b=(0,a.i(97624).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"}]]);a.s(["ExternalLink",0,b],2)},8685,a=>{"use strict";let b=(0,a.i(97624).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],8685)},78454,a=>{"use strict";a.i(24255),a.s([])},83813,a=>{"use strict";let b=(0,a.i(97624).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"}]]);a.s(["FolderOpen",0,b],83813)},37545,a=>{"use strict";let b=(0,a.i(97624).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);a.s(["GitBranch",0,b],37545)},18288,a=>{"use strict";let b=(0,a.i(97624).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);a.s(["default",0,b])},48111,a=>{"use strict";let b=(0,a.i(97624).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);a.s(["Archive",0,b],48111)},32471,a=>{"use strict";let b=(0,a.i(97624).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);a.s(["Code2",0,b],32471)},30536,a=>{"use strict";let b=(0,a.i(97624).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);a.s(["GitCommitHorizontal",0,b],30536)},80720,99986,65822,a=>{"use strict";var b=a.i(6120);let c=(0,b.createServerReference)("403b50818c4c8a3d6d430ae3439eb3037c4ca54755",b.callServer,void 0,b.findSourceMapURL,"openIde");a.s(["openIde",0,c],80720);let d=(0,b.createServerReference)("40792ab294bf027b28044da4c8ef078009d30f6a86",b.callServer,void 0,b.findSourceMapURL,"openShell");a.s(["openShell",0,d],99986);let e=(0,b.createServerReference)("4014a40a31cf611500dd14f1ee4409c3279343d678",b.callServer,void 0,b.findSourceMapURL,"openFolder");a.s(["openFolder",0,e],65822)},55944,a=>{"use strict";var b=a.i(18288);a.s(["TriangleAlert",()=>b.default])},29370,a=>{"use strict";let b=(0,a.i(97624).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",0,b],29370)},49853,a=>{"use strict";let b=(0,a.i(97624).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["default",0,b])},86139,a=>{"use strict";let b=(0,a.i(97624).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["Circle",0,b],86139)},95881,a=>{"use strict";var b=a.i(22018);a.s(["CheckIcon",()=>b.default])},53556,a=>{"use strict";let b=(0,a.i(97624).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);a.s(["Shield",0,b],53556)},31271,a=>{"use strict";let b=(0,a.i(97624).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);a.s(["FolderPlus",0,b],31271)},36815,a=>{"use strict";var b=a.i(6120);let c=(0,b.createServerReference)("40561d29661f661688842173586e2787a89109395a",b.callServer,void 0,b.findSourceMapURL,"addRepository");a.s(["addRepository",0,c])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0_17.-n._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/presentation/web/components/ui/badge.tsx","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/check.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-popover%401.1.15_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.14__%40types%2Brea_8b5332f8e883134e9d9ab2856fc4395d/node_modules/%40radix-ui/react-popover/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/popover.tsx","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevron-up.ts","../../../../../../../src/presentation/web/components/features/settings/AgentModelPicker/index.tsx","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/code.ts"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst badgeVariants = cva(\n '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',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80',\n outline: 'text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />;\n}\n\nexport { Badge, badgeVariants };\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'M20 6 9 17l-5-5', key: '1gmf2c' }]];\n\n/**\n * @component @name Check\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Check = createLucideIcon('check', __iconNode);\n\nexport default Check;\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [['path', { d: 'm18 15-6-6-6 6', key: '153udz' }]];\n\n/**\n * @component @name ChevronUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-up\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronUp = createLucideIcon('chevron-up', __iconNode);\n\nexport default ChevronUp;\n","'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { getAllAgentModels } from '@/app/actions/get-all-agent-models';\nimport type { AgentModelGroup } from '@/app/actions/get-all-agent-models';\nimport { updateAgentAndModel } from '@/app/actions/update-agent-and-model';\nimport { getAgentTypeIcon } from '@/components/common/feature-node/agent-type-icons';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\n\nexport interface AgentModelPickerProps {\n initialAgentType: string;\n initialModel: string;\n onAgentModelChange?: (agentType: string, model: string) => void;\n disabled?: boolean;\n className?: string;\n /** 'settings' persists to DB; 'override' only calls onAgentModelChange */\n mode: 'settings' | 'override';\n}\n\nexport function AgentModelPicker({\n initialAgentType,\n initialModel,\n onAgentModelChange,\n disabled,\n className,\n mode,\n}: AgentModelPickerProps) {\n const { t } = useTranslation('web');\n const [open, setOpen] = React.useState(false);\n const [groups, setGroups] = React.useState<AgentModelGroup[]>([]);\n const [loading, setLoading] = React.useState(true);\n const [agentType, setAgentType] = React.useState(initialAgentType);\n const [model, setModel] = React.useState(initialModel);\n const [error, setError] = React.useState<string | null>(null);\n\n // 0 = agent list visible, 1 = model list visible\n const [level, setLevel] = React.useState(0);\n // Which agent's models to show (kept separate from level for animation)\n const [drillAgent, setDrillAgent] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n getAllAgentModels()\n .then(setGroups)\n .finally(() => setLoading(false));\n }, []);\n\n // Reset drill-down when popover closes\n React.useEffect(() => {\n if (!open) {\n const t = setTimeout(() => {\n setLevel(0);\n setDrillAgent(null);\n }, 150);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n const drillInto = (agent: string) => {\n setDrillAgent(agent);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => setLevel(1));\n });\n };\n\n const drillBack = () => {\n setLevel(0);\n setTimeout(() => setDrillAgent(null), 220);\n };\n\n const handleSelect = async (newAgentType: string, newModel: string) => {\n setOpen(false);\n\n if (newAgentType === agentType && newModel === model) return;\n\n if (mode === 'override') {\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n return;\n }\n\n // mode === 'settings' — optimistically update, then persist\n const prevAgent = agentType;\n const prevModel = model;\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n\n setError(null);\n try {\n const result = await updateAgentAndModel(newAgentType, newModel || null);\n if (!result.ok) {\n // Revert on failure\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError(result.error ?? 'Failed to save');\n }\n } catch {\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError('Failed to save');\n }\n };\n\n const isDisabled = (disabled ?? false) || loading;\n\n const AgentIcon = getAgentTypeIcon(agentType);\n const agentLabel = groups.find((g) => g.agentType === agentType)?.label ?? agentType;\n const modelName = model ? getModelMeta(model).displayName || model : null;\n\n const activeGroup = drillAgent ? groups.find((g) => g.agentType === drillAgent) : null;\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n aria-invalid={!!error}\n aria-describedby={error ? 'agent-model-picker-error' : undefined}\n disabled={isDisabled}\n className=\"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30\"\n >\n <span className=\"flex items-center gap-2 truncate\">\n <AgentIcon className=\"h-4 w-4 shrink-0\" />\n {loading ? (\n 'Loading…'\n ) : (\n <span className=\"flex items-center gap-1\">\n <span className=\"text-muted-foreground text-xs\">{agentLabel}</span>\n {modelName ? (\n <>\n <span className=\"text-muted-foreground/50 text-xs\">·</span>\n <span className=\"text-xs font-medium\">{modelName}</span>\n </>\n ) : null}\n </span>\n )}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"z-[70] w-(--radix-popover-trigger-width) overflow-hidden p-0\"\n align=\"start\"\n >\n {/* Sliding container — both panels side by side, translateX controlled by level */}\n <div\n className=\"flex transition-transform duration-200 ease-in-out\"\n style={{ transform: `translateX(${level === 1 ? '-50%' : '0%'})`, width: '200%' }}\n >\n {/* ── Level 1: Agent list ── */}\n <div className=\"w-1/2 shrink-0\">\n <div className=\"text-muted-foreground border-b px-3 py-2 text-xs font-medium\">\n Select agent\n </div>\n {groups.map((group) => {\n const GroupIcon = getAgentTypeIcon(group.agentType);\n const isActive = agentType === group.agentType;\n const hasModels = group.models.length > 0;\n\n return (\n <button\n key={group.agentType}\n type=\"button\"\n disabled={!group.installed}\n className={cn(\n 'flex w-full items-center gap-2.5 px-3 py-2 text-xs transition-colors',\n group.installed\n ? 'hover:bg-accent hover:text-accent-foreground cursor-pointer'\n : 'cursor-not-allowed opacity-60',\n isActive && 'bg-accent/50'\n )}\n onClick={() => {\n if (!group.installed) return;\n if (hasModels) {\n drillInto(group.agentType);\n } else {\n handleSelect(group.agentType, '');\n }\n }}\n >\n <GroupIcon className=\"h-4 w-4 shrink-0\" />\n <span className=\"flex-1 text-start\">{group.label}</span>\n <Badge\n variant=\"outline\"\n className={cn(\n 'px-1.5 py-0 text-[10px] leading-4 font-normal',\n group.installed\n ? 'border-emerald-500/30 text-emerald-500'\n : 'border-muted-foreground/30 text-muted-foreground'\n )}\n >\n {group.installed\n ? t('settings.environment.installed')\n : t('settings.environment.notInstalled')}\n </Badge>\n {isActive && !hasModels ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n {hasModels && group.installed ? (\n <ChevronRight className=\"text-muted-foreground h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </div>\n\n {/* ── Level 2: Model list for selected agent ── */}\n <div className=\"w-1/2 shrink-0\">\n {activeGroup ? (\n <>\n {/* Back header */}\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors\"\n onClick={drillBack}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n {activeGroup.label}\n </button>\n\n {/* Model items */}\n {activeGroup.models.map((m) => {\n const isSelected = agentType === activeGroup.agentType && model === m.id;\n return (\n <button\n key={m.id}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-start transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isSelected && 'bg-accent/50'\n )}\n onClick={() => handleSelect(activeGroup.agentType, m.id)}\n >\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-xs font-medium\">{m.displayName}</span>\n <span className=\"text-muted-foreground text-xs\">{m.description}</span>\n </div>\n {isSelected ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </>\n ) : null}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {Boolean(error) && (\n <p id=\"agent-model-picker-error\" className=\"text-destructive text-sm\" role=\"alert\">\n {error}\n </p>\n )}\n </div>\n );\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm16 18 6-6-6-6', key: 'eg8j8' }],\n ['path', { d: 'm8 6-6 6 6 6', key: 'ppft3o' }],\n];\n\n/**\n * @component @name Code\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/code\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Code = createLucideIcon('code', __iconNode);\n\nexport default Code;\n"],"names":["badgeVariants","variants","variant","default","secondary","destructive","outline","defaultVariants","Badge","className","props","POPOVER_NAME","createPopoverContext","createPopoverScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","setOpen","prop","defaultProp","onChange","caller","scope","contentId","onOpenToggle","prevOpen","onCustomAnchorAdd","onCustomAnchorRemove","displayName","ANCHOR_NAME","PopoverAnchor","forwardedRef","anchorProps","context","ref","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","trigger","button","type","getState","onClick","asChild","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","PopoverPortal","container","present","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","contentRef","composedRefs","isRightClickOutsideRef","content","current","as","allowPinchZoom","PopoverContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","onEscapeKeyDown","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","onDismiss","role","id","style","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","Root2","Anchor2","Trigger","Portal","Content2","Close","Arrow2","AgentModelPicker","initialAgentType","initialModel","onAgentModelChange","disabled","mode","t","groups","setGroups","loading","setLoading","agentType","setAgentType","model","setModel","error","setError","level","setLevel","drillAgent","setDrillAgent","then","finally","setTimeout","clearTimeout","drillInto","agent","requestAnimationFrame","drillBack","handleSelect","newAgentType","newModel","prevAgent","prevModel","result","ok","isDisabled","AgentIcon","agentLabel","find","g","label","modelName","activeGroup","undefined","align","transform","width","map","group","GroupIcon","isActive","hasModels","models","length","installed","m","isSelected","description","Boolean"],"mappings":"wDACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAMA,EAAgB,CAAA,EAAA,EAAA,GAAA,AAAG,EACvB,uKACA,CACEC,SAAU,CACRC,QAAS,CACPC,QAAS,mFACTC,UACE,kFACFC,YACE,+FACFC,QAAS,iBACX,CACF,EACAC,gBAAiB,CACfL,QAAS,SACX,CACF,kBAMF,SAASM,AAAM,WAAEC,CAAS,SAAEP,CAAO,CAAE,GAAGQ,EAAmB,EACzD,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAID,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAACT,EAAc,SAAEE,CAAQ,GAAIO,GAAa,GAAGC,CAAK,EAC7E,kCCbA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,EAAA,AAAQ,CAAR,AAAQ,CAAR,AAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,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AAkB,CAAA,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAQ,CAAA,AAAE,EAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,AAAhB,CAAgB,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAC/C","ignoreList":[1,2,4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[54233,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(11321);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},92527,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},99760,(a,b,c)=>{"use strict";let d;Object.defineProperty(c,"__esModule",{value:!0});var e={getAssetToken:function(){return i},getAssetTokenQuery:function(){return j},getDeploymentId:function(){return g},getDeploymentIdQuery:function(){return h}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});function g(){return d}function h(a=!1){return d?`${a?"&":"?"}dpl=${d}`:""}function i(){return!1}function j(a=!1){return""}d=void 0},57769,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},14703,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},49369,(a,b,c)=>{"use strict";function d(){let a,b,c=new Promise((c,d)=>{a=c,b=d});return{resolve:a,reject:b,promise:c}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createPromiseWithResolvers",{enumerable:!0,get:function(){return d}})},51658,a=>{"use strict";let b=(0,a.i(97624).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.s(["default",0,b])},39388,a=>{"use strict";let b=(0,a.i(97624).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["default",0,b])},60382,94059,26190,a=>{"use strict";var b=a.i(59960);a.s(["LoaderCircleIcon",()=>b.default],60382);var c=a.i(51658);a.s(["DownloadIcon",()=>c.default],94059);let d=(0,a.i(97624).default)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]]);a.s(["StickyNoteIcon",0,d],26190)},79620,a=>{"use strict";var b=a.i(53083),c=a.i(85536);a.s(["Textarea",0,function({className:a,...d}){return(0,b.jsx)("textarea",{"data-slot":"textarea",className:(0,c.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...d})}])},42360,75579,a=>{"use strict";var b=a.i(31078);a.s(["VisuallyHidden",0,b],42360);let c=(0,a.i(97624).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["FileIcon",0,c],75579)},55123,a=>{"use strict";let b=(0,a.i(97624).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["default",0,b])},307,30931,a=>{"use strict";var b=a.i(53083),c=a.i(83695),d=a.i(60382),e=a.i(94059),f=a.i(26190),g=a.i(85536),h=a.i(45670),i=a.i(79620),j=a.i(82934),k=a.i(42360),l=a.i(75579),m=a.i(55123),m=m;let n=(0,a.i(97624).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var o=a.i(14068),o=o;a.i(18948);let p=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),q=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function r(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return`${(a/Math.pow(1024,b)).toFixed(+(0!==b))} ${["B","KB","MB","GB"][b]}`}let s=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function t(a,b){let c=new URLSearchParams({path:a,mimeType:b});return`/api/attachments/preview?${c.toString()}`}a.s(["AttachmentChip",0,function({name:a,size:u,mimeType:v,path:w,onRemove:x,loading:y=!1,disabled:z=!1,notes:A,onNotesChange:B}){let C,D,E=(C=a.lastIndexOf("."))>=0?a.slice(C).toLowerCase():"",F=p.has(E)?n:".pdf"===E?m.default:q.has(E)?o.default:l.FileIcon,G=".pdf"===E?"bg-red-50 text-red-600":p.has(E)?"bg-blue-50 text-blue-600":q.has(E)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600",H=(D=a.lastIndexOf("."))>=0&&s.has(a.slice(D).toLowerCase());if(y)return(0,b.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-md border",children:(0,b.jsx)(d.LoaderCircleIcon,{className:"text-muted-foreground h-5 w-5 animate-spin"})});if(H){let d=(0,b.jsxs)("button",{type:"button",className:"relative block cursor-pointer rounded-md",children:[(0,b.jsx)("img",{src:t(w,v),alt:a,title:a,className:"h-12 w-12 rounded-md border object-cover transition-opacity hover:opacity-80"}),A?(0,b.jsx)("span",{className:"ring-background absolute -right-1 -bottom-1 flex h-4 w-4 items-center justify-center rounded-full bg-amber-500 text-white shadow-sm ring-2",children:(0,b.jsx)(f.StickyNoteIcon,{className:"h-2.5 w-2.5"})}):null]});return(0,b.jsx)(j.TooltipProvider,{delayDuration:200,children:(0,b.jsxs)(h.Dialog,{children:[(0,b.jsxs)(j.Tooltip,{children:[(0,b.jsxs)("div",{className:"group relative",children:[(0,b.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(h.DialogTrigger,{asChild:!0,children:d})}),!z&&(0,b.jsx)("button",{type:"button",onClick:x,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,b.jsx)(c.X,{className:"h-3 w-3"})})]}),A?(0,b.jsx)(j.TooltipContent,{side:"bottom",className:"max-w-[220px] border border-amber-200 bg-amber-50 text-amber-950 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100",children:(0,b.jsx)("p",{className:"line-clamp-3 text-xs leading-snug",children:A})}):null]}),(0,b.jsxs)(h.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,b.jsx)(k.VisuallyHidden.Root,{children:(0,b.jsxs)(h.DialogTitle,{children:["Preview: ",a]})}),(0,b.jsx)("div",{className:"relative bg-black/90",children:(0,b.jsx)("img",{src:t(w,v),alt:a,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,b.jsxs)("div",{className:"bg-background flex flex-col gap-2 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:r(u)})]}),(0,b.jsx)("a",{href:t(w,v),download:a,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${a}`,children:(0,b.jsx)(e.DownloadIcon,{className:"h-4 w-4"})})]}),B?(0,b.jsx)(i.Textarea,{placeholder:"Add notes about this image…",value:A??"",onChange:a=>B(a.target.value),rows:2,className:"resize-none text-sm","aria-label":"Image notes"}):A?(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:A}):null]})]})]})})}return(0,b.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-full border py-1 ps-2 pe-3",children:[(0,b.jsx)("div",{className:(0,g.cn)("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",G),children:(0,b.jsx)(F,{className:"h-3 w-3"})}),(0,b.jsx)("span",{className:"max-w-[120px] truncate text-sm",children:a}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:r(u)}),!z&&(0,b.jsx)("button",{type:"button",onClick:x,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,b.jsx)(c.X,{className:"h-3 w-3"})})]})}],30931),a.s([],307)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_12uy.45._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/client/use-merged-ref.ts","../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/deployment-id.ts","../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/segment.ts","../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/invariant-error.ts","../../../../../../../node_modules/.pnpm/next%4016.2.2_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.59.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/shared/lib/promise-with-resolvers.ts","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/download.ts","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/paperclip.ts","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/sticky-note.ts","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/file-text.ts","../../../../../../../src/presentation/web/components/common/attachment-chip/attachment-chip.tsx","../../../../../../../src/presentation/web/components/common/attachment-card/attachment-card.tsx","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts"],"sourcesContent":["import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n deploymentId = document.documentElement.dataset.dplId\n // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n // HTML only), React isn't aware of it at all.\n delete document.documentElement.dataset.dplId\n} else {\n // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n // Server side: left as is or replaced with a string or replaced with false\n deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n let id = getDeploymentId()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n\nexport function getAssetToken(): string | undefined {\n return (\n process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID\n )\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n let id = getAssetToken()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n // Shim of Stage 4 Promise.withResolvers proposal\n let resolve: (value: T | PromiseLike<T>) => void\n let reject: (reason: any) => void\n const promise = new Promise<T>((res, rej) => {\n resolve = res\n reject = rej\n })\n return { resolve: resolve!, reject: reject!, promise }\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 15V3', key: 'm9g1x1' }],\n ['path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', key: 'ih7n3h' }],\n ['path', { d: 'm7 10 5 5 5-5', key: 'brsn70' }],\n];\n\n/**\n * @component @name Download\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/download\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Download = createLucideIcon('download', __iconNode);\n\nexport default Download;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551',\n key: '1miecu',\n },\n ],\n];\n\n/**\n * @component @name Paperclip\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/paperclip\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Paperclip = createLucideIcon('paperclip', __iconNode);\n\nexport default Paperclip;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z',\n key: '1dfntj',\n },\n ],\n ['path', { d: 'M15 3v5a1 1 0 0 0 1 1h5', key: '6s6qgf' }],\n];\n\n/**\n * @component @name StickyNote\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/sticky-note\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst StickyNote = createLucideIcon('sticky-note', __iconNode);\n\nexport default StickyNote;\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n];\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileText = createLucideIcon('file-text', __iconNode);\n\nexport default FileText;\n","/* eslint-disable @next/next/no-img-element -- Local file preview requires raw <img>, not next/image */\n'use client';\n\nimport { X, LoaderCircleIcon, DownloadIcon, StickyNoteIcon } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Dialog, DialogTrigger, DialogContent, DialogTitle } from '@/components/ui/dialog';\nimport { Textarea } from '@/components/ui/textarea';\nimport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from '@/components/ui/tooltip';\nimport { VisuallyHidden } from 'radix-ui';\nimport {\n formatFileSize,\n getFileIcon,\n getFileIconColor,\n} from '@/components/common/attachment-card/attachment-card';\n\nexport interface AttachmentChipProps {\n name: string;\n size: number;\n mimeType: string;\n path: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n /** Optional notes attached to this image */\n notes?: string;\n /** Callback when user edits notes in the preview modal */\n onNotesChange?: (notes: string) => void;\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\n\nfunction isImage(name: string): boolean {\n const dot = name.lastIndexOf('.');\n return dot >= 0 && IMAGE_EXTS.has(name.slice(dot).toLowerCase());\n}\n\nfunction previewUrl(path: string, mimeType: string): string {\n const params = new URLSearchParams({ path, mimeType });\n return `/api/attachments/preview?${params.toString()}`;\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nexport function AttachmentChip({\n name,\n size,\n mimeType,\n path,\n onRemove,\n loading = false,\n disabled = false,\n notes,\n onNotesChange,\n}: AttachmentChipProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n const imageFile = isImage(name);\n\n if (loading) {\n return (\n <div className=\"flex h-12 w-12 items-center justify-center rounded-md border\">\n <LoaderCircleIcon className=\"text-muted-foreground h-5 w-5 animate-spin\" />\n </div>\n );\n }\n\n if (imageFile) {\n const thumbnail = (\n <button type=\"button\" className=\"relative block cursor-pointer rounded-md\">\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n title={name}\n className=\"h-12 w-12 rounded-md border object-cover transition-opacity hover:opacity-80\"\n />\n {notes ? (\n <span className=\"ring-background absolute -right-1 -bottom-1 flex h-4 w-4 items-center justify-center rounded-full bg-amber-500 text-white shadow-sm ring-2\">\n <StickyNoteIcon className=\"h-2.5 w-2.5\" />\n </span>\n ) : null}\n </button>\n );\n\n return (\n <TooltipProvider delayDuration={200}>\n <Dialog>\n <Tooltip>\n <div className=\"group relative\">\n <TooltipTrigger asChild>\n <DialogTrigger asChild>{thumbnail}</DialogTrigger>\n </TooltipTrigger>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n {notes ? (\n <TooltipContent\n side=\"bottom\"\n className=\"max-w-[220px] border border-amber-200 bg-amber-50 text-amber-950 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100\"\n >\n <p className=\"line-clamp-3 text-xs leading-snug\">{notes}</p>\n </TooltipContent>\n ) : null}\n </Tooltip>\n <DialogContent className=\"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90\">\n <VisuallyHidden.Root>\n <DialogTitle>Preview: {name}</DialogTitle>\n </VisuallyHidden.Root>\n <div className=\"relative bg-black/90\">\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n className=\"h-auto max-h-[70vh] w-full object-contain\"\n />\n </div>\n <div className=\"bg-background flex flex-col gap-2 px-4 py-3\">\n <div className=\"flex items-center gap-3\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n </div>\n <a\n href={previewUrl(path, mimeType)}\n download={name}\n className=\"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors\"\n aria-label={`Download ${name}`}\n >\n <DownloadIcon className=\"h-4 w-4\" />\n </a>\n </div>\n {onNotesChange ? (\n <Textarea\n placeholder=\"Add notes about this image…\"\n value={notes ?? ''}\n onChange={(e) => onNotesChange(e.target.value)}\n rows={2}\n className=\"resize-none text-sm\"\n aria-label=\"Image notes\"\n />\n ) : notes ? (\n <p className=\"text-muted-foreground text-sm\">{notes}</p>\n ) : null}\n </div>\n </DialogContent>\n </Dialog>\n </TooltipProvider>\n );\n }\n\n return (\n <div className=\"group relative flex items-center gap-2 rounded-full border py-1 ps-2 pe-3\">\n <div\n className={cn(\n 'flex h-6 w-6 shrink-0 items-center justify-center rounded-full',\n iconColorClass\n )}\n >\n <Icon className=\"h-3 w-3\" />\n </div>\n <span className=\"max-w-[120px] truncate text-sm\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n );\n}\n","import type { LucideIcon } from 'lucide-react';\nimport {\n FileIcon,\n FileTextIcon,\n ImageIcon,\n CodeIcon,\n Trash2Icon,\n LoaderCircleIcon,\n} from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\n\nexport interface AttachmentCardProps {\n name: string;\n size: number;\n mimeType: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n /** Optional secondary text shown below the filename (e.g. file path). */\n subtitle?: string;\n}\n\nexport function AttachmentCard({\n name,\n size,\n mimeType: _mimeType,\n onRemove,\n loading = false,\n disabled = false,\n subtitle,\n}: AttachmentCardProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n {subtitle ? (\n <span className=\"text-muted-foreground truncate text-xs\">{subtitle}</span>\n ) : null}\n <span className=\"text-muted-foreground text-xs\">\n {loading ? 'Uploading...' : formatFileSize(size)}\n </span>\n </div>\n {loading ? (\n <LoaderCircleIcon className=\"text-muted-foreground h-4 w-4 animate-spin\" />\n ) : (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nexport function getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nexport function getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nexport function formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n"],"names":["useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","warnOnce","_","process","env","NODE_ENV","warnings","Set","msg","has","console","warn","add","getAssetToken","getAssetTokenQuery","getDeploymentId","getDeploymentIdQuery","deploymentId","window","document","documentElement","dataset","dplId","NEXT_DEPLOYMENT_ID","undefined","ampersand","id","NEXT_IMMUTABLE_ASSET_TOKEN","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isGroupSegment","isParallelRouteSegment","segment","Array","isArray","endsWith","startsWith","searchParams","isPageSegment","includes","stringifiedQuery","JSON","stringify","segments","parallelRouteKey","length","rawSegment","tree","first","segmentPath","node","parallelRoutes","children","Object","values","segmentValue","push","InvariantError","Error","constructor","message","options","name","createPromiseWithResolvers","resolve","reject","promise","Promise","res","rej","Textarea","className","props"],"mappings":"sHASgBA,eAAAA,qCAAAA,aAT8B,CAAA,CAAA,IAAA,GASvC,SAASA,EACdC,CAAmB,CACnBC,CAAmB,EAEnB,IAAMC,EAAWC,CAAAA,EAAAA,EAAAA,MAAM,AAANA,EAA4B,MACvCC,EAAWD,CAAAA,EAAAA,EAAAA,MAAAA,AAAM,EAAsB,MAS7C,MAAOE,CAAAA,EAAAA,EAAAA,WAAAA,AAAW,EAChB,AAACC,IACC,GAAgB,OAAZA,EAAkB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