@neuralnomads/codenomad 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -4
- package/dist/background-processes/manager.js +0 -1
- package/dist/config/schema.js +1 -0
- package/dist/filesystem/__tests__/browser.test.js +65 -0
- package/dist/filesystem/__tests__/search-cache.test.js +2 -2
- package/dist/filesystem/browser.js +25 -4
- package/dist/index.js +13 -6
- package/dist/launcher.js +12 -1
- package/dist/opencode-plugin/codenomad-opencode-plugin.tgz +0 -0
- package/dist/opencode-plugin.js +146 -0
- package/dist/opencode-plugin.test.js +28 -0
- package/dist/previews/manager.js +63 -0
- package/dist/server/__tests__/listener-base-url.test.js +30 -0
- package/dist/server/http-server.js +378 -152
- package/dist/server/listener-base-url.js +17 -0
- package/dist/server/routes/config-files.js +92 -0
- package/dist/server/routes/config-files.test.js +115 -0
- package/dist/server/routes/filesystem.js +13 -0
- package/dist/server/routes/previews.js +25 -0
- package/dist/server/routes/workspaces.js +38 -1
- package/dist/workspaces/__tests__/git-clone.test.js +142 -0
- package/dist/workspaces/__tests__/spawn.test.js +27 -9
- package/dist/workspaces/git-clone.js +148 -0
- package/dist/workspaces/manager.js +27 -6
- package/dist/workspaces/spawn.js +35 -9
- package/dist/workspaces/worktree-map.js +16 -0
- package/package.json +3 -3
- package/public/assets/FilesTab-B5ysoRLh.js +2 -0
- package/public/assets/GitChangesTab-BksCi53d.js +2 -0
- package/public/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/public/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/public/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/public/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/public/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/public/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/public/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/public/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/public/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/public/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/public/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/public/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/public/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/public/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/public/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/public/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/public/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/public/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/public/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/public/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/public/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/public/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/public/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/public/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/public/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/public/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/public/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/public/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/public/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/public/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/public/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/public/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/public/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/public/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/public/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/public/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/public/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/public/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/public/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/public/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/public/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/public/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/public/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/public/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/public/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/public/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/public/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/public/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/public/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/public/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/public/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/public/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/public/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/public/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/public/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/public/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/public/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/public/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/public/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/public/assets/{SplitFilePanel-BOHH3F--.js → SplitFilePanel-CrSfR22r.js} +1 -1
- package/public/assets/StatusTab-Dgqekgjn.js +1 -0
- package/public/assets/{align-justify-9zpyaAdy.js → align-justify-hRtBz8xe.js} +1 -1
- package/public/assets/{bundle-full-xFW13Lny.js → bundle-full-BVDA-a9Y.js} +2 -2
- package/public/assets/{diff-viewer-xG9yjpN8.js → diff-viewer-BCAI0Cw8.js} +1 -1
- package/public/assets/index-B2Qd6xQq.css +1 -0
- package/public/assets/index-BQpEhdk5.js +1 -0
- package/public/assets/index-BXIEm2zT.js +1 -0
- package/public/assets/index-CWjU9mAF.js +1 -0
- package/public/assets/index-Cvtlo58a.js +1 -0
- package/public/assets/index-DFlxnvHT.js +2 -0
- package/public/assets/index-Ddsv8Uc0.js +1 -0
- package/public/assets/index-Dn7woJnK.js +1 -0
- package/public/assets/index-DnCBfFB3.js +1 -0
- package/public/assets/index-DnXT1F8T.js +1 -0
- package/public/assets/index-Kv-3BRTi.js +1 -0
- package/public/assets/index-g-G1RiME.js +1 -0
- package/public/assets/{loading-HUhLEgb_.js → loading-bD3ppK2l.js} +1 -1
- package/public/assets/main-BsbMOeQg.js +65 -0
- package/public/assets/markdown-DJuaMC5H.js +315 -0
- package/public/assets/monaco-viewer-BFNhPQX7.js +26 -0
- package/public/assets/tool-call-BSJluZRW.js +59 -0
- package/public/assets/{unified-picker-DuNuUpLy.js → unified-picker-DmFyrIis.js} +1 -1
- package/public/assets/{wrap-text-zghCl6wN.js → wrap-text-BkcW_eTA.js} +1 -1
- package/public/index.html +4 -4
- package/public/loading.html +4 -4
- package/public/sw.js +1 -1
- package/public/ui-version.json +1 -1
- package/dist/opencode-config/README.md +0 -32
- package/dist/opencode-config/opencode.jsonc +0 -3
- package/dist/opencode-config/package-lock.json +0 -380
- package/dist/opencode-config/package.json +0 -9
- package/dist/opencode-config/plugin/codenomad.ts +0 -62
- package/dist/opencode-config/plugin/lib/background-process.ts +0 -265
- package/dist/opencode-config/plugin/lib/client.ts +0 -133
- package/dist/opencode-config/plugin/lib/request.ts +0 -214
- package/dist/opencode-config.js +0 -26
- package/public/assets/ChangesTab-ovdqLHc3.js +0 -2
- package/public/assets/DiffToolbar-B12EfXMX.js +0 -1
- package/public/assets/FilesTab-nb_itEXG.js +0 -2
- package/public/assets/GitChangesTab-DcT_4BL2.js +0 -2
- package/public/assets/StatusTab-Dyt_EG33.js +0 -1
- package/public/assets/index-7DpT014-.js +0 -1
- package/public/assets/index-BDK4V9L0.js +0 -1
- package/public/assets/index-Bx-Bezt2.js +0 -1
- package/public/assets/index-CCAZZY0l.js +0 -1
- package/public/assets/index-CEcZq5WB.js +0 -1
- package/public/assets/index-CQCmSDHL.js +0 -1
- package/public/assets/index-Cz_fl8aY.js +0 -1
- package/public/assets/index-Dcgftm1m.css +0 -1
- package/public/assets/index-m4C3yx3J.js +0 -1
- package/public/assets/index-mh_z9p40.js +0 -2
- package/public/assets/main-CKhfaeKI.js +0 -48
- package/public/assets/markdown-BeXU9Z-x.js +0 -58
- package/public/assets/monaco-viewer-BgP6xpZ6.js +0 -26
- package/public/assets/todo-D6PVVp_f.js +0 -1
- package/public/assets/tool-call-Dgn3NlA8.js +0 -60
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aq as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-BFNhPQX7.js";import{c as L,b as F,n as p,a as D,S as q,E as z,D as G,C as T,G as U}from"./git-diff-vendor-CSgooKT_.js";import{aw as N,ax as K}from"./main-BsbMOeQg.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-DFlxnvHT.js";var $=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,k;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((k=m==null?void 0:m.textContent)==null?void 0:k.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const u=C??document.createElement("span");u.className="tool-call-diff-compact-line-number",u.textContent=g,u.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(u),n.push({gutter:r,label:u,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,h=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",h),o.style.setProperty("--diff-aside-width--",h)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return F(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(q,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=$(),n=o;return typeof n=="function"?E(n,l):o=l,x(l,p(q,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var h=P();return x(h,()=>e.diffText),h})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?T.Split:T.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=$(),n=o;return typeof n=="function"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
|