@cosmicstack/mercury-agent 1.1.9 → 1.1.12

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.
Files changed (114) hide show
  1. package/README.md +101 -1
  2. package/README.zh-CN.md +265 -140
  3. package/dist/index.js +4473 -1842
  4. package/dist/index.js.map +1 -1
  5. package/dist/web/ui/assets/{Chat-DCFkzIwn.js → Chat-DXSn2dY8.js} +2 -2
  6. package/dist/web/ui/assets/{Chat-DCFkzIwn.js.map → Chat-DXSn2dY8.js.map} +1 -1
  7. package/dist/web/ui/assets/{Dashboard-B81ollv8.js → Dashboard-1rlAqQ-Y.js} +2 -2
  8. package/dist/web/ui/assets/{Dashboard-B81ollv8.js.map → Dashboard-1rlAqQ-Y.js.map} +1 -1
  9. package/dist/web/ui/assets/{Goals-D0cR8yIP.js → Goals-CgSUAXLH.js} +2 -2
  10. package/dist/web/ui/assets/{Goals-D0cR8yIP.js.map → Goals-CgSUAXLH.js.map} +1 -1
  11. package/dist/web/ui/assets/{Graph-C3eHp3_J.js → Graph-DnlOWkay.js} +2 -2
  12. package/dist/web/ui/assets/{Graph-C3eHp3_J.js.map → Graph-DnlOWkay.js.map} +1 -1
  13. package/dist/web/ui/assets/{Kanban-DrkTRyni.js → Kanban-DRlNiNRF.js} +2 -2
  14. package/dist/web/ui/assets/{Kanban-DrkTRyni.js.map → Kanban-DRlNiNRF.js.map} +1 -1
  15. package/dist/web/ui/assets/{Login-GRQ-LjgN.js → Login-BP5524pC.js} +2 -2
  16. package/dist/web/ui/assets/{Login-GRQ-LjgN.js.map → Login-BP5524pC.js.map} +1 -1
  17. package/dist/web/ui/assets/{MarkdownRenderer-Dvh1jwyj.js → MarkdownRenderer-B9KGVD0X.js} +2 -2
  18. package/dist/web/ui/assets/{MarkdownRenderer-Dvh1jwyj.js.map → MarkdownRenderer-B9KGVD0X.js.map} +1 -1
  19. package/dist/web/ui/assets/{Memory-dAZsKmWz.js → Memory-BOQEY0H8.js} +2 -2
  20. package/dist/web/ui/assets/{Memory-dAZsKmWz.js.map → Memory-BOQEY0H8.js.map} +1 -1
  21. package/dist/web/ui/assets/{Permissions-DCiyUUfI.js → Permissions-jbFH-toa.js} +2 -2
  22. package/dist/web/ui/assets/{Permissions-DCiyUUfI.js.map → Permissions-jbFH-toa.js.map} +1 -1
  23. package/dist/web/ui/assets/{PersonDetail-iZgApJog.js → PersonDetail-Ca8B9io8.js} +2 -2
  24. package/dist/web/ui/assets/{PersonDetail-iZgApJog.js.map → PersonDetail-Ca8B9io8.js.map} +1 -1
  25. package/dist/web/ui/assets/{Persons-Bs_HhYjC.js → Persons-epdmUeBM.js} +2 -2
  26. package/dist/web/ui/assets/{Persons-Bs_HhYjC.js.map → Persons-epdmUeBM.js.map} +1 -1
  27. package/dist/web/ui/assets/{Providers-CL6wMWni.js → Providers-Bm8sZNZo.js} +2 -2
  28. package/dist/web/ui/assets/{Providers-CL6wMWni.js.map → Providers-Bm8sZNZo.js.map} +1 -1
  29. package/dist/web/ui/assets/{Schedules-BQwE1hP5.js → Schedules-BZKhm9R7.js} +2 -2
  30. package/dist/web/ui/assets/{Schedules-BQwE1hP5.js.map → Schedules-BZKhm9R7.js.map} +1 -1
  31. package/dist/web/ui/assets/{Settings-26SF-okR.js → Settings-Hii-5oku.js} +2 -2
  32. package/dist/web/ui/assets/{Settings-26SF-okR.js.map → Settings-Hii-5oku.js.map} +1 -1
  33. package/dist/web/ui/assets/Skills-BHJp2CgD.js +17 -0
  34. package/dist/web/ui/assets/Skills-BHJp2CgD.js.map +1 -0
  35. package/dist/web/ui/assets/{Tasks-DbwRozzx.js → Tasks-D36pqkro.js} +2 -2
  36. package/dist/web/ui/assets/{Tasks-DbwRozzx.js.map → Tasks-D36pqkro.js.map} +1 -1
  37. package/dist/web/ui/assets/{Usage-i_q6Ri4s.js → Usage-CmjaYrsT.js} +2 -2
  38. package/dist/web/ui/assets/{Usage-i_q6Ri4s.js.map → Usage-CmjaYrsT.js.map} +1 -1
  39. package/dist/web/ui/assets/{Workspace-ZR5syf-9.js → Workspace-BYLf-wTJ.js} +2 -2
  40. package/dist/web/ui/assets/{Workspace-ZR5syf-9.js.map → Workspace-BYLf-wTJ.js.map} +1 -1
  41. package/dist/web/ui/assets/{activity-CIP1IzSg.js → activity-MOTqH8zM.js} +2 -2
  42. package/dist/web/ui/assets/{activity-CIP1IzSg.js.map → activity-MOTqH8zM.js.map} +1 -1
  43. package/dist/web/ui/assets/{alert-dialog-CW-j2nG4.js → alert-dialog-MbYSbZx5.js} +2 -2
  44. package/dist/web/ui/assets/{alert-dialog-CW-j2nG4.js.map → alert-dialog-MbYSbZx5.js.map} +1 -1
  45. package/dist/web/ui/assets/{arrow-left-D2YO-iMS.js → arrow-left-CtqQsBC6.js} +2 -2
  46. package/dist/web/ui/assets/{arrow-left-D2YO-iMS.js.map → arrow-left-CtqQsBC6.js.map} +1 -1
  47. package/dist/web/ui/assets/{avatar-BLsf3GhK.js → avatar-BIYaY7pR.js} +2 -2
  48. package/dist/web/ui/assets/{avatar-BLsf3GhK.js.map → avatar-BIYaY7pR.js.map} +1 -1
  49. package/dist/web/ui/assets/{badge-DfDJNUtd.js → badge-CUJiWF1y.js} +2 -2
  50. package/dist/web/ui/assets/{badge-DfDJNUtd.js.map → badge-CUJiWF1y.js.map} +1 -1
  51. package/dist/web/ui/assets/{button-TaFPR-zy.js → button-CNasMlFE.js} +2 -2
  52. package/dist/web/ui/assets/{button-TaFPR-zy.js.map → button-CNasMlFE.js.map} +1 -1
  53. package/dist/web/ui/assets/{card-DAYo4Zl5.js → card-BdsEOP7t.js} +2 -2
  54. package/dist/web/ui/assets/{card-DAYo4Zl5.js.map → card-BdsEOP7t.js.map} +1 -1
  55. package/dist/web/ui/assets/{chevron-down-CQi0yuay.js → chevron-down-CB9J_vvZ.js} +2 -2
  56. package/dist/web/ui/assets/{chevron-down-CQi0yuay.js.map → chevron-down-CB9J_vvZ.js.map} +1 -1
  57. package/dist/web/ui/assets/{circle-check-DweDcOkA.js → circle-check-DvGSe1uZ.js} +2 -2
  58. package/dist/web/ui/assets/{circle-check-DweDcOkA.js.map → circle-check-DvGSe1uZ.js.map} +1 -1
  59. package/dist/web/ui/assets/{circle-x-BmL20etA.js → circle-x-CyaGJ_BM.js} +2 -2
  60. package/dist/web/ui/assets/{circle-x-BmL20etA.js.map → circle-x-CyaGJ_BM.js.map} +1 -1
  61. package/dist/web/ui/assets/{dialog-DovgkMhT.js → dialog-Bd1rELXb.js} +2 -2
  62. package/dist/web/ui/assets/{dialog-DovgkMhT.js.map → dialog-Bd1rELXb.js.map} +1 -1
  63. package/dist/web/ui/assets/{download-_QBatDio.js → download-C8RvlFqO.js} +2 -2
  64. package/dist/web/ui/assets/{download-_QBatDio.js.map → download-C8RvlFqO.js.map} +1 -1
  65. package/dist/web/ui/assets/{eye-Wpgtfmgw.js → eye-BJ0NucMz.js} +2 -2
  66. package/dist/web/ui/assets/{eye-Wpgtfmgw.js.map → eye-BJ0NucMz.js.map} +1 -1
  67. package/dist/web/ui/assets/{file-text-2EGFNyc1.js → file-text-BWWBuD_N.js} +2 -2
  68. package/dist/web/ui/assets/{file-text-2EGFNyc1.js.map → file-text-BWWBuD_N.js.map} +1 -1
  69. package/dist/web/ui/assets/{folder-open-C-OiZn9P.js → folder-open-BwjemFy7.js} +2 -2
  70. package/dist/web/ui/assets/{folder-open-C-OiZn9P.js.map → folder-open-BwjemFy7.js.map} +1 -1
  71. package/dist/web/ui/assets/{git-branch-BT9gCKgG.js → git-branch-D9JVASpC.js} +2 -2
  72. package/dist/web/ui/assets/{git-branch-BT9gCKgG.js.map → git-branch-D9JVASpC.js.map} +1 -1
  73. package/dist/web/ui/assets/{index-BhxU0YlT.js → index-C3YiF4qv.js} +6 -6
  74. package/dist/web/ui/assets/index-C3YiF4qv.js.map +1 -0
  75. package/dist/web/ui/assets/{index-CUT6Fr2C.js → index-CaqLZNof.js} +2 -2
  76. package/dist/web/ui/assets/{index-CUT6Fr2C.js.map → index-CaqLZNof.js.map} +1 -1
  77. package/dist/web/ui/assets/index-CuhiuVab.css +1 -0
  78. package/dist/web/ui/assets/{input-L1uz5xAQ.js → input-CH3dmo9r.js} +2 -2
  79. package/dist/web/ui/assets/{input-L1uz5xAQ.js.map → input-CH3dmo9r.js.map} +1 -1
  80. package/dist/web/ui/assets/{loader-circle-BTFgt3hG.js → loader-circle-DbYKk0_Q.js} +2 -2
  81. package/dist/web/ui/assets/{loader-circle-BTFgt3hG.js.map → loader-circle-DbYKk0_Q.js.map} +1 -1
  82. package/dist/web/ui/assets/{pencil-uxK07iYy.js → pencil-gNDEMhav.js} +2 -2
  83. package/dist/web/ui/assets/{pencil-uxK07iYy.js.map → pencil-gNDEMhav.js.map} +1 -1
  84. package/dist/web/ui/assets/{plus-DcWFYr4m.js → plus-7rbHkByr.js} +2 -2
  85. package/dist/web/ui/assets/{plus-DcWFYr4m.js.map → plus-7rbHkByr.js.map} +1 -1
  86. package/dist/web/ui/assets/{power-DVIqVIMj.js → power-BS7gCDWs.js} +2 -2
  87. package/dist/web/ui/assets/{power-DVIqVIMj.js.map → power-BS7gCDWs.js.map} +1 -1
  88. package/dist/web/ui/assets/{progress-DMwOdxli.js → progress-ZzhsBV2v.js} +2 -2
  89. package/dist/web/ui/assets/{progress-DMwOdxli.js.map → progress-ZzhsBV2v.js.map} +1 -1
  90. package/dist/web/ui/assets/{search-D1OOxb1X.js → search-BZsbhO0B.js} +2 -2
  91. package/dist/web/ui/assets/{search-D1OOxb1X.js.map → search-BZsbhO0B.js.map} +1 -1
  92. package/dist/web/ui/assets/{select-Dnx_bUgy.js → select-vRSgBrHz.js} +2 -2
  93. package/dist/web/ui/assets/{select-Dnx_bUgy.js.map → select-vRSgBrHz.js.map} +1 -1
  94. package/dist/web/ui/assets/{send-D4uxqmyH.js → send-BkyTIUtJ.js} +2 -2
  95. package/dist/web/ui/assets/{send-D4uxqmyH.js.map → send-BkyTIUtJ.js.map} +1 -1
  96. package/dist/web/ui/assets/{sparkles-DLSJA4xU.js → sparkles-DcP24GEL.js} +2 -2
  97. package/dist/web/ui/assets/{sparkles-DLSJA4xU.js.map → sparkles-DcP24GEL.js.map} +1 -1
  98. package/dist/web/ui/assets/{switch-CvDDbCUA.js → switch-LRN9wWy2.js} +2 -2
  99. package/dist/web/ui/assets/{switch-CvDDbCUA.js.map → switch-LRN9wWy2.js.map} +1 -1
  100. package/dist/web/ui/assets/{terminal-DI3J3W_z.js → terminal-CWG62zdD.js} +2 -2
  101. package/dist/web/ui/assets/{terminal-DI3J3W_z.js.map → terminal-CWG62zdD.js.map} +1 -1
  102. package/dist/web/ui/assets/{textarea-CXLsr8tf.js → textarea-CXh3tmJ1.js} +2 -2
  103. package/dist/web/ui/assets/{textarea-CXLsr8tf.js.map → textarea-CXh3tmJ1.js.map} +1 -1
  104. package/dist/web/ui/assets/{zap-C-0oH5gt.js → zap-BEfqVtvZ.js} +2 -2
  105. package/dist/web/ui/assets/{zap-C-0oH5gt.js.map → zap-BEfqVtvZ.js.map} +1 -1
  106. package/dist/web/ui/index.html +2 -2
  107. package/package.json +9 -4
  108. package/dist/web/ui/assets/Skills-DANyYK_d.js +0 -7
  109. package/dist/web/ui/assets/Skills-DANyYK_d.js.map +0 -1
  110. package/dist/web/ui/assets/index-BhxU0YlT.js.map +0 -1
  111. package/dist/web/ui/assets/index-DOw1nKre.css +0 -1
  112. package/dist/web/ui/sw.js.map +0 -1
  113. package/dist/web/ui/workbox-0bb07689.js +0 -3
  114. package/dist/web/ui/workbox-0bb07689.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{j as e,A as te,m as se}from"./vendor-motion-Dwx3-JO5.js";import{r as a}from"./vendor-react-C7pctHW3.js";import{e as P,a as f,c as N,S as le,X as Ne,g as re,M as ve}from"./index-BhxU0YlT.js";import{B as T}from"./button-TaFPR-zy.js";import{B as Q}from"./badge-DfDJNUtd.js";import{o as we,A as ke,b as Ce,a as Se,u as $,M as ue,F as Me}from"./MarkdownRenderer-Dvh1jwyj.js";import{L as K}from"./loader-circle-BTFgt3hG.js";import{a as ne,C as ze}from"./chevron-down-CQi0yuay.js";import{h as De}from"./vendor-syntax-xZUI6Op9.js";import{G as oe}from"./git-branch-BT9gCKgG.js";import{D as Te}from"./download-_QBatDio.js";import{S as Ee}from"./sparkles-DLSJA4xU.js";import{P as pe}from"./plus-DcWFYr4m.js";import{Z as Fe}from"./zap-C-0oH5gt.js";import{T as Re}from"./terminal-DI3J3W_z.js";import{S as Le}from"./send-D4uxqmyH.js";import{F as He}from"./folder-open-C-OiZn9P.js";import{F as _e}from"./file-text-2EGFNyc1.js";import"./vendor-radix-3UdfCgs_.js";import"./index-CUT6Fr2C.js";import"./vendor-markdown-DwTbvico.js";/**
1
+ import{j as e,A as te,m as se}from"./vendor-motion-Dwx3-JO5.js";import{r as a}from"./vendor-react-C7pctHW3.js";import{e as P,a as f,c as N,S as le,X as Ne,g as re,M as ve}from"./index-C3YiF4qv.js";import{B as T}from"./button-CNasMlFE.js";import{B as Q}from"./badge-CUJiWF1y.js";import{o as we,A as ke,b as Ce,a as Se,u as $,M as ue,F as Me}from"./MarkdownRenderer-B9KGVD0X.js";import{L as K}from"./loader-circle-DbYKk0_Q.js";import{a as ne,C as ze}from"./chevron-down-CB9J_vvZ.js";import{h as De}from"./vendor-syntax-xZUI6Op9.js";import{G as oe}from"./git-branch-D9JVASpC.js";import{D as Te}from"./download-C8RvlFqO.js";import{S as Ee}from"./sparkles-DcP24GEL.js";import{P as pe}from"./plus-7rbHkByr.js";import{Z as Fe}from"./zap-BEfqVtvZ.js";import{T as Re}from"./terminal-CWG62zdD.js";import{S as Le}from"./send-BkyTIUtJ.js";import{F as He}from"./folder-open-BwjemFy7.js";import{F as _e}from"./file-text-BWWBuD_N.js";import"./vendor-radix-3UdfCgs_.js";import"./index-CaqLZNof.js";import"./vendor-markdown-DwTbvico.js";/**
2
2
  * @license lucide-react v0.511.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -49,4 +49,4 @@ import{j as e,A as te,m as se}from"./vendor-motion-Dwx3-JO5.js";import{r as a}fr
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
51
  */const Je=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Qe=P("upload",Je);function et(r){return{".ts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"jsx",".py":"python",".rs":"rust",".go":"go",".java":"java",".json":"json",".yaml":"yaml",".yml":"yaml",".toml":"toml",".md":"markdown",".txt":"text",".css":"css",".html":"html",".sh":"bash",".bash":"bash",".zsh":"bash",".sql":"sql",".xml":"xml",".svg":"xml",".dockerfile":"docker",".env":"text",".gitignore":"text",".c":"c",".cpp":"cpp",".h":"c",".hpp":"cpp",".rb":"ruby",".php":"php",".swift":"swift",".kt":"kotlin",".scala":"scala",".lua":"lua",".r":"r",".dart":"dart",".graphql":"graphql",".scss":"scss",".less":"less",".vue":"markup",".prisma":"text",".proto":"protobuf"}[r.toLowerCase()]||"text"}function ie(r,c,C){if(c)return C?e.jsx(He,{className:"h-4 w-4 text-mercury-400"}):e.jsx(Me,{className:"h-4 w-4 text-mercury-400/70"});const S=r.includes(".")?"."+r.split(".").pop():"";return[".ts",".tsx",".js",".jsx",".py",".rs",".go",".java",".sh"].includes(S)?e.jsx(ye,{className:"h-4 w-4 text-blue-400"}):e.jsx(_e,{className:"h-4 w-4 text-muted-foreground"})}function ge(r){switch(r){case"modified":return e.jsx("span",{className:"text-amber-400 text-xs font-bold",children:"M"});case"added":return e.jsx("span",{className:"text-emerald-400 text-xs font-bold",children:"A"});case"deleted":return e.jsx("span",{className:"text-red-400 text-xs font-bold",children:"D"});case"untracked":return e.jsx("span",{className:"text-gray-400 text-xs font-bold",children:"U"});case"renamed":return e.jsx("span",{className:"text-purple-400 text-xs font-bold",children:"R"});default:return e.jsx("span",{className:"text-muted-foreground text-xs",children:"?"})}}function tt({onOpenFile:r,openFiles:c}){const[C,S]=a.useState(null),[i,R]=a.useState(new Set(["."])),[y,M]=a.useState(new Map),[g,o]=a.useState(!0);a.useEffect(()=>{j()},[]);async function j(v){try{const d=await f.workspace.tree(v);!v||v==="."?(S(d),o(!1)):M(b=>new Map(b).set(v,d))}catch{o(!1)}}function W(v){const d=new Set(i);d.has(v)?d.delete(v):(d.add(v),y.has(v)||j(v)),R(d)}function F(v,d){return v.map(b=>{const l=d==="."?b.name:`${d}/${b.name}`,m=i.has(l),z=c.includes(l);if(b.isDirectory){const E=y.get(l);return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>W(l),className:N("flex w-full items-center gap-1.5 rounded-md px-2 py-1 text-left text-[13px] transition-colors","hover:bg-muted/60"),children:[m?e.jsx(ze,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):e.jsx(re,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),ie(b.name,!0,m),e.jsx("span",{className:"truncate",children:b.name})]}),m&&E&&e.jsx("div",{className:"ml-3 border-l border-border/30 pl-1",children:F(E.items,l)})]},l)}return e.jsxs("button",{onClick:()=>r(l),className:N("flex w-full items-center gap-1.5 rounded-md px-2 py-1 text-left text-[13px] transition-colors",z?"bg-primary/10 text-primary":"hover:bg-muted/60 text-foreground/80"),children:[e.jsx("span",{className:"w-3"}),ie(b.name,!1),e.jsx("span",{className:"truncate",children:b.name})]},l)})}return g?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(K,{className:"h-5 w-5 animate-spin text-primary"})}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(Ie,{className:"h-4 w-4 text-mercury-400"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Explorer"})]}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>j(),children:e.jsx(je,{className:"h-3 w-3"})})]}),e.jsx(le,{className:"flex-1 px-1 py-1",children:C&&F(C.items,".")})]})}function st({tabs:r,activeTab:c,onSelectTab:C,onCloseTab:S,onSave:i,onContentChange:R}){const y=a.useRef(null),M=a.useRef(null),g=r.find(o=>o.path===c);return a.useEffect(()=>{function o(j){(j.metaKey||j.ctrlKey)&&j.key==="s"&&(j.preventDefault(),c&&i(c))}return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[c,i]),r.length===0?e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 text-center",children:[e.jsx("div",{className:"rounded-2xl bg-primary/10 p-6",children:e.jsx(ye,{className:"h-12 w-12 text-primary/60"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-foreground",children:"No files open"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Select a file from the explorer to start editing"})]})]}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex items-center gap-0 overflow-x-auto border-b border-border bg-muted/20",children:r.map(o=>e.jsxs("button",{onClick:()=>C(o.path),className:N("group flex items-center gap-2 border-r border-border/30 px-3 py-1.5 text-[13px] transition-colors",o.path===c?"bg-background text-foreground border-b-2 border-b-primary":"text-muted-foreground hover:bg-muted/40 hover:text-foreground"),children:[ie(o.name,!1),e.jsx("span",{className:"max-w-[120px] truncate",children:o.name}),o.dirty&&e.jsx(Pe,{className:"h-2 w-2 fill-primary text-primary"}),e.jsx("button",{onClick:j=>{j.stopPropagation(),S(o.path)},className:"ml-1 rounded p-0.5 opacity-0 transition-opacity group-hover:opacity-100 hover:bg-muted",children:e.jsx(Ne,{className:"h-3 w-3"})})]},o.path))}),g&&e.jsxs("div",{className:"relative flex flex-col flex-1 min-h-0",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border/30 bg-muted/10 px-3 py-1",children:[e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:g.path}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:g.language}),g.dirty&&e.jsxs(T,{size:"sm",variant:"ghost",className:"h-5 gap-1 px-2 text-[10px]",onClick:()=>i(g.path),children:[e.jsx("span",{className:"text-primary",children:"Save"}),e.jsx("span",{className:"text-muted-foreground",children:"Cmd+S"})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto bg-[#282c34]",ref:M,onClick:()=>{var o;return(o=y.current)==null?void 0:o.focus()},children:e.jsxs("div",{className:"relative",style:{minWidth:"fit-content"},children:[e.jsx(De,{language:g.language,style:we,showLineNumbers:!0,lineNumberStyle:{minWidth:"3em",paddingRight:"1em",color:"rgba(255,255,255,0.25)",fontSize:"13px",lineHeight:"20px",userSelect:"none"},customStyle:{margin:0,padding:"0.5rem 0",background:"transparent",fontSize:"13px",lineHeight:"20px",fontFamily:"var(--font-mono, 'Geist Mono', ui-monospace, monospace)"},codeTagProps:{style:{fontSize:"13px",lineHeight:"20px",fontFamily:"var(--font-mono, 'Geist Mono', ui-monospace, monospace)"}},wrapLongLines:!1,children:g.content||" "}),e.jsx("textarea",{ref:y,value:g.content,onChange:o=>R(g.path,o.target.value),spellCheck:!1,className:N("absolute top-0 left-0 w-full h-full resize-none bg-transparent text-transparent caret-white","font-mono text-[13px] leading-[20px]","focus:outline-none","whitespace-pre","pointer-events-none focus:pointer-events-auto"),style:{tabSize:2,padding:"0.5rem 0 0.5rem 4.5em",fontFamily:"var(--font-mono, 'Geist Mono', ui-monospace, monospace)",overflow:"hidden"},onFocus:()=>{y.current&&(y.current.style.pointerEvents="auto")},onBlur:()=>{y.current&&(y.current.style.pointerEvents="none")},onWheel:o=>{M.current&&(M.current.scrollTop+=o.deltaY,M.current.scrollLeft+=o.deltaX)}})]})})]})]})}function at(){const[r,c]=a.useState(null),[C,S]=a.useState([]),[i,R]=a.useState([]),[y,M]=a.useState(""),[g,o]=a.useState(!1),[j,W]=a.useState(!1),[F,v]=a.useState(!0),[d,b]=a.useState(!1),[l,m]=a.useState(null),[z,E]=a.useState(null),k=a.useCallback(async(t=!1)=>{b(!0);try{const[h,I,q]=await Promise.all([f.git.status(),f.git.branches(),f.git.log(15)]);c(h),S(I.branches),R(q.commits),t&&(E({type:"success",msg:"Refreshed"}),setTimeout(()=>E(null),1500))}catch(h){E({type:"error",msg:h.message})}finally{v(!1),b(!1)}},[]);a.useEffect(()=>{k()},[k]);function x(t,h){E({type:t,msg:h}),setTimeout(()=>E(null),3e3)}async function H(t){m("stage");try{await f.git.stage(t),await k()}catch(h){x("error",h.message)}finally{m(null)}}async function A(t){m("unstage");try{await f.git.unstage(t),await k()}catch(h){x("error",h.message)}finally{m(null)}}async function O(){if(y.trim()){m("commit");try{const t=await f.git.commit(y.trim());M(""),x("success","Committed successfully"),await k()}catch(t){x("error",t.message)}finally{m(null)}}}async function G(){m("push");try{const t=await f.git.push();x("success",t.message||"Pushed"),await k()}catch(t){x("error",t.message)}finally{m(null)}}async function U(){m("pull");try{const t=await f.git.pull();x("success",t.message||"Pulled"),await k()}catch(t){x("error",t.message)}finally{m(null)}}async function V(t){m("checkout");try{await f.git.checkout(t),x("success",`Switched to ${t}`),o(!1),await k()}catch(h){x("error",h.message)}finally{m(null)}}async function X(){m("generate");try{((r==null?void 0:r.files.filter(q=>!q.staged))||[]).length>0&&(await f.git.stage(["."]),await k());const h=await f.git.generateCommitMessage(),I=typeof h=="string"?h:(h==null?void 0:h.message)||"";I?(M(I),x("success","Message generated")):x("error","No message returned")}catch(t){x("error",t.message)}finally{m(null)}}if(F)return e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(K,{className:"h-5 w-5 animate-spin text-primary"})});const L=(r==null?void 0:r.files.filter(t=>t.staged))||[],_=(r==null?void 0:r.files.filter(t=>!t.staged))||[];return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(oe,{className:"h-4 w-4 text-mercury-400"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Source Control"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(T,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:U,disabled:!!l,children:e.jsx(Te,{className:"h-3 w-3"})}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:G,disabled:!!l,children:e.jsx(Qe,{className:"h-3 w-3"})}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>k(!0),disabled:!!l||d,title:"Refresh","aria-label":"Refresh",children:e.jsx(je,{className:N("h-3 w-3",d&&"animate-spin")})})]})]}),e.jsx(le,{className:"flex-1",children:e.jsxs("div",{className:"p-2 space-y-3",children:[e.jsx(te,{children:z&&e.jsx(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:N("rounded-md px-3 py-1.5 text-xs",z.type==="success"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"),children:z.msg})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("button",{onClick:()=>o(!g),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-muted/60",children:[e.jsx(oe,{className:"h-3.5 w-3.5 text-primary"}),e.jsx("span",{className:"font-medium",children:(r==null?void 0:r.branch)||"—"}),r&&r.ahead>0&&e.jsxs(Q,{variant:"outline",className:"text-[10px] px-1 py-0",children:[e.jsx(ke,{className:"h-2.5 w-2.5 mr-0.5"}),r.ahead]}),r&&r.behind>0&&e.jsxs(Q,{variant:"outline",className:"text-[10px] px-1 py-0",children:[e.jsx(Ce,{className:"h-2.5 w-2.5 mr-0.5"}),r.behind]}),e.jsx(re,{className:N("ml-auto h-3 w-3 transition-transform",g&&"rotate-90")})]}),e.jsx(te,{children:g&&e.jsx(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:e.jsx("div",{className:"ml-2 space-y-0.5 border-l border-border/30 pl-2 py-1",children:C.filter(t=>!t.name.startsWith("remotes/")).map(t=>e.jsxs("button",{onClick:()=>!t.isCurrent&&V(t.name),className:N("flex w-full items-center gap-2 rounded-md px-2 py-1 text-xs transition-colors",t.isCurrent?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),disabled:t.isCurrent||!!l,children:[t.isCurrent&&e.jsx(ne,{className:"h-3 w-3"}),e.jsx("span",{className:"truncate",children:t.name})]},t.name))})})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{value:y,onChange:t=>M(t.target.value),placeholder:"Commit message...",rows:2,className:N("w-full resize-none rounded-lg border border-border bg-muted/30 px-3 py-2 pr-9 text-sm text-foreground","placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-primary/40")}),e.jsx("button",{onClick:X,disabled:!!l,title:"AI generate commit message",className:N("absolute right-2 top-2 rounded-md p-1.5 transition-colors border border-border/50","text-primary/70 hover:text-primary hover:bg-primary/10 bg-background/80",l==="generate"&&"animate-pulse"),children:l==="generate"?e.jsx(K,{className:"h-4 w-4 animate-spin text-primary"}):e.jsx(Ee,{className:"h-4 w-4"})})]}),e.jsxs(T,{size:"sm",className:"w-full h-7 gap-1.5 text-xs",disabled:!y.trim()||L.length===0||!!l,onClick:O,children:[l==="commit"?e.jsx(K,{className:"h-3 w-3 animate-spin"}):e.jsx(ne,{className:"h-3 w-3"}),"Commit (",L.length," staged)"]})]}),L.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-1 mb-1",children:[e.jsxs("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:["Staged (",L.length,")"]}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>A(L.map(t=>t.path)),children:e.jsx(fe,{className:"h-3 w-3"})})]}),e.jsx("div",{className:"space-y-0.5",children:L.map(t=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1 text-xs hover:bg-muted/40 group",children:[ge(t.status),e.jsx("span",{className:"flex-1 truncate font-mono",children:t.path}),e.jsx("button",{onClick:()=>A([t.path]),className:"opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(fe,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},`staged-${t.path}`))})]}),_.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-1 mb-1",children:[e.jsxs("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:["Changes (",_.length,")"]}),e.jsx(T,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>H(_.map(t=>t.path)),children:e.jsx(pe,{className:"h-3 w-3"})})]}),e.jsx("div",{className:"space-y-0.5",children:_.map(t=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-2 py-1 text-xs hover:bg-muted/40 group",children:[ge(t.status),e.jsx("span",{className:"flex-1 truncate font-mono",children:t.path}),e.jsx("button",{onClick:()=>H([t.path]),className:"opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(pe,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},`unstaged-${t.path}`))})]}),L.length===0&&_.length===0&&e.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:"No changes detected"}),e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>W(!j),className:"flex w-full items-center gap-1.5 px-1 mb-1",children:[e.jsx(re,{className:N("h-3 w-3 text-muted-foreground transition-transform",j&&"rotate-90")}),e.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Recent Commits"})]}),e.jsx(te,{children:j&&e.jsx(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:e.jsx("div",{className:"space-y-0.5",children:i.map(t=>e.jsx("div",{className:"rounded-md px-2 py-1.5 hover:bg-muted/40 transition-colors",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ke,{className:"h-3 w-3 mt-0.5 shrink-0 text-muted-foreground"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs text-foreground line-clamp-2 leading-snug",children:t.message}),e.jsxs("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:t.short}),e.jsx("span",{className:"mx-1",children:"·"}),t.date]})]})]})},t.hash))})})})]})]})})]})}function rt({projectInfo:r,codeMode:c,isMaximized:C,onToggleMaximize:S}){const[i,R]=a.useState("terminal"),[y,M]=a.useState([]),[g,o]=a.useState(""),[j,W]=a.useState(!1),[F,v]=a.useState([]),[d,b]=a.useState(-1),l=a.useRef(null),m=a.useRef(null),[z,E]=a.useState(""),{connected:k}=Se(),x=$(s=>s.streamingText),H=$(s=>s.isStreaming),A=$(s=>s.waiting),O=$(s=>s.messages),G=$(s=>s.addMessage),U=$(s=>s.setWaiting),V=$(s=>s.clearStreaming),X=$(s=>s.activeThreadId),L=$(s=>s.setActiveThread),_=$(s=>s.bumpThreadVersion),t=H||A;a.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[y]);async function h(){var w;const s=g.trim();if(!(!s||j)){o(""),v(B=>[...B,s]),b(-1),W(!0);try{const B=await f.terminal.exec(s);M(n=>[...n,{id:`${Date.now()}`,command:s,output:B.output||B.error||"",exitCode:B.exitCode,timestamp:Date.now()}])}catch(B){M(n=>[...n,{id:`${Date.now()}`,command:s,output:B.message,exitCode:1,timestamp:Date.now()}])}finally{W(!1),(w=m.current)==null||w.focus()}}}function I(s){if(s.key==="Enter")s.preventDefault(),h();else if(s.key==="ArrowUp"){if(s.preventDefault(),F.length>0){const w=d<0?F.length-1:Math.max(0,d-1);b(w),o(F[w])}}else if(s.key==="ArrowDown"&&(s.preventDefault(),d>=0)){const w=d+1;w>=F.length?(b(-1),o("")):(b(w),o(F[w]))}}async function q(){const s=z.trim();if(!s||t)return;E("");let w=X;w||(w=`web:${Date.now()}_${Math.random().toString(36).slice(2,8)}`,L(w)),G({id:crypto.randomUUID(),role:"user",content:s,timestamp:new Date().toISOString()}),U(!0),f.chat.threads.addMessage(w,"user",s).then(()=>_()).catch(()=>{});try{await f.chat.send(s,w)}catch{U(!1),V()}}const Z=O.slice(-6);return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-border bg-muted/20 px-3 py-1 text-[11px]",children:[e.jsx("div",{className:"flex items-center gap-1.5",children:c!=null&&c.active?e.jsxs(Q,{variant:"outline",className:N("text-[10px] px-1.5 py-0 gap-1",c.state==="execute"?"border-emerald-500/40 text-emerald-400":"border-amber-500/40 text-amber-400"),children:[e.jsx(Fe,{className:"h-2.5 w-2.5"}),c.state==="execute"?"Execute":"Plan"]}):e.jsx(Q,{variant:"outline",className:"text-[10px] px-1.5 py-0 text-muted-foreground",children:"Chat"})}),e.jsx("span",{className:"h-3 w-px bg-border"}),r&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground font-mono truncate max-w-[200px]",children:r.projectName}),e.jsx("span",{className:"h-3 w-px bg-border"}),e.jsx("span",{className:"text-muted-foreground font-mono truncate max-w-[300px]",title:r.cwd,children:r.cwd}),r.isGit&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-3 w-px bg-border"}),e.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(oe,{className:"h-3 w-3"}),e.jsx("span",{className:"font-mono",children:r.branch})]})]})]}),e.jsx("span",{className:"flex-1"}),e.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx("div",{className:N("h-1.5 w-1.5 rounded-full",k?"bg-emerald-500":"bg-red-500")}),e.jsx("span",{children:k?"Connected":"Disconnected"})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-muted/10",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsxs("button",{onClick:()=>R("terminal"),className:N("flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium transition-colors border-b-2",i==="terminal"?"border-b-primary text-foreground":"border-b-transparent text-muted-foreground hover:text-foreground"),children:[e.jsx(Re,{className:"h-3.5 w-3.5"}),"Terminal"]}),e.jsxs("button",{onClick:()=>R("chat"),className:N("flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium transition-colors border-b-2",i==="chat"?"border-b-primary text-foreground":"border-b-transparent text-muted-foreground hover:text-foreground"),children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),"Chat",t&&e.jsx(K,{className:"h-3 w-3 animate-spin text-primary"})]})]}),e.jsx("button",{onClick:S,className:"mr-2 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",title:C?"Restore panel":"Maximize panel","aria-label":C?"Restore panel":"Maximize panel",children:C?e.jsx(Xe,{className:"h-3.5 w-3.5"}):e.jsx(Oe,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:i==="terminal"?e.jsxs("div",{className:"flex h-full flex-col bg-[#0d1117]",children:[e.jsxs("div",{ref:l,className:"flex-1 overflow-auto p-2 font-mono text-[13px]",children:[y.map(s=>e.jsxs("div",{className:"mb-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-emerald-400",children:"$"}),e.jsx("span",{className:"text-gray-200",children:s.command})]}),s.output&&e.jsx("pre",{className:N("whitespace-pre-wrap text-[12px] leading-relaxed mt-0.5 pl-4",s.exitCode===0?"text-gray-400":"text-red-400"),children:s.output})]},s.id)),j&&e.jsxs("div",{className:"flex items-center gap-2 text-gray-500",children:[e.jsx(K,{className:"h-3 w-3 animate-spin"}),e.jsx("span",{className:"text-xs",children:"Running..."})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-gray-800 bg-[#0d1117] px-3 py-2",children:[e.jsx("span",{className:"text-emerald-400 font-mono text-sm",children:"$"}),e.jsx("input",{ref:m,value:g,onChange:s=>o(s.target.value),onKeyDown:I,placeholder:"Type a command...",className:"flex-1 bg-transparent font-mono text-[13px] text-gray-200 placeholder:text-gray-600 focus:outline-none",autoFocus:!0})]})]}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx(le,{className:"flex-1 px-3 py-2",children:e.jsxs("div",{className:"space-y-2",children:[Z.map(s=>e.jsx("div",{className:N("rounded-lg px-3 py-2 text-sm",s.role==="user"?"bg-primary/10 text-foreground ml-8":s.role==="system"?"bg-red-500/10 text-red-400":"bg-muted text-foreground mr-8"),children:s.role==="assistant"?e.jsx(ue,{content:s.content}):e.jsx("p",{className:"whitespace-pre-wrap text-[13px]",children:s.content})},s.id)),H&&x&&e.jsxs("div",{className:"rounded-lg bg-muted px-3 py-2 mr-8",children:[e.jsx(ue,{content:x}),e.jsx("span",{className:"inline-block h-3.5 w-[2px] animate-pulse bg-primary ml-0.5"})]}),A&&!H&&e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-muted px-3 py-2 text-sm text-muted-foreground mr-8",children:[e.jsx(K,{className:"h-3.5 w-3.5 animate-spin text-primary"}),"Thinking..."]})]})}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-3 py-2",children:[e.jsx("input",{value:z,onChange:s=>E(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),q())},placeholder:"Ask Mercury...",disabled:t,className:N("flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/60 focus:outline-none",t&&"opacity-50")}),e.jsx(T,{size:"icon",className:"h-7 w-7 shrink-0",disabled:t||!z.trim(),onClick:q,children:e.jsx(Le,{className:"h-3.5 w-3.5"})})]})]})})]})}function Mt(){const[r,c]=a.useState([]),[C,S]=a.useState(null),[i,R]=a.useState(null),[y,M]=a.useState(null),[g,o]=a.useState(240),[j,W]=a.useState(280),[F,v]=a.useState(260),[d,b]=a.useState(!1),[l,m]=a.useState(!0),[z,E]=a.useState(!0),[k,x]=a.useState(!1),[H,A]=a.useState(""),[O,G]=a.useState(""),[U,V]=a.useState(!1),[X,L]=a.useState(0);a.useEffect(()=>{f.workspace.info().then(R).catch(()=>{}),f.code.status().then(n=>M({state:n.state,active:n.active})).catch(()=>{})},[]);async function _(){const n=H.trim();if(n){V(!0),G("");try{await f.workspace.setRoot(n);const u=await f.workspace.info();R(u),x(!1),A(""),c([]),S(null),L(p=>p+1)}catch(u){G(u.message||"Invalid path")}finally{V(!1)}}}async function t(n){if(r.find(p=>p.path===n)){S(n);return}try{const p=await f.workspace.file(n),D=p.ext||(n.includes(".")?"."+n.split(".").pop():""),ee={path:n,name:p.name,content:p.content,language:et(D),dirty:!1,originalContent:p.content};c(Y=>[...Y,ee]),S(n)}catch{}}function h(n){if(c(u=>u.filter(p=>p.path!==n)),C===n){const u=r.filter(p=>p.path!==n);S(u.length>0?u[u.length-1].path:null)}}async function I(n){const u=r.find(p=>p.path===n);if(!(!u||!u.dirty))try{await f.workspace.saveFile(n,u.content),c(p=>p.map(D=>D.path===n?{...D,dirty:!1,originalContent:D.content}:D))}catch{}}function q(n,u){c(p=>p.map(D=>D.path===n?{...D,content:u,dirty:u!==D.originalContent}:D))}function Z(n,u,p,D,ee=!1){const Y=a.useRef(!1);return{onMouseDown:a.useCallback(ae=>{ae.preventDefault(),Y.current=!0;const ce=n==="horizontal"?ae.clientX:ae.clientY;let de;u(J=>(de=J,J));function me(J){if(!Y.current)return;const he=n==="horizontal"?J.clientX-ce:ce-J.clientY,be=ee?-he:he;u(Math.min(D,Math.max(p,de+be)))}function xe(){Y.current=!1,document.removeEventListener("mousemove",me),document.removeEventListener("mouseup",xe)}document.addEventListener("mousemove",me),document.addEventListener("mouseup",xe)},[n,u,p,D,ee])}}const s=Z("horizontal",o,160,400),w=Z("horizontal",W,200,450,!0),B=Z("vertical",v,120,500);return e.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-border bg-muted/20 px-4 py-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(We,{className:"h-4 w-4 text-mercury-400"}),e.jsx("span",{className:"font-medium text-foreground",children:(i==null?void 0:i.projectName)||"Workspace"}),e.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate max-w-[300px]",title:i==null?void 0:i.cwd,children:(i==null?void 0:i.cwd)||"—"})]}),e.jsx(T,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{x(!k),A((i==null?void 0:i.cwd)||""),G("")},children:"Change Folder"}),e.jsx("span",{className:"flex-1"}),e.jsx(T,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>m(!l),children:l?"Hide Explorer":"Show Explorer"}),e.jsx(T,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>E(!z),children:z?"Hide Git":"Show Git"})]}),e.jsx(te,{children:k&&e.jsxs(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-muted/10 px-4 py-2",children:[e.jsx("input",{value:H,onChange:n=>{A(n.target.value),G("")},onKeyDown:n=>{n.key==="Enter"&&_(),n.key==="Escape"&&x(!1)},placeholder:"/path/to/project",className:"flex-1 rounded-md border border-border bg-background px-3 py-1.5 text-sm font-mono text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary/40",autoFocus:!0}),e.jsxs(T,{size:"sm",className:"h-7 gap-1 text-xs",onClick:_,disabled:U||!H.trim(),children:[U?e.jsx(K,{className:"h-3 w-3 animate-spin"}):e.jsx(ne,{className:"h-3 w-3"}),"Open"]}),e.jsx(T,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>x(!1),children:"Cancel"})]}),O&&e.jsx("p",{className:"px-4 pb-2 text-xs text-red-400",children:O})]})}),!d&&e.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:g},className:"shrink-0 overflow-hidden border-r border-border",children:e.jsx(tt,{onOpenFile:t,openFiles:r.map(n=>n.path)},X)}),e.jsx("div",{...s,className:"w-1 shrink-0 cursor-col-resize hover:bg-primary/30 active:bg-primary/50 transition-colors"})]}),e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:e.jsx(st,{tabs:r,activeTab:C,onSelectTab:S,onCloseTab:h,onSave:I,onContentChange:q})}),z&&e.jsx("div",{...w,className:"w-1 shrink-0 cursor-col-resize hover:bg-primary/30 active:bg-primary/50 transition-colors"}),z&&e.jsx("div",{style:{width:j},className:"shrink-0 overflow-hidden border-l border-border",children:e.jsx(at,{},X)})]}),!d&&e.jsx("div",{...B,className:"h-1 shrink-0 cursor-row-resize hover:bg-primary/30 active:bg-primary/50 transition-colors border-t border-border"}),e.jsx("div",{style:d?void 0:{height:F},className:N("overflow-hidden",d?"flex-1 min-h-0":"shrink-0"),children:e.jsx(rt,{projectInfo:i,codeMode:y,isMaximized:d,onToggleMaximize:()=>b(n=>!n)})})]})}export{Mt as WorkspacePage};
52
- //# sourceMappingURL=Workspace-ZR5syf-9.js.map
52
+ //# sourceMappingURL=Workspace-BYLf-wTJ.js.map