MCPcopy Create free account
hub / github.com/ShipSecAI/studio / formatArgs

Function formatArgs

packages/component-sdk/src/runner.ts:47–61  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

45
46
47function formatArgs(args: string[]): string {
48 return args
49 .map((part, index) => {
50 if (!part) {
51 return '';
52 }
53 const hasNewlines = part.includes('\n');
54 const isLong = part.length > 120;
55 if (hasNewlines || isLong) {
56 return `<arg-${index}:${part.length} chars>`;
57 }
58 return part;
59 })
60 .join(' ');
61}
62
63async function loadPtySpawn(): Promise<PtySpawn | null> {
64 if (cachedPtySpawn) {

Callers 3

runComponentInDockerFunction · 0.85
runDockerWithStandardIOFunction · 0.85
runDockerWithPtyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected