Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Refine command approval prompt message
Maximilian Roos525baa209eaa
diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex c7bb82e27..5f2c815ae 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -89,7 +89,7 @@ fn prompt_for_batch_approval(commands: &[&Command], project_id: &str) -> Result<crate::output::flush_for_stderr_prompt()?;eprintln!(- "{WARNING_EMOJI} {WARNING}{WARNING_BOLD}{project_name}{WARNING_BOLD:#}{WARNING} wants to execute {WARNING_BOLD}{count}{WARNING_BOLD:#}{WARNING} command{plural}:{WARNING:#}"+ "{WARNING_EMOJI} {WARNING}{WARNING_BOLD}{project_name}{WARNING_BOLD:#}{WARNING} needs approval to execute {WARNING_BOLD}{count}{WARNING_BOLD:#}{WARNING} command{plural}:{WARNING:#}");eprintln!();diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snapindex fb3a3c926..b3cfbb4dd 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap@@ -4,7 +4,7 @@ expression: normalized---y-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snapindex f9126dc37..75e722eea 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap@@ -4,7 +4,7 @@ expression: normalized---n-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snapindex bf594e76d..7da78e90a 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap@@ -4,7 +4,7 @@ expression: normalized---y-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m2[0m[33m commands:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snapindex 4dbc2fbb9..d9ac249a2 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap@@ -4,7 +4,7 @@ expression: normalized---n-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m2[0m[33m commands:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snapindex 2fbfcd7ea..02fc3e55c 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap@@ -4,7 +4,7 @@ expression: normalized---y-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m3[0m[33m commands:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m3[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snapindex 8aeefec16..19b48ab21 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap@@ -4,7 +4,7 @@ expression: normalized---y-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m3[0m[33m commands:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m3[0m[33m commands:[0mπ post-create [1minstall[0m:[40m [0m [1m[34mecho[0m [32m'Installing dependencies...'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snapindex 46d99d400..1744285d0 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap@@ -4,7 +4,7 @@ expression: normalized---y-^Dπ‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+^Dπ‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snapindex c7ee87efa..51e16bb45 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSRSVBw/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGrgnK1/test-config.toml---success: falseexit_code: 1@@ -27,7 +27,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snapindex 94ab0a06e..5f96bab7a 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m2[0m[33m commands:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snapindex 8d91e670e..c04317e85 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m4[0m[33m commands:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m4[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'Branch: test-nested-branch'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snapindex c5fec5fd1..0bbf242cf 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m3[0m[33m commands:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m3[0m[33m commands:[0mπ post-create [1minstall[0m:[40m [0m [1m[34mecho[0m [32m'Installing dependencies...'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snapindex 8e4de590f..7b3e3a357 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'Worktree path: [REPO].feature-test-approval'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snapindex 94ab0a06e..5f96bab7a 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m2[0m[33m commands:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snapindex 2620b1822..7dcec368c 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m [36m>[0m output.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snapindex 674623a8e..5067f7544 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-merge:[40m [0m [1m[34mecho[0m [32m'Post-merge cleanup for main'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snapindex 6b6e0e106..5fac643c8 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap@@ -9,7 +9,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ pre-merge:[40m [0m [1m[34mecho[0m [32m'Running pre-merge checks on main'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approvals__ask_approvals_all_none_approved.snap b/tests/snapshots/integration__integration_tests__approvals__ask_approvals_all_none_approved.snapindex fe0e47f84..4c67685cc 100644--- a/tests/snapshots/integration__integration_tests__approvals__ask_approvals_all_none_approved.snap+++ b/tests/snapshots/integration__integration_tests__approvals__ask_approvals_all_none_approved.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpuzpIU1/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppPglbl/test-config.toml---success: falseexit_code: 1@@ -27,7 +27,7 @@ exit_code: 1π‘ [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt beta ask-approvals'[0m----- stderr ------π‘ [33m[1m[33mtest-repo[0m[33m wants to execute [1m[33m1[0m[33m command:[0m+π‘ [33m[1m[33mtest-repo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test'[0m[0m