MCPcopy
hub / github.com/anomalyco/opencode / runArgs

Function runArgs

packages/opencode/test/lib/cli-process.ts:251–261  ·  view source on GitHub ↗
(message: string, opts?: RunOpts)

Source from the content-addressed store, hash-verified

249 })
250
251 const runArgs = (message: string, opts?: RunOpts) => {
252 const argv: string[] = ["run"]
253 if (opts?.printLogs) argv.push("--print-logs")
254 argv.push("--model", opts?.model ?? testModelID)
255 if (opts?.agent) argv.push("--agent", opts.agent)
256 if (opts?.format) argv.push("--format", opts.format)
257 if (opts?.command) argv.push("--command", opts.command)
258 if (opts?.extraArgs) argv.push(...opts.extraArgs)
259 argv.push(message)
260 return argv
261 }
262
263 const runOpts = (opts?: RunOpts): SpawnOpts | undefined => {
264 if (!opts?.permission) return opts

Callers 2

runFunction · 0.85
withCliFixtureFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected