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

Function imageReplyMode

cli/gateway_command.go:399–410  ·  view source on GitHub ↗

imageReplyMode parses CHATCLI_GATEWAY_IMAGE_REPLY. Empty/"auto"/truthy → auto; "never"/"off"/falsey → never. Unknown values fall back to auto.

(raw string)

Source from the content-addressed store, hash-verified

397// imageReplyMode parses CHATCLI_GATEWAY_IMAGE_REPLY. Empty/"auto"/truthy →
398// auto; "never"/"off"/falsey → never. Unknown values fall back to auto.
399func imageReplyMode(raw string) string {
400 switch strings.ToLower(strings.TrimSpace(raw)) {
401 case "", imageReplyAuto, "always", "on":
402 return imageReplyAuto
403 case imageReplyNever, "off":
404 return imageReplyNever
405 }
406 if enabled, err := strconv.ParseBool(strings.TrimSpace(raw)); err == nil && !enabled {
407 return imageReplyNever
408 }
409 return imageReplyAuto
410}
411
412// gatewayImageOutbox holds, per session, the picture the agent produced during
413// the just-finished run until the runner attaches it to the final reply. Runs

Callers 2

gatewayAgentFuncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected