webFetchAutoSaveThreshold returns the byte threshold above which an unfiltered fetch triggers the auto-save-to-disk escalation. Honors CHATCLI_WEBFETCH_AUTOSAVE_BYTES (power-user override); any non-parsable value falls back to defaultWebFetchAutoSaveSize.
()
| 440 | // CHATCLI_WEBFETCH_AUTOSAVE_BYTES (power-user override); any non-parsable |
| 441 | // value falls back to defaultWebFetchAutoSaveSize. |
| 442 | func webFetchAutoSaveThreshold() int { |
| 443 | if v := os.Getenv("CHATCLI_WEBFETCH_AUTOSAVE_BYTES"); v != "" { |
| 444 | var n int |
| 445 | if _, err := fmt.Sscanf(v, "%d", &n); err == nil && n > 0 { |
| 446 | return n |
| 447 | } |
| 448 | } |
| 449 | return defaultWebFetchAutoSaveSize |
| 450 | } |
| 451 | |
| 452 | // browserUA returns the User-Agent to send on outbound page/search |
| 453 | // requests. Honors CHATCLI_WEBFETCH_USER_AGENT (power-user override, e.g. |
no outgoing calls