MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / printDryRun

Function printDryRun

internal/cli/launch.go:259–281  ·  view source on GitHub ↗
(out io.Writer, tool tools.Tool, ep providers.Endpoint, model string, plan []tools.PlannedWrite, args []string)

Source from the content-addressed store, hash-verified

257}
258
259func printDryRun(out io.Writer, tool tools.Tool, ep providers.Endpoint, model string, plan []tools.PlannedWrite, args []string) {
260 fmt.Fprintf(out, "Tool: %s\n", tool.LaunchCommand())
261 if ep.Endpoint != "" {
262 fmt.Fprintf(out, "Endpoint: %s\n", ep.Endpoint)
263 }
264 if model != "" {
265 fmt.Fprintf(out, "Model: %s\n", model)
266 }
267 if tool.ConfigTarget != nil && len(plan) > 0 {
268 fmt.Fprintf(out, "Config writes (%s):\n", tool.ConfigTarget.Path)
269 for _, p := range plan {
270 v := p.Value
271 keyU := strings.ToUpper(p.KeyPath)
272 if s, ok := v.(string); ok && (strings.Contains(keyU, "AUTH") || strings.Contains(keyU, "KEY") || strings.Contains(keyU, "TOKEN")) {
273 v = providers.MaskedAPIKey(s)
274 }
275 fmt.Fprintf(out, " %s %s = %q\n", p.Op, p.KeyPath, fmt.Sprintf("%v", v))
276 }
277 }
278 if len(args) > 0 {
279 fmt.Fprintf(out, "Args: %s\n", strings.Join(args, " "))
280 }
281}
282
283// runToolMenu remains as a fallback used by tests that exercise the
284// non-TTY rendering path of the legacy single-step menu. It is no

Callers 1

launchCommandMethod · 0.85

Calls 2

MaskedAPIKeyFunction · 0.92
LaunchCommandMethod · 0.80

Tested by

no test coverage detected