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

Function buildRunCommandBody

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

Source from the content-addressed store, hash-verified

683}
684
685function buildRunCommandBody(args) {
686 const parts = [];
687 if (args.command_line) parts.push(writeStringField(23, args.command_line));
688 if (args.cwd) parts.push(writeStringField(2, args.cwd));
689 if (args.blocking) parts.push(writeBoolField(11, true));
690 if (typeof args.stdout === 'string') parts.push(writeStringField(4, args.stdout));
691 if (typeof args.stderr === 'string') parts.push(writeStringField(5, args.stderr));
692 if (Number.isFinite(args.exit_code)) parts.push(writeVarintField(6, args.exit_code));
693 // combined_output (field 21) — RunCommandOutput { full=1 }. The planner
694 // reads this when reasoning about command results, so we mirror stdout
695 // there in addition to the legacy stdout field.
696 if (typeof args.full_output === 'string') {
697 const inner = writeStringField(1, args.full_output);
698 parts.push(writeMessageField(21, inner));
699 }
700 return Buffer.concat(parts);
701}
702
703function buildGrepSearchV2Body(args) {
704 const parts = [];

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected