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

Function formatSize

cli/memory_command.go:654–662  ·  view source on GitHub ↗
(bytes int64)

Source from the content-addressed store, hash-verified

652}
653
654func formatSize(bytes int64) string {
655 if bytes < 1024 {
656 return fmt.Sprintf("%dB", bytes)
657 }
658 if bytes < 1024*1024 {
659 return fmt.Sprintf("%.1fKB", float64(bytes)/1024)
660 }
661 return fmt.Sprintf("%.1fMB", float64(bytes)/(1024*1024))
662}
663
664// getMemorySuggestions provides autocomplete suggestions for /memory subcommands.
665func (cli *ChatCLI) getMemorySuggestions(d prompt.Document) []prompt.Suggest {

Callers 1

listMemoryNotesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected