openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 549 B
JavaScript
import"./openclaw-state-read-errors-D_saNBXy.mjs";import"node:path";import"node:fs/promises";function splitNullBuffer(e){let t=Buffer.from(e.buffer,e.byteOffset,e.byteLength),n=[],r=0;for(let e=t.indexOf(0,r);e!==-1;e=t.indexOf(0,r))e>r&&n.push(t.subarray(r,e)),r=e+1;return r<t.length&&n.push(t.subarray(r)),n}function*gitPathspecBatches(e){let t=0;for(;t<e.length;){let n=[],r=0;for(;t<e.length&&(n.length===0||n.length<128&&r<16384);){let i=e[t++];n.push(i),r+=Buffer.byteLength(i)+1}yield n}}export{splitNullBuffer as n,gitPathspecBatches as t};