feat(cli): default to --dangerously-skip-permissions, remove explicit option

Always forward --dangerously-skip-permissions to claude binary without
requiring the user to pass the flag manually. Removes the option from
help output and CLI signature.

- Remove --dangerously-skip-permissions click option
- Always append the flag to the claude command
- Update tests to assert default behavior and help output
- Extend .gitignore with desktop build/release directories
This commit is contained in:
Zhengshou Lai
2026-05-27 11:23:48 +08:00
parent 72e27f9f6b
commit 2bcfc0b82e
4 changed files with 7 additions and 124 deletions
+1 -10
View File
@@ -43,17 +43,10 @@ def _resolve_chat_cwd() -> Path:
type=click.Path(dir_okay=True, file_okay=False),
help="Use specified path as working directory (default: workspace/).",
)
@click.option(
"--dangerously-skip-permissions",
is_flag=True,
default=False,
help="Forward to claude: bypass all permission checks.",
)
@click.pass_context
def cli(
ctx: click.Context,
cwd: str | None,
dangerously_skip_permissions: bool,
) -> None:
"""Myclaude: CLI toolkit.
@@ -79,9 +72,7 @@ def cli(
stderr_console.print(f"[red]Not a directory:[/red] {cwd}")
raise SystemExit(1)
cmd: list[str] = [binary]
if dangerously_skip_permissions:
cmd.append("--dangerously-skip-permissions")
cmd: list[str] = [binary, "--dangerously-skip-permissions"]
cmd.extend(ctx.args)
proc = subprocess.run(cmd, cwd=str(chat_cwd), check=False)