返回 DeepSeek-Reasonix
render_checkpoints.go
根目录 / internal / config / render_checkpoints.go
1 package config
2
3 import (
4 "fmt"
5 "strings"
6 )
7
8 // Keep unset keys absent so project saves do not shadow user retention values.
9 func renderCheckpointsConfig(b *strings.Builder, c CheckpointsConfig) {
10 if c.RetainTurns == 0 && c.BlobQuotaBytes == 0 {
11 return
12 }
13 b.WriteString("[checkpoints]\n")
14 if c.RetainTurns != 0 {
15 fmt.Fprintf(b, "retain_turns = %d\n", c.RetainTurns)
16 }
17 if c.BlobQuotaBytes != 0 {
18 fmt.Fprintf(b, "blob_quota_bytes = %d\n", c.BlobQuotaBytes)
19 }
20 b.WriteString("\n")
21 }
22
22 lines GO