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

Function printProfileLists

cli/memory_command.go:799–822  ·  view source on GitHub ↗

printProfileLists renders the list-shaped attributes of the profile panel.

(profile memory.UserProfile)

Source from the content-addressed store, hash-verified

797
798// printProfileLists renders the list-shaped attributes of the profile panel.
799func printProfileLists(profile memory.UserProfile) {
800 for _, f := range []struct {
801 key string
802 items []string
803 sep string
804 }{
805 {"mem.cmd.profile.certifications", profile.Certifications, ", "},
806 {"mem.cmd.profile.skills", profile.Skills, ", "},
807 {"mem.cmd.profile.goals", profile.Goals, ", "},
808 {"mem.cmd.profile.interests", profile.Interests, ", "},
809 {"mem.cmd.profile.directives", profile.Directives, "; "},
810 } {
811 if len(f.items) > 0 {
812 fmt.Printf(" %s %s\n", colorize(i18n.T(f.key), ColorYellow), strings.Join(f.items, f.sep))
813 }
814 }
815 if len(profile.Environment) > 0 {
816 envEntries := make([]string, 0, len(profile.Environment))
817 for _, k := range sortedStringKeys(profile.Environment) {
818 envEntries = append(envEntries, k+"="+profile.Environment[k])
819 }
820 fmt.Printf(" %s %s\n", colorize(i18n.T("mem.cmd.profile.environment"), ColorYellow), strings.Join(envEntries, ", "))
821 }
822}
823
824// printProfileTimeline renders stances and the milestone timeline.
825func printProfileTimeline(profile memory.UserProfile) {

Callers 1

showMemoryProfileMethod · 0.85

Calls 3

TFunction · 0.92
colorizeFunction · 0.85
sortedStringKeysFunction · 0.85

Tested by

no test coverage detected