imageReplyMode parses CHATCLI_GATEWAY_IMAGE_REPLY. Empty/"auto"/truthy → auto; "never"/"off"/falsey → never. Unknown values fall back to auto.
(raw string)
| 397 | // imageReplyMode parses CHATCLI_GATEWAY_IMAGE_REPLY. Empty/"auto"/truthy → |
| 398 | // auto; "never"/"off"/falsey → never. Unknown values fall back to auto. |
| 399 | func 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 |
no outgoing calls
no test coverage detected