(t,e,n,r=80*1024,o="batch")
| 628 | \u2026`;o.sort((u,l)=>u-l);let s=300,i=[];for(let u of o){let l=Math.max(0,u-s),d=Math.min(t.length,u+s);i.length>0&&l<=i[i.length-1][1]?i[i.length-1][1]=d:i.push([l,d])}let a=[],c=0;for(let[u,l]of i){if(c>=n)break;let d=t.slice(u,Math.min(l,u+(n-c)));a.push((u>0?"\u2026":"")+d+(l<t.length?"\u2026":"")),c+=d.length}return a.join(` |
| 629 | |
| 630 | `)}function nC(t,e,n,r=80*1024,o="batch"){let s=[],i=0,a=o==="global"?void 0:n;for(let c of e){if(i>r){s.push(`## ${c} |
| 631 | (output cap reached \u2014 use ctx_search(queries: ["${c}"]) for details) |
| 632 | `);continue}let u=t.searchWithFallback(c,3,a,void 0,"exact");if(s.push(`## ${c}`),s.push(""),u.length>0){for(let l of u){let d=gb(l.content,c,3e3,l.highlighted);s.push(`### ${l.title}`),s.push(d),s.push(""),i+=d.length+l.title.length}continue}s.push("No matching sections found."),s.push("")}return o==="global"?s.push(` |
| 633 | > **Scope:** Queries searched the entire persistent index (query_scope: "global").`):s.push('\n> **Tip:** Results are scoped to this batch only. To search across all indexed sources, use `ctx_search(queries: [...])` or call ctx_batch_execute with `query_scope: "global"`.'),s}function y4(t){return`'${t.replace(/'/g,"'\\''")}'`}function _4(t){return`'${t.replace(/'/g,"''")}'`}function rC(t,e){let n=`--require ${e}`,r=t.toLowerCase(),o=r.split(/[\\/]/).pop()??r;return r.includes("powershell")||r.includes("pwsh")?`$env:NODE_OPTIONS=${_4(n)}; `:o==="cmd"||o==="cmd.exe"?`set "NODE_OPTIONS=${n.replace(/"/g,'""')}" && `:`NODE_OPTIONS=${y4(n)} `}function oC(t){let e=t.replace(/\s+/g," ").trim();return e.length<=IR?e:e.slice(0,IR)+"\u2026"}function vd(t){if(t!==void 0)return t;if(Qe().platform!=="antigravity-cli")return;let e=Number(process.env.CONTEXT_MODE_AGY_EXEC_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:sC}function b4(t){return t.length<=AR?t:t.slice(0,AR)+` |
| 634 | \u2026 (truncated)`}function iC(t,e,n){let r=n?`path=${n} |
| 635 | `:"",o=`\`\`\`${t} |
| 636 | ${b4(e)} |
no test coverage detected