Skip to content

Commit 538af97

Browse files
phernandezclaude
andcommitted
feat: show spinner while fetching cloud projects in bm project list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 054178d commit 538af97

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

src/basic_memory/cli/commands/project.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ async def _list_projects(ws: str | None = None):
7171
cloud_error: Exception | None = None
7272

7373
if cloud:
74-
with force_routing(cloud=True):
75-
cloud_result = run_with_cleanup(_list_projects(effective_workspace))
74+
with console.status("[bold blue]Fetching cloud projects...", spinner="dots"):
75+
with force_routing(cloud=True):
76+
cloud_result = run_with_cleanup(_list_projects(effective_workspace))
7677
elif local:
7778
with force_routing(local=True):
7879
local_result = run_with_cleanup(_list_projects())
@@ -83,8 +84,13 @@ async def _list_projects(ws: str | None = None):
8384

8485
if _has_cloud_credentials(config):
8586
try:
86-
with force_routing(cloud=True):
87-
cloud_result = run_with_cleanup(_list_projects(effective_workspace))
87+
with console.status(
88+
"[bold blue]Fetching cloud projects...", spinner="dots"
89+
):
90+
with force_routing(cloud=True):
91+
cloud_result = run_with_cleanup(
92+
_list_projects(effective_workspace)
93+
)
8894
except Exception as exc: # pragma: no cover
8995
cloud_error = exc
9096

@@ -95,7 +101,10 @@ async def _list_projects(ws: str | None = None):
95101
try:
96102
from basic_memory.mcp.project_context import get_available_workspaces
97103

98-
workspaces = run_with_cleanup(get_available_workspaces())
104+
with console.status(
105+
"[bold blue]Resolving workspace...", spinner="dots"
106+
):
107+
workspaces = run_with_cleanup(get_available_workspaces())
99108
matched = next(
100109
(ws for ws in workspaces if ws.tenant_id == effective_workspace),
101110
None,

0 commit comments

Comments
 (0)