@@ -59,15 +59,15 @@ def callback(
5959 )
6060
6161 add_command ("finalize" , help = "apply current draft to original branch" )
62- add_command ("generate" , help = "start a new draft from a prompt" )
62+ add_command ("generate" , help = "create or update draft from a prompt" )
6363 add_command ("show-drafts" , short = "D" , help = "show draft history" )
6464 add_command ("show-prompts" , short = "P" , help = "show prompt history" )
6565 add_command ("show-templates" , short = "T" , help = "show template information" )
6666
6767 parser .add_option (
6868 "-a" ,
6969 "--accept" ,
70- help = "apply generated changes " ,
70+ help = "accept draft, may be repeated " ,
7171 action = "count" ,
7272 )
7373 parser .add_option (
@@ -79,7 +79,7 @@ def callback(
7979 parser .add_option (
8080 "-d" ,
8181 "--delete" ,
82- help = "delete draft after finalizing or discarding " ,
82+ help = "delete draft after finalizing" ,
8383 action = "store_true" ,
8484 )
8585 parser .add_option (
@@ -101,12 +101,25 @@ def callback(
101101 action = "store_true" ,
102102 )
103103
104+ parser .add_option (
105+ "--no-accept" ,
106+ help = "do not update worktree from draft" ,
107+ dest = "accept" ,
108+ action = "store_const" ,
109+ const = 0 ,
110+ )
104111 parser .add_option (
105112 "--no-reset" ,
106113 help = "abort if there are any staged changes" ,
107114 dest = "reset" ,
108115 action = "store_false" ,
109116 )
117+ parser .add_option (
118+ "--no-sync" ,
119+ help = "do not commit intermediate worktree changes" ,
120+ dest = "sync" ,
121+ action = "store_false" ,
122+ )
110123 parser .add_option (
111124 "--reset" ,
112125 help = "reset index before generating a new draft" ,
@@ -209,12 +222,15 @@ def main() -> None: # noqa: PLR0912 PLR0915
209222 bot_name = opts .bot ,
210223 prompt_transform = open_editor if editable else None ,
211224 tool_visitors = [ToolPrinter ()],
212- reset = config .auto_reset if opts .reset is None else opts .reset ,
213- sync = opts .sync ,
225+ reset = config .reset if opts .reset is None else opts .reset ,
226+ sync = config . sync if opts . sync is None else opts .sync ,
214227 )
215228 print (f"Generated change in { name } ." )
216229 case "finalize" :
217- name = drafter .finalize_draft (delete = opts .delete )
230+ name = drafter .finalize_draft (
231+ delete = opts .delete ,
232+ sync = config .sync if opts .sync is None else opts .sync ,
233+ )
218234 print (f"Finalized { name } ." )
219235 case "show-drafts" :
220236 table = drafter .history_table (args [0 ] if args else None )
0 commit comments