MCPcopy Create free account
hub / github.com/diillson/chatcli / SetSecurityPromptLogger

Function SetSecurityPromptLogger

cli/coder/security_prompt_guarded.go:32–35  ·  view source on GitHub ↗

SetSecurityPromptLogger installs a zap logger into the package-level input guard. Callers that have a logger (the CLI initializer) should set this at startup; otherwise the guard falls back to a no-op logger. Idempotent: subsequent calls overwrite the active logger and guard.

(logger *zap.Logger)

Source from the content-addressed store, hash-verified

30//
31// Idempotent: subsequent calls overwrite the active logger and guard.
32func SetSecurityPromptLogger(logger *zap.Logger) {
33 promptInputGuardLogger = logger
34 promptInputGuard = NewInputGuard(logger)
35}
36
37// activeInputGuard returns the package-level guard, lazily instantiated
38// with the most recently configured logger (or a no-op when nothing was

Callers 1

NewChatCLIFunction · 0.92

Calls 1

NewInputGuardFunction · 0.85

Tested by

no test coverage detected