移除 --auth-context,改为 --auth-stdin,结构化传递解析认证信息

This commit is contained in:
2026-06-02 17:17:00 +08:00
parent 40e699e173
commit c16e6e3d0c
7 changed files with 76 additions and 105 deletions
+2 -3
View File
@@ -161,11 +161,10 @@ def _build_example(path: tuple[str, ...], *, existing_examples: list[str] | None
]
if existing_examples:
for example in existing_examples:
has_auth = "--auth-context" in example
has_required_options = all(f"--{option_name}" in example for option_name in required_option_names)
if has_auth and has_required_options:
if has_required_options:
return example
parts = ["tjwater-cli", "--auth-context", "auth.json", *path]
parts = ["tjwater-cli", *path]
if ctx is None:
return " ".join(parts)
for parameter in ctx.command.params: