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

Function webFetchAutoSaveThreshold

cli/plugins/builtin_webfetch.go:442–450  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

440// CHATCLI_WEBFETCH_AUTOSAVE_BYTES (power-user override); any non-parsable
441// value falls back to defaultWebFetchAutoSaveSize.
442func 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.

Callers 2

ExecuteWithStreamMethod · 0.85

Calls

no outgoing calls