MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / partialFunctionCallsPrefixLength

Function partialFunctionCallsPrefixLength

src/cascade-native-bridge.js:1263–1271  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1261}
1262
1263function partialFunctionCallsPrefixLength(text) {
1264 const lit = '<function_calls';
1265 const lower = String(text || '').toLowerCase();
1266 const max = Math.min(lit.length - 1, lower.length);
1267 for (let n = max; n > 0; n--) {
1268 if (lower.endsWith(lit.slice(0, n))) return n;
1269 }
1270 return 0;
1271}
1272
1273// ─── Inject caller's tool history as additional_steps ───────────────
1274//

Callers 1

_drainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected