| 1 | package boot |
| 2 | |
| 3 | import ( |
| 4 | "reasonix/internal/config" |
| 5 | ) |
| 6 | |
| 7 | func handleConfigLoadWarnings(opts Options, cfg *config.Config) bool { |
| 8 | if cfg == nil || !cfg.HasLoadWarnings() || opts.OnConfigLoadWarnings == nil { |
| 9 | return false |
| 10 | } |
| 11 | return opts.OnConfigLoadWarnings(cfg.LoadWarnings()) |
| 12 | } |
| 13 | |
| 14 | func deepSeekProtocolMigrationNoticeError(configLoadWarningsHandled bool, err error) error { |
| 15 | // Suppress only after a frontend explicitly accepts the resilient-loader |
| 16 | // warnings. StatsSource is only a usage label and does not prove that its |
| 17 | // caller can present Config.LoadWarnings. |
| 18 | if configLoadWarningsHandled && config.IsDeepSeekProtocolConfigParseError(err) { |
| 19 | return nil |
| 20 | } |
| 21 | return err |
| 22 | } |
| 23 |