(bytes int64)
| 652 | } |
| 653 | |
| 654 | func 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. |
| 665 | func (cli *ChatCLI) getMemorySuggestions(d prompt.Document) []prompt.Suggest { |