From 75eaabbfb5d21f4c316ca4c3d2241890db16f9b9 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Sun, 26 Apr 2026 09:54:23 +0800 Subject: [PATCH] fix(cli): restore is_flag=False + flag_value on --cwd option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts an earlier incorrect cleanup: click.option with is_flag=False + flag_value="." is valid click syntax that allows --cwd to work both with and without an argument: --cwd → cwd="." (current directory) --cwd /path → cwd="/path" --cwd=. → cwd="." --cwd --flag → cwd=".", flag=True (correctly parsed) Without these parameters, --cwd requires a value and --dangerously-skip-permissions would be misread as the cwd. --- bin/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cli.py b/bin/cli.py index 428f983..9de1c64 100644 --- a/bin/cli.py +++ b/bin/cli.py @@ -37,6 +37,8 @@ def _resolve_chat_cwd() -> Path: @click.option( "--cwd", "-C", + is_flag=False, + flag_value=".", default=None, type=click.Path(dir_okay=True, file_okay=False), help="Use specified path as working directory (default: workspace/).",