MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / push

Function push

src/workspaces/headless-task.ts:88–96  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

86 let total = 0;
87 return {
88 push(c) {
89 chunks.push(c);
90 total += c.length;
91 if (total > maxBytes * 2) {
92 const merged = Buffer.concat(chunks).subarray(-maxBytes);
93 chunks = [merged];
94 total = merged.length;
95 }
96 },
97 text() {
98 return Buffer.concat(chunks).subarray(-maxBytes).toString('utf8');
99 },

Callers

nothing calls this directly

Calls 3

extractFunction · 0.85
pushMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected