This commit is contained in:
2026-01-10 17:30:18 -08:00
parent 08fef4a5d3
commit c2edd5139f
10 changed files with 769 additions and 86 deletions

View File

@@ -102,3 +102,34 @@ def show_provider_config_panel(
)
)
stderr_console().print(footer)
def show_store_config_panel(
store_type: str,
keys: Sequence[str] | None = None,
*,
config_hint: str = "config.conf"
) -> None:
"""Show a Rich panel explaining how to configure a storage backend."""
normalized = str(store_type or "").strip().lower() or "store"
pre = Text("Add this to your config", style="bold")
footer = Text(
f"Place this block in {config_hint} or config.d/*.conf",
style="dim"
)
body = Text()
body.append(f"[store={normalized}]\n", style="bold cyan")
for key in keys or []:
body.append(f'{key}=""\n', style="yellow")
stderr_console().print(pre)
stderr_console().print(
Panel(
body,
title=f"{normalized} storage configuration",
expand=False
)
)
stderr_console().print(footer)