MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / formatStdioArgs

Function formatStdioArgs

packages/plugins/mcp/src/react/stdio-fields.ts:24–26  ·  view source on GitHub ↗
(args: readonly string[] | undefined)

Source from the content-addressed store, hash-verified

22/** Render stored arguments back into the single-line field, re-quoting any
23 * token that contains whitespace so `parseStdioArgs` recovers it. */
24export function formatStdioArgs(args: readonly string[] | undefined): string {
25 return (args ?? []).map((arg) => (/\s/.test(arg) ? `"${arg}"` : arg)).join(" ");
26}
27
28/** Parse the KEY=value block into the declared static env map. Splits on the
29 * FIRST `=` only, so a value may itself contain `=`. Blank lines, `#`

Callers 2

StdioEditFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected