formatSelfEvolveNotice renders a one-line summary of what the engine did this pass, e.g. "skills: authored deploy-this-project" or "skill suggestion: ...". Returns "" when nothing happened, so the worker stays silent on quiet turns.
(s selfEvolveSummary)
| 426 | // pass, e.g. "skills: authored deploy-this-project" or "skill suggestion: ...". |
| 427 | // Returns "" when nothing happened, so the worker stays silent on quiet turns. |
| 428 | func formatSelfEvolveNotice(s selfEvolveSummary) string { |
| 429 | if s.isEmpty() { |
| 430 | return "" |
| 431 | } |
| 432 | var parts []string |
| 433 | if len(s.Authored) > 0 { |
| 434 | parts = append(parts, i18n.T("selfevolve.notice.authored", strings.Join(s.Authored, ", "))) |
| 435 | } |
| 436 | if len(s.Evolved) > 0 { |
| 437 | parts = append(parts, i18n.T("selfevolve.notice.evolved", strings.Join(s.Evolved, ", "))) |
| 438 | } |
| 439 | if len(s.EvolvedBackup) > 0 { |
| 440 | parts = append(parts, i18n.T("selfevolve.notice.evolved_backup", strings.Join(s.EvolvedBackup, ", "))) |
| 441 | } |
| 442 | if len(s.Suggested) > 0 { |
| 443 | parts = append(parts, i18n.T("selfevolve.notice.suggested", strings.Join(s.Suggested, ", "))) |
| 444 | } |
| 445 | if len(parts) == 0 { |
| 446 | return "" |
| 447 | } |
| 448 | return i18n.T("selfevolve.notice.prefix") + " " + strings.Join(parts, "; ") |
| 449 | } |
no test coverage detected