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

Function buildReadUrlContentBody

src/cascade-native-bridge.js:831–846  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

829}
830
831function buildReadUrlContentBody(args) {
832 const parts = [];
833 if (args.url) parts.push(writeStringField(1, args.url));
834 const doc = buildKnowledgeBaseItem({
835 text: args.text || args.content || args.summary || '',
836 summary: args.summary || '',
837 url: args.url || args.resolved_url || '',
838 title: args.title || '',
839 });
840 if (doc.length) parts.push(writeMessageField(2, doc));
841 if (args.resolved_url) parts.push(writeStringField(3, args.resolved_url));
842 if (args.latency_ms != null) parts.push(writeVarintField(4, Number(args.latency_ms) || 0));
843 if (args.user_rejected) parts.push(writeBoolField(6, true));
844 if (args.auto_run_decision != null) parts.push(writeVarintField(7, Number(args.auto_run_decision) || 0));
845 return Buffer.concat(parts);
846}
847
848const STEP_BODY_BUILDER = {
849 view_file: buildViewFileBody,

Callers

nothing calls this directly

Calls 6

writeStringFieldFunction · 0.90
writeMessageFieldFunction · 0.90
writeVarintFieldFunction · 0.90
writeBoolFieldFunction · 0.90
buildKnowledgeBaseItemFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected