2026-04-22 16:03:51 +02:00
|
|
|
from __future__ import annotations
|
2026-04-21 17:42:37 +02:00
|
|
|
|
2026-04-22 15:47:46 +02:00
|
|
|
from chromy.chroma_functions import list_collections
|
2026-04-29 12:44:28 +02:00
|
|
|
from chromy.output import format_collection_names, print_lines
|
2026-04-21 17:42:37 +02:00
|
|
|
|
|
|
|
|
|
2026-04-22 22:14:26 +02:00
|
|
|
def handle_list_collections() -> int:
|
2026-04-21 17:42:37 +02:00
|
|
|
collections = list_collections()
|
2026-04-24 18:28:03 +02:00
|
|
|
|
2026-04-21 17:42:37 +02:00
|
|
|
if not collections:
|
|
|
|
|
print("No collections found.")
|
|
|
|
|
return 0
|
|
|
|
|
|
2026-04-29 12:44:28 +02:00
|
|
|
print_lines(format_collection_names(collections))
|
2026-04-24 18:28:03 +02:00
|
|
|
|
2026-04-21 17:42:37 +02:00
|
|
|
return 0
|