| 373 | } |
| 374 | |
| 375 | func (cli *ChatCLI) showMemoryProjects() { |
| 376 | mgr := cli.memoryStore.Manager() |
| 377 | projects := mgr.Projects.GetAll() |
| 378 | |
| 379 | fmt.Println() |
| 380 | fmt.Println(colorize(" "+i18n.T("mem.cmd.projects.title"), ColorCyan+ColorBold)) |
| 381 | fmt.Println(colorize(" ─────────────────────────────────────────", ColorGray)) |
| 382 | |
| 383 | if len(projects) == 0 { |
| 384 | fmt.Println(colorize(" "+i18n.T("mem.cmd.projects.empty"), ColorGray)) |
| 385 | fmt.Println() |
| 386 | return |
| 387 | } |
| 388 | |
| 389 | for _, p := range projects { |
| 390 | status := p.Status |
| 391 | statusColor := ColorGray |
| 392 | switch status { |
| 393 | case "active": |
| 394 | statusColor = ColorGreen |
| 395 | case "paused": |
| 396 | statusColor = ColorYellow |
| 397 | case "completed": |
| 398 | statusColor = ColorCyan |
| 399 | } |
| 400 | |
| 401 | fmt.Printf(" %s [%s]\n", colorize(p.Name, ColorYellow), colorize(status, statusColor)) |
| 402 | if p.Path != "" { |
| 403 | fmt.Printf(" %s %s\n", i18n.T("mem.cmd.projects.path"), p.Path) |
| 404 | } |
| 405 | if p.Description != "" { |
| 406 | fmt.Printf(" %s\n", p.Description) |
| 407 | } |
| 408 | if len(p.Technologies) > 0 { |
| 409 | fmt.Printf(" %s %s\n", i18n.T("mem.cmd.projects.tech"), strings.Join(p.Technologies, ", ")) |
| 410 | } |
| 411 | if !p.LastActive.IsZero() { |
| 412 | fmt.Printf(" %s %s\n", i18n.T("mem.cmd.projects.last_active"), colorize(p.LastActive.Format("2006-01-02"), ColorGray)) |
| 413 | } |
| 414 | } |
| 415 | fmt.Println() |
| 416 | } |
| 417 | |
| 418 | func (cli *ChatCLI) showMemoryStats() { |
| 419 | mgr := cli.memoryStore.Manager() |