neural-loom 0.2.44 → 0.2.46

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 (98) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/diagnostics/route-bundle-stats.json +2 -2
  7. package/.next/fallback-build-manifest.json +3 -3
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  24. package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
  25. package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
  26. package/.next/server/app/api/context/route.js +1 -1
  27. package/.next/server/app/api/context/route.js.nft.json +1 -1
  28. package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
  29. package/.next/server/app/api/recents/route.js.nft.json +1 -1
  30. package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
  31. package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
  32. package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
  33. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  34. package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
  35. package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
  36. package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
  37. package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
  38. package/.next/server/app/index.html +1 -1
  39. package/.next/server/app/index.rsc +2 -2
  40. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  41. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  42. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  43. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  44. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/.next/server/app/page/react-loadable-manifest.json +2 -2
  46. package/.next/server/app/page_client-reference-manifest.js +1 -1
  47. package/.next/server/chunks/[root-of-the-server]__0--ansu._.js +15 -0
  48. package/.next/server/chunks/[root-of-the-server]__0--ansu._.js.map +1 -0
  49. package/.next/server/chunks/[root-of-the-server]__01.zh3b._.js +7 -7
  50. package/.next/server/chunks/[root-of-the-server]__01.zh3b._.js.map +1 -1
  51. package/.next/server/chunks/[root-of-the-server]__07zx04e._.js +6 -6
  52. package/.next/server/chunks/[root-of-the-server]__07zx04e._.js.map +1 -1
  53. package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js +7 -7
  54. package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js.map +1 -1
  55. package/.next/server/chunks/[root-of-the-server]__0em6a~~._.js +7 -7
  56. package/.next/server/chunks/[root-of-the-server]__0em6a~~._.js.map +1 -1
  57. package/.next/server/chunks/[root-of-the-server]__0gchnwb._.js +1 -1
  58. package/.next/server/chunks/[root-of-the-server]__0gchnwb._.js.map +1 -1
  59. package/.next/server/chunks/[root-of-the-server]__0i~01cv._.js +5 -5
  60. package/.next/server/chunks/[root-of-the-server]__0i~01cv._.js.map +1 -1
  61. package/.next/server/chunks/[root-of-the-server]__0s0is_9._.js +6 -6
  62. package/.next/server/chunks/[root-of-the-server]__0s0is_9._.js.map +1 -1
  63. package/.next/server/chunks/[root-of-the-server]__0t713sv._.js +1 -1
  64. package/.next/server/chunks/[root-of-the-server]__0t713sv._.js.map +1 -1
  65. package/.next/server/chunks/[root-of-the-server]__0thsozo._.js +6 -6
  66. package/.next/server/chunks/[root-of-the-server]__0thsozo._.js.map +1 -1
  67. package/.next/server/chunks/[root-of-the-server]__10wwca8._.js +6 -6
  68. package/.next/server/chunks/[root-of-the-server]__10wwca8._.js.map +1 -1
  69. package/.next/server/chunks/[root-of-the-server]__11h_nxt._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__11h_nxt._.js.map +1 -1
  71. package/.next/server/chunks/[root-of-the-server]__11z12oe._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__11z12oe._.js.map +1 -1
  73. package/.next/server/chunks/ssr/_0t7oqy6._.js +1 -1
  74. package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -1
  75. package/.next/server/middleware-build-manifest.js +3 -3
  76. package/.next/server/pages/404.html +1 -1
  77. package/.next/server/pages/500.html +1 -1
  78. package/.next/server/server-reference-manifest.js +1 -1
  79. package/.next/server/server-reference-manifest.json +1 -1
  80. package/.next/static/chunks/{0b89ti7ob.09t.js → 076_b43_kienv.js} +1 -1
  81. package/.next/static/chunks/{0kkoif8x_kxrq.js → 0k2co3uj4w81_.js} +1 -1
  82. package/.next/static/chunks/15zf~gqr_i8s1.js +1 -0
  83. package/.next/trace +1 -1
  84. package/.next/trace-build +1 -1
  85. package/package.json +1 -1
  86. package/src/app/api/context/aider/route.ts +4 -1
  87. package/src/app/api/context/claude/route.ts +4 -1
  88. package/src/app/components/AiderWizard.tsx +1 -1
  89. package/src/app/components/ClaudeWizard.tsx +1 -1
  90. package/src/app/page.tsx +4 -12
  91. package/src/lib/agents/ContextManager.ts +30 -0
  92. package/src/lib/config.ts +68 -1
  93. package/.next/server/chunks/[root-of-the-server]__0656ruo._.js +0 -15
  94. package/.next/server/chunks/[root-of-the-server]__0656ruo._.js.map +0 -1
  95. package/.next/static/chunks/17jifiroq0_q..js +0 -1
  96. /package/.next/static/{fkguOvhqTzhrR0V_gCa1M → 37RhJSWegcb8uZa7ESDNm}/_buildManifest.js +0 -0
  97. /package/.next/static/{fkguOvhqTzhrR0V_gCa1M → 37RhJSWegcb8uZa7ESDNm}/_clientMiddlewareManifest.js +0 -0
  98. /package/.next/static/{fkguOvhqTzhrR0V_gCa1M → 37RhJSWegcb8uZa7ESDNm}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54370,e=>{"use strict";var r=e.i(43476),o=e.i(71645);let t={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.85)",backdropFilter:"blur(12px)",zIndex:1100,display:"flex",alignItems:"center",justifyContent:"center"},n={width:"90%",maxWidth:"550px",height:"480px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.7), 0 10px 10px -5px rgba(0,0,0,0.7)",display:"flex",flexDirection:"column",overflow:"hidden"},l={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},i={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},a={display:"flex",padding:"0.75rem 1.25rem",gap:"0.5rem",backgroundColor:"rgba(10, 15, 25, 0.5)",borderBottom:"1px solid var(--border)"},s={flex:1,padding:"0.45rem 0.75rem",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.8rem",outline:"none"},d={padding:"0.45rem 0.85rem",backgroundColor:"var(--border)",border:"1px solid var(--border-focus)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},c={padding:"0.15rem 0.45rem",backgroundColor:"rgba(255, 255, 255, 0.15)",border:"none",borderRadius:"4px",color:"var(--foreground)",fontSize:"0.7rem",cursor:"pointer",fontWeight:600},p={flex:1,padding:"0.5rem 1.25rem",overflowY:"auto",backgroundColor:"#070a0f"},u={display:"flex",flexDirection:"column",gap:"0.25rem"},m={display:"flex",alignItems:"center",gap:"0.6rem",padding:"0.45rem 0.65rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.825rem",border:"1px solid transparent",userSelect:"none",transition:"all 0.15s ease"},x={textAlign:"center",padding:"2rem",fontSize:"0.85rem",color:"var(--muted)"},g={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},f={fontSize:"0.75rem",color:"var(--muted)",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},b={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},h={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};e.s(["default",0,function({title:e,initialPath:y,onClose:v,onSelect:j}){let[k,C]=(0,o.useState)(y||""),[S,w]=(0,o.useState)(null),[D,R]=(0,o.useState)([]),[z,W]=(0,o.useState)(null),[F,I]=(0,o.useState)(""),[T,P]=(0,o.useState)(!1),[B,L]=(0,o.useState)(""),A=async e=>{P(!0),L("");try{let r=`/api/files?action=browse_dirs&path=${encodeURIComponent(e)}`,o=await fetch(r),t=await o.json();o.ok&&t.success?(C(t.currentPath),I(t.currentPath),w(t.parentPath),R(t.directories),W(null)):L(t.error||"Failed to load directory content.")}catch(e){console.error("Error browsing directories:",e),L("Failed to fetch directory contents.")}finally{P(!1)}};(0,o.useEffect)(()=>{A(y)},[y]);let O=e=>{A(e)},E=()=>{F.trim()&&A(F.trim())};return(0,r.jsx)("div",{style:t,children:(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("h3",{style:{fontSize:"1rem",fontWeight:700,margin:0,color:"var(--foreground)"},children:["📁 ",e]}),(0,r.jsx)("button",{onClick:v,style:i,"aria-label":"Close browser",children:"✖"})]}),(0,r.jsxs)("div",{style:a,children:[(0,r.jsx)("input",{type:"text",value:F,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()},style:s,placeholder:"Absolute folder path..."}),(0,r.jsx)("button",{onClick:E,style:d,disabled:T,children:"Go"})]}),(0,r.jsx)("div",{style:p,children:T?(0,r.jsx)("div",{style:x,children:"Loading directories..."}):B?(0,r.jsxs)("div",{style:{...x,color:"var(--danger)"},children:[B,(0,r.jsx)("button",{onClick:()=>A(k||"."),style:{...d,display:"block",margin:"0.75rem auto 0"},children:"Retry"})]}):(0,r.jsxs)("div",{style:u,children:[S&&(0,r.jsxs)("div",{onClick:()=>O(S),onDoubleClick:()=>O(S),style:m,title:"Go up to parent directory",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"⬆️"}),(0,r.jsx)("span",{style:{fontWeight:600},children:".. (Up)"})]}),0===D.length?(0,r.jsx)("div",{style:{...x,color:"var(--muted)"},children:"No subdirectories found"}):D.map(e=>{let o=z===e.path;return(0,r.jsxs)("div",{onClick:()=>W(e.path),onDoubleClick:()=>O(e.path),style:{...m,backgroundColor:o?"rgba(109, 40, 217, 0.25)":"transparent",borderColor:o?"var(--border-focus)":"transparent"},title:"Single click to highlight, double click to enter",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"📁"}),(0,r.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),o&&(0,r.jsx)("button",{type:"button",onClick:r=>{r.stopPropagation(),O(e.path)},style:c,children:"Enter ➜"})]},e.path)})]})}),(0,r.jsxs)("div",{style:g,children:[(0,r.jsxs)("span",{style:f,children:["Selection: ",(0,r.jsx)("span",{style:{color:"var(--foreground)",fontFamily:"var(--font-mono), monospace"},children:z||k||"(None)"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("button",{onClick:v,style:h,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{j(z||k),v()},style:b,disabled:T,children:"Select Folder"})]})]})]})})}])},44837,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(54370);let n={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.8)",backdropFilter:"blur(8px)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",animation:"fadeIn 0.2s ease-out"},l={width:"90%",maxWidth:"500px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5)",overflow:"hidden",display:"flex",flexDirection:"column"},i={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},a={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},s={padding:"1.25rem",display:"flex",flexDirection:"column"},d={display:"flex",flexDirection:"column",marginBottom:"1rem"},c={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)",marginBottom:"0.375rem",textTransform:"uppercase",letterSpacing:"0.05em"},p={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.825rem",outline:"none",transition:"border-color 0.15s ease"},u={marginTop:"0.75rem",padding:"0.75rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"rgba(239, 68, 68, 0.05)",color:"var(--danger)",fontSize:"0.8rem",lineHeight:1.4},m={display:"flex",justifyContent:"flex-end",gap:"0.75rem",padding:"1rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},x={padding:"0.5rem 1rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},g={padding:"0.5rem 1rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},f={padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.05)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"};e.s(["default",0,function({onClose:e,onConfirmLaunch:b,isDocker:h}){let[y,v]=(0,o.useState)({name:h?"Claude Docker":"Claude Local",workspaceRoot:"",scopedDirs:[],extraFlags:""}),[j,k]=(0,o.useState)(""),[C,S]=(0,o.useState)(!0),[w,D]=(0,o.useState)(!1),[R,z]=(0,o.useState)(""),[W,F]=(0,o.useState)(!1),[I,T]=(0,o.useState)(!1),[P,B]=(0,o.useState)({workspaces:[],scopes:[]});(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/context/claude");if(e.ok){let r=await e.json();r.success&&r.config&&v({name:r.config.name||(h?"Claude Docker":"Claude Local"),workspaceRoot:r.config.workspaceRoot||"",scopedDirs:r.config.scopedDirs||[],extraFlags:r.config.extraFlags||""})}let r=await fetch("/api/recents");if(r.ok){let e=await r.json();e.success&&e.recents&&B(e.recents)}}catch(e){console.error("Failed to load Claude configuration / recents:",e)}finally{S(!1)}})()},[h]);let L=async()=>{D(!0),z("");try{let e=await fetch("/api/context/claude",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(e.ok)D(!1),b(y.name,y.workspaceRoot,y.scopedDirs);else{let r=await e.json();z(r.error||"Failed to save settings."),D(!1)}}catch(e){console.error(e),z("Network error: failed to connect to NeuralLoom dashboard API."),D(!1)}};return C?(0,r.jsx)("div",{style:n,children:(0,r.jsx)("div",{style:l,children:(0,r.jsx)("div",{style:{textAlign:"center",padding:"2rem"},children:(0,r.jsx)("span",{style:{color:"var(--muted)"},children:"Loading Claude Configuration..."})})})}):(0,r.jsx)("div",{style:n,children:(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("div",{style:i,children:[(0,r.jsxs)("h3",{style:{fontSize:"1.1rem",fontWeight:700,margin:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h?"🐳":"🤖"," Claude PTY Launch Wizard ",h?"(Docker)":"(Local)"]}),(0,r.jsx)("button",{onClick:e,style:a,"aria-label":"Close wizard",children:"✖"})]}),(0,r.jsxs)("div",{style:s,children:[(0,r.jsx)("p",{style:{fontSize:"0.825rem",color:"var(--muted)",marginBottom:"1.25rem",lineHeight:1.4},children:"Configure the local workspace path and access parameters for the Claude Code session. Settings are saved in `.ai/neural-loom/claude.json`."}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Session Display Name"}),(0,r.jsx)("input",{type:"text",value:y.name,onChange:e=>v({...y,name:e.target.value}),placeholder:h?"Claude Docker":"Claude Local",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Workspace Directory (Root)"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:y.workspaceRoot,onChange:e=>v({...y,workspaceRoot:e.target.value}),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\wingman",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>F(!0),style:f,children:"Browse..."})]}),P.workspaces.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),P.workspaces.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>v({...y,workspaceRoot:e}),style:{background:"rgba(255,255,255,0.03)",border:"1px solid var(--border)",borderRadius:"3px",color:"var(--muted)",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:e.split(/[/\\]/).pop()||e},e))]}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"The active folder Claude Code will run in. Leave blank to run in the current orchestrator directory."})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Extra Command Flags"}),(0,r.jsx)("input",{type:"text",value:y.extraFlags||"",onChange:e=>v({...y,extraFlags:e.target.value}),placeholder:"e.g. --resume ace806f9-cb5f-4a19-b0e9-d4331b7863a7",style:p}),(0,r.jsxs)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:["Custom parameters passed to the Claude CLI (e.g. ",(0,r.jsx)("code",{children:"--resume <session-id>"}),")."]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Scoped Directories (Additional Access)"}),y.scopedDirs.length>0&&(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",marginBottom:"0.5rem"},children:y.scopedDirs.map((e,o)=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#080c14",padding:"0.35rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)"},children:[(0,r.jsx)("span",{style:{fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e=y.scopedDirs.filter((e,r)=>r!==o);v({...y,scopedDirs:e})},style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.8rem",padding:"0 0.25rem"},children:"Remove"})]},o))}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:j,onChange:e=>k(e.target.value),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\other-repo",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>T(!0),style:f,children:"Browse..."}),(0,r.jsx)("button",{type:"button",onClick:()=>{j.trim()&&!y.scopedDirs.includes(j.trim())&&(v({...y,scopedDirs:[...y.scopedDirs,j.trim()]}),k(""))},style:{padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(109, 40, 217, 0.1)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},children:"Add"})]}),P.scopes.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),P.scopes.filter(e=>!y.scopedDirs.includes(e)).map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{y.scopedDirs.includes(e)||v({...y,scopedDirs:[...y.scopedDirs,e]})},style:{background:"rgba(168, 85, 247, 0.05)",border:"1px solid rgba(168, 85, 247, 0.2)",borderRadius:"3px",color:"#c084fc",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:["+",e.split(/[/\\]/).pop()||e]},e))]})]}),R&&(0,r.jsxs)("div",{style:u,children:["✗ ",R]})]}),(0,r.jsxs)("div",{style:m,children:[(0,r.jsx)("button",{onClick:e,style:g,disabled:w,children:"Cancel"}),(0,r.jsx)("button",{onClick:L,style:x,disabled:w,children:w?"Saving...":"Launch Session"})]}),W&&(0,r.jsx)(t.default,{title:"Select Workspace Root",initialPath:y.workspaceRoot,onClose:()=>F(!1),onSelect:e=>v({...y,workspaceRoot:e})}),I&&(0,r.jsx)(t.default,{title:"Add Scoped Directory",initialPath:j,onClose:()=>T(!1),onSelect:e=>k(e)})]})})}])},20032,e=>{e.n(e.i(44837))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54370,e=>{"use strict";var r=e.i(43476),o=e.i(71645);let t={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.85)",backdropFilter:"blur(12px)",zIndex:1100,display:"flex",alignItems:"center",justifyContent:"center"},n={width:"90%",maxWidth:"550px",height:"480px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.7), 0 10px 10px -5px rgba(0,0,0,0.7)",display:"flex",flexDirection:"column",overflow:"hidden"},l={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},a={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},i={display:"flex",padding:"0.75rem 1.25rem",gap:"0.5rem",backgroundColor:"rgba(10, 15, 25, 0.5)",borderBottom:"1px solid var(--border)"},s={flex:1,padding:"0.45rem 0.75rem",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.8rem",outline:"none"},d={padding:"0.45rem 0.85rem",backgroundColor:"var(--border)",border:"1px solid var(--border-focus)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},c={padding:"0.15rem 0.45rem",backgroundColor:"rgba(255, 255, 255, 0.15)",border:"none",borderRadius:"4px",color:"var(--foreground)",fontSize:"0.7rem",cursor:"pointer",fontWeight:600},p={flex:1,padding:"0.5rem 1.25rem",overflowY:"auto",backgroundColor:"#070a0f"},u={display:"flex",flexDirection:"column",gap:"0.25rem"},m={display:"flex",alignItems:"center",gap:"0.6rem",padding:"0.45rem 0.65rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.825rem",border:"1px solid transparent",userSelect:"none",transition:"all 0.15s ease"},x={textAlign:"center",padding:"2rem",fontSize:"0.85rem",color:"var(--muted)"},g={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},f={fontSize:"0.75rem",color:"var(--muted)",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},b={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},h={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};e.s(["default",0,function({title:e,initialPath:y,onClose:v,onSelect:j}){let[k,C]=(0,o.useState)(y||""),[S,w]=(0,o.useState)(null),[D,R]=(0,o.useState)([]),[z,W]=(0,o.useState)(null),[F,I]=(0,o.useState)(""),[T,P]=(0,o.useState)(!1),[B,L]=(0,o.useState)(""),A=async e=>{P(!0),L("");try{let r=`/api/files?action=browse_dirs&path=${encodeURIComponent(e)}`,o=await fetch(r),t=await o.json();o.ok&&t.success?(C(t.currentPath),I(t.currentPath),w(t.parentPath),R(t.directories),W(null)):L(t.error||"Failed to load directory content.")}catch(e){console.error("Error browsing directories:",e),L("Failed to fetch directory contents.")}finally{P(!1)}};(0,o.useEffect)(()=>{A(y)},[y]);let O=e=>{A(e)},E=()=>{F.trim()&&A(F.trim())};return(0,r.jsx)("div",{style:t,children:(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("h3",{style:{fontSize:"1rem",fontWeight:700,margin:0,color:"var(--foreground)"},children:["📁 ",e]}),(0,r.jsx)("button",{onClick:v,style:a,"aria-label":"Close browser",children:"✖"})]}),(0,r.jsxs)("div",{style:i,children:[(0,r.jsx)("input",{type:"text",value:F,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()},style:s,placeholder:"Absolute folder path..."}),(0,r.jsx)("button",{onClick:E,style:d,disabled:T,children:"Go"})]}),(0,r.jsx)("div",{style:p,children:T?(0,r.jsx)("div",{style:x,children:"Loading directories..."}):B?(0,r.jsxs)("div",{style:{...x,color:"var(--danger)"},children:[B,(0,r.jsx)("button",{onClick:()=>A(k||"."),style:{...d,display:"block",margin:"0.75rem auto 0"},children:"Retry"})]}):(0,r.jsxs)("div",{style:u,children:[S&&(0,r.jsxs)("div",{onClick:()=>O(S),onDoubleClick:()=>O(S),style:m,title:"Go up to parent directory",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"⬆️"}),(0,r.jsx)("span",{style:{fontWeight:600},children:".. (Up)"})]}),0===D.length?(0,r.jsx)("div",{style:{...x,color:"var(--muted)"},children:"No subdirectories found"}):D.map(e=>{let o=z===e.path;return(0,r.jsxs)("div",{onClick:()=>W(e.path),onDoubleClick:()=>O(e.path),style:{...m,backgroundColor:o?"rgba(109, 40, 217, 0.25)":"transparent",borderColor:o?"var(--border-focus)":"transparent"},title:"Single click to highlight, double click to enter",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"📁"}),(0,r.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),o&&(0,r.jsx)("button",{type:"button",onClick:r=>{r.stopPropagation(),O(e.path)},style:c,children:"Enter ➜"})]},e.path)})]})}),(0,r.jsxs)("div",{style:g,children:[(0,r.jsxs)("span",{style:f,children:["Selection: ",(0,r.jsx)("span",{style:{color:"var(--foreground)",fontFamily:"var(--font-mono), monospace"},children:z||k||"(None)"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("button",{onClick:v,style:h,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{j(z||k),v()},style:b,disabled:T,children:"Select Folder"})]})]})]})})}])},44837,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(54370);let n={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.8)",backdropFilter:"blur(8px)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",animation:"fadeIn 0.2s ease-out"},l={width:"90%",maxWidth:"500px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5)",overflow:"hidden",display:"flex",flexDirection:"column"},a={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},i={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},s={padding:"1.25rem",display:"flex",flexDirection:"column"},d={display:"flex",flexDirection:"column",marginBottom:"1rem"},c={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)",marginBottom:"0.375rem",textTransform:"uppercase",letterSpacing:"0.05em"},p={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.825rem",outline:"none",transition:"border-color 0.15s ease"},u={marginTop:"0.75rem",padding:"0.75rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"rgba(239, 68, 68, 0.05)",color:"var(--danger)",fontSize:"0.8rem",lineHeight:1.4},m={display:"flex",justifyContent:"flex-end",gap:"0.75rem",padding:"1rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},x={padding:"0.5rem 1rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},g={padding:"0.5rem 1rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},f={padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.05)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"};e.s(["default",0,function({onClose:e,onConfirmLaunch:b,isDocker:h}){let[y,v]=(0,o.useState)({name:h?"Claude Docker":"Claude Local",workspaceRoot:"",scopedDirs:[],extraFlags:""}),[j,k]=(0,o.useState)(""),[C,S]=(0,o.useState)(!0),[w,D]=(0,o.useState)(!1),[R,z]=(0,o.useState)(""),[W,F]=(0,o.useState)(!1),[I,T]=(0,o.useState)(!1),[P,B]=(0,o.useState)({workspaces:[],scopes:[]});(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/context/claude");if(e.ok){let r=await e.json();r.success&&r.config&&v({name:r.config.name||(h?"Claude Docker":"Claude Local"),workspaceRoot:r.config.workspaceRoot||r.config.defaultWorkspaceRoot||"",scopedDirs:r.config.scopedDirs||[],extraFlags:r.config.extraFlags||""})}let r=await fetch("/api/recents");if(r.ok){let e=await r.json();e.success&&e.recents&&B(e.recents)}}catch(e){console.error("Failed to load Claude configuration / recents:",e)}finally{S(!1)}})()},[h]);let L=async()=>{D(!0),z("");try{let e=await fetch("/api/context/claude",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(e.ok)D(!1),b(y.name,y.workspaceRoot,y.scopedDirs);else{let r=await e.json();z(r.error||"Failed to save settings."),D(!1)}}catch(e){console.error(e),z("Network error: failed to connect to NeuralLoom dashboard API."),D(!1)}};return C?(0,r.jsx)("div",{style:n,children:(0,r.jsx)("div",{style:l,children:(0,r.jsx)("div",{style:{textAlign:"center",padding:"2rem"},children:(0,r.jsx)("span",{style:{color:"var(--muted)"},children:"Loading Claude Configuration..."})})})}):(0,r.jsx)("div",{style:n,children:(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("div",{style:a,children:[(0,r.jsxs)("h3",{style:{fontSize:"1.1rem",fontWeight:700,margin:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:[h?"🐳":"🤖"," Claude PTY Launch Wizard ",h?"(Docker)":"(Local)"]}),(0,r.jsx)("button",{onClick:e,style:i,"aria-label":"Close wizard",children:"✖"})]}),(0,r.jsxs)("div",{style:s,children:[(0,r.jsx)("p",{style:{fontSize:"0.825rem",color:"var(--muted)",marginBottom:"1.25rem",lineHeight:1.4},children:"Configure the local workspace path and access parameters for the Claude Code session. Settings are saved in `.ai/neural-loom/claude.json`."}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Session Display Name"}),(0,r.jsx)("input",{type:"text",value:y.name,onChange:e=>v({...y,name:e.target.value}),placeholder:h?"Claude Docker":"Claude Local",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Workspace Directory (Root)"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:y.workspaceRoot,onChange:e=>v({...y,workspaceRoot:e.target.value}),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\wingman",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>F(!0),style:f,children:"Browse..."})]}),P.workspaces.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),P.workspaces.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>v({...y,workspaceRoot:e}),style:{background:"rgba(255,255,255,0.03)",border:"1px solid var(--border)",borderRadius:"3px",color:"var(--muted)",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:e.split(/[/\\]/).pop()||e},e))]}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"The active folder Claude Code will run in. Leave blank to run in the current orchestrator directory."})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Extra Command Flags"}),(0,r.jsx)("input",{type:"text",value:y.extraFlags||"",onChange:e=>v({...y,extraFlags:e.target.value}),placeholder:"e.g. --resume ace806f9-cb5f-4a19-b0e9-d4331b7863a7",style:p}),(0,r.jsxs)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:["Custom parameters passed to the Claude CLI (e.g. ",(0,r.jsx)("code",{children:"--resume <session-id>"}),")."]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Scoped Directories (Additional Access)"}),y.scopedDirs.length>0&&(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",marginBottom:"0.5rem"},children:y.scopedDirs.map((e,o)=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#080c14",padding:"0.35rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)"},children:[(0,r.jsx)("span",{style:{fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e=y.scopedDirs.filter((e,r)=>r!==o);v({...y,scopedDirs:e})},style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.8rem",padding:"0 0.25rem"},children:"Remove"})]},o))}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:j,onChange:e=>k(e.target.value),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\other-repo",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>T(!0),style:f,children:"Browse..."}),(0,r.jsx)("button",{type:"button",onClick:()=>{j.trim()&&!y.scopedDirs.includes(j.trim())&&(v({...y,scopedDirs:[...y.scopedDirs,j.trim()]}),k(""))},style:{padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(109, 40, 217, 0.1)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},children:"Add"})]}),P.scopes.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),P.scopes.filter(e=>!y.scopedDirs.includes(e)).map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{y.scopedDirs.includes(e)||v({...y,scopedDirs:[...y.scopedDirs,e]})},style:{background:"rgba(168, 85, 247, 0.05)",border:"1px solid rgba(168, 85, 247, 0.2)",borderRadius:"3px",color:"#c084fc",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:["+",e.split(/[/\\]/).pop()||e]},e))]})]}),R&&(0,r.jsxs)("div",{style:u,children:["✗ ",R]})]}),(0,r.jsxs)("div",{style:m,children:[(0,r.jsx)("button",{onClick:e,style:g,disabled:w,children:"Cancel"}),(0,r.jsx)("button",{onClick:L,style:x,disabled:w,children:w?"Saving...":"Launch Session"})]}),W&&(0,r.jsx)(t.default,{title:"Select Workspace Root",initialPath:y.workspaceRoot,onClose:()=>F(!1),onSelect:e=>v({...y,workspaceRoot:e})}),I&&(0,r.jsx)(t.default,{title:"Add Scoped Directory",initialPath:j,onClose:()=>T(!1),onSelect:e=>k(e)})]})})}])},20032,e=>{e.n(e.i(44837))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54370,e=>{"use strict";var r=e.i(43476),o=e.i(71645);let t={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.85)",backdropFilter:"blur(12px)",zIndex:1100,display:"flex",alignItems:"center",justifyContent:"center"},i={width:"90%",maxWidth:"550px",height:"480px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.7), 0 10px 10px -5px rgba(0,0,0,0.7)",display:"flex",flexDirection:"column",overflow:"hidden"},n={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},l={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},s={display:"flex",padding:"0.75rem 1.25rem",gap:"0.5rem",backgroundColor:"rgba(10, 15, 25, 0.5)",borderBottom:"1px solid var(--border)"},a={flex:1,padding:"0.45rem 0.75rem",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.8rem",outline:"none"},d={padding:"0.45rem 0.85rem",backgroundColor:"var(--border)",border:"1px solid var(--border-focus)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},c={padding:"0.15rem 0.45rem",backgroundColor:"rgba(255, 255, 255, 0.15)",border:"none",borderRadius:"4px",color:"var(--foreground)",fontSize:"0.7rem",cursor:"pointer",fontWeight:600},p={flex:1,padding:"0.5rem 1.25rem",overflowY:"auto",backgroundColor:"#070a0f"},u={display:"flex",flexDirection:"column",gap:"0.25rem"},m={display:"flex",alignItems:"center",gap:"0.6rem",padding:"0.45rem 0.65rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.825rem",border:"1px solid transparent",userSelect:"none",transition:"all 0.15s ease"},g={textAlign:"center",padding:"2rem",fontSize:"0.85rem",color:"var(--muted)"},x={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},h={fontSize:"0.75rem",color:"var(--muted)",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},f={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},b={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};e.s(["default",0,function({title:e,initialPath:y,onClose:v,onSelect:j}){let[k,S]=(0,o.useState)(y||""),[C,w]=(0,o.useState)(null),[A,R]=(0,o.useState)([]),[z,D]=(0,o.useState)(null),[F,I]=(0,o.useState)(""),[K,P]=(0,o.useState)(!1),[T,W]=(0,o.useState)(""),B=async e=>{P(!0),W("");try{let r=`/api/files?action=browse_dirs&path=${encodeURIComponent(e)}`,o=await fetch(r),t=await o.json();o.ok&&t.success?(S(t.currentPath),I(t.currentPath),w(t.parentPath),R(t.directories),D(null)):W(t.error||"Failed to load directory content.")}catch(e){console.error("Error browsing directories:",e),W("Failed to fetch directory contents.")}finally{P(!1)}};(0,o.useEffect)(()=>{B(y)},[y]);let G=e=>{B(e)},O=()=>{F.trim()&&B(F.trim())};return(0,r.jsx)("div",{style:t,children:(0,r.jsxs)("div",{style:i,children:[(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("h3",{style:{fontSize:"1rem",fontWeight:700,margin:0,color:"var(--foreground)"},children:["📁 ",e]}),(0,r.jsx)("button",{onClick:v,style:l,"aria-label":"Close browser",children:"✖"})]}),(0,r.jsxs)("div",{style:s,children:[(0,r.jsx)("input",{type:"text",value:F,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O()},style:a,placeholder:"Absolute folder path..."}),(0,r.jsx)("button",{onClick:O,style:d,disabled:K,children:"Go"})]}),(0,r.jsx)("div",{style:p,children:K?(0,r.jsx)("div",{style:g,children:"Loading directories..."}):T?(0,r.jsxs)("div",{style:{...g,color:"var(--danger)"},children:[T,(0,r.jsx)("button",{onClick:()=>B(k||"."),style:{...d,display:"block",margin:"0.75rem auto 0"},children:"Retry"})]}):(0,r.jsxs)("div",{style:u,children:[C&&(0,r.jsxs)("div",{onClick:()=>G(C),onDoubleClick:()=>G(C),style:m,title:"Go up to parent directory",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"⬆️"}),(0,r.jsx)("span",{style:{fontWeight:600},children:".. (Up)"})]}),0===A.length?(0,r.jsx)("div",{style:{...g,color:"var(--muted)"},children:"No subdirectories found"}):A.map(e=>{let o=z===e.path;return(0,r.jsxs)("div",{onClick:()=>D(e.path),onDoubleClick:()=>G(e.path),style:{...m,backgroundColor:o?"rgba(109, 40, 217, 0.25)":"transparent",borderColor:o?"var(--border-focus)":"transparent"},title:"Single click to highlight, double click to enter",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"📁"}),(0,r.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),o&&(0,r.jsx)("button",{type:"button",onClick:r=>{r.stopPropagation(),G(e.path)},style:c,children:"Enter ➜"})]},e.path)})]})}),(0,r.jsxs)("div",{style:x,children:[(0,r.jsxs)("span",{style:h,children:["Selection: ",(0,r.jsx)("span",{style:{color:"var(--foreground)",fontFamily:"var(--font-mono), monospace"},children:z||k||"(None)"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("button",{onClick:v,style:b,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{j(z||k),v()},style:f,disabled:K,children:"Select Folder"})]})]})]})})}])},1663,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(54370);let i={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.8)",backdropFilter:"blur(8px)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",animation:"fadeIn 0.2s ease-out"},n={width:"90%",maxWidth:"500px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5)",overflow:"hidden",display:"flex",flexDirection:"column"},l={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},s={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},a={padding:"1.25rem",display:"flex",flexDirection:"column"},d={display:"flex",flexDirection:"column",marginBottom:"1rem"},c={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)",marginBottom:"0.375rem",textTransform:"uppercase",letterSpacing:"0.05em"},p={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.825rem",outline:"none",transition:"border-color 0.15s ease"},u={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.825rem",outline:"none",cursor:"pointer"},m={marginTop:"0.75rem",padding:"0.75rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"rgba(239, 68, 68, 0.05)",color:"var(--danger)",fontSize:"0.8rem",lineHeight:1.4},g={display:"flex",justifyContent:"flex-end",gap:"0.75rem",padding:"1rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},x={padding:"0.5rem 1rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",color:"#fff",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},h={padding:"0.5rem 1rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},f={padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.05)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"};e.s(["default",0,function({onClose:e,onConfirmLaunch:b,isDocker:y}){let[v,j]=(0,o.useState)({openaiApiKey:"",anthropicApiKey:"",geminiApiKey:"",model:"claude-3-5-sonnet",extraFlags:"",workspaceRoot:"",scopedDirs:[],loadAllFiles:!0}),[k,S]=(0,o.useState)(""),[C,w]=(0,o.useState)(!0),[A,R]=(0,o.useState)(!1),[z,D]=(0,o.useState)(""),[F,I]=(0,o.useState)(!1),[K,P]=(0,o.useState)(!1),[T,W]=(0,o.useState)({workspaces:[],scopes:[]});(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/context/aider");if(e.ok){let r=await e.json();r.success&&r.config&&j({openaiApiKey:r.config.openaiApiKey||"",anthropicApiKey:r.config.anthropicApiKey||"",geminiApiKey:r.config.geminiApiKey||"",model:r.config.model||"claude-3-5-sonnet",extraFlags:r.config.extraFlags||"",workspaceRoot:r.config.workspaceRoot||"",scopedDirs:r.config.scopedDirs||[],loadAllFiles:!1!==r.config.loadAllFiles})}let r=await fetch("/api/recents");if(r.ok){let e=await r.json();e.success&&e.recents&&W(e.recents)}}catch(e){console.error("Failed to load Aider configuration / recents:",e)}finally{w(!1)}})()},[]);let B=async()=>{R(!0),D("");try{let e=await fetch("/api/context/aider",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});if(e.ok)R(!1),b();else{let r=await e.json();D(r.error||"Failed to save settings."),R(!1)}}catch(e){console.error(e),D("Network error: failed to connect to NeuralLoom dashboard API."),R(!1)}};return C?(0,r.jsx)("div",{style:i,children:(0,r.jsx)("div",{style:n,children:(0,r.jsx)("div",{style:{textAlign:"center",padding:"2rem"},children:(0,r.jsx)("span",{style:{color:"var(--muted)"},children:"Loading Aider Configuration..."})})})}):(0,r.jsx)("div",{style:i,children:(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("h3",{style:{fontSize:"1.1rem",fontWeight:700,margin:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🐍 Aider Launch Panel ",y?"(Docker)":""]}),(0,r.jsx)("button",{onClick:e,style:s,"aria-label":"Close wizard",children:"✖"})]}),(0,r.jsxs)("div",{style:a,children:[(0,r.jsx)("p",{style:{fontSize:"0.825rem",color:"var(--muted)",marginBottom:"1.25rem",lineHeight:1.4},children:"Configure model and environment variables for the Aider session. API keys are saved locally in `.ai/neural-loom/aider.json` and are ignored by git."}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Anthropic API Key"}),(0,r.jsx)("input",{type:"password",value:v.anthropicApiKey,onChange:e=>j({...v,anthropicApiKey:e.target.value}),placeholder:v.anthropicApiKey?"••••••••••••••••":"sk-ant-...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"OpenAI API Key"}),(0,r.jsx)("input",{type:"password",value:v.openaiApiKey,onChange:e=>j({...v,openaiApiKey:e.target.value}),placeholder:v.openaiApiKey?"••••••••••••••••":"sk-...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Gemini API Key"}),(0,r.jsx)("input",{type:"password",value:v.geminiApiKey,onChange:e=>j({...v,geminiApiKey:e.target.value}),placeholder:v.geminiApiKey?"••••••••••••••••":"AIzaSy...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Workspace Directory (Root)"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:v.workspaceRoot,onChange:e=>j({...v,workspaceRoot:e.target.value}),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\neural-loom",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>I(!0),style:f,children:"Browse..."})]}),T.workspaces.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),T.workspaces.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>j({...v,workspaceRoot:e}),style:{background:"rgba(255,255,255,0.03)",border:"1px solid var(--border)",borderRadius:"3px",color:"var(--muted)",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:e.split(/[/\\]/).pop()||e},e))]}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"Leave blank to default to the current orchestrator directory."})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Scoped Directories (Additional Access)"}),v.scopedDirs.length>0&&(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",marginBottom:"0.5rem"},children:v.scopedDirs.map((e,o)=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#080c14",padding:"0.35rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)"},children:[(0,r.jsx)("span",{style:{fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e=v.scopedDirs.filter((e,r)=>r!==o);j({...v,scopedDirs:e})},style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.8rem",padding:"0 0.25rem"},children:"Remove"})]},o))}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:k,onChange:e=>S(e.target.value),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\wingman",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>P(!0),style:f,children:"Browse..."}),(0,r.jsx)("button",{type:"button",onClick:()=>{k.trim()&&!v.scopedDirs.includes(k.trim())&&(j({...v,scopedDirs:[...v.scopedDirs,k.trim()]}),S(""))},style:{padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(109, 40, 217, 0.1)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},children:"Add"})]}),T.scopes.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),T.scopes.filter(e=>!v.scopedDirs.includes(e)).map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{v.scopedDirs.includes(e)||j({...v,scopedDirs:[...v.scopedDirs,e]})},style:{background:"rgba(168, 85, 247, 0.05)",border:"1px solid rgba(168, 85, 247, 0.2)",borderRadius:"3px",color:"#c084fc",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:["+",e.split(/[/\\]/).pop()||e]},e))]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"AI Model Selection"}),(0,r.jsxs)("select",{value:v.model,onChange:e=>j({...v,model:e.target.value}),style:u,children:[(0,r.jsx)("option",{value:"claude-3-5-sonnet",children:"Claude 3.5 Sonnet (Recommended)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.5-flash",children:"Gemini 2.5 Flash (Recommended for Free Tier)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.5-pro",children:"Gemini 2.5 Pro (Requires Paid/Billing Tier)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.0-flash-exp",children:"Gemini 2.0 Flash Exp"}),(0,r.jsx)("option",{value:"gemini/gemini-1.5-pro",children:"Gemini 1.5 Pro"}),(0,r.jsx)("option",{value:"gemini/gemini-1.5-flash",children:"Gemini 1.5 Flash"}),(0,r.jsx)("option",{value:"gpt-4o",children:"GPT-4o"}),(0,r.jsx)("option",{value:"deepseek/deepseek-coder",children:"DeepSeek Coder"}),(0,r.jsx)("option",{value:"gpt-4-turbo",children:"GPT-4 Turbo"})]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Extra CLI Flags (Optional)"}),(0,r.jsx)("input",{type:"text",value:v.extraFlags,onChange:e=>j({...v,extraFlags:e.target.value}),placeholder:"e.g. --no-git --auto-commits",style:p}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"Appended directly to the startup shell command."})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginTop:"0.25rem",marginBottom:"1.25rem"},children:[(0,r.jsx)("input",{type:"checkbox",id:"loadAllFiles",checked:v.loadAllFiles,onChange:e=>j({...v,loadAllFiles:e.target.checked}),style:{width:"16px",height:"16px",cursor:"pointer",accentColor:"var(--accent)"}}),(0,r.jsx)("label",{htmlFor:"loadAllFiles",style:{fontSize:"0.8rem",color:"var(--foreground)",cursor:"pointer",userSelect:"none"},children:"Load all files in root directory on startup"})]}),z&&(0,r.jsxs)("div",{style:m,children:["✗ ",z]})]}),(0,r.jsxs)("div",{style:g,children:[(0,r.jsx)("button",{onClick:e,style:h,disabled:A,children:"Cancel"}),(0,r.jsx)("button",{onClick:B,style:x,disabled:A,children:A?"Saving...":"Save & Launch Session"})]}),F&&(0,r.jsx)(t.default,{title:"Select Workspace Root",initialPath:v.workspaceRoot,onClose:()=>I(!1),onSelect:e=>j({...v,workspaceRoot:e})}),K&&(0,r.jsx)(t.default,{title:"Add Scoped Directory",initialPath:k,onClose:()=>P(!1),onSelect:e=>S(e)})]})})}])},9949,e=>{e.n(e.i(1663))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54370,e=>{"use strict";var r=e.i(43476),o=e.i(71645);let t={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.85)",backdropFilter:"blur(12px)",zIndex:1100,display:"flex",alignItems:"center",justifyContent:"center"},i={width:"90%",maxWidth:"550px",height:"480px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 20px 25px -5px rgba(0,0,0,0.7), 0 10px 10px -5px rgba(0,0,0,0.7)",display:"flex",flexDirection:"column",overflow:"hidden"},n={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},l={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},s={display:"flex",padding:"0.75rem 1.25rem",gap:"0.5rem",backgroundColor:"rgba(10, 15, 25, 0.5)",borderBottom:"1px solid var(--border)"},a={flex:1,padding:"0.45rem 0.75rem",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.8rem",outline:"none"},d={padding:"0.45rem 0.85rem",backgroundColor:"var(--border)",border:"1px solid var(--border-focus)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},c={padding:"0.15rem 0.45rem",backgroundColor:"rgba(255, 255, 255, 0.15)",border:"none",borderRadius:"4px",color:"var(--foreground)",fontSize:"0.7rem",cursor:"pointer",fontWeight:600},p={flex:1,padding:"0.5rem 1.25rem",overflowY:"auto",backgroundColor:"#070a0f"},u={display:"flex",flexDirection:"column",gap:"0.25rem"},m={display:"flex",alignItems:"center",gap:"0.6rem",padding:"0.45rem 0.65rem",borderRadius:"6px",cursor:"pointer",fontSize:"0.825rem",border:"1px solid transparent",userSelect:"none",transition:"all 0.15s ease"},g={textAlign:"center",padding:"2rem",fontSize:"0.85rem",color:"var(--muted)"},x={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},h={fontSize:"0.75rem",color:"var(--muted)",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},f={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},b={padding:"0.45rem 0.9rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};e.s(["default",0,function({title:e,initialPath:y,onClose:v,onSelect:j}){let[k,S]=(0,o.useState)(y||""),[C,w]=(0,o.useState)(null),[A,R]=(0,o.useState)([]),[z,D]=(0,o.useState)(null),[F,I]=(0,o.useState)(""),[K,P]=(0,o.useState)(!1),[T,W]=(0,o.useState)(""),B=async e=>{P(!0),W("");try{let r=`/api/files?action=browse_dirs&path=${encodeURIComponent(e)}`,o=await fetch(r),t=await o.json();o.ok&&t.success?(S(t.currentPath),I(t.currentPath),w(t.parentPath),R(t.directories),D(null)):W(t.error||"Failed to load directory content.")}catch(e){console.error("Error browsing directories:",e),W("Failed to fetch directory contents.")}finally{P(!1)}};(0,o.useEffect)(()=>{B(y)},[y]);let G=e=>{B(e)},O=()=>{F.trim()&&B(F.trim())};return(0,r.jsx)("div",{style:t,children:(0,r.jsxs)("div",{style:i,children:[(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("h3",{style:{fontSize:"1rem",fontWeight:700,margin:0,color:"var(--foreground)"},children:["📁 ",e]}),(0,r.jsx)("button",{onClick:v,style:l,"aria-label":"Close browser",children:"✖"})]}),(0,r.jsxs)("div",{style:s,children:[(0,r.jsx)("input",{type:"text",value:F,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O()},style:a,placeholder:"Absolute folder path..."}),(0,r.jsx)("button",{onClick:O,style:d,disabled:K,children:"Go"})]}),(0,r.jsx)("div",{style:p,children:K?(0,r.jsx)("div",{style:g,children:"Loading directories..."}):T?(0,r.jsxs)("div",{style:{...g,color:"var(--danger)"},children:[T,(0,r.jsx)("button",{onClick:()=>B(k||"."),style:{...d,display:"block",margin:"0.75rem auto 0"},children:"Retry"})]}):(0,r.jsxs)("div",{style:u,children:[C&&(0,r.jsxs)("div",{onClick:()=>G(C),onDoubleClick:()=>G(C),style:m,title:"Go up to parent directory",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"⬆️"}),(0,r.jsx)("span",{style:{fontWeight:600},children:".. (Up)"})]}),0===A.length?(0,r.jsx)("div",{style:{...g,color:"var(--muted)"},children:"No subdirectories found"}):A.map(e=>{let o=z===e.path;return(0,r.jsxs)("div",{onClick:()=>D(e.path),onDoubleClick:()=>G(e.path),style:{...m,backgroundColor:o?"rgba(109, 40, 217, 0.25)":"transparent",borderColor:o?"var(--border-focus)":"transparent"},title:"Single click to highlight, double click to enter",children:[(0,r.jsx)("span",{style:{fontSize:"1.1rem"},children:"📁"}),(0,r.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),o&&(0,r.jsx)("button",{type:"button",onClick:r=>{r.stopPropagation(),G(e.path)},style:c,children:"Enter ➜"})]},e.path)})]})}),(0,r.jsxs)("div",{style:x,children:[(0,r.jsxs)("span",{style:h,children:["Selection: ",(0,r.jsx)("span",{style:{color:"var(--foreground)",fontFamily:"var(--font-mono), monospace"},children:z||k||"(None)"})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("button",{onClick:v,style:b,children:"Cancel"}),(0,r.jsx)("button",{onClick:()=>{j(z||k),v()},style:f,disabled:K,children:"Select Folder"})]})]})]})})}])},1663,e=>{"use strict";var r=e.i(43476),o=e.i(71645),t=e.i(54370);let i={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(5, 7, 10, 0.8)",backdropFilter:"blur(8px)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",animation:"fadeIn 0.2s ease-out"},n={width:"90%",maxWidth:"500px",backgroundColor:"var(--card)",border:"1px solid var(--border-focus)",borderRadius:"12px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5)",overflow:"hidden",display:"flex",flexDirection:"column"},l={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},s={background:"none",border:"none",color:"var(--muted)",fontSize:"0.9rem",cursor:"pointer",padding:"0.25rem"},a={padding:"1.25rem",display:"flex",flexDirection:"column"},d={display:"flex",flexDirection:"column",marginBottom:"1rem"},c={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)",marginBottom:"0.375rem",textTransform:"uppercase",letterSpacing:"0.05em"},p={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontFamily:"var(--font-mono), monospace",fontSize:"0.825rem",outline:"none",transition:"border-color 0.15s ease"},u={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--foreground)",fontSize:"0.825rem",outline:"none",cursor:"pointer"},m={marginTop:"0.75rem",padding:"0.75rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"rgba(239, 68, 68, 0.05)",color:"var(--danger)",fontSize:"0.8rem",lineHeight:1.4},g={display:"flex",justifyContent:"flex-end",gap:"0.75rem",padding:"1rem 1.25rem",borderTop:"1px solid var(--border)",background:"hsla(var(--border-hsl), 0.2)"},x={padding:"0.5rem 1rem",borderRadius:"6px",border:"none",background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",color:"#fff",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},h={padding:"0.5rem 1rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--foreground)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},f={padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.05)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"};e.s(["default",0,function({onClose:e,onConfirmLaunch:b,isDocker:y}){let[v,j]=(0,o.useState)({openaiApiKey:"",anthropicApiKey:"",geminiApiKey:"",model:"claude-3-5-sonnet",extraFlags:"",workspaceRoot:"",scopedDirs:[],loadAllFiles:!0}),[k,S]=(0,o.useState)(""),[C,w]=(0,o.useState)(!0),[A,R]=(0,o.useState)(!1),[z,D]=(0,o.useState)(""),[F,I]=(0,o.useState)(!1),[K,P]=(0,o.useState)(!1),[T,W]=(0,o.useState)({workspaces:[],scopes:[]});(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/context/aider");if(e.ok){let r=await e.json();r.success&&r.config&&j({openaiApiKey:r.config.openaiApiKey||"",anthropicApiKey:r.config.anthropicApiKey||"",geminiApiKey:r.config.geminiApiKey||"",model:r.config.model||"claude-3-5-sonnet",extraFlags:r.config.extraFlags||"",workspaceRoot:r.config.workspaceRoot||r.config.defaultWorkspaceRoot||"",scopedDirs:r.config.scopedDirs||[],loadAllFiles:!1!==r.config.loadAllFiles})}let r=await fetch("/api/recents");if(r.ok){let e=await r.json();e.success&&e.recents&&W(e.recents)}}catch(e){console.error("Failed to load Aider configuration / recents:",e)}finally{w(!1)}})()},[]);let B=async()=>{R(!0),D("");try{let e=await fetch("/api/context/aider",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});if(e.ok)R(!1),b();else{let r=await e.json();D(r.error||"Failed to save settings."),R(!1)}}catch(e){console.error(e),D("Network error: failed to connect to NeuralLoom dashboard API."),R(!1)}};return C?(0,r.jsx)("div",{style:i,children:(0,r.jsx)("div",{style:n,children:(0,r.jsx)("div",{style:{textAlign:"center",padding:"2rem"},children:(0,r.jsx)("span",{style:{color:"var(--muted)"},children:"Loading Aider Configuration..."})})})}):(0,r.jsx)("div",{style:i,children:(0,r.jsxs)("div",{style:n,children:[(0,r.jsxs)("div",{style:l,children:[(0,r.jsxs)("h3",{style:{fontSize:"1.1rem",fontWeight:700,margin:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🐍 Aider Launch Panel ",y?"(Docker)":""]}),(0,r.jsx)("button",{onClick:e,style:s,"aria-label":"Close wizard",children:"✖"})]}),(0,r.jsxs)("div",{style:a,children:[(0,r.jsx)("p",{style:{fontSize:"0.825rem",color:"var(--muted)",marginBottom:"1.25rem",lineHeight:1.4},children:"Configure model and environment variables for the Aider session. API keys are saved locally in `.ai/neural-loom/aider.json` and are ignored by git."}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Anthropic API Key"}),(0,r.jsx)("input",{type:"password",value:v.anthropicApiKey,onChange:e=>j({...v,anthropicApiKey:e.target.value}),placeholder:v.anthropicApiKey?"••••••••••••••••":"sk-ant-...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"OpenAI API Key"}),(0,r.jsx)("input",{type:"password",value:v.openaiApiKey,onChange:e=>j({...v,openaiApiKey:e.target.value}),placeholder:v.openaiApiKey?"••••••••••••••••":"sk-...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Gemini API Key"}),(0,r.jsx)("input",{type:"password",value:v.geminiApiKey,onChange:e=>j({...v,geminiApiKey:e.target.value}),placeholder:v.geminiApiKey?"••••••••••••••••":"AIzaSy...",style:p})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Workspace Directory (Root)"}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:v.workspaceRoot,onChange:e=>j({...v,workspaceRoot:e.target.value}),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\neural-loom",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>I(!0),style:f,children:"Browse..."})]}),T.workspaces.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),T.workspaces.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>j({...v,workspaceRoot:e}),style:{background:"rgba(255,255,255,0.03)",border:"1px solid var(--border)",borderRadius:"3px",color:"var(--muted)",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:e.split(/[/\\]/).pop()||e},e))]}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"Leave blank to default to the current orchestrator directory."})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Scoped Directories (Additional Access)"}),v.scopedDirs.length>0&&(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",marginBottom:"0.5rem"},children:v.scopedDirs.map((e,o)=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"#080c14",padding:"0.35rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)"},children:[(0,r.jsx)("span",{style:{fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",wordBreak:"break-all"},children:e}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e=v.scopedDirs.filter((e,r)=>r!==o);j({...v,scopedDirs:e})},style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.8rem",padding:"0 0.25rem"},children:"Remove"})]},o))}),(0,r.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,r.jsx)("input",{type:"text",value:k,onChange:e=>S(e.target.value),placeholder:"e.g. C:\\Users\\Dave\\OneDrive\\Projects\\JS\\wingman",style:{...p,flex:1}}),(0,r.jsx)("button",{type:"button",onClick:()=>P(!0),style:f,children:"Browse..."}),(0,r.jsx)("button",{type:"button",onClick:()=>{k.trim()&&!v.scopedDirs.includes(k.trim())&&(j({...v,scopedDirs:[...v.scopedDirs,k.trim()]}),S(""))},style:{padding:"0.35rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(109, 40, 217, 0.1)",color:"var(--foreground)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},children:"Add"})]}),T.scopes.length>0&&(0,r.jsxs)("div",{style:{marginTop:"0.35rem",display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)"},children:"Recent:"}),T.scopes.filter(e=>!v.scopedDirs.includes(e)).map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{v.scopedDirs.includes(e)||j({...v,scopedDirs:[...v.scopedDirs,e]})},style:{background:"rgba(168, 85, 247, 0.05)",border:"1px solid rgba(168, 85, 247, 0.2)",borderRadius:"3px",color:"#c084fc",fontSize:"0.65rem",padding:"1px 6px",cursor:"pointer",fontFamily:"var(--font-mono)"},title:e,children:["+",e.split(/[/\\]/).pop()||e]},e))]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"AI Model Selection"}),(0,r.jsxs)("select",{value:v.model,onChange:e=>j({...v,model:e.target.value}),style:u,children:[(0,r.jsx)("option",{value:"claude-3-5-sonnet",children:"Claude 3.5 Sonnet (Recommended)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.5-flash",children:"Gemini 2.5 Flash (Recommended for Free Tier)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.5-pro",children:"Gemini 2.5 Pro (Requires Paid/Billing Tier)"}),(0,r.jsx)("option",{value:"gemini/gemini-2.0-flash-exp",children:"Gemini 2.0 Flash Exp"}),(0,r.jsx)("option",{value:"gemini/gemini-1.5-pro",children:"Gemini 1.5 Pro"}),(0,r.jsx)("option",{value:"gemini/gemini-1.5-flash",children:"Gemini 1.5 Flash"}),(0,r.jsx)("option",{value:"gpt-4o",children:"GPT-4o"}),(0,r.jsx)("option",{value:"deepseek/deepseek-coder",children:"DeepSeek Coder"}),(0,r.jsx)("option",{value:"gpt-4-turbo",children:"GPT-4 Turbo"})]})]}),(0,r.jsxs)("div",{style:d,children:[(0,r.jsx)("label",{style:c,children:"Extra CLI Flags (Optional)"}),(0,r.jsx)("input",{type:"text",value:v.extraFlags,onChange:e=>j({...v,extraFlags:e.target.value}),placeholder:"e.g. --no-git --auto-commits",style:p}),(0,r.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginTop:"0.25rem"},children:"Appended directly to the startup shell command."})]}),(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginTop:"0.25rem",marginBottom:"1.25rem"},children:[(0,r.jsx)("input",{type:"checkbox",id:"loadAllFiles",checked:v.loadAllFiles,onChange:e=>j({...v,loadAllFiles:e.target.checked}),style:{width:"16px",height:"16px",cursor:"pointer",accentColor:"var(--accent)"}}),(0,r.jsx)("label",{htmlFor:"loadAllFiles",style:{fontSize:"0.8rem",color:"var(--foreground)",cursor:"pointer",userSelect:"none"},children:"Load all files in root directory on startup"})]}),z&&(0,r.jsxs)("div",{style:m,children:["✗ ",z]})]}),(0,r.jsxs)("div",{style:g,children:[(0,r.jsx)("button",{onClick:e,style:h,disabled:A,children:"Cancel"}),(0,r.jsx)("button",{onClick:B,style:x,disabled:A,children:A?"Saving...":"Save & Launch Session"})]}),F&&(0,r.jsx)(t.default,{title:"Select Workspace Root",initialPath:v.workspaceRoot,onClose:()=>I(!1),onSelect:e=>j({...v,workspaceRoot:e})}),K&&(0,r.jsx)(t.default,{title:"Add Scoped Directory",initialPath:k,onClose:()=>P(!1),onSelect:e=>S(e)})]})})}])},9949,e=>{e.n(e.i(1663))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let t=e.r(32061);function n({reason:e,children:a}){if("u"<typeof window)throw Object.defineProperty(new t.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}},9885,(e,a,s)=>{"use strict";function t(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return t}})},52157,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return i}});let t=e.r(43476),n=e.r(74080),r=e.r(63599),l=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let a=r.workAsyncStorage.getStore();if(void 0===a)return null;let s=[];if(a.reactLoadableManifest&&e){let t=a.reactLoadableManifest;for(let a of e){if(!t[a])continue;let e=t[a].files;s.push(...e)}}if(0===s.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,t.jsx)(t.Fragment,{children:s.map(e=>{let s=`${a.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,t.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:a.nonce},e):((0,n.preload)(s,{as:"script",fetchPriority:"low",nonce:a.nonce}),null)})})}},69093,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let t=e.r(43476),n=e.r(71645),r=e.r(67585),l=e.r(52157);function o(e){return{default:e&&"default"in e?e.default:e}}let i={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},d=function(e){let a={...i,...e},s=(0,n.lazy)(()=>a.loader().then(o)),d=a.loading;function c(e){let o=d?(0,t.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!a.ssr||!!a.loading,c=i?n.Suspense:n.Fragment,u=a.ssr?(0,t.jsxs)(t.Fragment,{children:["u"<typeof window?(0,t.jsx)(l.PreloadChunks,{moduleIds:a.modules}):null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return n}});let t=e.r(55682)._(e.r(69093));function n(e,a){let s={};"function"==typeof e&&(s.loader=e);let n={...s,...a};return(0,t.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),a.exports=s.default)},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var a=e.i(43476),s=e.i(71645),t=e.i(70703),n=e.i(20897);let r=(0,t.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,a.jsx)("span",{children:"Initializing terminal emulator..."})})}),l=(0,t.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,a.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),o=(0,t.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),i=(0,t.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),d=(0,t.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),c=(0,t.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,t]=(0,s.useState)([]),[u,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1),[f,_]=(0,s.useState)(!1),[g,x]=(0,s.useState)(!1),[j,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[N,W]=(0,s.useState)(3001),[P,E]=(0,s.useState)("0.2.19"),[T,L]=(0,s.useState)(null),R=e.filter(e=>"workspace-terminal"!==e.id),A=e.find(e=>e.id===u),D=R.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),B=R.some(e=>"claude-ssh"===e.type&&"running"===e.status),I=async()=>{try{let e=await fetch("/api/sessions"),a=await e.json();a.sessions&&t(a.sessions),a.wsPort&&W(a.wsPort),a.originalCwd&&S(a.originalCwd),a.version&&E(a.version)}catch(e){console.error("Failed to fetch sessions:",e)}},O=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let a=await e.json();a.success&&a.recents&&a.recents.lastSession&&L(a.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}};(0,s.useEffect)(()=>{(async()=>{await I(),await O()})(),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(e=>console.log("Service Worker registered:",e.scope)).catch(e=>console.error("Service Worker registration failed:",e));let e=setInterval(I,4e3);return()=>clearInterval(e)},[]);let z=async(e,a,s,t)=>{h(!0);try{let n=a;n||("claude"===e?n="Claude Local":"claude-docker"===e?n="Claude Docker":"claude-ssh"===e?n="Claude SSH":"aider"===e?n="Aider Local":"aider-docker"===e?n="Aider Docker":"mock"===e&&(n="Mock Session"));let r={type:e,name:n,workspaceRoot:s,scopedDirs:t};if(("aider"===e||"aider-docker"===e)&&!s)try{let e=await fetch("/api/context/aider");if(e.ok){let a=await e.json();a.success&&a.config&&(r.workspaceRoot=a.config.workspaceRoot,r.scopedDirs=a.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let l=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),o=await l.json();o.success&&(await I(),p(o.session.id),L({type:e,name:n,workspaceRoot:s,scopedDirs:t}))}catch(e){console.error("Failed to launch session:",e)}finally{h(!1)}},M=async(e,a=!1)=>{try{let s=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:a})});(await s.json()).success&&(a&&u===e&&p(null),await I())}catch(e){console.error("Failed to stop session:",e)}};return(0,a.jsxs)("div",{className:`${n.default.container} ${A?n.default.containerActive:""}`,children:[(0,a.jsxs)("header",{className:n.default.header,children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1.5rem"},children:[(0,a.jsx)("img",{src:"/logo.png",alt:"NeuralLoom Logo",style:{width:"160px",height:"160px",borderRadius:"16px",objectFit:"contain"}}),(0,a.jsxs)("div",{className:n.default.logoArea,children:[(0,a.jsx)("h1",{className:n.default.title,style:{margin:0,lineHeight:1.1},children:"NeuralLoom"}),(0,a.jsx)("span",{className:n.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]})]}),(0,a.jsxs)("div",{className:n.default.statusIndicator,children:[(0,a.jsx)("span",{className:n.default.pulseDot}),(0,a.jsx)("span",{children:"Orchestrator Online"})]})]}),A?(0,a.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,a.jsx)(c,{sessionId:A.id,workspaceRoot:A.workspaceRoot||"",scopedDirs:A.scopedDirs||[],onClose:()=>p(null),sessions:e,onSwitchSession:e=>p(e),onRefreshSessions:I,wsPort:N})}):(0,a.jsxs)("div",{className:n.default.dashboardGrid,children:[(0,a.jsxs)("main",{className:n.default.mainPanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Active AI Agents"}),0===R.length?(0,a.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,a.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions in this workspace. Launch a Claude or Aider agent session to begin."}),(0,a.jsxs)("div",{style:{display:"flex",gap:"1rem",justifyContent:"center",flexWrap:"wrap"},children:[T&&(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{z(T.type,T.name,T.workspaceRoot,T.scopedDirs)},disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",maxWidth:"200px"},title:`Re-launch: ${T.name||T.type}`,children:"⚡ Re-launch Last Session"}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Claude PTY"}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Aider PTY"})]}),(0,a.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Want to verify layout features first?"," ",(0,a.jsx)("span",{onClick:()=>z("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start simulated sandbox session"})]})]}):(0,a.jsx)("div",{className:n.default.agentGrid,children:R.map(e=>(0,a.jsxs)("div",{className:`${n.default.agentCard} card ${u===e.id?n.default.activeBorder:""}`,children:[(0,a.jsxs)("div",{className:n.default.agentHeader,children:[(0,a.jsx)("span",{className:n.default.agentName,children:e.name}),(0,a.jsx)("span",{className:`${n.default.agentBadge} ${"stopped"===e.status?n.default.stoppedBadge:""}`,children:e.status})]}),(0,a.jsxs)("div",{className:n.default.cardBody,children:[(0,a.jsxs)("p",{style:{fontSize:"0.825rem",color:"var(--muted)"},children:["ID: ",(0,a.jsx)("code",{style:{fontSize:"0.75rem"},children:e.id.substring(0,8)}),(0,a.jsx)("br",{}),"Type: ","claude"===e.type?"Claude Local PTY":"claude-docker"===e.type?"Claude Docker PTY":"claude-ssh"===e.type?"Claude SSH PTY":"aider"===e.type?"Aider Local PTY":"aider-docker"===e.type?"Aider Docker PTY":"mock"===e.type?"Simulated Mock PTY":"Unknown PTY",(0,a.jsx)("br",{}),"Logs: ",e.logsCount," captured lines"]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:["running"===e.status?(0,a.jsx)("button",{onClick:()=>M(e.id,!1),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--danger)"},children:"Stop"}):(0,a.jsx)("button",{onClick:()=>M(e.id,!0),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},children:"Delete"}),(0,a.jsx)("button",{onClick:()=>p(e.id),style:{flex:2,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"none",backgroundColor:u===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff"},children:u===e.id?"Connected":"Open Session"})]})]})]},e.id))})]}),u&&"workspace-terminal"!==u&&(0,a.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)"},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console Bridge — ",e.find(e=>e.id===u)?.name]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===u)?.status==="stopped"&&(0,a.jsx)("button",{onClick:async()=>{try{let e=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u})});if(e.ok)await I();else{let a=await e.json();alert(a.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e),alert("Network error: failed to restart session.")}},style:{padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",boxShadow:"0 0 8px rgba(234, 179, 8, 0.2)"},title:"Restart the stopped session process runner",children:"⚡ Restart Session"}),(0,a.jsx)("button",{onClick:()=>p(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"Close Panel ✖"})]})]}),(0,a.jsx)(r,{sessionId:u,wsPort:N})]}),(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Workspace Shell Terminal"}),(0,a.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.85rem"},children:["💻 Local Workspace Shell (CWD: ",C||"root",")"]}),(0,a.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)"},children:"Pre-configured environment"})]}),(0,a.jsx)(r,{sessionId:"workspace-terminal",height:"300px",wsPort:N})]})]}),(0,a.jsxs)("section",{style:{marginTop:"2rem"},children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,a.jsxs)("div",{className:n.default.contextList,children:[(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Compiles AGENTS.md guidelines and project files folder hierarchy map."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccc"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"🚀 Mount Context (/ccc)"})]}),(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Executes instructions written in .ai/neural-loom/cprompt.md."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccp"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,a.jsx)(l,{})]})]}),(0,a.jsxs)("aside",{className:n.default.sidePanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Execution Environments"}),(0,a.jsxs)("div",{className:n.default.envGrid,children:[(0,a.jsxs)("div",{className:n.default.envRow,children:[(0,a.jsx)("span",{className:n.default.envName,children:"💻 Local host OS"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:D?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🐳 Docker Sandbox"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:D?"var(--success)":"var(--muted)"},children:D?"Active":"Not Mounted"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:B?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🌐 Remote VM (SSH)"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:B?"var(--success)":"var(--muted)"},children:B?"Active":"Disconnected"})]})]})]}),(0,a.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🤖"}),(0,a.jsx)("span",{children:"Launch Claude PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!0),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Docker PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>_(!0),disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🌐"}),(0,a.jsx)("span",{children:"Launch SSH PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐍"}),(0,a.jsx)("span",{children:"Launch Aider PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!0),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Aider Docker"})]})]}),(0,a.jsxs)("section",{className:"card",style:{padding:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsx)("h3",{style:{fontSize:"1rem",fontWeight:700},children:"Quick Actions"}),(0,a.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.875rem",display:"flex",flexDirection:"column",gap:"0.5rem",color:"var(--muted)"},children:[(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Configure global API Keys"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Edit rules templates"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Inspect process locks"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]}),(0,a.jsxs)("div",{style:{marginTop:"1.2rem",textAlign:"center",fontSize:"0.72rem",color:"var(--muted)"},children:["Need to troubleshoot?"," ",(0,a.jsx)("span",{onClick:()=>z("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Launch simulated playground sandbox"})]})]})]})]}),(0,a.jsxs)("footer",{className:n.default.footer,children:[(0,a.jsxs)("span",{children:["NeuralLoom v",P," — Experimental AI Orchestrator Bridge"]}),(0,a.jsxs)("span",{children:["Directory: ",C||"Loading..."]})]}),f&&(0,a.jsx)(o,{onClose:()=>_(!1),onConfirmLaunch:()=>{_(!1),z("claude-ssh")}}),g&&(0,a.jsx)(i,{onClose:()=>x(!1),isDocker:j,onConfirmLaunch:()=>{x(!1),z(j?"aider-docker":"aider")}}),b&&(0,a.jsx)(d,{onClose:()=>v(!1),isDocker:k,onConfirmLaunch:(e,a,s)=>{v(!1),z(k?"claude-docker":"claude",e,a,s)}})]})}])},33779,e=>{e.v(a=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/070hz362~_h8n.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(37314)))},39429,e=>{e.v(a=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(a=>e.l(a))).then(()=>a(1985)))},56915,e=>{e.v(a=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(a=>e.l(a))).then(()=>a(99026)))},78716,e=>{e.v(a=>Promise.all(["static/chunks/0k2co3uj4w81_.js"].map(a=>e.l(a))).then(()=>a(9949)))},33789,e=>{e.v(a=>Promise.all(["static/chunks/076_b43_kienv.js"].map(a=>e.l(a))).then(()=>a(20032)))},78003,e=>{e.v(a=>Promise.all(["static/chunks/0eidfx-s54367.js","static/chunks/070hz362~_h8n.js","static/chunks/0bclk7hf35ac4.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(97722)))}]);
package/.next/trace CHANGED
@@ -1 +1 @@
1
- [{"name":"generate-buildid","duration":214,"timestamp":26708793063,"id":4,"parentId":1,"tags":{},"startTime":1781506092992,"traceId":"237c1e8d010b0702"},{"name":"load-custom-routes","duration":337,"timestamp":26708793382,"id":5,"parentId":1,"tags":{},"startTime":1781506092992,"traceId":"237c1e8d010b0702"},{"name":"create-dist-dir","duration":537,"timestamp":26708793747,"id":6,"parentId":1,"tags":{},"startTime":1781506092993,"traceId":"237c1e8d010b0702"},{"name":"clean","duration":515,"timestamp":26708795117,"id":7,"parentId":1,"tags":{},"startTime":1781506092994,"traceId":"237c1e8d010b0702"},{"name":"discover-routes","duration":5993,"timestamp":26708817893,"id":8,"parentId":1,"tags":{},"startTime":1781506093017,"traceId":"237c1e8d010b0702"},{"name":"create-root-mapping","duration":58,"timestamp":26708823932,"id":9,"parentId":1,"tags":{},"startTime":1781506093023,"traceId":"237c1e8d010b0702"},{"name":"generate-route-types","duration":17261,"timestamp":26708825277,"id":10,"parentId":1,"tags":{},"startTime":1781506093024,"traceId":"237c1e8d010b0702"},{"name":"public-dir-conflict-check","duration":98,"timestamp":26708842675,"id":11,"parentId":1,"tags":{},"startTime":1781506093042,"traceId":"237c1e8d010b0702"},{"name":"generate-routes-manifest","duration":2480,"timestamp":26708842882,"id":12,"parentId":1,"tags":{},"startTime":1781506093042,"traceId":"237c1e8d010b0702"},{"name":"run-turbopack","duration":2306540,"timestamp":26708851735,"id":14,"parentId":1,"tags":{},"startTime":1781506093051,"traceId":"237c1e8d010b0702"},{"name":"turbopack-build-events","duration":61,"timestamp":26709137201,"id":15,"parentId":1,"tags":{},"startTime":1781506093336,"traceId":"237c1e8d010b0702"},{"name":"run-typescript","duration":3732933,"timestamp":26711166283,"id":16,"parentId":1,"tags":{},"startTime":1781506095365,"traceId":"237c1e8d010b0702"},{"name":"generate-required-server-files","duration":1422,"timestamp":26714900047,"id":18,"parentId":1,"tags":{},"startTime":1781506099099,"traceId":"237c1e8d010b0702"},{"name":"check-static-error-page","duration":7472,"timestamp":26715014203,"id":20,"parentId":19,"tags":{},"startTime":1781506099213,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":523929,"timestamp":26715026200,"id":40,"parentId":22,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":532572,"timestamp":26715017678,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781506099217,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":615166,"timestamp":26715026306,"id":41,"parentId":23,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":623546,"timestamp":26715018006,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781506099217,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":615570,"timestamp":26715026798,"id":45,"parentId":27,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":623592,"timestamp":26715018821,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781506099218,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":626032,"timestamp":26715025961,"id":39,"parentId":21,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":635651,"timestamp":26715016389,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781506099215,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":633676,"timestamp":26715026473,"id":43,"parentId":25,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":641754,"timestamp":26715018448,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781506099217,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":634377,"timestamp":26715026387,"id":42,"parentId":24,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":642564,"timestamp":26715018243,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781506099217,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":641786,"timestamp":26715030818,"id":56,"parentId":38,"tags":{},"startTime":1781506099230,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":651297,"timestamp":26715021364,"id":38,"parentId":19,"tags":{"page":"/"},"startTime":1781506099220,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":646444,"timestamp":26715026564,"id":44,"parentId":26,"tags":{},"startTime":1781506099225,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":654408,"timestamp":26715018634,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781506099218,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":648178,"timestamp":26715027720,"id":52,"parentId":34,"tags":{},"startTime":1781506099227,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":655703,"timestamp":26715020245,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781506099219,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":651690,"timestamp":26715027650,"id":51,"parentId":33,"tags":{},"startTime":1781506099227,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":659324,"timestamp":26715020057,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781506099219,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":654889,"timestamp":26715026949,"id":46,"parentId":28,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":662854,"timestamp":26715019032,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781506099218,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":657144,"timestamp":26715027064,"id":47,"parentId":29,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":665006,"timestamp":26715019236,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781506099218,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":658843,"timestamp":26715027764,"id":53,"parentId":35,"tags":{},"startTime":1781506099227,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":666148,"timestamp":26715020521,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781506099219,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":659363,"timestamp":26715027430,"id":49,"parentId":31,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":667160,"timestamp":26715019655,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781506099219,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":661547,"timestamp":26715027502,"id":50,"parentId":32,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":669212,"timestamp":26715019863,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781506099219,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":662878,"timestamp":26715028017,"id":55,"parentId":37,"tags":{},"startTime":1781506099227,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":669750,"timestamp":26715021171,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781506099220,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":664861,"timestamp":26715027290,"id":48,"parentId":30,"tags":{},"startTime":1781506099226,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":672743,"timestamp":26715019436,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781506099218,"traceId":"237c1e8d010b0702"},{"name":"is-page-static","duration":665390,"timestamp":26715027948,"id":54,"parentId":36,"tags":{},"startTime":1781506099227,"traceId":"237c1e8d010b0702"},{"name":"check-page","duration":672429,"timestamp":26715020934,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781506099220,"traceId":"237c1e8d010b0702"},{"name":"static-check","duration":679790,"timestamp":26715013596,"id":19,"parentId":1,"tags":{},"startTime":1781506099213,"traceId":"237c1e8d010b0702"},{"name":"write-routes-manifest","duration":805,"timestamp":26715694442,"id":58,"parentId":1,"tags":{},"startTime":1781506099893,"traceId":"237c1e8d010b0702"},{"name":"load-dotenv","duration":40,"timestamp":26715715473,"id":61,"parentId":60,"tags":{},"startTime":1781506099914,"traceId":"237c1e8d010b0702"},{"name":"run-export-path-map","duration":631,"timestamp":26715721604,"id":62,"parentId":60,"tags":{},"startTime":1781506099921,"traceId":"237c1e8d010b0702"},{"name":"next-export","duration":642068,"timestamp":26715714290,"id":60,"parentId":1,"tags":{},"startTime":1781506099913,"traceId":"237c1e8d010b0702"},{"name":"move-exported-app-not-found-","duration":1954,"timestamp":26716357814,"id":63,"parentId":59,"tags":{},"startTime":1781506100557,"traceId":"237c1e8d010b0702"},{"name":"move-exported-app-global-error-","duration":1467,"timestamp":26716359863,"id":64,"parentId":59,"tags":{},"startTime":1781506100559,"traceId":"237c1e8d010b0702"},{"name":"static-generation","duration":663246,"timestamp":26715700869,"id":59,"parentId":1,"tags":{},"startTime":1781506099900,"traceId":"237c1e8d010b0702"},{"name":"write-routes-manifest","duration":727,"timestamp":26716364207,"id":65,"parentId":1,"tags":{},"startTime":1781506100563,"traceId":"237c1e8d010b0702"},{"name":"print-tree-view","duration":3519,"timestamp":26716380676,"id":66,"parentId":1,"tags":{},"startTime":1781506100580,"traceId":"237c1e8d010b0702"},{"name":"write-route-bundle-stats","duration":10265,"timestamp":26716384231,"id":67,"parentId":1,"tags":{},"startTime":1781506100583,"traceId":"237c1e8d010b0702"},{"name":"telemetry-flush","duration":171689,"timestamp":26716394528,"id":68,"parentId":1,"tags":{},"startTime":1781506100593,"traceId":"237c1e8d010b0702"},{"name":"next-build","duration":7820715,"timestamp":26708745526,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781506092944,"traceId":"237c1e8d010b0702"}]
1
+ [{"name":"generate-buildid","duration":204,"timestamp":35424708463,"id":4,"parentId":1,"tags":{},"startTime":1781514808907,"traceId":"3c29c73db0290c04"},{"name":"load-custom-routes","duration":380,"timestamp":35424708772,"id":5,"parentId":1,"tags":{},"startTime":1781514808908,"traceId":"3c29c73db0290c04"},{"name":"create-dist-dir","duration":516,"timestamp":35424709186,"id":6,"parentId":1,"tags":{},"startTime":1781514808908,"traceId":"3c29c73db0290c04"},{"name":"clean","duration":588,"timestamp":35424710607,"id":7,"parentId":1,"tags":{},"startTime":1781514808910,"traceId":"3c29c73db0290c04"},{"name":"discover-routes","duration":6837,"timestamp":35424734185,"id":8,"parentId":1,"tags":{},"startTime":1781514808933,"traceId":"3c29c73db0290c04"},{"name":"create-root-mapping","duration":74,"timestamp":35424741070,"id":9,"parentId":1,"tags":{},"startTime":1781514808940,"traceId":"3c29c73db0290c04"},{"name":"generate-route-types","duration":17967,"timestamp":35424742441,"id":10,"parentId":1,"tags":{},"startTime":1781514808941,"traceId":"3c29c73db0290c04"},{"name":"public-dir-conflict-check","duration":100,"timestamp":35424760542,"id":11,"parentId":1,"tags":{},"startTime":1781514808959,"traceId":"3c29c73db0290c04"},{"name":"generate-routes-manifest","duration":2495,"timestamp":35424760756,"id":12,"parentId":1,"tags":{},"startTime":1781514808960,"traceId":"3c29c73db0290c04"},{"name":"run-turbopack","duration":2394848,"timestamp":35424770650,"id":14,"parentId":1,"tags":{},"startTime":1781514808970,"traceId":"3c29c73db0290c04"},{"name":"turbopack-build-events","duration":69,"timestamp":35425070075,"id":15,"parentId":1,"tags":{},"startTime":1781514809269,"traceId":"3c29c73db0290c04"},{"name":"run-typescript","duration":3902320,"timestamp":35427175312,"id":16,"parentId":1,"tags":{},"startTime":1781514811374,"traceId":"3c29c73db0290c04"},{"name":"generate-required-server-files","duration":1263,"timestamp":35431078496,"id":18,"parentId":1,"tags":{},"startTime":1781514815277,"traceId":"3c29c73db0290c04"},{"name":"check-static-error-page","duration":6152,"timestamp":35431194806,"id":20,"parentId":19,"tags":{},"startTime":1781514815394,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":497179,"timestamp":35431205233,"id":40,"parentId":22,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":505124,"timestamp":35431197407,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781514815396,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":629276,"timestamp":35431205567,"id":45,"parentId":27,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":636481,"timestamp":35431198429,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781514815397,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":641111,"timestamp":35431205332,"id":42,"parentId":24,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":648581,"timestamp":35431197915,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781514815397,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":642193,"timestamp":35431204990,"id":39,"parentId":21,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":651030,"timestamp":35431196195,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781514815395,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":647314,"timestamp":35431205414,"id":44,"parentId":26,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":654517,"timestamp":35431198263,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781514815397,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":654019,"timestamp":35431205375,"id":43,"parentId":25,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":661354,"timestamp":35431198099,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781514815397,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":654879,"timestamp":35431205699,"id":46,"parentId":28,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":662008,"timestamp":35431198620,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":655973,"timestamp":35431205289,"id":41,"parentId":23,"tags":{},"startTime":1781514815404,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":663584,"timestamp":35431197719,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781514815397,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":651799,"timestamp":35431209858,"id":56,"parentId":38,"tags":{},"startTime":1781514815409,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":661015,"timestamp":35431200673,"id":38,"parentId":19,"tags":{"page":"/"},"startTime":1781514815400,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":656435,"timestamp":35431205800,"id":47,"parentId":29,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":663473,"timestamp":35431198800,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":658501,"timestamp":35431206274,"id":49,"parentId":31,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":665654,"timestamp":35431199157,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":662621,"timestamp":35431205989,"id":48,"parentId":30,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":669678,"timestamp":35431198972,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":664171,"timestamp":35431206365,"id":50,"parentId":32,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":671260,"timestamp":35431199316,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":664545,"timestamp":35431206431,"id":51,"parentId":33,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":671535,"timestamp":35431199475,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781514815398,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":665252,"timestamp":35431206641,"id":54,"parentId":36,"tags":{},"startTime":1781514815406,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":671628,"timestamp":35431200294,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781514815399,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":670531,"timestamp":35431206545,"id":52,"parentId":34,"tags":{},"startTime":1781514815405,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":677473,"timestamp":35431199640,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781514815399,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":671513,"timestamp":35431206679,"id":55,"parentId":37,"tags":{},"startTime":1781514815406,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":677727,"timestamp":35431200498,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781514815399,"traceId":"3c29c73db0290c04"},{"name":"is-page-static","duration":674319,"timestamp":35431206598,"id":53,"parentId":35,"tags":{},"startTime":1781514815406,"traceId":"3c29c73db0290c04"},{"name":"check-page","duration":681036,"timestamp":35431199917,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781514815399,"traceId":"3c29c73db0290c04"},{"name":"static-check","duration":686594,"timestamp":35431194390,"id":19,"parentId":1,"tags":{},"startTime":1781514815393,"traceId":"3c29c73db0290c04"},{"name":"write-routes-manifest","duration":780,"timestamp":35431881898,"id":58,"parentId":1,"tags":{},"startTime":1781514816081,"traceId":"3c29c73db0290c04"},{"name":"load-dotenv","duration":29,"timestamp":35431896437,"id":61,"parentId":60,"tags":{},"startTime":1781514816095,"traceId":"3c29c73db0290c04"},{"name":"run-export-path-map","duration":393,"timestamp":35431901171,"id":62,"parentId":60,"tags":{},"startTime":1781514816100,"traceId":"3c29c73db0290c04"},{"name":"next-export","duration":616946,"timestamp":35431895577,"id":60,"parentId":1,"tags":{},"startTime":1781514816094,"traceId":"3c29c73db0290c04"},{"name":"move-exported-app-not-found-","duration":1837,"timestamp":35432514246,"id":63,"parentId":59,"tags":{},"startTime":1781514816713,"traceId":"3c29c73db0290c04"},{"name":"move-exported-app-global-error-","duration":1474,"timestamp":35432516174,"id":64,"parentId":59,"tags":{},"startTime":1781514816715,"traceId":"3c29c73db0290c04"},{"name":"static-generation","duration":634141,"timestamp":35431886584,"id":59,"parentId":1,"tags":{},"startTime":1781514816085,"traceId":"3c29c73db0290c04"},{"name":"write-routes-manifest","duration":899,"timestamp":35432520840,"id":65,"parentId":1,"tags":{},"startTime":1781514816720,"traceId":"3c29c73db0290c04"},{"name":"print-tree-view","duration":3219,"timestamp":35432535190,"id":66,"parentId":1,"tags":{},"startTime":1781514816734,"traceId":"3c29c73db0290c04"},{"name":"write-route-bundle-stats","duration":6016,"timestamp":35432538441,"id":67,"parentId":1,"tags":{},"startTime":1781514816737,"traceId":"3c29c73db0290c04"},{"name":"telemetry-flush","duration":177868,"timestamp":35432544496,"id":68,"parentId":1,"tags":{},"startTime":1781514816743,"traceId":"3c29c73db0290c04"},{"name":"next-build","duration":8064259,"timestamp":35424658130,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781514808857,"traceId":"3c29c73db0290c04"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":2306540,"timestamp":26708851735,"id":14,"parentId":1,"tags":{},"startTime":1781506093051,"traceId":"237c1e8d010b0702"},{"name":"turbopack-build-events","duration":61,"timestamp":26709137201,"id":15,"parentId":1,"tags":{},"startTime":1781506093336,"traceId":"237c1e8d010b0702"},{"name":"run-typescript","duration":3732933,"timestamp":26711166283,"id":16,"parentId":1,"tags":{},"startTime":1781506095365,"traceId":"237c1e8d010b0702"},{"name":"static-check","duration":679790,"timestamp":26715013596,"id":19,"parentId":1,"tags":{},"startTime":1781506099213,"traceId":"237c1e8d010b0702"},{"name":"static-generation","duration":663246,"timestamp":26715700869,"id":59,"parentId":1,"tags":{},"startTime":1781506099900,"traceId":"237c1e8d010b0702"},{"name":"telemetry-flush","duration":171689,"timestamp":26716394528,"id":68,"parentId":1,"tags":{},"startTime":1781506100593,"traceId":"237c1e8d010b0702"},{"name":"next-build","duration":7820715,"timestamp":26708745526,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781506092944,"traceId":"237c1e8d010b0702"}]
1
+ [{"name":"run-turbopack","duration":2394848,"timestamp":35424770650,"id":14,"parentId":1,"tags":{},"startTime":1781514808970,"traceId":"3c29c73db0290c04"},{"name":"turbopack-build-events","duration":69,"timestamp":35425070075,"id":15,"parentId":1,"tags":{},"startTime":1781514809269,"traceId":"3c29c73db0290c04"},{"name":"run-typescript","duration":3902320,"timestamp":35427175312,"id":16,"parentId":1,"tags":{},"startTime":1781514811374,"traceId":"3c29c73db0290c04"},{"name":"static-check","duration":686594,"timestamp":35431194390,"id":19,"parentId":1,"tags":{},"startTime":1781514815393,"traceId":"3c29c73db0290c04"},{"name":"static-generation","duration":634141,"timestamp":35431886584,"id":59,"parentId":1,"tags":{},"startTime":1781514816085,"traceId":"3c29c73db0290c04"},{"name":"telemetry-flush","duration":177868,"timestamp":35432544496,"id":68,"parentId":1,"tags":{},"startTime":1781514816743,"traceId":"3c29c73db0290c04"},{"name":"next-build","duration":8064259,"timestamp":35424658130,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781514808857,"traceId":"3c29c73db0290c04"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neural-loom",
3
- "version": "0.2.44",
3
+ "version": "0.2.46",
4
4
  "bin": {
5
5
  "neural-loom": "./bin/cli.js"
6
6
  },
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
 
5
- import { getConfigDir } from "@/lib/config";
5
+ import { getConfigDir, getDefaultWorkspaceRoot } from "@/lib/config";
6
6
 
7
7
  const configDir = getConfigDir();
8
8
  const configPath = path.join(configDir, "aider.json");
@@ -56,6 +56,8 @@ export async function GET() {
56
56
  // Merge scopedDirs, filtering out duplicates
57
57
  const mergedScopes = Array.from(new Set([...scopedDirs, ...wsFolders]));
58
58
 
59
+ const defaultWorkspaceRoot = getDefaultWorkspaceRoot();
60
+
59
61
  return NextResponse.json({
60
62
  success: true,
61
63
  config: {
@@ -67,6 +69,7 @@ export async function GET() {
67
69
  workspaceRoot,
68
70
  scopedDirs: mergedScopes,
69
71
  loadAllFiles,
72
+ defaultWorkspaceRoot,
70
73
  },
71
74
  });
72
75
  } catch (error) {
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
 
5
- import { getConfigDir } from "@/lib/config";
5
+ import { getConfigDir, getDefaultWorkspaceRoot } from "@/lib/config";
6
6
 
7
7
  const configDir = getConfigDir();
8
8
  const configPath = path.join(configDir, "claude.json");
@@ -42,6 +42,8 @@ export async function GET() {
42
42
  // Merge scopedDirs, filtering out duplicates
43
43
  const mergedScopes = Array.from(new Set([...scopedDirs, ...wsFolders]));
44
44
 
45
+ const defaultWorkspaceRoot = getDefaultWorkspaceRoot();
46
+
45
47
  return NextResponse.json({
46
48
  success: true,
47
49
  config: {
@@ -49,6 +51,7 @@ export async function GET() {
49
51
  workspaceRoot,
50
52
  scopedDirs: mergedScopes,
51
53
  extraFlags,
54
+ defaultWorkspaceRoot,
52
55
  },
53
56
  });
54
57
  } catch (error) {
@@ -54,7 +54,7 @@ export default function AiderWizard({ onClose, onConfirmLaunch, isDocker }: Aide
54
54
  geminiApiKey: data.config.geminiApiKey || "",
55
55
  model: data.config.model || "claude-3-5-sonnet",
56
56
  extraFlags: data.config.extraFlags || "",
57
- workspaceRoot: data.config.workspaceRoot || "",
57
+ workspaceRoot: data.config.workspaceRoot || data.config.defaultWorkspaceRoot || "",
58
58
  scopedDirs: data.config.scopedDirs || [],
59
59
  loadAllFiles: data.config.loadAllFiles !== false,
60
60
  });
@@ -42,7 +42,7 @@ export default function ClaudeWizard({ onClose, onConfirmLaunch, isDocker }: Cla
42
42
  if (data.success && data.config) {
43
43
  setConfig({
44
44
  name: data.config.name || (isDocker ? "Claude Docker" : "Claude Local"),
45
- workspaceRoot: data.config.workspaceRoot || "",
45
+ workspaceRoot: data.config.workspaceRoot || data.config.defaultWorkspaceRoot || "",
46
46
  scopedDirs: data.config.scopedDirs || [],
47
47
  extraFlags: data.config.extraFlags || "",
48
48
  });
package/src/app/page.tsx CHANGED
@@ -145,19 +145,11 @@ export default function Home() {
145
145
  };
146
146
  initFetch();
147
147
 
148
- // Unregister any active Service Workers to disable PWA interceptions
148
+ // Register PWA Service Worker for standalone taskbar icon installation
149
149
  if ('serviceWorker' in navigator) {
150
- navigator.serviceWorker.getRegistrations().then((registrations) => {
151
- for (const registration of registrations) {
152
- registration.unregister()
153
- .then((success) => {
154
- if (success) {
155
- console.log('Service Worker unregistered successfully.');
156
- }
157
- })
158
- .catch((err) => console.error('Failed to unregister Service Worker:', err));
159
- }
160
- });
150
+ navigator.serviceWorker.register('/sw.js')
151
+ .then((reg) => console.log('Service Worker registered:', reg.scope))
152
+ .catch((err) => console.error('Service Worker registration failed:', err));
161
153
  }
162
154
 
163
155
  const interval = setInterval(fetchSessions, 4000);
@@ -1,12 +1,27 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
+ import { isDirWritable } from "../config";
3
4
 
4
5
  export class ContextManager {
6
+ private static writableCache = new Map<string, boolean>();
7
+
8
+ private static isWritable(root: string): boolean {
9
+ if (this.writableCache.has(root)) {
10
+ return this.writableCache.get(root)!;
11
+ }
12
+ const res = isDirWritable(root);
13
+ this.writableCache.set(root, res);
14
+ return res;
15
+ }
16
+
5
17
  private static get workspaceRoot(): string {
6
18
  return process.env.ORIGINAL_CWD || process.cwd();
7
19
  }
8
20
 
9
21
  private static ensureDirs(root: string) {
22
+ if (!this.isWritable(root)) {
23
+ return;
24
+ }
10
25
  try {
11
26
  const aiDir = path.join(root, ".ai", "neural-loom");
12
27
  if (!fs.existsSync(aiDir)) {
@@ -23,6 +38,9 @@ export class ContextManager {
23
38
  }
24
39
 
25
40
  public static initializeStaging(root: string = process.env.ORIGINAL_CWD || process.cwd()) {
41
+ if (!this.isWritable(root)) {
42
+ return;
43
+ }
26
44
  try {
27
45
  this.ensureDirs(root);
28
46
 
@@ -49,6 +67,9 @@ export class ContextManager {
49
67
  }
50
68
 
51
69
  public static updatePrompt(promptText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {
70
+ if (!this.isWritable(root)) {
71
+ return;
72
+ }
52
73
  try {
53
74
  this.ensureDirs(root);
54
75
  const promptFile = path.join(root, ".ai", "neural-loom", "cprompt.md");
@@ -59,6 +80,9 @@ export class ContextManager {
59
80
  }
60
81
 
61
82
  public static updateContext(contextText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {
83
+ if (!this.isWritable(root)) {
84
+ return;
85
+ }
62
86
  try {
63
87
  this.ensureDirs(root);
64
88
  const contextFile = path.join(root, ".ai", "neural-loom", "ccontext.md");
@@ -69,6 +93,9 @@ export class ContextManager {
69
93
  }
70
94
 
71
95
  public static updateRules(rulesText: string, root: string = process.env.ORIGINAL_CWD || process.cwd()) {
96
+ if (!this.isWritable(root)) {
97
+ return;
98
+ }
72
99
  try {
73
100
  this.ensureDirs(root);
74
101
  const agentsMdPath = path.join(root, "AGENTS.md");
@@ -93,6 +120,9 @@ export class ContextManager {
93
120
  }
94
121
 
95
122
  public static compileSessionContext(root: string = process.env.ORIGINAL_CWD || process.cwd(), scopedDirs?: string[]) {
123
+ if (!this.isWritable(root)) {
124
+ return;
125
+ }
96
126
  try {
97
127
  this.ensureDirs(root);
98
128
  this.initializeStaging(root);