2026-04-22 16:03:51 +02:00
|
|
|
from __future__ import annotations
|
2026-04-21 17:42:37 +02:00
|
|
|
|
2026-04-22 16:03:51 +02:00
|
|
|
from chromy.command_inputs import ListCollectionsInput
|
2026-04-22 15:47:46 +02:00
|
|
|
from chromy.chroma_functions import list_collections
|
|
|
|
|
from chromy.utilities import print_lines
|
2026-04-21 17:42:37 +02:00
|
|
|
|
|
|
|
|
|
2026-04-22 16:03:51 +02:00
|
|
|
def handle_list_collections(_: ListCollectionsInput) -> int:
|
2026-04-21 17:42:37 +02:00
|
|
|
collections = list_collections()
|
|
|
|
|
if not collections:
|
|
|
|
|
print("No collections found.")
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
print_lines(collections)
|
|
|
|
|
return 0
|