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

Function formatSelfEvolveNotice

cli/selfevolve.go:428–449  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
428func 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}

Callers 1

extractAndSaveMethod · 0.85

Calls 2

TFunction · 0.92
isEmptyMethod · 0.80

Tested by

no test coverage detected