@neuralnomads/codenomad-dev 0.18.0-dev-20260727-269cff64 → 0.18.0-dev-20260804-c16cc005

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 (50) hide show
  1. package/dist/background-processes/manager.js +15 -30
  2. package/dist/background-processes/manager.test.js +123 -0
  3. package/dist/index.js +2 -2
  4. package/dist/server/__tests__/listener-retry.test.js +15 -0
  5. package/dist/server/http-server.js +7 -7
  6. package/dist/workspaces/instance-client.js +6 -5
  7. package/dist/workspaces/instance-client.test.js +149 -0
  8. package/dist/workspaces/instance-events.js +2 -2
  9. package/dist/workspaces/loopback.js +8 -0
  10. package/dist/workspaces/manager.js +24 -8
  11. package/dist/workspaces/manager.test.js +55 -10
  12. package/package.json +1 -1
  13. package/public/assets/FilesTab-PxqWVPyo.js +2 -0
  14. package/public/assets/{GitChangesTab-COJ_xDva.js → GitChangesTab-CBKL5IdG.js} +1 -1
  15. package/public/assets/{SplitFilePanel-B5nrgBs3.js → SplitFilePanel-DaqtU5jw.js} +1 -1
  16. package/public/assets/StatusTab-B-z6yiGA.js +1 -0
  17. package/public/assets/{align-justify-CKDczyVy.js → align-justify-D8zzAQxs.js} +1 -1
  18. package/public/assets/{diff-viewer-drQ_Yje8.js → diff-viewer-BU6juksj.js} +1 -1
  19. package/public/assets/index-7b0Woxv7.js +1 -0
  20. package/public/assets/{index-Bt9PdFAD.css → index-B7bZsUV8.css} +1 -1
  21. package/public/assets/index-BnIGFV9i.js +1 -0
  22. package/public/assets/index-Bwil2k-o.js +1 -0
  23. package/public/assets/index-Cct6SfHO.js +1 -0
  24. package/public/assets/index-CfcsvGZu.js +1 -0
  25. package/public/assets/index-CzxPTjaX.js +1 -0
  26. package/public/assets/index-DMYv1E9L.js +2 -0
  27. package/public/assets/index-FXydT52m.js +1 -0
  28. package/public/assets/index-ZBLywF20.js +1 -0
  29. package/public/assets/{loading-Cz4dKVP8.js → loading-Bdrg1dVr.js} +1 -1
  30. package/public/assets/main-oNL0VKfF.js +69 -0
  31. package/public/assets/{markdown-DUHZyBXo.js → markdown-BwpQkztY.js} +1 -1
  32. package/public/assets/{tool-call-C7FlzFBf.js → tool-call-BOKqxL44.js} +3 -3
  33. package/public/assets/unified-picker-DoMT5Ia8.js +1 -0
  34. package/public/assets/{wrap-text-CS5K8Uhi.js → wrap-text-CJPfwppv.js} +1 -1
  35. package/public/index.html +3 -3
  36. package/public/loading.html +3 -3
  37. package/public/sw.js +1 -1
  38. package/public/assets/FilesTab-pl_3_Ppx.js +0 -2
  39. package/public/assets/StatusTab-rXgEwwYW.js +0 -1
  40. package/public/assets/index-BymyGk2C.js +0 -1
  41. package/public/assets/index-CEIEYgCg.js +0 -1
  42. package/public/assets/index-Cqo6ftJT.js +0 -1
  43. package/public/assets/index-Cs1fQOLl.js +0 -1
  44. package/public/assets/index-CwhvpTeE.js +0 -1
  45. package/public/assets/index-D0xuNxlo.js +0 -2
  46. package/public/assets/index-D1HW4nyh.js +0 -1
  47. package/public/assets/index-DBw0YE-2.js +0 -1
  48. package/public/assets/index-OYNGtp3z.js +0 -1
  49. package/public/assets/main-BEYytlgD.js +0 -68
  50. package/public/assets/unified-picker-CpU6qugd.js +0 -1
@@ -1 +0,0 @@
1
- import{t as v,i as o,m as S,a as A,d as W,u as ye,j as we,k as Ae,f as We}from"./monaco-viewer-CiFg18Ak.js";import{d as b,o as pe,b as q,c as qe,n as f,S as g,F as ne,a as j}from"./git-diff-vendor-CYS3ApzA.js";import{u as je}from"./index-D0xuNxlo.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var Be=v("<span class=ml-2>"),Ue=v("<div class=dropdown-empty>"),ie=v("<div class=dropdown-section-header>"),He=v('<div><div class="flex items-center gap-2 text-sm"><svg class="dropdown-icon h-4 w-4 text-blue-500"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg><span class=font-mono>. '),Ve=v('<div class="dropdown-surface bottom-full left-0 mb-1"><div class=dropdown-header><div class=dropdown-header-title></div></div><div class="dropdown-content max-h-60 overflow-x-auto"></div><div class=dropdown-footer><div><span class=font-medium>↑↓</span> <!> • <span class=font-medium>Tab/Enter</span> <!> • <span class=font-medium>Esc</span> '),$e=v('<div class="mt-0.5 text-xs"style=color:var(--text-muted)>'),Ge=v('<div><div class="flex items-start gap-2"><svg class="dropdown-icon-accent h-4 w-4 mt-0.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M4 6h16M4 12h16M4 18h16"></path></svg><div class=flex-1><div class="text-sm font-medium">/'),Ke=v("<span class=dropdown-badge>"),Ne=v('<div><div class="flex items-start gap-2"><svg class="dropdown-icon-accent h-4 w-4 mt-0.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg><div class=flex-1><div class="flex items-center gap-2"><span class="text-sm font-medium">'),Oe=v('<svg class="dropdown-icon-accent h-4 w-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z">'),Je=v('<div><div class="flex min-w-full w-max items-center gap-2 text-sm"><span class=whitespace-nowrap>'),Xe=v('<svg class="dropdown-icon h-4 w-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z">');const _e=Ae("actions"),Ye=100,Ze=200;function et(t,s){if(!s)return t;const c=t.replace(/\/+$/,"");return c.length>0?`${c}/`:"./"}function tt(t){return t==="."||t==="./"||t==="/"}function nt(t,s){if(tt(t))return".";const c=t.replace(/^\.\/+/,"");return s?c.replace(/\/+$/,"")||".":c}function re(t){const s=t.trim();return s?s.replace(/^(\.\/)+/,"").replace(/^\/+/,""):""}function xe(t){return t.map(s=>{const c=s.type==="directory";return{path:et(s.path,c),relativePath:nt(s.path,c),isDirectory:c,isGitFile:!1}})}const ct=t=>{const{t:s}=je(),c=()=>t.mode??"mention",[M,le]=b([]),[B,Ce]=b([]),[k,w]=b(0),[U,I]=b("idle"),[H,V]=b([]),[Se,oe]=b(!1),[se,G]=b(null);let P,L,K=null,N="",O="",T=null,F=null,z=0,E=null;function J(){setTimeout(()=>{L&&(L.scrollTop=0)},0)}function X(e){le(e),w(0),J()}async function be(e){return T===e&&F||(T=e,F=we.listWorkspaceFiles(e).then(n=>xe(n)).then(n=>(V(n),G(e),n)).catch(n=>{throw _e.error("[UnifiedPicker] Failed to load workspace files:",n),V([]),G(null),n}).finally(()=>{T===e&&(T=null,F=null)})),F}async function Pe(e){return se()===e&&H().length>0?H():be(e)}async function ce(e,n){const r=re(e),l=++z,_=!r&&se()===n&&H().length>0,x=r?"search":_?"idle":"listing";I(x!=="idle"?x:"idle");try{if(!r){const te=await Pe(n);if(!Z(l,n))return;X(te);return}const Q=await we.searchWorkspaceFiles(n,r,{limit:Ye});if(!Z(l,n))return;X(xe(Q))}catch(Q){n===t.workspaceId&&(_e.error("[UnifiedPicker] Failed to fetch files:",Q),Z(l,n)&&X([]))}finally{Ee(l,n)&&I("idle")}}function Y(){E&&(clearTimeout(E),E=null)}function Fe(e,n,r=!1){Y();const l=re(e);if(!r&&l.length>0){E=setTimeout(()=>{E=null,ce(e,n)},Ze);return}ce(e,n)}function Z(e,n){return t.open&&n===t.workspaceId&&e===z}function Ee(e,n){return n===t.workspaceId&&e===z}function Qe(){Y(),le([]),V([]),G(null),oe(!1),w(0),I("idle"),K=null,N="",O="",z=0}pe(()=>{Y()}),q(()=>{if(!t.open){Qe();return}if(c()!=="mention")return;const e=K!==t.workspaceId,n=N!==t.searchQuery;if(n&&(w(0),J()),!Se()||e||n){oe(!0),K=t.workspaceId,N=t.searchQuery;const r=e||re(t.searchQuery).length===0;Fe(t.searchQuery,t.workspaceId,r)}}),q(()=>{if(!t.open||c()!=="mention")return;const e=t.searchQuery.toLowerCase(),n=t.agents.filter(l=>!l.hidden),r=e?n.filter(l=>l.name.toLowerCase().includes(e)||l.description&&l.description.toLowerCase().includes(e)):n;Ce(r)});const R=qe(()=>{if(c()!=="command")return[];const e=t.searchQuery.trim().toLowerCase(),n=t.commands??[];return e?n.filter(r=>{const l=r.name.toLowerCase().includes(e),_=(r.description??"").toLowerCase().includes(e);return l||_}):n});q(()=>{if(!t.open||c()!=="command")return;const e=t.searchQuery,n=R().length;if(e!==O){O=e,w(0),J();return}if(n<=0){k()!==0&&w(0);return}const r=k();if(r<0){w(0);return}r>=n&&w(n-1)});const ee=()=>{const e=[];if(c()==="command")return R().forEach(r=>e.push({type:"command",command:r})),e;const n=t.searchQuery==="."||t.searchQuery==="./";if(c()==="mention"&&n){const r={path:".",relativePath:".",isDirectory:!0,isGitFile:!1};e.push({type:"file",file:r})}return n||B().forEach(r=>e.push({type:"agent",agent:r})),M().forEach(r=>e.push({type:"file",file:r})),e};function ae(){setTimeout(()=>{const e=P==null?void 0:P.querySelector('[data-picker-selected="true"]');e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})},0)}function de(e){var r;if(!t.open)return;const n=ee();if(e.key==="ArrowDown")e.preventDefault(),e.stopPropagation(),w(l=>Math.min(l+1,n.length-1)),ae();else if(e.key==="ArrowUp")e.preventDefault(),e.stopPropagation(),w(l=>Math.max(l-1,0)),ae();else if(e.key==="Enter"||e.key==="Tab"){e.preventDefault(),e.stopPropagation();const l=n[k()];if(l){const _=e.key==="Tab"?"tab":e.shiftKey?"shiftEnter":"enter";t.onSelect(l,_)}else e.key==="Enter"&&c()==="mention"&&((r=t.onSubmitWithoutSelection)==null||r.call(t))}else e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),t.onClose())}q(()=>{t.open&&(document.addEventListener("keydown",de),pe(()=>{document.removeEventListener("keydown",de)}))});const ue=()=>R().length,fe=()=>B().length,he=()=>M().length,De=()=>c()==="mention"&&U()!=="idle",Me=()=>U()==="search"?s("unifiedPicker.loading.searching"):U()==="listing"?s("unifiedPicker.loading.loadingWorkspace"):"";return f(g,{get when(){return t.open},get children(){var e=Ve(),n=e.firstChild,r=n.firstChild,l=n.nextSibling,_=l.nextSibling,x=_.firstChild,Q=x.firstChild,te=Q.nextSibling,me=te.nextSibling,Ie=me.nextSibling,Le=Ie.nextSibling,Te=Le.nextSibling,ge=Te.nextSibling,ze=ge.nextSibling,Re=ze.nextSibling;Re.nextSibling;var ve=P;typeof ve=="function"?ye(ve,e):P=e,o(r,f(g,{get when(){return c()==="command"},get fallback(){return s("unifiedPicker.title.mention")},get children(){return s("unifiedPicker.title.command")}}),null),o(r,f(g,{get when(){return De()},get children(){var i=Be();return o(i,Me),i}}),null);var ke=L;return typeof ke=="function"?ye(ke,l):L=l,o(l,f(g,{get when(){return S(()=>c()==="command")()?ue()===0:S(()=>fe()===0)()&&he()===0},get children(){var i=Ue();return o(i,()=>s("unifiedPicker.empty")),i}}),null),o(l,f(g,{get when(){return S(()=>c()==="command")()&&ue()>0},get children(){return[(()=>{var i=ie();return o(i,()=>s("unifiedPicker.sections.commands")),i})(),f(ne,{get each(){return R()},children:(i,p)=>{const u=()=>p()===k();return(()=>{var d=Ge(),h=d.firstChild,y=h.firstChild,m=y.nextSibling,C=m.firstChild;return C.firstChild,d.$$click=()=>t.onSelect({type:"command",command:i},"click"),o(C,()=>i.name,null),o(m,f(g,{get when(){return i.description},get children(){var a=$e();return o(a,(()=>{var $=S(()=>(i.description??"").length>80);return()=>$()?(i.description??"").slice(0,80)+"...":i.description})()),a}}),null),j(a=>{var $=`dropdown-item ${u()?"dropdown-item-highlight":""}`,D=u();return $!==a.e&&A(d,a.e=$),D!==a.t&&W(d,"data-picker-selected",a.t=D),a},{e:void 0,t:void 0}),d})()}})]}}),null),o(l,f(g,{get when(){return S(()=>c()==="mention"&&fe()>0)()&&!(t.searchQuery==="."||t.searchQuery==="./")},get children(){return[(()=>{var i=ie();return o(i,()=>s("unifiedPicker.sections.agents")),i})(),f(ne,{get each(){return B()},children:i=>{const p=ee().findIndex(u=>u.type==="agent"&&u.agent.name===i.name);return(()=>{var u=Ne(),d=u.firstChild,h=d.firstChild,y=h.nextSibling,m=y.firstChild,C=m.firstChild;return u.$$click=()=>t.onSelect({type:"agent",agent:i},"click"),o(C,()=>i.name),o(m,f(g,{get when(){return i.mode==="subagent"},get children(){var a=Ke();return o(a,()=>s("unifiedPicker.badge.subagent")),a}}),null),o(y,f(g,{get when(){return i.description},get children(){var a=$e();return o(a,(()=>{var $=S(()=>!!(i.description&&i.description.length>80));return()=>$()?i.description.slice(0,80)+"...":i.description})()),a}}),null),j(a=>{var $=`dropdown-item ${p===k()?"dropdown-item-highlight":""}`,D=p===k();return $!==a.e&&A(u,a.e=$),D!==a.t&&W(u,"data-picker-selected",a.t=D),a},{e:void 0,t:void 0}),u})()}})]}}),null),o(l,f(g,{get when(){return S(()=>c()==="mention")()&&(he()>0||t.searchQuery==="."||t.searchQuery==="./")},get children(){return[(()=>{var i=ie();return o(i,()=>s("unifiedPicker.sections.files")),i})(),f(g,{get when(){return t.searchQuery==="."||t.searchQuery==="./"},get children(){var i=He(),p=i.firstChild,u=p.firstChild,d=u.nextSibling;return d.firstChild,i.$$click=()=>{const h={path:".",relativePath:".",isDirectory:!0,isGitFile:!1};t.onSelect({type:"file",file:h},"click")},o(d,()=>s("unifiedPicker.sections.workspaceRoot"),null),j(h=>{var y=`dropdown-item py-1.5 ${k()===0?"dropdown-item-highlight":""}`,m=k()===0;return y!==h.e&&A(i,h.e=y),m!==h.t&&W(i,"data-picker-selected",h.t=m),h},{e:void 0,t:void 0}),i}}),f(ne,{get each(){return M()},children:i=>{const p=ee().findIndex(d=>d.type==="file"&&d.file.relativePath===i.relativePath),u=i.isDirectory;return(()=>{var d=Je(),h=d.firstChild,y=h.firstChild;return d.$$click=()=>t.onSelect({type:"file",file:i},"click"),o(h,f(g,{when:u,get fallback(){return Xe()},get children(){return Oe()}}),y),o(y,()=>i.path),j(m=>{var C=`dropdown-item py-1.5 ${p===k()?"dropdown-item-highlight":""}`,a=p===k();return C!==m.e&&A(d,m.e=C),a!==m.t&&W(d,"data-picker-selected",m.t=a),m},{e:void 0,t:void 0}),d})()}})]}}),null),o(x,()=>s("unifiedPicker.footer.navigate"),me),o(x,()=>s("unifiedPicker.footer.select"),ge),o(x,()=>s("unifiedPicker.footer.close"),null),e}})};We(["click"]);export{ct as default};