tower-studio 0.2.45 → 0.2.47
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/_not-found/page.js +8 -8
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +2 -4
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +5 -4
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +3 -5
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/ask/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/notify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/pending/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/harness/reply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +4 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +5 -3
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +172 -112
- package/.next/standalone/.next/server/app/harness/page.js +8 -8
- package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +254 -158
- package/.next/standalone/.next/server/app/missions/page.js +10 -9
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/onboarding/page.js +8 -8
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/page.js +8 -8
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +245 -149
- package/.next/standalone/.next/server/app/settings/page.js +10 -11
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +286 -238
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +9 -9
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +251 -203
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +9 -9
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/build-manifest.json +18 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +18 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +413 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +25 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +228 -180
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +9 -9
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +266 -218
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +10 -11
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +149 -89
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +9 -9
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +226 -178
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +9 -9
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +293 -233
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +11 -12
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +177 -129
- package/.next/standalone/.next/server/app/workspaces/page.js +8 -8
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_09ikw5j.js +5 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +9 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-1~xqo._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.3n3t.._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.wsvr6._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0y3adwk._.js → [root-of-the-server]__0.yf1mx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0o6i1wy._.js → [root-of-the-server]__00xe-t8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0vh3112._.js → [root-of-the-server]__02yvm55._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__09arklv._.js → [root-of-the-server]__04-ty51._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0v98a~t._.js → [root-of-the-server]__065hi6e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0k9rz_z._.js → [root-of-the-server]__06iuq17._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06x1zwj._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__06~wmlx._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__092475e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0atap--._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c3je91._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dz.knv._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehwsa1._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fd9z.r._.js +30 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gcg7i.._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iyp~.k._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07xsu6m._.js → [root-of-the-server]__0j7565a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0m8t3vi._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nv83.p._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0squ613._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u8tl88._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wugb-9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0yeg1kp._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zchqv1._.js +43 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_~s0z4._.js → [root-of-the-server]__0zcy11y._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~1-i5h._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~ju4-d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10qclz-._.js +3 -0
- package/.next/standalone/.next/server/chunks/_02hac5p._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0_w835g._.js +4 -0
- package/.next/standalone/.next/server/chunks/_0je3dz2._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0tidm8l._.js +25 -2
- package/.next/standalone/.next/server/chunks/_0zok2an._.js +25 -2
- package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0aygchu._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
- package/.next/standalone/.next/server/chunks/src_lib_0d~1~wz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0ylel_1._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_providers_index_ts_0.y.3vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_config-defaults_ts_10ayktg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0se9_next_dist_0i5qmqd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0se9_next_dist_esm_build_templates_app-page_04~dhws.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0r~ty--._.js → 0ws9_lucide-react_dist_esm_icons_0gv_cwy._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00qdvw7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01bz3_g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__051tpij._.js → [root-of-the-server]__0282989._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dfqa5a._.js → [root-of-the-server]__03jikql._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ixgha6._.js → [root-of-the-server]__04dod9d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05tx27l._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0fl0l82._.js → [root-of-the-server]__07ha-7q._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07~giyb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0872sqe._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__096w7g2._.js → [root-of-the-server]__09qoc8v._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b.ej5q._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dmjt7o._.js → [root-of-the-server]__0bl842b._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lau3k_._.js → [root-of-the-server]__0c81jqz._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dh0alq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e79g0v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t_zq~v._.js → [root-of-the-server]__0fy8mj6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0g2wrd2._.js → [root-of-the-server]__0gsk~9d._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h4ltpn._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hx2p17._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0iaw1ms._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ie8~g5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~s8otw._.js → [root-of-the-server]__0j1w7ro._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0i0k_zi._.js → [root-of-the-server]__0jxfeb6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l0~scn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0tb.1li._.js → [root-of-the-server]__0mi.v4q._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vi-5xg._.js → [root-of-the-server]__0nell0t._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odoa97._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0o9jkew._.js → [root-of-the-server]__0q8o5us._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dv.-zu._.js → [root-of-the-server]__0qjjy1r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rg73f.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~4y3y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s~ak20._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t3q30a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tpho3f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__08etd~v._.js → [root-of-the-server]__0tusyj0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06s-_gx._.js → [root-of-the-server]__0x6eyvj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xftcya._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xiiocg._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xnuz05._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0znl9us._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~fdua7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1290yo~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12s3kky._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ydiu_y._.js → [root-of-the-server]__136sh9u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0dye20y._.js → _0-wp_zu._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0.-.0zk._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09rq08e._.js → _0111pr2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~6pqk.._.js → _029yl-g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_02mcoex._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_02p-udo._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_02t7f2_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_04brhyt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_08b3kyv._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0a___34._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ljrvyt._.js → _0b4v~ls._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0bdyusg._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/_0c8-9m9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0xnn~jq._.js → _0gcox_6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_01fdzzv._.js → _0gte_c4._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0hyn4md._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_13_b8hh._.js → _0lqjtwo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0noar.v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rilhs1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_078cdw~._.js → _0sbkase._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_08bq4g8._.js → _0t-0.1o._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0w~~xn0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_12la163._.js → _0xexuoi._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0xu906p._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0z-z415._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0z5~opf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0zx1ubq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~2k74h._.js +43 -0
- package/.next/standalone/.next/server/chunks/ssr/_0~rpgs_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_10a_vqn._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0h0b46r._.js → _10or.ne._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09z-55_._.js → _10q2mbe._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ytcm0j._.js → _124j7aj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_13yv8at._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_actions_07_wts6._.js +47 -0
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_components_0rowjw~._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0bndp1~._.js → src_components_ui_popover_tsx_0a78wqo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_03xtona._.js → src_lib_0-3zx.v._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_lib_00ial55._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_01-0ix1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_01d~ml9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_04y-65j._.js → src_lib_0278czx._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_07o.0r6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_09jpiip._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0bmg7ix._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0cb~2g1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fdsvpu._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fyrfen._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0-x.wbd._.js → src_lib_0gqe-g3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ixnmd0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0pgz5n6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_00p-ir2._.js → src_lib_0tq69ek._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0y5zzg-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_11~ojr2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_pty_orphan-reaper_ts_0a0qmlo._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ng0eku._.js → src_lib_schemas_ts_0ph~1ak._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +4 -0
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +2308 -1642
- package/.next/standalone/.next/static/chunks/0.2y9uc38xso-.js +1 -0
- package/.next/standalone/.next/static/chunks/00agq5_c-.llc.js +1 -0
- package/.next/standalone/.next/static/chunks/015i97g3voot2.js +2 -0
- package/.next/standalone/.next/static/chunks/01wvj~s3skc-5.js +1 -0
- package/.next/standalone/.next/static/chunks/{0c4-6qdhi645s.js → 031br6.h-zycv.js} +1 -1
- package/.next/standalone/.next/static/chunks/04.2m8l~ws19v.js +1 -0
- package/.next/standalone/.next/static/chunks/054ztat09k8d8.js +1 -0
- package/.next/standalone/.next/static/chunks/07c4b1kp_85qg.js +1 -0
- package/.next/standalone/.next/static/chunks/07f592yv~pptf.js +1 -0
- package/.next/standalone/.next/static/chunks/{0bvhkgitn__gl.js → 08j4ettv1zbmn.js} +1 -1
- package/.next/standalone/.next/static/chunks/08kc0~d-bpqxd.js +1 -0
- package/.next/standalone/.next/static/chunks/{0c.t.evwah_m4.js → 08s_oyki61yjf.js} +1 -1
- package/.next/standalone/.next/static/chunks/09bc_~h466~tj.js +1 -0
- package/.next/standalone/.next/static/chunks/0_hj_1l73v-on.js +1 -0
- package/.next/standalone/.next/static/chunks/0a54zbhpg7-ql.js +1 -0
- package/.next/standalone/.next/static/chunks/0c2po53wqe-op.js +1 -0
- package/.next/standalone/.next/static/chunks/0clhvl~13pwv2.js +1 -0
- package/.next/standalone/.next/static/chunks/0fi1kdxrc9m~d.js +1 -0
- package/.next/standalone/.next/static/chunks/0ix28r65.7o_r.js +12 -0
- package/.next/standalone/.next/static/chunks/0j56_.0_wup.m.js +1 -0
- package/.next/standalone/.next/static/chunks/0lokkque~1fox.js +1 -0
- package/.next/standalone/.next/static/chunks/0m5k~sgt78d8a.js +1 -0
- package/.next/standalone/.next/static/chunks/0mzzaly9-cwhd.js +5 -0
- package/.next/standalone/.next/static/chunks/0ov_akpudbv96.js +5 -0
- package/.next/standalone/.next/static/chunks/0pg~fc3o64-u0.js +1 -0
- package/.next/standalone/.next/static/chunks/0pvc93qomwhkq.js +1 -0
- package/.next/standalone/.next/static/chunks/0seo-lerjdkbn.js +1 -0
- package/.next/standalone/.next/static/chunks/0smoiulyzysrc.js +2 -0
- package/.next/standalone/.next/static/chunks/0ufatfbq87c84.js +1 -0
- package/.next/standalone/.next/static/chunks/{09bezwcb__18t.js → 0ujznvfinjpzn.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02xqrfqu.s8-i.js → 0ux~8zee88x-j.js} +1 -1
- package/.next/standalone/.next/static/chunks/0vy01_a6xhhrr.js +1 -0
- package/.next/standalone/.next/static/chunks/0wl8cpmvyhv0l.js +1 -0
- package/.next/standalone/.next/static/chunks/0xd_tk4asn0qj.js +1 -0
- package/.next/standalone/.next/static/chunks/0~l470bpaoz9f.js +1 -0
- package/.next/standalone/.next/static/chunks/118j.0w2pbdea.js +1 -0
- package/.next/standalone/.next/static/chunks/11yhe31en~dvt.js +1 -0
- package/.next/standalone/.next/static/chunks/13yfli6~6o4z~.js +1 -0
- package/.next/standalone/.next/static/chunks/14fch6~swodjf.css +1 -0
- package/.next/standalone/.next/static/chunks/15rlbf5rw1dd..js +1 -0
- package/.next/standalone/package.json +1 -2
- package/dist/mcp-server.cjs +1205 -4330
- package/package.json +1 -2
- package/prisma/schema.prisma +46 -5
- package/scripts/migrations/0006-project-knowledge.ts +58 -0
- package/scripts/migrations/0007-product-group.ts +67 -0
- package/skills/tower/SKILL.md +22 -92
- package/skills/tower/references/task-source.md +80 -0
- package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__034jopu._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08-s.nv._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ehx6q.._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pmamzv._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pzyjqf._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tplo5s._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tpzojh._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xasom7._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xy1t4x._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0y~y6sh._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10jnn26._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__116v_bx._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__119rbly._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0qk_esg._.js +0 -4
- package/.next/standalone/.next/server/chunks/_0t31z6q._.js +0 -5
- package/.next/standalone/.next/server/chunks/src_0aqjfcv._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_lib_0nw5n~t._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.q~~2p._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01zrinc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03x8axh._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06t.cx~._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0__klx0._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ccy_gg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cjmeyl._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dx9sp-._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f57j8r._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j1dx6p._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kn~asi._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0m.hayd._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sg4fde._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w24qox._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wq~4aj._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0yihqy6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zouyfp._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1184s~q._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0.iq8t8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_00.myc6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_00eymu8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_03-we0p._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_04szgc6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0kd_tda._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0ktexki._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0lo1nei._.js +0 -6
- package/.next/standalone/.next/server/chunks/ssr/_0mdd702._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0n0q6~9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pab_al._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pg6-.y._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0pvp63a._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_0qi4x-5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0qnobd-._.js +0 -43
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0ts~td3._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0y0_4zs._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yva1-.._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0yz5dmq._.js +0 -47
- package/.next/standalone/.next/server/chunks/ssr/_11w13--._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_09eeb85._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_0vv366l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_03x1i~1._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/src_lib_08gthaz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_090~6pq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0k8dkbn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0knbpxk._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0p_iehl._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qve1ri._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0s35u~4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x2ui80._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ypc5_d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_10jh2mz._.js +0 -3
- package/.next/standalone/.next/static/chunks/0-nppzqp-r.9c.js +0 -1
- package/.next/standalone/.next/static/chunks/0-te2tg6~a23u.js +0 -1
- package/.next/standalone/.next/static/chunks/0.64.6c1mh7d2.js +0 -1
- package/.next/standalone/.next/static/chunks/0.8n1ce9lggg4.js +0 -1
- package/.next/standalone/.next/static/chunks/0.nsmn6shzidu.js +0 -2
- package/.next/standalone/.next/static/chunks/0.zgqz~m3sjej.js +0 -1
- package/.next/standalone/.next/static/chunks/00.eotegra08r.js +0 -1
- package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +0 -1
- package/.next/standalone/.next/static/chunks/03y272e6e9o8i.js +0 -1
- package/.next/standalone/.next/static/chunks/08eyd7sq064r0.js +0 -1
- package/.next/standalone/.next/static/chunks/09b33znj4m__c.js +0 -1
- package/.next/standalone/.next/static/chunks/0d0zm8viq3ol4.js +0 -12
- package/.next/standalone/.next/static/chunks/0dktl5t_dtxu..js +0 -1
- package/.next/standalone/.next/static/chunks/0e5~nzt657k92.js +0 -1
- package/.next/standalone/.next/static/chunks/0erwxvpb9w29_.js +0 -1
- package/.next/standalone/.next/static/chunks/0gf~0e3xpa0fj.js +0 -5
- package/.next/standalone/.next/static/chunks/0gy79dfi~lnig.js +0 -1
- package/.next/standalone/.next/static/chunks/0gz3xwb5_8xwv.js +0 -1
- package/.next/standalone/.next/static/chunks/0i75~pu.bp20..js +0 -1
- package/.next/standalone/.next/static/chunks/0jn_w5b9r~beu.js +0 -1
- package/.next/standalone/.next/static/chunks/0l59z2mf1ouxu.js +0 -1
- package/.next/standalone/.next/static/chunks/0m4xd-ie7j.hx.js +0 -1
- package/.next/standalone/.next/static/chunks/0mx9ebe6we4z0.js +0 -1
- package/.next/standalone/.next/static/chunks/0nsggimu5je3g.js +0 -1
- package/.next/standalone/.next/static/chunks/0nw8nx8kafy79.js +0 -1
- package/.next/standalone/.next/static/chunks/0pzjryav9pm7p.js +0 -1
- package/.next/standalone/.next/static/chunks/0q-rl50zskr35.js +0 -1
- package/.next/standalone/.next/static/chunks/0qqy2x-fsmmmx.js +0 -1
- package/.next/standalone/.next/static/chunks/0t59wpux0g1~l.js +0 -1
- package/.next/standalone/.next/static/chunks/0uezq8wiwkq8d.js +0 -1
- package/.next/standalone/.next/static/chunks/0vrc~7m1_cuvl.js +0 -1
- package/.next/standalone/.next/static/chunks/0xbh24-hxrt~m.css +0 -1
- package/.next/standalone/.next/static/chunks/0xkkmruo8p.l_.js +0 -1
- package/.next/standalone/.next/static/chunks/0xx0pe_j2kmr9.js +0 -2
- package/.next/standalone/.next/static/chunks/0zqjqiqmorenw.js +0 -5
- package/.next/standalone/.next/static/chunks/136l78utn~v08.js +0 -1
- package/.next/standalone/.next/static/chunks/171x9kw9wcyk4.js +0 -1
- package/.next/standalone/.next/static/chunks/17m4o~gdsvuo3.js +0 -1
- package/next.config.ts +0 -18
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{f1860bJqnbYj-1WLMj7F- → dFewkdixeBoRBY6Fvw11J}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[520788,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(553798),e=a.i(940271),f=a.i(951192),g=a.i(952313),h=a.i(699570),i=a.i(866718),j=a.i(429246),k=a.i(412783),l=a.i(786304),m=a.i(563658),n=a.i(814574),o=a.i(368114),p=a.i(268317),q=a.i(369289),r=a.i(711796);let s=(0,r.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var t=a.i(350739);let u=(0,r.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var v=a.i(190076),w=a.i(705594),x=a.i(264589),y=a.i(567648),z=a.i(54384),A=a.i(774881);let B=(0,r.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=a.i(975231);let D=(0,r.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var E=a.i(509405);let F=(0,r.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var G=a.i(704494),H=a.i(913284),I=a.i(468862),J=a.i(347165),K=a.i(912868),L=a.i(10390),M=a.i(17174),N=a.i(762183),O=a.i(405540),P=a.i(780410);let Q=(0,P.createServerReference)("005c2726b05a25fd0df69e27f64e4c4d3ac62d4aeb",P.callServer,void 0,P.findSourceMapURL,"getAvailableTerminalApps"),R=(0,P.createServerReference)("000978f807ee1c10e9f24a8760105b9a4286b20f03",P.callServer,void 0,P.findSourceMapURL,"getAvailableEditors");var S=a.i(244437);let T=(0,P.createServerReference)("405e5a97f4a478e4899cfc8b7ce4f6b6c97fc86e00",P.callServer,void 0,P.findSourceMapURL,"createPrompt"),U=(0,P.createServerReference)("601062409a7b3954f4a42883e96f14d7afb0370260",P.callServer,void 0,P.findSourceMapURL,"updatePrompt"),V=(0,P.createServerReference)("40421b2504036074195fa22b1e0c6c820a898b1d6e",P.callServer,void 0,P.findSourceMapURL,"deletePrompt"),W=(0,P.createServerReference)("004304143784128b08e36314b07306fa80d5ecbc60",P.callServer,void 0,P.findSourceMapURL,"getBuiltinPrompts"),X=(0,P.createServerReference)("406aa1e9f7d440ab65ea75aa271fd1cb3fbfbb8e74",P.callServer,void 0,P.findSourceMapURL,"saveSystemDirective"),Y=(0,P.createServerReference)("007eba1407880880480a86b1bb8c39f4a162834ed1",P.callServer,void 0,P.findSourceMapURL,"resetSystemDirective"),Z=(0,P.createServerReference)("0077b903d85d93767146dba4e8ac8db9fb0c852a56",P.callServer,void 0,P.findSourceMapURL,"getAvailableProviders");var $=a.i(785259),_=a.i(43775);let aa=(0,r.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"}]]);var ab=a.i(324954);let ac=(0,r.default)("folder-up",[["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"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var ad=a.i(161664),ae=a.i(811344),af=a.i(607219);let ag=(0,P.createServerReference)("40447126abd2c5a63ed91a5f3e830fe183297ef8fa",P.callServer,void 0,P.findSourceMapURL,"createBackup"),ah=(0,P.createServerReference)("00f1ed26f90c69edd42bfef3c401537f8b7cea3b1c",P.callServer,void 0,P.findSourceMapURL,"listBackupFiles"),ai=(0,P.createServerReference)("40e8466353ea4f7fc936124e5b9bc6959fa5e85767",P.callServer,void 0,P.findSourceMapURL,"deleteBackupFile"),aj=(0,P.createServerReference)("4017ddf42ac9ad60bd0ca32399cb77fd89c1dde7a3",P.callServer,void 0,P.findSourceMapURL,"restoreBackup"),ak=(0,P.createServerReference)("40ea8ccda8e40c448f0efdf57802533c899085f145",P.callServer,void 0,P.findSourceMapURL,"resetSystem"),al=(0,P.createServerReference)("0049e44e964b52c779ca7bd2c0b100be7448b7f227",P.callServer,void 0,P.findSourceMapURL,"getBackupDir"),am=(0,P.createServerReference)("409f087619c775f2217c7340456a6c261f94f3a52f",P.callServer,void 0,P.findSourceMapURL,"setBackupDir"),an=(0,P.createServerReference)("00cfe89ac15dcfa343a12995a8d5fcf4a4e1e65661",P.callServer,void 0,P.findSourceMapURL,"getStorageLocation"),ao=(0,P.createServerReference)("40ccbede9888dad3bec7d9b6f55ac4ba5b09f69dc9",P.callServer,void 0,P.findSourceMapURL,"setStorageLocation");function ap(){let{t:a,locale:e}=(0,f.useI18n)(),j=(0,d.useRouter)(),[k,l]=(0,c.useState)([]),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(!1),[B,D]=(0,c.useState)(""),E=(0,c.useRef)(null),[F,H]=(0,c.useState)(!1),[I,J]=(0,c.useState)(""),K=(0,c.useCallback)(async()=>{w(!0);try{let[a,b,c]=await Promise.all([ah(),al(),an()]);l(a),o(b),s(c)}finally{w(!1)}},[]);(0,c.useEffect)(()=>{K()},[K]);let L=async()=>{let b=B.trim()||void 0;A(!1),D(""),y("create");try{await ag(b),g.toast.success(a("settings.backup.createSuccess")),await K()}catch{g.toast.error(a("settings.backup.createError"))}finally{y(null)}},M=async b=>{if(confirm(a("settings.backup.restoreConfirm"))){y("restore");try{await aj(b),g.toast.success(a("settings.backup.restoreSuccess"),{action:{label:a("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await K()}catch{g.toast.error(a("settings.backup.restoreError"))}finally{y(null)}}},N=async b=>{if(confirm(a("settings.backup.deleteConfirm")))try{await ai(b),g.toast.success(a("settings.backup.deleteSuccess")),l(a=>a.filter(a=>a.filename!==b))}catch{g.toast.error(a("settings.backup.deleteError"))}},O=async b=>{q(!1);try{await am(b),o(b),g.toast.success(a("settings.backup.dirSaved")),await K()}catch{g.toast.error(a("settings.backup.dirError"))}},P=async b=>{y("storage");try{let c=await ao({newPath:b});if(!c.ok)return void g.toast.error(c.error||a("settings.storage.moveError"));g.toast.success(a("settings.storage.moveSuccess",{count:String(c.moved??0)})),await K()}catch(b){g.toast.error(b instanceof Error?b.message:a("settings.storage.moveError"))}finally{y(null)}},Q=async b=>{u(!1),confirm(a("settings.storage.moveConfirm"))&&await P(b)},R=async()=>{!r||r.isDefault||confirm(a("settings.storage.resetConfirm"))&&await P(r.default)},S=async b=>{let c=b.target.files?.[0];if(c){b.target.value="",y("import");try{let b=new FormData;b.append("file",c);let d=await fetch("/api/internal/backup/import",{method:"POST",body:b});if(!d.ok){let b=await d.json();g.toast.error("Invalid backup archive"===b.error?a("settings.backup.importInvalid"):(b.error,a("settings.backup.importError")));return}g.toast.success(a("settings.backup.importSuccess")),await K()}catch{g.toast.error(a("settings.backup.importError"))}finally{y(null)}}},T=async()=>{if("RESET"===I){H(!1),J(""),y("reset");try{await ak("RESET"),g.toast.success(a("settings.backup.resetSuccess")),j.push("/")}catch{g.toast.error(a("settings.backup.resetError"))}finally{y(null)}}},U=null!==x;return(0,b.jsxs)("div",{className:"space-y-6",children:[("restore"===x||"reset"===x)&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,b.jsx)(G.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===x?a("settings.backup.restoring"):a("settings.backup.resetting")})]})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-base font-semibold",children:a("settings.storage.sectionTitle")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("settings.storage.hint")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{children:[a("settings.storage.current"),":"]}),(0,b.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:r?.current??"…"}),r?.isDefault&&(0,b.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:a("settings.storage.defaultBadge")}),(0,b.jsx)(h.Button,{variant:"ghost",onClick:()=>u(!0),disabled:"storage"===x,className:"text-xs text-muted-foreground",children:"storage"===x?(0,b.jsx)(G.Loader2,{className:"h-3 w-3 animate-spin"}):a("settings.storage.change")}),r&&!r.isDefault&&(0,b.jsx)(h.Button,{variant:"ghost",onClick:R,disabled:"storage"===x,className:"text-xs text-muted-foreground",children:a("settings.storage.reset")})]}),(0,b.jsx)(_.FolderBrowserDialog,{open:t,onOpenChange:u,onSelect:Q})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-base font-semibold",children:a("settings.backup.sectionTitle")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{children:[a("settings.backup.dir"),":"]}),(0,b.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,b.jsx)(h.Button,{variant:"ghost",onClick:()=>q(!0),className:"text-xs text-muted-foreground",children:a("settings.backup.dirChange")})]}),(0,b.jsx)(_.FolderBrowserDialog,{open:p,onOpenChange:q,onSelect:O})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Button,{onClick:()=>{D(""),A(!0)},disabled:U,className:"gap-2",children:"create"===x?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-4 w-4 animate-spin"})," ",a("settings.backup.creating")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aa,{className:"h-4 w-4"})," ",a("settings.backup.create")]})}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsxs)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",disabled:U,onClick:()=>E.current?.click(),className:"gap-2"}),children:[(0,b.jsx)(ac,{className:"h-4 w-4"}),a("settings.backup.import")]}),(0,b.jsx)($.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.importHint")})]}),(0,b.jsx)("input",{ref:E,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:S})]}),(0,b.jsx)(n.Dialog,{open:z,onOpenChange:A,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(n.DialogHeader,{children:(0,b.jsx)(n.DialogTitle,{children:a("settings.backup.create")})}),(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.backup.createLabel")}),(0,b.jsx)(i.Input,{value:B,onChange:a=>D(a.target.value),onKeyDown:a=>"Enter"===a.key&&L(),placeholder:a("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>A(!1),children:a("common.cancel")}),(0,b.jsx)(h.Button,{onClick:L,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:a("settings.backup.create")})]})]})}),v?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(G.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===k.length?(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,b.jsx)(af.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("settings.backup.empty")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a("settings.backup.emptyDesc")})]}):(0,b.jsx)("div",{className:"space-y-3",children:k.map(c=>{var d,f;return(0,b.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[c.label?(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:c.label}):(0,b.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:c.filename}),c.autoBackup&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:a("settings.backup.autoLabel")})]}),c.label&&(0,b.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:c.filename}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(d=c.size)<1024?`${d} B`:d<1048576?`${(d/1024).toFixed(1)} KB`:`${(d/1048576).toFixed(1)} MB`," · ",(f=c.createdAt,new Date(f).toLocaleString("zh"===e?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),c.preview.length>0&&(0,b.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[c.preview.map((a,c)=>(0,b.jsxs)("span",{children:[c>0&&" ",a.workspace,"(",a.projects.join(", "),")"]},c)),c.stats.workspaces>c.preview.length&&(0,b.jsxs)("span",{children:[" ",a("settings.backup.workspaces",{count:String(c.stats.workspaces)})]})]}),(0,b.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[a("settings.backup.projects",{count:String(c.stats.projects)})," · ",a("settings.backup.tasks",{count:String(c.stats.tasks)})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>M(c.filename),disabled:U,className:"text-muted-foreground hover:text-foreground"}),children:(0,b.jsx)(ab.Upload,{className:"h-3.5 w-3.5"})}),(0,b.jsx)($.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.restore")})]}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(c.filename),disabled:U,className:"text-muted-foreground hover:text-rose-400"}),children:(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,b.jsx)($.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.delete")})]})]})]})},c.filename)})}),(0,b.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,b.jsx)(ae.AlertTriangle,{className:"h-4 w-4"}),a("settings.backup.dangerZone")]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:a("settings.backup.resetDesc")}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{J(""),H(!0)},disabled:U,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,b.jsx)(ad.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),a("settings.backup.reset")]})]}),(0,b.jsx)(n.Dialog,{open:F,onOpenChange:H,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:a("settings.backup.resetConfirmTitle")}),(0,b.jsx)(n.DialogDescription,{children:a("settings.backup.resetConfirmDesc")})]}),(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.backup.resetConfirmInput")}),(0,b.jsx)(i.Input,{value:I,onChange:a=>J(a.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>H(!1),children:a("common.cancel")}),(0,b.jsx)(h.Button,{disabled:"RESET"!==I,onClick:T,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:a("settings.backup.reset")})]})]})})]})}var aq=a.i(953093),ar=a.i(668116);let as=(0,r.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var at=a.i(22761),au=a.i(963326),av=a.i(192369),aw=a.i(599209),ax=a.i(627141);let ay=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function az({cmd:a}){let{t:d}=(0,f.useI18n)(),[e,i]=(0,c.useState)(!1),j=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(a);else{let b=document.createElement("textarea");b.value=a,document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b)}i(!0),g.toast.success(d("common.copied")),setTimeout(()=>i(!1),1500)}catch{g.toast.error(d("common.copyFailed"))}};return(0,b.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,b.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:a}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":d("common.copy"),onClick:j,children:e?(0,b.jsx)(ar.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(at.Copy,{className:"h-3 w-3"})})]})}function aA({extension:a}){let{t:d}=(0,f.useI18n)(),{status:e,loading:i,isInstalling:j,install:k,uninstall:l,refresh:m}=(0,ax.useExtension)(a.id),[n,o]=(0,c.useState)(!1),p=a.icon,q=e.installed,r=async()=>{let b=await k();b.success?g.toast.success(d("settings.extensions.installSuccess").replace("{name}",a.name)):g.toast.error(d("settings.extensions.installFailed").replace("{name}",a.name)+(b.error?`: ${b.error.slice(0,200)}`:""))},s=async()=>{let b=await l();b.success?g.toast.success(d("settings.extensions.uninstallSuccess").replace("{name}",a.name)):g.toast.error(d("settings.extensions.uninstallFailed").replace("{name}",a.name)+(b.error?`: ${b.error.slice(0,200)}`:""))},t=async()=>{o(!0);try{await m()}finally{o(!1)}},u=()=>{window.open(a.homepageUrl,"_blank","noopener,noreferrer")};return(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,b.jsx)(p,{className:"h-5 w-5 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:a.name}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a.description})]})]}),(0,b.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",a.sizeMB," MB"]})]}),(0,b.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:d("common.loading")})]}):q?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(H.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,b.jsxs)("span",{className:"text-foreground",children:[d("settings.extensions.installed"),e.version?` v${e.version}`:""]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(as,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:d("settings.extensions.notInstalledShort")})]})}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[q?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"default",onClick:r,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.reinstalling")]}):d("settings.extensions.reinstall")}),(0,b.jsx)(h.Button,{variant:"outline",onClick:s,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.uninstalling")]}):d("settings.extensions.uninstall")})]}):a.manualInstall?(0,b.jsxs)(aw.Popover,{children:[(0,b.jsx)(aw.PopoverTrigger,{render:a=>(0,b.jsxs)(h.Button,{variant:"default",...a,children:[(0,b.jsx)(aa,{className:"h-3.5 w-3.5"}),d("settings.extensions.installViaHomepage")]})}),(0,b.jsxs)(aw.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,b.jsx)("p",{children:d("settings.extensions.manualInstallHintIntro")}),(0,b.jsx)("div",{className:"space-y-2",children:ay.map(({os:a,cmd:c})=>(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:a}),(0,b.jsx)(az,{cmd:c})]},a))}),(0,b.jsx)("p",{className:"text-muted-foreground",children:d("settings.extensions.manualInstallHintAfter")}),(0,b.jsxs)("button",{type:"button",onClick:u,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,b.jsx)(au.ExternalLink,{className:"h-3 w-3"}),d("settings.extensions.visitHomepage")]})]})]}):(0,b.jsx)(h.Button,{variant:"default",onClick:r,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.installing")]}):d("settings.extensions.install")}),(0,b.jsxs)(h.Button,{variant:"ghost",onClick:t,disabled:n,children:[(0,b.jsx)(av.RefreshCw,{className:`h-3.5 w-3.5 ${n?"animate-spin":""}`}),d("settings.extensions.recheck")]}),(0,b.jsxs)(h.Button,{variant:"ghost",onClick:u,children:[(0,b.jsx)(au.ExternalLink,{className:"h-3.5 w-3.5"}),d("settings.extensions.visitHomepage")]})]})]})}function aB(){let{t:a}=(0,f.useI18n)(),c=(0,aq.listExtensionMetadata)();return(0,b.jsxs)("div",{className:"space-y-5",children:[(0,b.jsxs)("header",{children:[(0,b.jsx)("h2",{className:"text-base font-semibold",children:a("settings.extensions.title")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("settings.extensions.desc")})]}),(0,b.jsx)("div",{className:"space-y-3",children:c.map(a=>(0,b.jsx)(aA,{extension:a},a.id))})]})}a.i(423993);var aC=a.i(109603),aD=a.i(975787),aE=a.i(875846),aF=a.i(718799);let aG=["global","panels","missions"],aH=new Set(["missions.cycleBack"]);function aI({keys:a}){return(0,b.jsx)(aF.KeyCombo,{keys:a})}function aJ(){let a,{t:d}=(0,f.useI18n)(),e=(0,aE.useKeymapStore)(a=>a.overrides),i=(0,aE.useKeymapStore)(a=>a.setBinding),j=(0,aE.useKeymapStore)(a=>a.resetBinding),k=(0,aE.useKeymapStore)(a=>a.resetAll),[m,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),r=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(m){let a=requestAnimationFrame(()=>r.current?.focus());return()=>cancelAnimationFrame(a)}},[m]);let s=(0,c.useMemo)(()=>{let a=new Map;for(let b of aC.SHORTCUT_ACTIONS)for(let c of e[b.id]??[...b.defaultKeys])a.has(c)||a.set(c,b.id);return a},[e]),t=(0,c.useMemo)(()=>aG.map(a=>({group:a,actions:aC.SHORTCUT_ACTIONS.filter(b=>b.group===a&&!aH.has(b.id))})).filter(a=>a.actions.length>0),[]),u=m?(0,aC.getAction)(m):null,v=p&&m&&(a=s.get(p))&&a!==m?a:null;function w(){o(null),q(null)}return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("header",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-base font-semibold",children:d("settings.keyboardShortcuts")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:d("settings.keyboardShortcutsDesc")})]}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:function(){k(),g.toast.success(d("settings.shortcuts.resetAllDone"))},children:[(0,b.jsx)(ad.RotateCcw,{className:"h-3.5 w-3.5"}),d("settings.shortcuts.resetAll")]})]}),(0,b.jsx)("div",{className:"space-y-6",children:t.map(({group:a,actions:c})=>(0,b.jsxs)("section",{children:[(0,b.jsx)("h3",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:d(`shortcuts.group.${a}`)}),(0,b.jsx)("ul",{className:"divide-y divide-border/50 rounded-xl border border-border bg-card",children:c.map(a=>{let c,f=a.id in e;return(0,b.jsxs)("li",{className:"flex items-center justify-between gap-4 px-5 py-3.5",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:d(a.descriptionKey)}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,b.jsx)(aI,{keys:e[c=a.id]??[...(0,aC.getAction)(c).defaultKeys]}),a.configurable?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>{var b;return b=a.id,void(q(null),o(b))},children:d("settings.shortcuts.rebind")}),f&&(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>j(a.id),children:(0,b.jsx)(ad.RotateCcw,{className:"h-3.5 w-3.5"})})}),(0,b.jsx)($.TooltipContent,{children:d("settings.shortcuts.reset")})]})]}):(0,b.jsx)(l.Badge,{variant:"outline",className:"text-muted-foreground",children:d("settings.shortcuts.fixed")})]})]},a.id)})})]},a))}),(0,b.jsx)(n.Dialog,{open:null!==m,onOpenChange:a=>!a&&w(),children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:u?d(u.descriptionKey):d("settings.shortcuts.rebind")}),(0,b.jsx)(n.DialogDescription,{children:d("settings.shortcuts.pressKey")})]}),(0,b.jsx)("textarea",{ref:r,readOnly:!0,tabIndex:0,"aria-label":d("settings.shortcuts.pressKey"),onKeyDown:a=>{a.preventDefault(),a.stopPropagation();let b=(0,aD.serializeKeyEvent)(a.nativeEvent);b&&q(b)},className:"flex h-20 w-full cursor-pointer resize-none items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 text-center text-sm outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,b.jsx)("div",{className:"flex min-h-8 items-center justify-center",children:p?(0,b.jsx)(aI,{keys:[p]}):(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:d("settings.shortcuts.pressKey")})}),v&&(0,b.jsx)("p",{className:"text-center text-xs text-amber-600 dark:text-amber-400",children:d("settings.shortcuts.conflict",{name:d((0,aC.getAction)(v).descriptionKey)})}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:w,children:d("settings.shortcuts.cancel")}),(0,b.jsx)(h.Button,{variant:"default",onClick:function(){m&&p&&(i(m,[p]),w(),g.toast.success(d("settings.shortcuts.saved")))},disabled:!p,children:d("settings.shortcuts.saveBtn")})]})]})})]})}var aK=a.i(690251),aL=a.i(506913),aM=a.i(344393),aN=a.i(884664),aN=aN,aO=a.i(761818),aO=aO;let aP=(0,r.default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);var aQ=a.i(580701);let aR=(0,P.createServerReference)("40048f5ed131132ebede05519d16440a68f133c591",P.callServer,void 0,P.findSourceMapURL,"testHarnessTarget"),aS=["feishu","openclaw","hermes"],aT={feishu:["feishu"],openclaw:["telegram","signal","whatsapp","discord","slack","imessage"],hermes:["telegram","discord","slack","whatsapp","signal","feishu","wechat","wecom","dingtalk","qq","matrix","email"]},aU=[...new Set(Object.values(aT).flat())],aV="__custom__",aW=a=>aT[a]??[],aX={feishu:"https://open.feishu.cn/",openclaw:"https://docs.openclaw.ai/",hermes:"https://hermes-agent.nousresearch.com/docs/"};function aY(){let{t:a}=(0,f.useI18n)(),[d,e]=(0,c.useState)([]),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(new Set),[n,o]=(0,c.useState)(!0),[p,q]=(0,c.useTransition)(),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(null);(0,c.useEffect)(()=>{(0,M.getConfigValue)("harness.targets",[]).then(a=>{let b=(Array.isArray(a)?a:[]).map(a=>({id:a.id??crypto.randomUUID(),gateway:aS.includes(a.gateway)?a.gateway:"feishu",downstream:a.downstream??"feishu",active:!!a.active}));b.length>0&&!b.some(a=>a.active)&&(b[0].active=!0),e(b),m(new Set(b.filter(a=>a.downstream&&!aU.includes(a.downstream)).map(a=>a.id)))}).finally(()=>o(!1))},[]);let x=(a,b)=>e(c=>c.map(c=>c.id===a?{...c,...b}:c)),y=a=>{e(b=>{let c=b.find(b=>b.id===a)?.active,d=b.filter(b=>b.id!==a);return c&&d.length>0&&!d.some(a=>a.active)&&(d[0].active=!0),d}),j===a&&k(null)},z=(a,b)=>m(c=>{let d=new Set(c);return b?d.add(a):d.delete(a),d}),B=async()=>{try{await navigator.clipboard.writeText("帮我把 Tower 无人值守的通知渠道配置好,步骤:\n1. 用 playwright 打开对应平台的开放后台,注册/创建一个自建应用(机器人)。文档:飞书开放平台 https://open.feishu.cn/ ;OpenClaw https://docs.openclaw.ai/ ;Hermes https://hermes-agent.nousresearch.com/docs/ 。\n2. 拿到 appId / appSecret(或 webhook 地址 / token),开通「发送消息」权限。\n3. 建议**新建一个唯一名称的专属群组**(如「Tower 无人值守通知」),把机器人加进去 —— 避免同名群/人导致发错。记下群 id(或我的用户 id)。\n4. 把凭据配置到对应平台的 MCP(如飞书 MCP 的 config),确保能调用它发送消息。\n5. 在 Tower「设置 → 通知 → 无人值守发送渠道」加一条对应网关的渠道,点「测试」验证能收到消息。"),g.toast.success(a("settings.harness.copied"))}catch{g.toast.error("复制失败")}},D=async a=>{if(r.trim()){u(!0),w(null);try{let b=await aR({gateway:a.gateway,downstream:a.downstream,dest:r.trim()});w(b)}catch(a){w({ok:!1,output:a instanceof Error?a.message:String(a)})}finally{u(!1)}}},E=b=>aU.includes(b)?a(`settings.harness.ds.${b}`):b,F=({label:a,children:c})=>(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:a}),c]});return(0,b.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:a("settings.harness.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a("settings.harness.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2 rounded-lg bg-muted/30 px-3 py-2",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)(aL.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{children:a("settings.harness.notice")})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 pl-5 text-xs",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a("settings.harness.docsLabel"),":"]}),aS.map(c=>aX[c]?(0,b.jsxs)("a",{href:aX[c],target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-primary hover:underline",children:[a(`settings.harness.gateway.${c}`),(0,b.jsx)(au.ExternalLink,{className:"h-3 w-3"})]},c):null),(0,b.jsxs)("button",{type:"button",onClick:B,className:"inline-flex items-center gap-1 text-primary hover:underline",children:[(0,b.jsx)(at.Copy,{className:"h-3 w-3"}),a("settings.harness.copyPrompt")]})]})]}),n&&(0,b.jsx)(G.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}),(0,b.jsx)("div",{className:"space-y-2",children:d.map(c=>{var d;let f,g=l.has(c.id);return j===c.id?(0,b.jsxs)("div",{className:"rounded-lg border bg-muted/30 p-3 space-y-3",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(F,{label:a("settings.harness.gatewayLabel"),children:(0,b.jsxs)(aQ.Select,{value:c.gateway,onValueChange:a=>{let b=a??"feishu",d=aW(b);x(c.id,{gateway:b,downstream:d.includes(c.downstream)?c.downstream:d[0]??""}),z(c.id,!1)},children:[(0,b.jsx)(aQ.SelectTrigger,{className:"w-full",children:(0,b.jsx)("span",{className:"truncate",children:a(`settings.harness.gateway.${c.gateway}`)})}),(0,b.jsx)(aQ.SelectContent,{children:aS.map(c=>(0,b.jsx)(aQ.SelectItem,{value:c,children:a(`settings.harness.gateway.${c}`)},c))})]})}),(0,b.jsx)(F,{label:a("settings.harness.downstreamLabel"),children:(0,b.jsxs)(aQ.Select,{value:g?aV:c.downstream,onValueChange:a=>{a===aV?(z(c.id,!0),x(c.id,{downstream:""})):(z(c.id,!1),x(c.id,{downstream:a??""}))},children:[(0,b.jsx)(aQ.SelectTrigger,{className:"w-full",children:(0,b.jsx)("span",{className:"truncate",children:g?a("settings.harness.ds.custom"):c.downstream?E(c.downstream):a("settings.harness.downstreamPlaceholder")})}),(0,b.jsxs)(aQ.SelectContent,{children:[aW(c.gateway).map(c=>(0,b.jsx)(aQ.SelectItem,{value:c,children:a(`settings.harness.ds.${c}`)},c)),"feishu"!==c.gateway&&(0,b.jsx)(aQ.SelectItem,{value:aV,children:a("settings.harness.ds.custom")})]})]})})]}),g&&(0,b.jsx)(F,{label:a("settings.harness.customLabel"),children:(0,b.jsx)(i.Input,{value:c.downstream,onChange:a=>x(c.id,{downstream:a.target.value}),placeholder:a("settings.harness.customPlaceholder")})}),(0,b.jsx)(F,{label:a("settings.harness.test"),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:r,onChange:a=>s(a.target.value),placeholder:a("settings.harness.testDestPlaceholder"),className:"flex-1"}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>D(c),disabled:t||!r.trim(),children:[t?(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,b.jsx)(aM.Send,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:t?a("settings.harness.testing"):a("settings.harness.testSend")})]})]}),v&&(0,b.jsxs)("div",{className:`flex items-start gap-1.5 rounded bg-muted/40 px-2 py-1 text-xs ${v.ok?"text-emerald-500":"text-rose-400"}`,children:[v.ok?(0,b.jsx)(aN.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):(0,b.jsx)(aO.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{className:"whitespace-pre-wrap break-words",children:v.ok?a("settings.harness.testOk"):`${a("settings.harness.testFail")}:${v.output}`})]})]})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,b.jsxs)(h.Button,{onClick:()=>{k(null),w(null)},children:[(0,b.jsx)(ar.Check,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.done")})]}),(0,b.jsxs)(h.Button,{variant:"ghost",className:"text-muted-foreground",onClick:()=>y(c.id),children:[(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.remove")})]})]})]},c.id):(0,b.jsxs)("div",{className:`flex items-center gap-2.5 rounded-lg border px-3 py-2 ${c.active?"border-primary/40 bg-primary/5":"bg-muted/20"}`,children:[(0,b.jsx)("button",{type:"button",onClick:()=>{let a;return a=c.id,e(b=>b.map(b=>({...b,active:b.id===a})))},title:a("settings.harness.setActive"),className:c.active?"text-primary":"text-muted-foreground hover:text-foreground",children:c.active?(0,b.jsx)(aP,{className:"h-4 w-4"}):(0,b.jsx)(as,{className:"h-4 w-4"})}),(0,b.jsx)("span",{className:"truncate text-sm text-foreground",children:(d=c,f=a(`settings.harness.gateway.${d.gateway}`),d.downstream?`${f} \xb7 ${E(d.downstream)}`:f)}),c.active&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-primary/15 px-2 py-0.5 text-[10px] font-medium text-primary ring-1 ring-primary/25",children:a("settings.harness.active")}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>{k(c.id),w(null),s("")},title:a("settings.harness.edit"),children:(0,b.jsx)(aK.Pencil,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>y(c.id),title:a("settings.harness.remove"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},c.id)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{let a=crypto.randomUUID();e(b=>[...b,{id:a,gateway:"feishu",downstream:"feishu",active:0===b.length}]),k(a),w(null)},className:"text-muted-foreground",children:[(0,b.jsx)(A.Plus,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.addTarget")})]}),(0,b.jsx)(h.Button,{onClick:()=>q(async()=>{await (0,N.setConfigValue)("harness.targets",d),k(null),g.toast.success(a("settings.harness.saved"))}),disabled:p,className:"rounded-lg",children:a("common.save")})]})]})}function aZ({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,o.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function a$({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,o.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let a_=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:q.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:s,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:t.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:u,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:x.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:v.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:w.HardDrive,accent:"cyan"},{id:"keyboard-shortcuts",labelKey:"settings.keyboardShortcuts",descKey:"settings.keyboardShortcutsDesc",icon:y.Keyboard,accent:"violet"}],a0={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},a1="ai-manager:default-cli-adapter",a2={host:"",ownerMatch:"*",localPathTemplate:"",priority:0},a3=a=>a.replace(/\\/g,"/").replace(/\/+$/,"");function a4(){let a=(0,d.useRouter)(),{t:q}=(0,f.useI18n)(),{theme:r,setTheme:s}=(0,e.useTheme)(),{locale:t,setLocale:u}=(0,f.useI18n)(),[v,w]=(0,c.useState)("general"),x=(0,c.useRef)(null),[y,P]=(0,c.useState)({left:0,width:0}),[aa,ab]=(0,c.useState)(!1),[ac,ad]=(0,c.useState)("Terminal"),[ae,af]=(0,c.useState)([]),[ag,ah]=(0,c.useState)(""),[ai,aj]=(0,c.useState)([]),[ak,al]=(0,c.useState)(13),[am,an]=(0,c.useState)("Menlo, Monaco, 'Courier New', monospace"),[ao,aq]=(0,c.useState)([]),[ar,as]=(0,c.useState)("claude"),[at,au]=(0,c.useState)(null),[av,aw]=(0,c.useState)({}),[ax,ay]=(0,c.useState)([]),[az,aA]=(0,c.useState)(!1),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)(null),[aG,aH]=(0,c.useState)(""),[aI,aK]=(0,c.useState)(""),[aL,aM]=(0,c.useState)(""),[aN,aO]=(0,c.useState)(null),[aP,aQ]=(0,c.useState)(""),[aR,aS]=(0,c.useState)(!1),[aT,aU]=(0,c.useState)(!1),[aV,aW]=(0,c.useState)(!1),[aX,a4]=(0,c.useState)([]),[a5,a6]=(0,c.useState)(null),[a7,a8]=(0,c.useState)({...a2}),[a9,ba]=(0,c.useState)(!1),[bb,bc]=(0,c.useState)({...a2}),[bd,be]=(0,c.useState)(!1),[bf,bg]=(0,c.useState)(!1),[bh,bi]=(0,c.useState)(0),[bj,bk]=(0,c.useState)(null),[bl,bm]=(0,c.useState)(null),[bn,bo]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,archiveDelayDays:7,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[bp,bq]=(0,c.useState)({timeoutSec:30}),[br,bs]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[bt,bu]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[bv,bw]=(0,c.useState)(null),[bx,by]=(0,c.useState)(!1),[bz,bA]=(0,c.useState)(""),[bB,bC]=(0,c.useState)(!0);(0,c.useEffect)(()=>ab(!0),[]),(0,c.useEffect)(()=>{(0,M.getConfigValue)("terminal.app","Terminal").then(ad),Q().then(af),(0,M.getConfigValue)("editor.command","").then(ah),R().then(aj),(0,M.getConfigValue)("terminal.fontSize",13).then(al),(0,M.getConfigValue)("terminal.fontFamily","Menlo, Monaco, 'Courier New', monospace").then(an)},[]),(0,c.useEffect)(()=>{if(0===ae.length||!ac||ae.some(a=>a.value===ac))return;let a=ae.find(a=>a.name===ac);a&&(ad(a.value),(0,N.setConfigValue)("terminal.app",a.value))},[ae,ac]),(0,c.useEffect)(()=>{if(0===ai.length||!ag||ai.some(a=>a.command===ag))return;let a=ai.find(a=>a.name===ag);a&&(ah(a.command),(0,N.setConfigValue)("editor.command",a.command))},[ai,ag]),(0,c.useEffect)(()=>{Z().then(aq);let a=localStorage.getItem(a1);a&&as(a)},[]),(0,c.useEffect)(()=>{(0,S.getPrompts)().then(ay)},[]),(0,c.useEffect)(()=>{W().then(a=>{aO(a),aQ(a.systemDirective)})},[]);let bD=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();bw(b)}}catch{}};async function bE(a){if(!at){au(a),aw(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a})}),c=await b.json();aw(b=>({...b,[a]:c}))}catch{aw(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{au(null)}}}(0,c.useEffect)(()=>{(0,M.getConfigValue)("git.pathMappingRules",[]).then(a=>{let b=new Set,c=!1,d=a.map(a=>{if(!a.id||b.has(a.id)){c=!0;let d={...a,id:crypto.randomUUID()};return b.add(d.id),d}return b.add(a.id),a});a4(d),c&&(0,N.setConfigValue)("git.pathMappingRules",d)}),(0,M.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{bA(a.join(", "))}),bD(),(0,O.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","board.archiveDelayDays","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{let b=a["system.maxUploadBytes"]??0x3200000,c=a["system.maxReadableFileBytes"]??5242880;bo({maxUploadMb:Math.round(b/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(c/1024/1024),archiveDelayDays:a["board.archiveDelayDays"]??7,taskDefaultUseWorktree:"boolean"!=typeof a["task.defaultUseWorktree"]||a["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof a["task.defaultAutoStart"]&&a["task.defaultAutoStart"]}),bq({timeoutSec:a["git.timeoutSec"]??30}),bs({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80,codeTimeoutSec:a["search.codeTimeoutSec"]??30}),bu({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{(0,M.getConfigValue)("notification.enabled",!0).then(bC)},[]);let bF=(0,c.useCallback)(()=>{aD(null),aH(""),aK(""),aM(""),aA(!0)},[]),bG=(0,c.useCallback)(a=>{aD(a),aH(a.name),aK(a.description??""),aM(a.content),aA(!0)},[]),bH=(0,c.useCallback)(async()=>{aG.trim()&&aL.trim()&&(aC?await U(aC.id,{name:aG.trim(),description:aI.trim()||void 0,content:aL.trim()}):await T({name:aG.trim(),description:aI.trim()||void 0,content:aL.trim()}),aA(!1),ay(await (0,S.getPrompts)()),a.refresh())},[aG,aI,aL,aC,a]),bI=(0,c.useCallback)(async()=>{aE&&(await V(aE),aF(null),ay(await (0,S.getPrompts)()),a.refresh())},[aE,a]),bJ=(0,c.useCallback)(async()=>{aS(!0);try{await X(aP);let a=await W();aO(a),aQ(a.systemDirective),aU(!1),g.toast.success(q("settings.prompts.builtin.saved"))}finally{aS(!1)}},[aP,q]),bK=(0,c.useCallback)(async()=>{aS(!0);try{let a=await Y(),b=await W();aO(b),aQ(a),g.toast.info(q("settings.prompts.builtin.resetDone"))}finally{aS(!1)}},[q]),bL=async()=>{await (0,N.setConfigValue)("system.maxUploadBytes",1024*bn.maxUploadMb*1024),await (0,N.setConfigValue)("system.maxConcurrentExecutions",bn.maxConcurrent),await (0,N.setConfigValue)("system.maxReadableFileBytes",1024*bn.maxReadableMb*1024),await (0,N.setConfigValue)("board.archiveDelayDays",bn.archiveDelayDays)},bM=async()=>{await (0,N.setConfigValue)("task.defaultUseWorktree",bn.taskDefaultUseWorktree),await (0,N.setConfigValue)("task.defaultAutoStart",bn.taskDefaultAutoStart),await (0,N.setConfigValue)("task.mcpDefaultsConfigured",!0)},bN=async()=>{await (0,N.setConfigValue)("git.timeoutSec",bp.timeoutSec)},bO=async()=>{await (0,N.setConfigValue)("search.resultLimit",br.resultLimit),await (0,N.setConfigValue)("search.allModeCap",br.allModeCap),await (0,N.setConfigValue)("search.debounceMs",br.debounceMs),await (0,N.setConfigValue)("search.snippetLength",br.snippetLength),await (0,N.setConfigValue)("search.codeTimeoutSec",br.codeTimeoutSec)},bP=async()=>{let a=Math.min(bt.minCols,bt.maxCols),b=Math.max(bt.minCols,bt.maxCols),c=Math.min(bt.minRows,bt.maxRows),d=Math.max(bt.minRows,bt.maxRows);bu({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,N.setConfigValue)("missions.grid.minCols",a),await (0,N.setConfigValue)("missions.grid.maxCols",b),await (0,N.setConfigValue)("missions.grid.minRows",c),await (0,N.setConfigValue)("missions.grid.maxRows",d)},bQ=async()=>{let a=bz.split(",").map(a=>a.trim()).filter(Boolean);await (0,N.setConfigValue)("hooks.autoUploadTypes",a)},bR=async()=>{if(bv){by(!0);try{let a=bv.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await bD()}finally{by(!1)}}},bS=async()=>{if(!bb.host.trim()||!bb.localPathTemplate.trim())return;let a=a3(bb.localPathTemplate.trim()),b=bd?`${a}/{path}`:a,c=[...aX,{id:crypto.randomUUID(),host:bb.host.trim(),ownerMatch:bb.ownerMatch.trim()||"*",localPathTemplate:b,priority:bb.priority}];await (0,N.setConfigValue)("git.pathMappingRules",c),a4(c),bc({...a2}),be(!1),ba(!1)},bT=async a=>{if(!a7.host.trim()||!a7.localPathTemplate.trim())return;let b=a3(a7.localPathTemplate.trim()),c=bf?`${b}/{path}`:b,d=aX.map(b=>b.id===a?{...b,host:a7.host.trim(),ownerMatch:a7.ownerMatch.trim()||"*",localPathTemplate:c,priority:a7.priority}:b);await (0,N.setConfigValue)("git.pathMappingRules",d),a4(d),a6(null),bg(!1)},bU=async a=>{let b=aX.filter(b=>b.id!==a);await (0,N.setConfigValue)("git.pathMappingRules",b),a4(b),bk(null)};async function bV(){let a=!bB;bC(a),await (0,N.setConfigValue)("notification.enabled",a)}let bW=(0,c.useCallback)(()=>{a.back()},[a]),bX=(0,c.useCallback)(a=>{let b=x.current;if(!b)return;let c=b.querySelector("[data-section]"),d=c?c.offsetWidth+4:140;b.scrollBy({left:"left"===a?-d:d,behavior:"smooth"})},[]);(0,c.useEffect)(()=>{let a=x.current;if(!a)return;let b=a.querySelector(`[data-section="${v}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();P({left:d.left-c.left,width:d.width})},[v]);let{canScrollLeft:bY,canScrollRight:bZ}=(0,p.useScrollOverflow)(x,[t]),b$=a_.find(a=>a.id===v),b_=b$?a0[b$.accent]:a0.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:q("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:q("settings.configDesc")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:bW,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(z.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{className:"relative flex items-center gap-1",children:[bY&&(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bX("left"),className:"shrink-0","aria-label":"scroll tabs left",children:(0,b.jsx)(K.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{ref:x,className:"relative flex flex-1 gap-1 overflow-x-auto [&::-webkit-scrollbar]:hidden",children:[a_.map(a=>{let c=a.icon,d=v===a.id,e=a0[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>w(a.id),className:(0,o.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,o.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:q(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,o.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",b_.indicator),style:{left:y.left,width:y.width}})]}),bZ&&(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bX("right"),className:"shrink-0","aria-label":"scroll tabs right",children:(0,b.jsx)(L.ChevronRight,{className:"h-4 w-4"})})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[b$&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,o.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",b_.bg,b_.text,b_.ring),children:(0,b.jsx)(b$.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:q(b$.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:q(b$.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(v){case"general":let a;return a=[{value:"light",label:q("settings.themeLight")},{value:"dark",label:q("settings.themeDark")},{value:"system",label:q("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(a$,{label:q("settings.theme"),description:q("settings.themeDesc"),children:aa?(0,b.jsx)(aZ,{options:a,value:r??"system",onChange:a=>s(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(a$,{label:q("settings.language"),description:q("settings.languageDesc"),children:(0,b.jsx)(aZ,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:t,onChange:a=>u(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.terminal.desc")})]}),ae.length>0&&(0,b.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:ae.map(a=>{let c=ac===a.value,d=(0,o.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",a.installed?c?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),e=()=>{a.installed&&(ad(a.value),(0,N.setConfigValue)("terminal.app",a.value))};return a.installed?(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name},a.value):(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name})}),(0,b.jsx)($.TooltipContent,{side:"top",children:q("settings.app.notInstalled")})]},a.value)})})]}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.terminalFont.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.terminalFont.desc")})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-4",children:[(0,b.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[q("settings.terminalFont.size"),(0,b.jsx)("input",{type:"number",min:8,max:40,value:ak,onChange:a=>{let b=Math.max(8,Math.min(40,Math.round(Number(a.target.value)||13)));al(b),(0,N.setConfigValue)("terminal.fontSize",b)},className:"h-8 w-20 rounded-md border border-border bg-background px-2 text-sm text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]}),(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 items-center gap-2 text-xs text-muted-foreground",children:[q("settings.terminalFont.family"),(0,b.jsx)("input",{type:"text",value:am,placeholder:"Menlo, Monaco, 'Courier New', monospace",onChange:a=>an(a.target.value),onBlur:a=>{let b=a.target.value.trim()||"Menlo, Monaco, 'Courier New', monospace";an(b),(0,N.setConfigValue)("terminal.fontFamily",b)},className:"h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,b.jsx)("div",{className:"mt-1.5 text-[11px] text-muted-foreground/70",children:q("settings.terminalFont.hint")})]}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.editor.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.editor.desc")})]}),ai.length>0&&(0,b.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:ai.map(a=>{let c=ag===a.command,d=(0,o.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",a.installed?c?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),e=()=>{a.installed&&(ah(a.command),(0,N.setConfigValue)("editor.command",a.command))};return a.installed?(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name},a.command):(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name})}),(0,b.jsx)($.TooltipContent,{side:"top",children:q("settings.app.notInstalled")})]},a.command)})})]})]});case"ai-tools":return(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ao.map(a=>{let c=ar===a.name,d=at===a.name,e=av[a.name];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.displayName}),(0,b.jsx)(l.Badge,{variant:"outline",children:q("label.builtin")}),c&&(0,b.jsxs)(l.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(B,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),q("settings.prompts.default")]}),e&&(0,b.jsx)(l.Badge,{variant:e.ok?"secondary":"destructive",className:(0,o.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(H.CheckCircle2,{className:"h-3 w-3 mr-1"}),q("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(I.XCircle,{className:"h-3 w-3 mr-1"}),q("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.cli.available&&a.cli.version?`${a.name} \xb7 ${a.cli.version}`:a.name})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>{var b;as(b=a.name),localStorage.setItem(a1,b)},children:[(0,b.jsx)(B,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),q("settings.prompts.setDefault")]}),(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>bE(a.name),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),q("settings.aiTools.testing")]}):q("settings.aiTools.testConnection")})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,o.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,o.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.name}-${c.name}`))})})]})},a.name)})});case"prompts":return aa?(0,b.jsxs)("div",{className:"space-y-4",children:[aN&&(0,b.jsxs)("div",{className:"space-y-4 rounded-xl border border-border/50 bg-card p-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:q("settings.prompts.builtin.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.prompts.builtin.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(k.Label,{className:"text-sm",children:q("settings.prompts.builtin.systemTitle")}),aN.systemDirectiveIsCustom&&(0,b.jsx)(l.Badge,{variant:"secondary",className:"rounded-full text-xs",children:q("settings.prompts.builtin.modified")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{aQ(aN.systemDirective),aU(!0)},children:[(0,b.jsx)(D,{className:"h-4 w-4"}),q("settings.prompts.builtin.edit")]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.prompts.builtin.systemDesc")}),(0,b.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,b.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:aN.systemDirective})})]}),(0,b.jsxs)("div",{className:"space-y-2 border-t border-border/50 pt-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(k.Label,{className:"text-sm",children:q("settings.prompts.builtin.childTitle")}),(0,b.jsx)(l.Badge,{variant:"outline",className:"rounded-full text-xs",children:q("settings.prompts.builtin.readonly")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>aW(!0),children:[(0,b.jsx)(E.Eye,{className:"h-4 w-4"}),q("settings.prompts.builtin.view")]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.prompts.builtin.childDesc")}),(0,b.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,b.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:aN.childReviewPrompt})})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:q("settings.prompts.custom.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.prompts.custom.desc")})]}),(0,b.jsxs)(h.Button,{onClick:bF,variant:"default",className:"shrink-0",children:[(0,b.jsx)(A.Plus,{className:"h-4 w-4 mr-2"}),q("settings.prompts.newPrompt")]})]}),0===ax.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:q("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:q("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:ax.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bG(a),title:q("settings.prompts.editPrompt"),children:(0,b.jsx)(D,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aF(a.id),className:"text-destructive",title:q("settings.prompts.delete"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},a.id))})]}),(0,b.jsx)(n.Dialog,{open:aT,onOpenChange:aU,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.builtin.systemTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.builtin.systemDesc")})]}),(0,b.jsx)(j.Textarea,{value:aP,onChange:a=>aQ(a.target.value),className:"max-h-[60vh] min-h-[50vh] font-mono text-xs"}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:bK,disabled:aR||!aN?.systemDirectiveIsCustom,children:q("settings.prompts.builtin.resetDefault")}),(0,b.jsx)(h.Button,{variant:"default",onClick:bJ,disabled:aR||aP===aN?.systemDirective,children:q("settings.prompts.save")})]})]})}),(0,b.jsx)(n.Dialog,{open:aV,onOpenChange:aW,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.builtin.childTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.builtin.childDesc")})]}),(0,b.jsx)(j.Textarea,{value:aN?.childReviewPrompt??"",readOnly:!0,className:"max-h-[60vh] min-h-[50vh] font-mono text-xs bg-muted/40 cursor-default"}),(0,b.jsx)(n.DialogFooter,{children:(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aW(!1),children:q("settings.prompts.close")})})]})}),(0,b.jsx)(n.Dialog,{open:az,onOpenChange:aA,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:aC?q("settings.prompts.editPrompt"):q("settings.prompts.newPrompt")}),(0,b.jsx)(n.DialogDescription,{children:aC?q("settings.prompts.editPrompt"):q("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-name",children:q("settings.prompts.promptName")}),(0,b.jsx)(i.Input,{id:"prompt-name",value:aG,onChange:a=>aH(a.target.value),placeholder:q("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-description",children:q("settings.prompts.promptDescription")}),(0,b.jsx)(i.Input,{id:"prompt-description",value:aI,onChange:a=>aK(a.target.value),placeholder:q("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-content",children:q("settings.prompts.promptContent")}),(0,b.jsx)(j.Textarea,{id:"prompt-content",value:aL,onChange:a=>aM(a.target.value),placeholder:q("settings.prompts.promptContentPlaceholder"),className:"mt-1.5 max-h-[55vh] min-h-[40vh] font-mono text-sm"})]})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aA(!1),children:q("settings.prompts.cancel")}),(0,b.jsx)(h.Button,{onClick:bH,disabled:!aG.trim()||!aL.trim(),children:q("settings.prompts.save")})]})]})}),(0,b.jsx)(n.Dialog,{open:!!aE,onOpenChange:a=>!a&&aF(null),children:(0,b.jsxs)(n.DialogContent,{children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aF(null),children:q("settings.prompts.cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",onClick:bI,children:q("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.git.desc")})]}),(0,b.jsxs)(h.Button,{onClick:()=>{bc({...a2}),ba(!0)},children:[(0,b.jsx)(A.Plus,{className:"mr-2 h-4 w-4"}),q("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==aX.length||a9?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:aX.map(a=>a5===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.host")}),(0,b.jsx)(i.Input,{value:a7.host,onChange:a=>a8(b=>({...b,host:a.target.value})),placeholder:q("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.ownerMatch")}),(0,b.jsx)(i.Input,{value:a7.ownerMatch,onChange:a=>a8(b=>({...b,ownerMatch:a.target.value})),placeholder:q("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:a7.localPathTemplate,onChange:a=>a8(b=>({...b,localPathTemplate:a.target.value})),placeholder:q("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:bf?"default":"outline",size:"sm",type:"button",onClick:()=>bg(a=>!a),className:"shrink-0 font-mono",children:"{path}"})}),(0,b.jsx)($.TooltipContent,{side:"top",className:"max-w-xs",children:(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("div",{className:"font-medium",children:q("settings.config.git.pathTooltipTitle")}),(0,b.jsx)("div",{className:"opacity-80",children:q("settings.config.git.pathTooltipDetail")})]})})]}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>bm("edit"),children:(0,b.jsx)(J.FolderOpen,{className:"h-4 w-4"})})}),(0,b.jsx)($.TooltipContent,{children:q("settings.config.git.pickFolder")})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:bf?q("onboarding.step3.pathHintFull"):q("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.priority")}),(0,b.jsx)(i.Input,{type:"number",value:a7.priority,onChange:a=>a8(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>{a6(null),bg(!1)},children:q("settings.config.git.cancel")}),(0,b.jsx)(h.Button,{size:"sm",onClick:()=>bT(a.id),children:q("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(l.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[q("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let b,c,d;return b=a.localPathTemplate,d=(c=/\/\{path\}\/?$/.test(b))?b.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):b,void(a6(a.id),a8({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:d,priority:a.priority}),bg(c))},title:q("settings.config.git.edit"),children:(0,b.jsx)(D,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bk(a.id),className:"text-destructive",title:q("settings.config.git.delete"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:q("settings.config.git.noRules")}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground/80",children:q("settings.config.git.noRulesFallback")})]}),a9&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:q("settings.config.git.host")}),(0,b.jsx)(i.Input,{value:bb.host,onChange:a=>bc(b=>({...b,host:a.target.value})),placeholder:q("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:q("settings.config.git.ownerMatch")}),(0,b.jsx)(i.Input,{value:bb.ownerMatch,onChange:a=>bc(b=>({...b,ownerMatch:a.target.value})),placeholder:q("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs font-medium",children:q("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:bb.localPathTemplate,onChange:a=>bc(b=>({...b,localPathTemplate:a.target.value})),placeholder:q("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:bd?"default":"outline",size:"sm",type:"button",onClick:()=>be(a=>!a),className:"shrink-0 font-mono",children:"{path}"})}),(0,b.jsx)($.TooltipContent,{side:"top",className:"max-w-xs",children:(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("div",{className:"font-medium",children:q("settings.config.git.pathTooltipTitle")}),(0,b.jsx)("div",{className:"opacity-80",children:q("settings.config.git.pathTooltipDetail")})]})})]}),(0,b.jsxs)($.Tooltip,{children:[(0,b.jsx)($.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>bm("add"),children:(0,b.jsx)(J.FolderOpen,{className:"h-4 w-4"})})}),(0,b.jsx)($.TooltipContent,{children:q("settings.config.git.pickFolder")})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:bd?q("onboarding.step3.pathHintFull"):q("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs font-medium",children:q("settings.config.git.priority")}),(0,b.jsx)(i.Input,{type:"number",value:bb.priority,onChange:a=>bc(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),bb.localPathTemplate&&(c=bb.localPathTemplate.trim().replace(/\/+$/,""),d=bd?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:q("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>bi(c),className:(0,o.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",bh===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[bh].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[bh].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>ba(!1),children:q("settings.config.git.cancel")}),(0,b.jsxs)(h.Button,{size:"sm",onClick:bS,disabled:!bb.host.trim()||!bb.localPathTemplate.trim(),children:[(0,b.jsx)(F,{className:"h-3.5 w-3.5 mr-1.5"}),q("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:500,value:bn.maxUploadMb,onChange:a=>bo(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bn.maxConcurrent,onChange:a=>bo(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxReadable")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxReadableHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:50,value:bn.maxReadableMb,onChange:a=>bo(b=>({...b,maxReadableMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.archiveDelay")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.archiveDelayHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:365,value:bn.archiveDelayDays,onChange:a=>bo(b=>({...b,archiveDelayDays:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:q("settings.config.system.archiveDelayUnit")})]})]})]}),(0,b.jsx)(h.Button,{onClick:bL,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.task.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.task.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.taskDefaultWorktree")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.taskDefaultWorktreeHint")})]}),(0,b.jsx)("button",{type:"button",onClick:()=>bo(a=>({...a,taskDefaultUseWorktree:!a.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${bn.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:bn.taskDefaultUseWorktree?q("task.worktreeYes"):q("task.worktreeNo")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.taskDefaultAutoStart")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.taskDefaultAutoStartHint")})]}),(0,b.jsx)("button",{type:"button",onClick:()=>bo(a=>({...a,taskDefaultAutoStart:!a.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${bn.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:bn.taskDefaultAutoStart?q("task.autoStartYes"):q("task.autoStartNo")})]})]}),(0,b.jsx)(h.Button,{onClick:bM,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:5,max:300,value:bp.timeoutSec,onChange:a=>bq(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(h.Button,{onClick:bN,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:5,max:100,value:br.resultLimit,onChange:a=>bs(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:1,max:20,value:br.allModeCap,onChange:a=>bs(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:50,max:1e3,value:br.debounceMs,onChange:a=>bs(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:20,max:500,value:br.snippetLength,onChange:a=>bs(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.codeTimeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.codeTimeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:5,max:300,step:5,value:br.codeTimeoutSec,onChange:a=>bs(b=>({...b,codeTimeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,b.jsx)(h.Button,{onClick:bO,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.minCols")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bt.minCols,onChange:a=>bu(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.maxCols")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bt.maxCols,onChange:a=>bu(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.minRows")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bt.minRows,onChange:a=>bu(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.maxRows")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bt.maxRows,onChange:a=>bu(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(h.Button,{onClick:bP,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(i.Input,{value:bz,onChange:a=>bA(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(h.Button,{onClick:bQ,className:"rounded-lg",children:q("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:bv?.installed?q("settings.config.hooks.installed"):q("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.hooks.installHint")})]}),(0,b.jsx)(h.Button,{variant:bv?.installed?"destructive":"default",onClick:bR,disabled:bx||!bv,className:"rounded-lg",children:bv?.installed?q("settings.config.hooks.uninstall"):q("settings.config.hooks.install")})]})]}),(0,b.jsx)(n.Dialog,{open:!!bj,onOpenChange:a=>!a&&bk(null),children:(0,b.jsxs)(n.DialogContent,{children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.config.git.deleteConfirm")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>bk(null),children:q("settings.config.git.cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",onClick:()=>bj&&bU(bj),children:q("settings.config.git.delete")})]})]})})]});case"notifications":return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.notifications.systemCategory")}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.notifications.enableDesc")})]}),(0,b.jsx)(m.Switch,{checked:bB,onCheckedChange:bV})]})]}),(0,b.jsx)(aY,{})]});case"backup":return(0,b.jsx)(ap,{});case"extensions":return(0,b.jsx)(aB,{});case"keyboard-shortcuts":return(0,b.jsx)(aJ,{})}}()]})}),(0,b.jsx)(_.FolderBrowserDialog,{open:null!==bl,onOpenChange:a=>{a||bm(null)},onSelect:a=>{let b=a3(a);"add"===bl?bc(a=>({...a,localPathTemplate:b})):"edit"===bl&&a8(a=>({...a,localPathTemplate:b})),bm(null)}})]})}a.s(["default",0,function(){return(0,b.jsx)(a4,{})}],520788)}];
|
|
1
|
+
module.exports=[520788,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(553798),e=a.i(940271),f=a.i(951192),g=a.i(952313),h=a.i(699570),i=a.i(866718),j=a.i(429246),k=a.i(412783),l=a.i(786304),m=a.i(563658),n=a.i(814574),o=a.i(368114),p=a.i(268317),q=a.i(369289),r=a.i(711796);let s=(0,r.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var t=a.i(350739);let u=(0,r.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var v=a.i(190076),w=a.i(705594),x=a.i(264589),y=a.i(567648),z=a.i(54384),A=a.i(774881);let B=(0,r.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=a.i(975231);let D=(0,r.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);var E=a.i(509405);let F=(0,r.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var G=a.i(704494),H=a.i(913284),I=a.i(468862),J=a.i(347165),K=a.i(912868),L=a.i(10390),M=a.i(386127),N=a.i(422036),O=a.i(899896),P=a.i(780410);let Q=(0,P.createServerReference)("00778c274386fee10c6d07fa7208ebf73366110d21",P.callServer,void 0,P.findSourceMapURL,"getAvailableTerminalApps"),R=(0,P.createServerReference)("00aa596e8a642e9da3810152361d231b3773ba7ef1",P.callServer,void 0,P.findSourceMapURL,"getAvailableEditors");var S=a.i(336042);let T=(0,P.createServerReference)("4090c37dd20c2677b3504fe2b36ade239e1bed3a98",P.callServer,void 0,P.findSourceMapURL,"createPrompt"),U=(0,P.createServerReference)("60f2d33f3f63dff7c9c024b2dfa8449c54e7beeb7d",P.callServer,void 0,P.findSourceMapURL,"updatePrompt"),V=(0,P.createServerReference)("40201142c8434d2a9d8d0e9b1a740240cfb9586985",P.callServer,void 0,P.findSourceMapURL,"deletePrompt"),W=(0,P.createServerReference)("0017bb73a0a2aab62e73b999b48cf8ae58bebdade8",P.callServer,void 0,P.findSourceMapURL,"getBuiltinPrompts"),X=(0,P.createServerReference)("40400da8b2732c30eb841d6d056afb8d8f091348ff",P.callServer,void 0,P.findSourceMapURL,"saveSystemDirective"),Y=(0,P.createServerReference)("0005a8b52fd7ff55a3594b6dca6915bad94dc95210",P.callServer,void 0,P.findSourceMapURL,"resetSystemDirective"),Z=(0,P.createServerReference)("001f9294e9e0bb248e7878413b2cc8361234aeb91c",P.callServer,void 0,P.findSourceMapURL,"getAvailableProviders");var $=a.i(648512);let _=(0,r.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var aa=a.i(580701);let ab=(0,P.createServerReference)("0028521a0b4fcf38aae6e0676543a7b380b2c86c14",P.callServer,void 0,P.findSourceMapURL,"getAiCapabilityConfigs"),ac=(0,P.createServerReference)("6064a8a5437a018ac0f0cdedd125941869938d1ea6",P.callServer,void 0,P.findSourceMapURL,"updateAiCapabilityConfig"),ad=(0,P.createServerReference)("0055c22bfa591cefc244c9861540576efd52b47373",P.callServer,void 0,P.findSourceMapURL,"getConnectedProviders"),ae=[{slot:"summary",key:"settings.capabilitySlots.summary"},{slot:"dreaming",key:"settings.capabilitySlots.dreaming"},{slot:"analysis",key:"settings.capabilitySlots.analysis"},{slot:"assistant",key:"settings.capabilitySlots.assistant"}];function af(){let{t:a}=(0,f.useI18n)(),[d,e]=(0,c.useState)([]),[h,i]=(0,c.useState)([]),[j,k]=(0,c.useState)([]),[l,m]=(0,c.useState)(!0),[n,o]=(0,c.useTransition)();(0,c.useEffect)(()=>{let a=!0;return Promise.all([Z(),ad(),ab()]).then(([b,c,d])=>{a&&(e(b),i(c),k(d))}).catch(b=>{a&&g.toast.error(b instanceof Error?b.message:String(b))}).finally(()=>{a&&m(!1)}),()=>{a=!1}},[]);let p=j.find(a=>"terminal"===a.slot),q=p?.provider??(h.includes("claude")?"claude":h[0]??"claude"),r=a=>d.find(b=>b.name===a)?.displayName??a;return l?(0,b.jsx)("div",{className:"h-32 rounded-xl bg-muted animate-pulse"}):(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,b.jsx)($.Terminal,{className:"h-4 w-4"}),a("settings.capabilitySlots.title")]}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a("settings.capabilitySlots.desc")})]}),(0,b.jsxs)("div",{className:`flex items-center justify-between gap-4 ${n?"opacity-40 pointer-events-none":""}`,children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a("settings.capabilitySlots.terminal")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground",children:a("settings.capabilitySlots.terminalDesc")})]}),0===h.length?(0,b.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:a("settings.capabilitySlots.noConnected")}):(0,b.jsxs)(aa.Select,{value:q,onValueChange:function(b){b&&o(async()=>{try{await ac("terminal",{provider:b,mode:"cli",model:null}),k(a=>{let c=a.filter(a=>"terminal"!==a.slot),d=p??{id:"",slot:"terminal",mode:"cli",model:null,createdAt:new Date,updatedAt:new Date};return[...c,{...d,slot:"terminal",provider:b,mode:"cli",model:null}]}),g.toast.success(a("settings.capabilitySlots.updated"))}catch(a){g.toast.error(a instanceof Error?a.message:String(a))}})},children:[(0,b.jsx)(aa.SelectTrigger,{className:"w-44 shrink-0",children:(0,b.jsx)("span",{className:"truncate",children:r(q)})}),(0,b.jsx)(aa.SelectContent,{children:h.map(a=>(0,b.jsx)(aa.SelectItem,{value:a,children:r(a)},a))})]})]}),(0,b.jsx)("div",{className:"space-y-2.5 border-t border-border/50 pt-3",children:ae.map(c=>(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 opacity-60",children:[(0,b.jsxs)("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[(0,b.jsx)(_,{className:"h-3 w-3"}),a(c.key)]}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:a("settings.capabilitySlots.claudeFixed")})]},c.slot))})]})}var ag=a.i(785259),ah=a.i(43775);let ai=(0,r.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"}]]);var aj=a.i(324954);let ak=(0,r.default)("folder-up",[["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"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var al=a.i(161664),am=a.i(811344),an=a.i(607219);let ao=(0,P.createServerReference)("4081190646dfd19e5905cd07949d52c1db0b9cd492",P.callServer,void 0,P.findSourceMapURL,"createBackup"),ap=(0,P.createServerReference)("00fb83e94a084a727104d92f4030891ffe21394ea2",P.callServer,void 0,P.findSourceMapURL,"listBackupFiles"),aq=(0,P.createServerReference)("405b7ce520badaa31ddeeeb003d8c7ecaa75ff8ceb",P.callServer,void 0,P.findSourceMapURL,"deleteBackupFile"),ar=(0,P.createServerReference)("405fb31348735d530b2fbd1bfa3bd32338c9c00fca",P.callServer,void 0,P.findSourceMapURL,"restoreBackup"),as=(0,P.createServerReference)("40b667c41c647e1a354912820b3477b34bfcc0ff05",P.callServer,void 0,P.findSourceMapURL,"resetSystem"),at=(0,P.createServerReference)("00a5aad9940317624b10224648af03f34420f2f827",P.callServer,void 0,P.findSourceMapURL,"getBackupDir"),au=(0,P.createServerReference)("4062e1805dec87d49081686a99971d70b7d081d1ba",P.callServer,void 0,P.findSourceMapURL,"setBackupDir"),av=(0,P.createServerReference)("00f566bdb4d932daa40b6e7d5a8600739be31e9666",P.callServer,void 0,P.findSourceMapURL,"getStorageLocation"),aw=(0,P.createServerReference)("408ec1c9fc327f6f8c68102f3d511371bcc13100e7",P.callServer,void 0,P.findSourceMapURL,"setStorageLocation");function ax(){let{t:a,locale:e}=(0,f.useI18n)(),j=(0,d.useRouter)(),[k,l]=(0,c.useState)([]),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(null),[z,A]=(0,c.useState)(!1),[B,D]=(0,c.useState)(""),E=(0,c.useRef)(null),[F,H]=(0,c.useState)(!1),[I,J]=(0,c.useState)(""),K=(0,c.useCallback)(async()=>{w(!0);try{let[a,b,c]=await Promise.all([ap(),at(),av()]);l(a),o(b),s(c)}finally{w(!1)}},[]);(0,c.useEffect)(()=>{K()},[K]);let L=async()=>{let b=B.trim()||void 0;A(!1),D(""),y("create");try{await ao(b),g.toast.success(a("settings.backup.createSuccess")),await K()}catch{g.toast.error(a("settings.backup.createError"))}finally{y(null)}},M=async b=>{if(confirm(a("settings.backup.restoreConfirm"))){y("restore");try{await ar(b),g.toast.success(a("settings.backup.restoreSuccess"),{action:{label:a("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await K()}catch{g.toast.error(a("settings.backup.restoreError"))}finally{y(null)}}},N=async b=>{if(confirm(a("settings.backup.deleteConfirm")))try{await aq(b),g.toast.success(a("settings.backup.deleteSuccess")),l(a=>a.filter(a=>a.filename!==b))}catch{g.toast.error(a("settings.backup.deleteError"))}},O=async b=>{q(!1);try{await au(b),o(b),g.toast.success(a("settings.backup.dirSaved")),await K()}catch{g.toast.error(a("settings.backup.dirError"))}},P=async b=>{y("storage");try{let c=await aw({newPath:b});if(!c.ok)return void g.toast.error(c.error||a("settings.storage.moveError"));g.toast.success(a("settings.storage.moveSuccess",{count:String(c.moved??0)})),await K()}catch(b){g.toast.error(b instanceof Error?b.message:a("settings.storage.moveError"))}finally{y(null)}},Q=async b=>{u(!1),confirm(a("settings.storage.moveConfirm"))&&await P(b)},R=async()=>{!r||r.isDefault||confirm(a("settings.storage.resetConfirm"))&&await P(r.default)},S=async b=>{let c=b.target.files?.[0];if(c){b.target.value="",y("import");try{let b=new FormData;b.append("file",c);let d=await fetch("/api/internal/backup/import",{method:"POST",body:b});if(!d.ok){let b=await d.json();g.toast.error("Invalid backup archive"===b.error?a("settings.backup.importInvalid"):(b.error,a("settings.backup.importError")));return}g.toast.success(a("settings.backup.importSuccess")),await K()}catch{g.toast.error(a("settings.backup.importError"))}finally{y(null)}}},T=async()=>{if("RESET"===I){H(!1),J(""),y("reset");try{await as("RESET"),g.toast.success(a("settings.backup.resetSuccess")),j.push("/")}catch{g.toast.error(a("settings.backup.resetError"))}finally{y(null)}}},U=null!==x;return(0,b.jsxs)("div",{className:"space-y-6",children:[("restore"===x||"reset"===x)&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,b.jsx)(G.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===x?a("settings.backup.restoring"):a("settings.backup.resetting")})]})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-base font-semibold",children:a("settings.storage.sectionTitle")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("settings.storage.hint")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{children:[a("settings.storage.current"),":"]}),(0,b.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:r?.current??"…"}),r?.isDefault&&(0,b.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:a("settings.storage.defaultBadge")}),(0,b.jsx)(h.Button,{variant:"ghost",onClick:()=>u(!0),disabled:"storage"===x,className:"text-xs text-muted-foreground",children:"storage"===x?(0,b.jsx)(G.Loader2,{className:"h-3 w-3 animate-spin"}):a("settings.storage.change")}),r&&!r.isDefault&&(0,b.jsx)(h.Button,{variant:"ghost",onClick:R,disabled:"storage"===x,className:"text-xs text-muted-foreground",children:a("settings.storage.reset")})]}),(0,b.jsx)(ah.FolderBrowserDialog,{open:t,onOpenChange:u,onSelect:Q})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-base font-semibold",children:a("settings.backup.sectionTitle")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsxs)("span",{children:[a("settings.backup.dir"),":"]}),(0,b.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,b.jsx)(h.Button,{variant:"ghost",onClick:()=>q(!0),className:"text-xs text-muted-foreground",children:a("settings.backup.dirChange")})]}),(0,b.jsx)(ah.FolderBrowserDialog,{open:p,onOpenChange:q,onSelect:O})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Button,{onClick:()=>{D(""),A(!0)},disabled:U,className:"gap-2",children:"create"===x?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-4 w-4 animate-spin"})," ",a("settings.backup.creating")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ai,{className:"h-4 w-4"})," ",a("settings.backup.create")]})}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsxs)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",disabled:U,onClick:()=>E.current?.click(),className:"gap-2"}),children:[(0,b.jsx)(ak,{className:"h-4 w-4"}),a("settings.backup.import")]}),(0,b.jsx)(ag.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.importHint")})]}),(0,b.jsx)("input",{ref:E,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:S})]}),(0,b.jsx)(n.Dialog,{open:z,onOpenChange:A,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(n.DialogHeader,{children:(0,b.jsx)(n.DialogTitle,{children:a("settings.backup.create")})}),(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.backup.createLabel")}),(0,b.jsx)(i.Input,{value:B,onChange:a=>D(a.target.value),onKeyDown:a=>"Enter"===a.key&&L(),placeholder:a("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>A(!1),children:a("common.cancel")}),(0,b.jsx)(h.Button,{onClick:L,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:a("settings.backup.create")})]})]})}),v?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(G.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===k.length?(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,b.jsx)(an.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:a("settings.backup.empty")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a("settings.backup.emptyDesc")})]}):(0,b.jsx)("div",{className:"space-y-3",children:k.map(c=>{var d,f;return(0,b.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[c.label?(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:c.label}):(0,b.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:c.filename}),c.autoBackup&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:a("settings.backup.autoLabel")})]}),c.label&&(0,b.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:c.filename}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(d=c.size)<1024?`${d} B`:d<1048576?`${(d/1024).toFixed(1)} KB`:`${(d/1048576).toFixed(1)} MB`," · ",(f=c.createdAt,new Date(f).toLocaleString("zh"===e?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),c.preview.length>0&&(0,b.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[c.preview.map((a,c)=>(0,b.jsxs)("span",{children:[c>0&&" ",a.workspace,"(",a.projects.join(", "),")"]},c)),c.stats.workspaces>c.preview.length&&(0,b.jsxs)("span",{children:[" ",a("settings.backup.workspaces",{count:String(c.stats.workspaces)})]})]}),(0,b.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[a("settings.backup.projects",{count:String(c.stats.projects)})," · ",a("settings.backup.tasks",{count:String(c.stats.tasks)})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>M(c.filename),disabled:U,className:"text-muted-foreground hover:text-foreground"}),children:(0,b.jsx)(aj.Upload,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(ag.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.restore")})]}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(c.filename),disabled:U,className:"text-muted-foreground hover:text-rose-400"}),children:(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(ag.TooltipContent,{side:"bottom",sideOffset:4,children:a("settings.backup.delete")})]})]})]})},c.filename)})}),(0,b.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,b.jsx)(am.AlertTriangle,{className:"h-4 w-4"}),a("settings.backup.dangerZone")]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:a("settings.backup.resetDesc")}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{J(""),H(!0)},disabled:U,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,b.jsx)(al.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),a("settings.backup.reset")]})]}),(0,b.jsx)(n.Dialog,{open:F,onOpenChange:H,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:a("settings.backup.resetConfirmTitle")}),(0,b.jsx)(n.DialogDescription,{children:a("settings.backup.resetConfirmDesc")})]}),(0,b.jsxs)("div",{className:"py-2",children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:a("settings.backup.resetConfirmInput")}),(0,b.jsx)(i.Input,{value:I,onChange:a=>J(a.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>H(!1),children:a("common.cancel")}),(0,b.jsx)(h.Button,{disabled:"RESET"!==I,onClick:T,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:a("settings.backup.reset")})]})]})})]})}var ay=a.i(953093),az=a.i(668116);let aA=(0,r.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var aB=a.i(22761),aC=a.i(963326),aD=a.i(192369),aE=a.i(599209),aF=a.i(627141);let aG=[{os:"macOS",cmd:"brew install ripgrep"},{os:"Windows",cmd:"winget install BurntSushi.ripgrep"},{os:"Linux",cmd:"sudo apt install ripgrep"}];function aH({cmd:a}){let{t:d}=(0,f.useI18n)(),[e,i]=(0,c.useState)(!1),j=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(a);else{let b=document.createElement("textarea");b.value=a,document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b)}i(!0),g.toast.success(d("common.copied")),setTimeout(()=>i(!1),1500)}catch{g.toast.error(d("common.copyFailed"))}};return(0,b.jsxs)("div",{className:"flex items-start gap-1 rounded-md bg-background/60 pl-2 pr-1 py-1 ring-1 ring-border/60",children:[(0,b.jsx)("code",{className:"min-w-0 flex-1 break-all font-mono text-[11px] leading-relaxed",children:a}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":d("common.copy"),onClick:j,children:e?(0,b.jsx)(az.Check,{className:"h-3 w-3 text-emerald-400"}):(0,b.jsx)(aB.Copy,{className:"h-3 w-3"})})]})}function aI({extension:a}){let{t:d}=(0,f.useI18n)(),{status:e,loading:i,isInstalling:j,install:k,uninstall:l,refresh:m}=(0,aF.useExtension)(a.id),[n,o]=(0,c.useState)(!1),p=a.icon,q=e.installed,r=async()=>{let b=await k();b.success?g.toast.success(d("settings.extensions.installSuccess").replace("{name}",a.name)):g.toast.error(d("settings.extensions.installFailed").replace("{name}",a.name)+(b.error?`: ${b.error.slice(0,200)}`:""))},s=async()=>{let b=await l();b.success?g.toast.success(d("settings.extensions.uninstallSuccess").replace("{name}",a.name)):g.toast.error(d("settings.extensions.uninstallFailed").replace("{name}",a.name)+(b.error?`: ${b.error.slice(0,200)}`:""))},t=async()=>{o(!0);try{await m()}finally{o(!1)}},u=()=>{window.open(a.homepageUrl,"_blank","noopener,noreferrer")};return(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,b.jsx)(p,{className:"h-5 w-5 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:a.name}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a.description})]})]}),(0,b.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",a.sizeMB," MB"]})]}),(0,b.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:d("common.loading")})]}):q?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(H.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,b.jsxs)("span",{className:"text-foreground",children:[d("settings.extensions.installed"),e.version?` v${e.version}`:""]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aA,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:d("settings.extensions.notInstalledShort")})]})}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[q?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"default",onClick:r,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.reinstalling")]}):d("settings.extensions.reinstall")}),(0,b.jsx)(h.Button,{variant:"outline",onClick:s,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.uninstalling")]}):d("settings.extensions.uninstall")})]}):a.manualInstall?(0,b.jsxs)(aE.Popover,{children:[(0,b.jsx)(aE.PopoverTrigger,{render:a=>(0,b.jsxs)(h.Button,{variant:"default",...a,children:[(0,b.jsx)(ai,{className:"h-3.5 w-3.5"}),d("settings.extensions.installViaHomepage")]})}),(0,b.jsxs)(aE.PopoverContent,{align:"start",className:"w-80 max-w-[90vw] gap-2 text-xs leading-relaxed",children:[(0,b.jsx)("p",{children:d("settings.extensions.manualInstallHintIntro")}),(0,b.jsx)("div",{className:"space-y-2",children:aG.map(({os:a,cmd:c})=>(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium text-muted-foreground",children:a}),(0,b.jsx)(aH,{cmd:c})]},a))}),(0,b.jsx)("p",{className:"text-muted-foreground",children:d("settings.extensions.manualInstallHintAfter")}),(0,b.jsxs)("button",{type:"button",onClick:u,className:"flex items-center gap-1 self-start text-[11px] text-primary underline-offset-2 hover:underline",children:[(0,b.jsx)(aC.ExternalLink,{className:"h-3 w-3"}),d("settings.extensions.visitHomepage")]})]})]}):(0,b.jsx)(h.Button,{variant:"default",onClick:r,disabled:j,children:j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),d("settings.extensions.installing")]}):d("settings.extensions.install")}),(0,b.jsxs)(h.Button,{variant:"ghost",onClick:t,disabled:n,children:[(0,b.jsx)(aD.RefreshCw,{className:`h-3.5 w-3.5 ${n?"animate-spin":""}`}),d("settings.extensions.recheck")]}),(0,b.jsxs)(h.Button,{variant:"ghost",onClick:u,children:[(0,b.jsx)(aC.ExternalLink,{className:"h-3.5 w-3.5"}),d("settings.extensions.visitHomepage")]})]})]})}function aJ(){let{t:a}=(0,f.useI18n)(),c=(0,ay.listExtensionMetadata)();return(0,b.jsxs)("div",{className:"space-y-5",children:[(0,b.jsxs)("header",{children:[(0,b.jsx)("h2",{className:"text-base font-semibold",children:a("settings.extensions.title")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("settings.extensions.desc")})]}),(0,b.jsx)("div",{className:"space-y-3",children:c.map(a=>(0,b.jsx)(aI,{extension:a},a.id))})]})}a.i(423993);var aK=a.i(109603),aL=a.i(975787),aM=a.i(875846),aN=a.i(718799);let aO=["global","panels","missions"],aP=new Set(["missions.cycleBack"]);function aQ({keys:a}){return(0,b.jsx)(aN.KeyCombo,{keys:a})}function aR(){let a,{t:d}=(0,f.useI18n)(),e=(0,aM.useKeymapStore)(a=>a.overrides),i=(0,aM.useKeymapStore)(a=>a.setBinding),j=(0,aM.useKeymapStore)(a=>a.resetBinding),k=(0,aM.useKeymapStore)(a=>a.resetAll),[m,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),r=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(m){let a=requestAnimationFrame(()=>r.current?.focus());return()=>cancelAnimationFrame(a)}},[m]);let s=(0,c.useMemo)(()=>{let a=new Map;for(let b of aK.SHORTCUT_ACTIONS)for(let c of e[b.id]??[...b.defaultKeys])a.has(c)||a.set(c,b.id);return a},[e]),t=(0,c.useMemo)(()=>aO.map(a=>({group:a,actions:aK.SHORTCUT_ACTIONS.filter(b=>b.group===a&&!aP.has(b.id))})).filter(a=>a.actions.length>0),[]),u=m?(0,aK.getAction)(m):null,v=p&&m&&(a=s.get(p))&&a!==m?a:null;function w(){o(null),q(null)}return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("header",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-base font-semibold",children:d("settings.keyboardShortcuts")}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:d("settings.keyboardShortcutsDesc")})]}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:function(){k(),g.toast.success(d("settings.shortcuts.resetAllDone"))},children:[(0,b.jsx)(al.RotateCcw,{className:"h-3.5 w-3.5"}),d("settings.shortcuts.resetAll")]})]}),(0,b.jsx)("div",{className:"space-y-6",children:t.map(({group:a,actions:c})=>(0,b.jsxs)("section",{children:[(0,b.jsx)("h3",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:d(`shortcuts.group.${a}`)}),(0,b.jsx)("ul",{className:"divide-y divide-border/50 rounded-xl border border-border bg-card",children:c.map(a=>{let c,f=a.id in e;return(0,b.jsxs)("li",{className:"flex items-center justify-between gap-4 px-5 py-3.5",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:d(a.descriptionKey)}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,b.jsx)(aQ,{keys:e[c=a.id]??[...(0,aK.getAction)(c).defaultKeys]}),a.configurable?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>{var b;return b=a.id,void(q(null),o(b))},children:d("settings.shortcuts.rebind")}),f&&(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>j(a.id),children:(0,b.jsx)(al.RotateCcw,{className:"h-3.5 w-3.5"})})}),(0,b.jsx)(ag.TooltipContent,{children:d("settings.shortcuts.reset")})]})]}):(0,b.jsx)(l.Badge,{variant:"outline",className:"text-muted-foreground",children:d("settings.shortcuts.fixed")})]})]},a.id)})})]},a))}),(0,b.jsx)(n.Dialog,{open:null!==m,onOpenChange:a=>!a&&w(),children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:u?d(u.descriptionKey):d("settings.shortcuts.rebind")}),(0,b.jsx)(n.DialogDescription,{children:d("settings.shortcuts.pressKey")})]}),(0,b.jsx)("textarea",{ref:r,readOnly:!0,tabIndex:0,"aria-label":d("settings.shortcuts.pressKey"),onKeyDown:a=>{a.preventDefault(),a.stopPropagation();let b=(0,aL.serializeKeyEvent)(a.nativeEvent);b&&q(b)},className:"flex h-20 w-full cursor-pointer resize-none items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 text-center text-sm outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,b.jsx)("div",{className:"flex min-h-8 items-center justify-center",children:p?(0,b.jsx)(aQ,{keys:[p]}):(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:d("settings.shortcuts.pressKey")})}),v&&(0,b.jsx)("p",{className:"text-center text-xs text-amber-600 dark:text-amber-400",children:d("settings.shortcuts.conflict",{name:d((0,aK.getAction)(v).descriptionKey)})}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:w,children:d("settings.shortcuts.cancel")}),(0,b.jsx)(h.Button,{variant:"default",onClick:function(){m&&p&&(i(m,[p]),w(),g.toast.success(d("settings.shortcuts.saved")))},disabled:!p,children:d("settings.shortcuts.saveBtn")})]})]})})]})}var aS=a.i(690251),aT=a.i(506913),aU=a.i(344393),aV=a.i(884664),aV=aV,aW=a.i(761818),aW=aW;let aX=(0,r.default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),aY=(0,P.createServerReference)("40ce353f7ed8ef76ed1e60f66cb5d4a20fa8e9b47d",P.callServer,void 0,P.findSourceMapURL,"testHarnessTarget"),aZ=["feishu","openclaw","hermes"],a$={feishu:["feishu"],openclaw:["telegram","signal","whatsapp","discord","slack","imessage"],hermes:["telegram","discord","slack","whatsapp","signal","feishu","wechat","wecom","dingtalk","qq","matrix","email"]},a_=[...new Set(Object.values(a$).flat())],a0="__custom__",a1=a=>a$[a]??[],a2={feishu:"https://open.feishu.cn/",openclaw:"https://docs.openclaw.ai/",hermes:"https://hermes-agent.nousresearch.com/docs/"};function a3(){let{t:a}=(0,f.useI18n)(),[d,e]=(0,c.useState)([]),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(new Set),[n,o]=(0,c.useState)(!0),[p,q]=(0,c.useTransition)(),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(null);(0,c.useEffect)(()=>{(0,M.getConfigValue)("harness.targets",[]).then(a=>{let b=(Array.isArray(a)?a:[]).map(a=>({id:a.id??crypto.randomUUID(),gateway:aZ.includes(a.gateway)?a.gateway:"feishu",downstream:a.downstream??"feishu",active:!!a.active}));b.length>0&&!b.some(a=>a.active)&&(b[0].active=!0),e(b),m(new Set(b.filter(a=>a.downstream&&!a_.includes(a.downstream)).map(a=>a.id)))}).finally(()=>o(!1))},[]);let x=(a,b)=>e(c=>c.map(c=>c.id===a?{...c,...b}:c)),y=a=>{e(b=>{let c=b.find(b=>b.id===a)?.active,d=b.filter(b=>b.id!==a);return c&&d.length>0&&!d.some(a=>a.active)&&(d[0].active=!0),d}),j===a&&k(null)},z=(a,b)=>m(c=>{let d=new Set(c);return b?d.add(a):d.delete(a),d}),B=async()=>{try{await navigator.clipboard.writeText("你有 Playwright(浏览器自动化)能力。帮我在飞书创建一个自建应用(机器人),用于 Tower 的无人值守通知与飞书助理。请一步步来;遇到需要我登录/扫码/人工确认的地方,停下来让我操作,我弄好再继续。\n\n平台地址:公网飞书 https://open.feishu.cn/ (公司/私有化飞书换成你们自己的内网开放平台地址)。用 Playwright 打开它,让我登录(企业管理员或开发者账号)。控制台页面可能有 WAF,但你是真实浏览器,正常访问即可。\n\n步骤:\n1. 创建企业自建应用:名字填「Tower 助理」,随便传个图标。\n2. 开启机器人能力:应用内「添加应用能力」→ 启用「机器人」。(不开这个,机器人进不了群、发不了消息。)\n3. 开通权限(「权限管理」逐个搜索并勾选,名称各版本略有差异,按含义找):\n 必需:im:message(读写单聊/群消息)、im:message.group_msg(读群里全部消息,机器人收到 @ 靠它)、im:chat(获取群信息)、im:chat.members:read(读群成员、识别「谁 @ 我」)。\n 可选:task:task、wiki:wiki:readonly / wiki:node:read / wiki:node:retrieve、docx:document:readonly、drive:drive:readonly(要建飞书待办、读飞书文档/知识库才需要)。\n4. 发布版本:改完权限必须「创建版本 → 申请发布 / 上线」,否则权限不生效(最容易忘的一步)。等发布成功。\n5. 取凭据:到「凭证与基础信息」,复制 App ID(cli_ 开头)和 App Secret;并取机器人自己的 open_id(botOpenId,拿不到就标「待补」)。\n6. 建议新建一个唯一名称的专属群(如「Tower 通知」),把机器人加进去,记下群 id —— 避免同名群/人导致发错。\n7. 把 appId / appSecret / domain 配到飞书 MCP,并在 Tower「设置 → 通知 → 无人值守发送渠道」加一条渠道,点「测试」验证能收到消息。\n\n避坑:① 域名别搞反 —— 公司飞书和公网飞书是两套、凭据不通用;② 只「建了应用」不等于能用,必须开机器人能力 + 发布版本 + 拉进群三样齐;③ 别用 curl 直接抓控制台页面(有 WAF 会 403),用浏览器(Playwright)操作。\n\n(换 OpenClaw / Hermes 等其它网关:参考各自文档 https://docs.openclaw.ai/ · https://hermes-agent.nousresearch.com/docs/ ,拿到 token / webhook 后同样在 Tower 加渠道并测试。)"),g.toast.success(a("settings.harness.copied"))}catch{g.toast.error("复制失败")}},D=async a=>{if(r.trim()){u(!0),w(null);try{let b=await aY({gateway:a.gateway,downstream:a.downstream,dest:r.trim()});w(b)}catch(a){w({ok:!1,output:a instanceof Error?a.message:String(a)})}finally{u(!1)}}},E=b=>a_.includes(b)?a(`settings.harness.ds.${b}`):b,F=({label:a,children:c})=>(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:a}),c]});return(0,b.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:a("settings.harness.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:a("settings.harness.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2 rounded-lg bg-muted/30 px-3 py-2",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[(0,b.jsx)(aT.Info,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{children:a("settings.harness.notice")})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 pl-5 text-xs",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a("settings.harness.docsLabel"),":"]}),aZ.map(c=>a2[c]?(0,b.jsxs)("a",{href:a2[c],target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-primary hover:underline",children:[a(`settings.harness.gateway.${c}`),(0,b.jsx)(aC.ExternalLink,{className:"h-3 w-3"})]},c):null),(0,b.jsxs)("button",{type:"button",onClick:B,className:"inline-flex items-center gap-1 text-primary hover:underline",children:[(0,b.jsx)(aB.Copy,{className:"h-3 w-3"}),a("settings.harness.copyPrompt")]})]})]}),n&&(0,b.jsx)(G.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}),(0,b.jsx)("div",{className:"space-y-2",children:d.map(c=>{var d;let f,g=l.has(c.id);return j===c.id?(0,b.jsxs)("div",{className:"rounded-lg border bg-muted/30 p-3 space-y-3",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsx)(F,{label:a("settings.harness.gatewayLabel"),children:(0,b.jsxs)(aa.Select,{value:c.gateway,onValueChange:a=>{let b=a??"feishu",d=a1(b);x(c.id,{gateway:b,downstream:d.includes(c.downstream)?c.downstream:d[0]??""}),z(c.id,!1)},children:[(0,b.jsx)(aa.SelectTrigger,{className:"w-full",children:(0,b.jsx)("span",{className:"truncate",children:a(`settings.harness.gateway.${c.gateway}`)})}),(0,b.jsx)(aa.SelectContent,{children:aZ.map(c=>(0,b.jsx)(aa.SelectItem,{value:c,children:a(`settings.harness.gateway.${c}`)},c))})]})}),(0,b.jsx)(F,{label:a("settings.harness.downstreamLabel"),children:(0,b.jsxs)(aa.Select,{value:g?a0:c.downstream,onValueChange:a=>{a===a0?(z(c.id,!0),x(c.id,{downstream:""})):(z(c.id,!1),x(c.id,{downstream:a??""}))},children:[(0,b.jsx)(aa.SelectTrigger,{className:"w-full",children:(0,b.jsx)("span",{className:"truncate",children:g?a("settings.harness.ds.custom"):c.downstream?E(c.downstream):a("settings.harness.downstreamPlaceholder")})}),(0,b.jsxs)(aa.SelectContent,{children:[a1(c.gateway).map(c=>(0,b.jsx)(aa.SelectItem,{value:c,children:a(`settings.harness.ds.${c}`)},c)),"feishu"!==c.gateway&&(0,b.jsx)(aa.SelectItem,{value:a0,children:a("settings.harness.ds.custom")})]})]})})]}),g&&(0,b.jsx)(F,{label:a("settings.harness.customLabel"),children:(0,b.jsx)(i.Input,{value:c.downstream,onChange:a=>x(c.id,{downstream:a.target.value}),placeholder:a("settings.harness.customPlaceholder")})}),(0,b.jsx)(F,{label:a("settings.harness.test"),children:(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:r,onChange:a=>s(a.target.value),placeholder:a("settings.harness.testDestPlaceholder"),className:"flex-1"}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>D(c),disabled:t||!r.trim(),children:[t?(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,b.jsx)(aU.Send,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:t?a("settings.harness.testing"):a("settings.harness.testSend")})]})]}),v&&(0,b.jsxs)("div",{className:`flex items-start gap-1.5 rounded bg-muted/40 px-2 py-1 text-xs ${v.ok?"text-emerald-500":"text-rose-400"}`,children:[v.ok?(0,b.jsx)(aV.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):(0,b.jsx)(aW.default,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,b.jsx)("span",{className:"whitespace-pre-wrap break-words",children:v.ok?a("settings.harness.testOk"):`${a("settings.harness.testFail")}:${v.output}`})]})]})}),(0,b.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,b.jsxs)(h.Button,{onClick:()=>{k(null),w(null)},children:[(0,b.jsx)(az.Check,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.done")})]}),(0,b.jsxs)(h.Button,{variant:"ghost",className:"text-muted-foreground",onClick:()=>y(c.id),children:[(0,b.jsx)(C.Trash2,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.remove")})]})]})]},c.id):(0,b.jsxs)("div",{className:`flex items-center gap-2.5 rounded-lg border px-3 py-2 ${c.active?"border-primary/40 bg-primary/5":"bg-muted/20"}`,children:[(0,b.jsx)("button",{type:"button",onClick:()=>{let a;return a=c.id,e(b=>b.map(b=>({...b,active:b.id===a})))},title:a("settings.harness.setActive"),className:c.active?"text-primary":"text-muted-foreground hover:text-foreground",children:c.active?(0,b.jsx)(aX,{className:"h-4 w-4"}):(0,b.jsx)(aA,{className:"h-4 w-4"})}),(0,b.jsx)("span",{className:"truncate text-sm text-foreground",children:(d=c,f=a(`settings.harness.gateway.${d.gateway}`),d.downstream?`${f} \xb7 ${E(d.downstream)}`:f)}),c.active&&(0,b.jsx)("span",{className:"shrink-0 rounded-full bg-primary/15 px-2 py-0.5 text-[10px] font-medium text-primary ring-1 ring-primary/25",children:a("settings.harness.active")}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>{k(c.id),w(null),s("")},title:a("settings.harness.edit"),children:(0,b.jsx)(aS.Pencil,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:()=>y(c.id),title:a("settings.harness.remove"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},c.id)})}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{let a=crypto.randomUUID();e(b=>[...b,{id:a,gateway:"feishu",downstream:"feishu",active:0===b.length}]),k(a),w(null)},className:"text-muted-foreground",children:[(0,b.jsx)(A.Plus,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:a("settings.harness.addTarget")})]}),(0,b.jsx)(h.Button,{onClick:()=>q(async()=>{await (0,N.setConfigValue)("harness.targets",d),k(null),g.toast.success(a("settings.harness.saved"))}),disabled:p,className:"rounded-lg",children:a("common.save")})]})]})}function a4({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,o.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function a5({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,o.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let a6=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:q.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:s,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:t.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:u,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:x.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:v.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:w.HardDrive,accent:"cyan"},{id:"keyboard-shortcuts",labelKey:"settings.keyboardShortcuts",descKey:"settings.keyboardShortcutsDesc",icon:y.Keyboard,accent:"violet"}],a7={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},a8="ai-manager:default-cli-adapter",a9={host:"",ownerMatch:"*",localPathTemplate:"",priority:0},ba=a=>a.replace(/\\/g,"/").replace(/\/+$/,"");function bb(){let a=(0,d.useRouter)(),{t:q}=(0,f.useI18n)(),{theme:r,setTheme:s}=(0,e.useTheme)(),{locale:t,setLocale:u}=(0,f.useI18n)(),[v,w]=(0,c.useState)("general"),x=(0,c.useRef)(null),[y,P]=(0,c.useState)({left:0,width:0}),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)("Terminal"),[ac,ad]=(0,c.useState)([]),[ae,ai]=(0,c.useState)(""),[aj,ak]=(0,c.useState)([]),[al,am]=(0,c.useState)(13),[an,ao]=(0,c.useState)("Menlo, Monaco, 'Courier New', monospace"),[ap,aq]=(0,c.useState)([]),[ar,as]=(0,c.useState)("claude"),[at,au]=(0,c.useState)(null),[av,aw]=(0,c.useState)({}),[ay,az]=(0,c.useState)([]),[aA,aB]=(0,c.useState)(!1),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)(null),[aG,aH]=(0,c.useState)(""),[aI,aK]=(0,c.useState)(""),[aL,aM]=(0,c.useState)(""),[aN,aO]=(0,c.useState)(null),[aP,aQ]=(0,c.useState)(""),[aS,aT]=(0,c.useState)(!1),[aU,aV]=(0,c.useState)(!1),[aW,aX]=(0,c.useState)(!1),[aY,aZ]=(0,c.useState)([]),[a$,a_]=(0,c.useState)(null),[a0,a1]=(0,c.useState)({...a9}),[a2,bb]=(0,c.useState)(!1),[bc,bd]=(0,c.useState)({...a9}),[be,bf]=(0,c.useState)(!1),[bg,bh]=(0,c.useState)(!1),[bi,bj]=(0,c.useState)(0),[bk,bl]=(0,c.useState)(null),[bm,bn]=(0,c.useState)(null),[bo,bp]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5,archiveDelayDays:7,taskDefaultUseWorktree:!0,taskDefaultAutoStart:!1}),[bq,br]=(0,c.useState)({timeoutSec:30}),[bs,bt]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[bu,bv]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[bw,bx]=(0,c.useState)(null),[by,bz]=(0,c.useState)(!1),[bA,bB]=(0,c.useState)(""),[bC,bD]=(0,c.useState)(!0);(0,c.useEffect)(()=>_(!0),[]),(0,c.useEffect)(()=>{(0,M.getConfigValue)("terminal.app","Terminal").then(ab),Q().then(ad),(0,M.getConfigValue)("editor.command","").then(ai),R().then(ak),(0,M.getConfigValue)("terminal.fontSize",13).then(am),(0,M.getConfigValue)("terminal.fontFamily","Menlo, Monaco, 'Courier New', monospace").then(ao)},[]),(0,c.useEffect)(()=>{if(0===ac.length||!aa||ac.some(a=>a.value===aa))return;let a=ac.find(a=>a.name===aa);a&&(ab(a.value),(0,N.setConfigValue)("terminal.app",a.value))},[ac,aa]),(0,c.useEffect)(()=>{if(0===aj.length||!ae||aj.some(a=>a.command===ae))return;let a=aj.find(a=>a.name===ae);a&&(ai(a.command),(0,N.setConfigValue)("editor.command",a.command))},[aj,ae]),(0,c.useEffect)(()=>{Z().then(aq);let a=localStorage.getItem(a8);a&&as(a)},[]),(0,c.useEffect)(()=>{(0,S.getPrompts)().then(az)},[]),(0,c.useEffect)(()=>{W().then(a=>{aO(a),aQ(a.systemDirective)})},[]);let bE=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();bx(b)}}catch{}};async function bF(a){if(!at){au(a),aw(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a})}),c=await b.json();aw(b=>({...b,[a]:c}))}catch{aw(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{au(null)}}}(0,c.useEffect)(()=>{(0,M.getConfigValue)("git.pathMappingRules",[]).then(a=>{let b=new Set,c=!1,d=a.map(a=>{if(!a.id||b.has(a.id)){c=!0;let d={...a,id:crypto.randomUUID()};return b.add(d.id),d}return b.add(a.id),a});aZ(d),c&&(0,N.setConfigValue)("git.pathMappingRules",d)}),(0,M.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{bB(a.join(", "))}),bE(),(0,O.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","board.archiveDelayDays","task.defaultUseWorktree","task.defaultAutoStart","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{let b=a["system.maxUploadBytes"]??0x3200000,c=a["system.maxReadableFileBytes"]??5242880;bp({maxUploadMb:Math.round(b/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(c/1024/1024),archiveDelayDays:a["board.archiveDelayDays"]??7,taskDefaultUseWorktree:"boolean"!=typeof a["task.defaultUseWorktree"]||a["task.defaultUseWorktree"],taskDefaultAutoStart:"boolean"==typeof a["task.defaultAutoStart"]&&a["task.defaultAutoStart"]}),br({timeoutSec:a["git.timeoutSec"]??30}),bt({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80,codeTimeoutSec:a["search.codeTimeoutSec"]??30}),bv({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{(0,M.getConfigValue)("notification.enabled",!0).then(bD)},[]);let bG=(0,c.useCallback)(()=>{aD(null),aH(""),aK(""),aM(""),aB(!0)},[]),bH=(0,c.useCallback)(a=>{aD(a),aH(a.name),aK(a.description??""),aM(a.content),aB(!0)},[]),bI=(0,c.useCallback)(async()=>{aG.trim()&&aL.trim()&&(aC?await U(aC.id,{name:aG.trim(),description:aI.trim()||void 0,content:aL.trim()}):await T({name:aG.trim(),description:aI.trim()||void 0,content:aL.trim()}),aB(!1),az(await (0,S.getPrompts)()),a.refresh())},[aG,aI,aL,aC,a]),bJ=(0,c.useCallback)(async()=>{aE&&(await V(aE),aF(null),az(await (0,S.getPrompts)()),a.refresh())},[aE,a]),bK=(0,c.useCallback)(async()=>{aT(!0);try{await X(aP);let a=await W();aO(a),aQ(a.systemDirective),aV(!1),g.toast.success(q("settings.prompts.builtin.saved"))}finally{aT(!1)}},[aP,q]),bL=(0,c.useCallback)(async()=>{aT(!0);try{let a=await Y(),b=await W();aO(b),aQ(a),g.toast.info(q("settings.prompts.builtin.resetDone"))}finally{aT(!1)}},[q]),bM=async()=>{await (0,N.setConfigValue)("system.maxUploadBytes",1024*bo.maxUploadMb*1024),await (0,N.setConfigValue)("system.maxConcurrentExecutions",bo.maxConcurrent),await (0,N.setConfigValue)("system.maxReadableFileBytes",1024*bo.maxReadableMb*1024),await (0,N.setConfigValue)("board.archiveDelayDays",bo.archiveDelayDays)},bN=async()=>{await (0,N.setConfigValue)("task.defaultUseWorktree",bo.taskDefaultUseWorktree),await (0,N.setConfigValue)("task.defaultAutoStart",bo.taskDefaultAutoStart),await (0,N.setConfigValue)("task.mcpDefaultsConfigured",!0)},bO=async()=>{await (0,N.setConfigValue)("git.timeoutSec",bq.timeoutSec)},bP=async()=>{await (0,N.setConfigValue)("search.resultLimit",bs.resultLimit),await (0,N.setConfigValue)("search.allModeCap",bs.allModeCap),await (0,N.setConfigValue)("search.debounceMs",bs.debounceMs),await (0,N.setConfigValue)("search.snippetLength",bs.snippetLength),await (0,N.setConfigValue)("search.codeTimeoutSec",bs.codeTimeoutSec)},bQ=async()=>{let a=Math.min(bu.minCols,bu.maxCols),b=Math.max(bu.minCols,bu.maxCols),c=Math.min(bu.minRows,bu.maxRows),d=Math.max(bu.minRows,bu.maxRows);bv({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,N.setConfigValue)("missions.grid.minCols",a),await (0,N.setConfigValue)("missions.grid.maxCols",b),await (0,N.setConfigValue)("missions.grid.minRows",c),await (0,N.setConfigValue)("missions.grid.maxRows",d)},bR=async()=>{let a=bA.split(",").map(a=>a.trim()).filter(Boolean);await (0,N.setConfigValue)("hooks.autoUploadTypes",a)},bS=async()=>{if(bw){bz(!0);try{let a=bw.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await bE()}finally{bz(!1)}}},bT=async()=>{if(!bc.host.trim()||!bc.localPathTemplate.trim())return;let a=ba(bc.localPathTemplate.trim()),b=be?`${a}/{path}`:a,c=[...aY,{id:crypto.randomUUID(),host:bc.host.trim(),ownerMatch:bc.ownerMatch.trim()||"*",localPathTemplate:b,priority:bc.priority}];await (0,N.setConfigValue)("git.pathMappingRules",c),aZ(c),bd({...a9}),bf(!1),bb(!1)},bU=async a=>{if(!a0.host.trim()||!a0.localPathTemplate.trim())return;let b=ba(a0.localPathTemplate.trim()),c=bg?`${b}/{path}`:b,d=aY.map(b=>b.id===a?{...b,host:a0.host.trim(),ownerMatch:a0.ownerMatch.trim()||"*",localPathTemplate:c,priority:a0.priority}:b);await (0,N.setConfigValue)("git.pathMappingRules",d),aZ(d),a_(null),bh(!1)},bV=async a=>{let b=aY.filter(b=>b.id!==a);await (0,N.setConfigValue)("git.pathMappingRules",b),aZ(b),bl(null)};async function bW(){let a=!bC;bD(a),await (0,N.setConfigValue)("notification.enabled",a)}let bX=(0,c.useCallback)(()=>{a.back()},[a]),bY=(0,c.useCallback)(a=>{let b=x.current;if(!b)return;let c=b.querySelector("[data-section]"),d=c?c.offsetWidth+4:140;b.scrollBy({left:"left"===a?-d:d,behavior:"smooth"})},[]);(0,c.useEffect)(()=>{let a=x.current;if(!a)return;let b=a.querySelector(`[data-section="${v}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();P({left:d.left-c.left,width:d.width})},[v]);let{canScrollLeft:bZ,canScrollRight:b$}=(0,p.useScrollOverflow)(x,[t]),b_=a6.find(a=>a.id===v),b0=b_?a7[b_.accent]:a7.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:q("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:q("settings.configDesc")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:bX,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(z.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{className:"relative flex items-center gap-1",children:[bZ&&(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bY("left"),className:"shrink-0","aria-label":"scroll tabs left",children:(0,b.jsx)(K.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{ref:x,className:"relative flex flex-1 gap-1 overflow-x-auto [&::-webkit-scrollbar]:hidden",children:[a6.map(a=>{let c=a.icon,d=v===a.id,e=a7[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>w(a.id),className:(0,o.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,o.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:q(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,o.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",b0.indicator),style:{left:y.left,width:y.width}})]}),b$&&(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bY("right"),className:"shrink-0","aria-label":"scroll tabs right",children:(0,b.jsx)(L.ChevronRight,{className:"h-4 w-4"})})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[b_&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,o.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",b0.bg,b0.text,b0.ring),children:(0,b.jsx)(b_.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:q(b_.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:q(b_.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(v){case"general":let a;return a=[{value:"light",label:q("settings.themeLight")},{value:"dark",label:q("settings.themeDark")},{value:"system",label:q("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(a5,{label:q("settings.theme"),description:q("settings.themeDesc"),children:$?(0,b.jsx)(a4,{options:a,value:r??"system",onChange:a=>s(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(a5,{label:q("settings.language"),description:q("settings.languageDesc"),children:(0,b.jsx)(a4,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:t,onChange:a=>u(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.terminal.desc")})]}),ac.length>0&&(0,b.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:ac.map(a=>{let c=aa===a.value,d=(0,o.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",a.installed?c?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),e=()=>{a.installed&&(ab(a.value),(0,N.setConfigValue)("terminal.app",a.value))};return a.installed?(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name},a.value):(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name})}),(0,b.jsx)(ag.TooltipContent,{side:"top",children:q("settings.app.notInstalled")})]},a.value)})})]}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.terminalFont.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.terminalFont.desc")})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-4",children:[(0,b.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[q("settings.terminalFont.size"),(0,b.jsx)("input",{type:"number",min:8,max:40,value:al,onChange:a=>{let b=Math.max(8,Math.min(40,Math.round(Number(a.target.value)||13)));am(b),(0,N.setConfigValue)("terminal.fontSize",b)},className:"h-8 w-20 rounded-md border border-border bg-background px-2 text-sm text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]}),(0,b.jsxs)("label",{className:"flex min-w-0 flex-1 items-center gap-2 text-xs text-muted-foreground",children:[q("settings.terminalFont.family"),(0,b.jsx)("input",{type:"text",value:an,placeholder:"Menlo, Monaco, 'Courier New', monospace",onChange:a=>ao(a.target.value),onBlur:a=>{let b=a.target.value.trim()||"Menlo, Monaco, 'Courier New', monospace";ao(b),(0,N.setConfigValue)("terminal.fontFamily",b)},className:"h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,b.jsx)("div",{className:"mt-1.5 text-[11px] text-muted-foreground/70",children:q("settings.terminalFont.hint")})]}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.editor.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.editor.desc")})]}),aj.length>0&&(0,b.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:aj.map(a=>{let c=ae===a.command,d=(0,o.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200",a.installed?c?"border-foreground bg-accent text-foreground font-medium cursor-pointer":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-not-allowed border-dashed border-border/60 text-muted-foreground/40"),e=()=>{a.installed&&(ai(a.command),(0,N.setConfigValue)("editor.command",a.command))};return a.installed?(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name},a.command):(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)("button",{type:"button",onClick:e,className:d,children:a.name})}),(0,b.jsx)(ag.TooltipContent,{side:"top",children:q("settings.app.notInstalled")})]},a.command)})})]})]});case"ai-tools":return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ap.map(a=>{let c=ar===a.name,d=at===a.name,e=av[a.name];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.displayName}),(0,b.jsx)(l.Badge,{variant:"outline",children:q("label.builtin")}),c&&(0,b.jsxs)(l.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(B,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),q("settings.prompts.default")]}),e&&(0,b.jsx)(l.Badge,{variant:e.ok?"secondary":"destructive",className:(0,o.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(H.CheckCircle2,{className:"h-3 w-3 mr-1"}),q("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(I.XCircle,{className:"h-3 w-3 mr-1"}),q("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.cli.available&&a.cli.version?`${a.name} \xb7 ${a.cli.version}`:a.name})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>{var b;as(b=a.name),localStorage.setItem(a8,b)},children:[(0,b.jsx)(B,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),q("settings.prompts.setDefault")]}),(0,b.jsx)(h.Button,{variant:"outline",size:"sm",onClick:()=>bF(a.name),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(G.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),q("settings.aiTools.testing")]}):q("settings.aiTools.testConnection")})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,o.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,o.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.name}-${c.name}`))})})]})},a.name)})}),(0,b.jsx)(af,{})]});case"prompts":return $?(0,b.jsxs)("div",{className:"space-y-4",children:[aN&&(0,b.jsxs)("div",{className:"space-y-4 rounded-xl border border-border/50 bg-card p-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:q("settings.prompts.builtin.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.prompts.builtin.desc")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(k.Label,{className:"text-sm",children:q("settings.prompts.builtin.systemTitle")}),aN.systemDirectiveIsCustom&&(0,b.jsx)(l.Badge,{variant:"secondary",className:"rounded-full text-xs",children:q("settings.prompts.builtin.modified")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>{aQ(aN.systemDirective),aV(!0)},children:[(0,b.jsx)(D,{className:"h-4 w-4"}),q("settings.prompts.builtin.edit")]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.prompts.builtin.systemDesc")}),(0,b.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,b.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:aN.systemDirective})})]}),(0,b.jsxs)("div",{className:"space-y-2 border-t border-border/50 pt-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(k.Label,{className:"text-sm",children:q("settings.prompts.builtin.childTitle")}),(0,b.jsx)(l.Badge,{variant:"outline",className:"rounded-full text-xs",children:q("settings.prompts.builtin.readonly")})]}),(0,b.jsxs)(h.Button,{variant:"outline",onClick:()=>aX(!0),children:[(0,b.jsx)(E.Eye,{className:"h-4 w-4"}),q("settings.prompts.builtin.view")]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.prompts.builtin.childDesc")}),(0,b.jsx)("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:(0,b.jsx)("p",{className:"line-clamp-3 whitespace-pre-wrap break-words font-mono text-xs text-muted-foreground",children:aN.childReviewPrompt})})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium",children:q("settings.prompts.custom.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.prompts.custom.desc")})]}),(0,b.jsxs)(h.Button,{onClick:bG,variant:"default",className:"shrink-0",children:[(0,b.jsx)(A.Plus,{className:"h-4 w-4 mr-2"}),q("settings.prompts.newPrompt")]})]}),0===ay.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:q("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:q("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:ay.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bH(a),title:q("settings.prompts.editPrompt"),children:(0,b.jsx)(D,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aF(a.id),className:"text-destructive",title:q("settings.prompts.delete"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},a.id))})]}),(0,b.jsx)(n.Dialog,{open:aU,onOpenChange:aV,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.builtin.systemTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.builtin.systemDesc")})]}),(0,b.jsx)(j.Textarea,{value:aP,onChange:a=>aQ(a.target.value),className:"max-h-[60vh] min-h-[50vh] font-mono text-xs"}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:bL,disabled:aS||!aN?.systemDirectiveIsCustom,children:q("settings.prompts.builtin.resetDefault")}),(0,b.jsx)(h.Button,{variant:"default",onClick:bK,disabled:aS||aP===aN?.systemDirective,children:q("settings.prompts.save")})]})]})}),(0,b.jsx)(n.Dialog,{open:aW,onOpenChange:aX,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.builtin.childTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.builtin.childDesc")})]}),(0,b.jsx)(j.Textarea,{value:aN?.childReviewPrompt??"",readOnly:!0,className:"max-h-[60vh] min-h-[50vh] font-mono text-xs bg-muted/40 cursor-default"}),(0,b.jsx)(n.DialogFooter,{children:(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aX(!1),children:q("settings.prompts.close")})})]})}),(0,b.jsx)(n.Dialog,{open:aA,onOpenChange:aB,children:(0,b.jsxs)(n.DialogContent,{className:"sm:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:aC?q("settings.prompts.editPrompt"):q("settings.prompts.newPrompt")}),(0,b.jsx)(n.DialogDescription,{children:aC?q("settings.prompts.editPrompt"):q("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-name",children:q("settings.prompts.promptName")}),(0,b.jsx)(i.Input,{id:"prompt-name",value:aG,onChange:a=>aH(a.target.value),placeholder:q("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-description",children:q("settings.prompts.promptDescription")}),(0,b.jsx)(i.Input,{id:"prompt-description",value:aI,onChange:a=>aK(a.target.value),placeholder:q("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(k.Label,{htmlFor:"prompt-content",children:q("settings.prompts.promptContent")}),(0,b.jsx)(j.Textarea,{id:"prompt-content",value:aL,onChange:a=>aM(a.target.value),placeholder:q("settings.prompts.promptContentPlaceholder"),className:"mt-1.5 max-h-[55vh] min-h-[40vh] font-mono text-sm"})]})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aB(!1),children:q("settings.prompts.cancel")}),(0,b.jsx)(h.Button,{onClick:bI,disabled:!aG.trim()||!aL.trim(),children:q("settings.prompts.save")})]})]})}),(0,b.jsx)(n.Dialog,{open:!!aE,onOpenChange:a=>!a&&aF(null),children:(0,b.jsxs)(n.DialogContent,{children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>aF(null),children:q("settings.prompts.cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",onClick:bJ,children:q("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.git.desc")})]}),(0,b.jsxs)(h.Button,{onClick:()=>{bd({...a9}),bb(!0)},children:[(0,b.jsx)(A.Plus,{className:"mr-2 h-4 w-4"}),q("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==aY.length||a2?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:aY.map(a=>a$===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.host")}),(0,b.jsx)(i.Input,{value:a0.host,onChange:a=>a1(b=>({...b,host:a.target.value})),placeholder:q("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.ownerMatch")}),(0,b.jsx)(i.Input,{value:a0.ownerMatch,onChange:a=>a1(b=>({...b,ownerMatch:a.target.value})),placeholder:q("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:a0.localPathTemplate,onChange:a=>a1(b=>({...b,localPathTemplate:a.target.value})),placeholder:q("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:bg?"default":"outline",size:"sm",type:"button",onClick:()=>bh(a=>!a),className:"shrink-0 font-mono",children:"{path}"})}),(0,b.jsx)(ag.TooltipContent,{side:"top",className:"max-w-xs",children:(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("div",{className:"font-medium",children:q("settings.config.git.pathTooltipTitle")}),(0,b.jsx)("div",{className:"opacity-80",children:q("settings.config.git.pathTooltipDetail")})]})})]}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>bn("edit"),children:(0,b.jsx)(J.FolderOpen,{className:"h-4 w-4"})})}),(0,b.jsx)(ag.TooltipContent,{children:q("settings.config.git.pickFolder")})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:bg?q("onboarding.step3.pathHintFull"):q("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs text-muted-foreground",children:q("settings.config.git.priority")}),(0,b.jsx)(i.Input,{type:"number",value:a0.priority,onChange:a=>a1(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>{a_(null),bh(!1)},children:q("settings.config.git.cancel")}),(0,b.jsx)(h.Button,{size:"sm",onClick:()=>bU(a.id),children:q("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(l.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[q("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let b,c,d;return b=a.localPathTemplate,d=(c=/\/\{path\}\/?$/.test(b))?b.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):b,void(a_(a.id),a1({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:d,priority:a.priority}),bh(c))},title:q("settings.config.git.edit"),children:(0,b.jsx)(D,{className:"h-4 w-4"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bl(a.id),className:"text-destructive",title:q("settings.config.git.delete"),children:(0,b.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsxs)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:q("settings.config.git.noRules")}),(0,b.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground/80",children:q("settings.config.git.noRulesFallback")})]}),a2&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:q("settings.config.git.host")}),(0,b.jsx)(i.Input,{value:bc.host,onChange:a=>bd(b=>({...b,host:a.target.value})),placeholder:q("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:q("settings.config.git.ownerMatch")}),(0,b.jsx)(i.Input,{value:bc.ownerMatch,onChange:a=>bd(b=>({...b,ownerMatch:a.target.value})),placeholder:q("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs font-medium",children:q("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{value:bc.localPathTemplate,onChange:a=>bd(b=>({...b,localPathTemplate:a.target.value})),placeholder:q("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:be?"default":"outline",size:"sm",type:"button",onClick:()=>bf(a=>!a),className:"shrink-0 font-mono",children:"{path}"})}),(0,b.jsx)(ag.TooltipContent,{side:"top",className:"max-w-xs",children:(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsx)("div",{className:"font-medium",children:q("settings.config.git.pathTooltipTitle")}),(0,b.jsx)("div",{className:"opacity-80",children:q("settings.config.git.pathTooltipDetail")})]})})]}),(0,b.jsxs)(ag.Tooltip,{children:[(0,b.jsx)(ag.TooltipTrigger,{render:(0,b.jsx)(h.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>bn("add"),children:(0,b.jsx)(J.FolderOpen,{className:"h-4 w-4"})})}),(0,b.jsx)(ag.TooltipContent,{children:q("settings.config.git.pickFolder")})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:be?q("onboarding.step3.pathHintFull"):q("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"block text-xs font-medium",children:q("settings.config.git.priority")}),(0,b.jsx)(i.Input,{type:"number",value:bc.priority,onChange:a=>bd(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),bc.localPathTemplate&&(c=bc.localPathTemplate.trim().replace(/\/+$/,""),d=be?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:q("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>bj(c),className:(0,o.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",bi===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[bi].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[bi].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>bb(!1),children:q("settings.config.git.cancel")}),(0,b.jsxs)(h.Button,{size:"sm",onClick:bT,disabled:!bc.host.trim()||!bc.localPathTemplate.trim(),children:[(0,b.jsx)(F,{className:"h-3.5 w-3.5 mr-1.5"}),q("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:500,value:bo.maxUploadMb,onChange:a=>bp(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bo.maxConcurrent,onChange:a=>bp(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.maxReadable")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.maxReadableHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:50,value:bo.maxReadableMb,onChange:a=>bp(b=>({...b,maxReadableMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.archiveDelay")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.archiveDelayHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:1,max:365,value:bo.archiveDelayDays,onChange:a=>bp(b=>({...b,archiveDelayDays:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:q("settings.config.system.archiveDelayUnit")})]})]})]}),(0,b.jsx)(h.Button,{onClick:bM,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.task.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.task.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.taskDefaultWorktree")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.taskDefaultWorktreeHint")})]}),(0,b.jsx)("button",{type:"button",onClick:()=>bp(a=>({...a,taskDefaultUseWorktree:!a.taskDefaultUseWorktree})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${bo.taskDefaultUseWorktree?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:bo.taskDefaultUseWorktree?q("task.worktreeYes"):q("task.worktreeNo")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.system.taskDefaultAutoStart")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.system.taskDefaultAutoStartHint")})]}),(0,b.jsx)("button",{type:"button",onClick:()=>bp(a=>({...a,taskDefaultAutoStart:!a.taskDefaultAutoStart})),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${bo.taskDefaultAutoStart?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:bo.taskDefaultAutoStart?q("task.autoStartYes"):q("task.autoStartNo")})]})]}),(0,b.jsx)(h.Button,{onClick:bN,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:5,max:300,value:bq.timeoutSec,onChange:a=>br(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(h.Button,{onClick:bO,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:5,max:100,value:bs.resultLimit,onChange:a=>bt(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:1,max:20,value:bs.allModeCap,onChange:a=>bt(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:50,max:1e3,value:bs.debounceMs,onChange:a=>bt(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(i.Input,{type:"number",min:20,max:500,value:bs.snippetLength,onChange:a=>bt(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.search.codeTimeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.search.codeTimeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(i.Input,{type:"number",min:5,max:300,step:5,value:bs.codeTimeoutSec,onChange:a=>bt(b=>({...b,codeTimeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,b.jsx)(h.Button,{onClick:bP,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.minCols")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bu.minCols,onChange:a=>bv(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.maxCols")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bu.maxCols,onChange:a=>bv(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.minRows")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bu.minRows,onChange:a=>bv(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:q("settings.config.missions.maxRows")}),(0,b.jsx)(i.Input,{type:"number",min:1,max:10,value:bu.maxRows,onChange:a=>bv(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(h.Button,{onClick:bQ,className:"rounded-lg",children:q("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:q("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:q("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(i.Input,{value:bA,onChange:a=>bB(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(h.Button,{onClick:bR,className:"rounded-lg",children:q("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:bw?.installed?q("settings.config.hooks.installed"):q("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:q("settings.config.hooks.installHint")})]}),(0,b.jsx)(h.Button,{variant:bw?.installed?"destructive":"default",onClick:bS,disabled:by||!bw,className:"rounded-lg",children:bw?.installed?q("settings.config.hooks.uninstall"):q("settings.config.hooks.install")})]})]}),(0,b.jsx)(n.Dialog,{open:!!bk,onOpenChange:a=>!a&&bl(null),children:(0,b.jsxs)(n.DialogContent,{children:[(0,b.jsxs)(n.DialogHeader,{children:[(0,b.jsx)(n.DialogTitle,{children:q("settings.config.git.deleteConfirm")}),(0,b.jsx)(n.DialogDescription,{children:q("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(n.DialogFooter,{children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>bl(null),children:q("settings.config.git.cancel")}),(0,b.jsx)(h.Button,{variant:"destructive",onClick:()=>bk&&bV(bk),children:q("settings.config.git.delete")})]})]})})]});case"notifications":return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:q("settings.notifications.systemCategory")}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:q("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:q("settings.notifications.enableDesc")})]}),(0,b.jsx)(m.Switch,{checked:bC,onCheckedChange:bW})]})]}),(0,b.jsx)(a3,{})]});case"backup":return(0,b.jsx)(ax,{});case"extensions":return(0,b.jsx)(aJ,{});case"keyboard-shortcuts":return(0,b.jsx)(aR,{})}}()]})}),(0,b.jsx)(ah.FolderBrowserDialog,{open:null!==bm,onOpenChange:a=>{a||bn(null)},onSelect:a=>{let b=ba(a);"add"===bm?bd(a=>({...a,localPathTemplate:b})):"edit"===bm&&a1(a=>({...a,localPathTemplate:b})),bn(null)}})]})}a.s(["default",0,function(){return(0,b.jsx)(bb,{})}],520788)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_app_settings_page_tsx_0h9v7dr._.js.map
|