Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Add prompt emoji & message type for user input questions
Maximilian Roos4426292cd2df
diff --git a/.config/lychee.toml b/.config/lychee.tomlindex 03eece572..7155a7960 100644--- a/.config/lychee.toml+++ b/.config/lychee.toml@@ -15,6 +15,9 @@ max_cache_age = "1d"# Exclude sites that block GitHub Actions or have reliability issuesexclude = [+ # Private or authenticated GitHub resources+ "github\\.com/anthropics/claude-code/issues",+# Social media (blocks GitHub Actions)"twitter\\.com","x\\.com",diff --git a/CLAUDE.md b/CLAUDE.mdindex 31937cd2d..205c10a91 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -189,7 +189,7 @@ spawn_background(build_command_that_checks_merge_again()); // Duplicate check!### Message Types-Six canonical message patterns with their emojis:+Seven canonical message patterns with their emojis:1. **Progress**: π (operations in progress)2. **Success**: β (successful completion)@@ -197,6 +197,7 @@ Six canonical message patterns with their emojis:4. **Warnings**: π‘ (non-blocking issues)5. **Hints**: π‘ (actionable suggestions, tips for user)6. **Info**: βͺ (neutral status, system feedback, metadata)+7. **Prompts**: β (questions requiring user input)**Output functions automatically add emoji AND semantic color.** Callers provide content with optional inner styling (like `<bold>`):@@ -247,7 +248,7 @@ println!("Branch created");Interactive prompts must flush stderr before blocking on stdin:```rust-eprint!("π‘ Allow and remember? [y/N] ");+eprint!("β Allow and remember? [y/N] ");stderr().flush()?;io::stdin().read_line(&mut response)?;```@@ -294,7 +295,7 @@ Style constants in `src/styling/constants.rs` (minimal set for programmatic styl- `DELETION`: Red (diffs, deletions) - used in table rendering- `GUTTER`: BrightWhite background (quoted content)-Emoji constants: `PROGRESS_EMOJI` (π), `SUCCESS_EMOJI` (β ), `ERROR_EMOJI` (β), `WARNING_EMOJI` (π‘), `HINT_EMOJI` (π‘), `INFO_EMOJI` (βͺ)+Emoji constants: `PROGRESS_EMOJI` (π), `SUCCESS_EMOJI` (β ), `ERROR_EMOJI` (β), `WARNING_EMOJI` (π‘), `HINT_EMOJI` (π‘), `INFO_EMOJI` (βͺ), `PROMPT_EMOJI` (β)For all other styling, use color-print tags in `cformat!`: `<red>`, `<green>`, `<yellow>`, `<cyan>`, `<dim>`, `<bold>`, `<bright-black>`diff --git a/README.md b/README.mdindex 3362e7c65..0e4292b2c 100644--- a/README.md+++ b/README.md@@ -1160,7 +1160,7 @@ Commands from project hooks and LLM configuration require approval on first run.<!-- β οΈ AUTO-GENERATED from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__readme_example_approval_prompt.snap β edit source to update -->-```+```consoleπ‘ repo needs approval to execute 3 commands:βͺ post-create install:@@ -1172,7 +1172,7 @@ Commands from project hooks and LLM configuration require approval on first run.βͺ post-create test:echo 'Running tests...'-π‘ Allow and remember? [y/N]+β Allow and remember? [y/N]```<!-- END AUTO-GENERATED -->diff --git a/docs/content/faq.md b/docs/content/faq.mdindex 67e21e5a6..6f83792d2 100644--- a/docs/content/faq.md+++ b/docs/content/faq.md@@ -32,7 +32,7 @@ Commands from project hooks and LLM configuration require approval on first run.βͺ post-create test:echo 'Running tests...'-π‘ Allow and remember? [y/N]+β Allow and remember? [y/N]```<!-- END AUTO-GENERATED -->diff --git a/docs/content/hooks.md b/docs/content/hooks.mdindex 818af8ad6..dc484d582 100644--- a/docs/content/hooks.md+++ b/docs/content/hooks.md@@ -201,7 +201,7 @@ Project commands require approval on first run. When a project defines hooks, thβͺ post-create test:echo 'Running tests...'-π‘ Allow and remember? [y/N]+β Allow and remember? [y/N]```<!-- END AUTO-GENERATED -->diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex 75546a5b2..f809ef988 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -8,7 +8,7 @@ use color_print::cformat;use worktrunk::config::{Command, WorktrunkConfig};use worktrunk::git::GitError;use worktrunk::styling::{- HINT_EMOJI, INFO_EMOJI, WARNING_EMOJI, eprint, eprintln, format_bash_with_gutter, stderr,+ INFO_EMOJI, PROMPT_EMOJI, WARNING_EMOJI, eprint, eprintln, format_bash_with_gutter, stderr,};/// Batch approval helper used when multiple commands are queued for execution.@@ -119,7 +119,7 @@ fn prompt_for_batch_approval(commands: &[&Command], project_id: &str) -> anyhow:eprint!("{}",- cformat!("{HINT_EMOJI} Allow and remember? <bold>[y/N]</> ")+ cformat!("{PROMPT_EMOJI} Allow and remember? <bold>[y/N]</> "));stderr().flush()?;diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rsindex 45fb645b2..fa1c0b434 100644--- a/src/commands/configure_shell.rs+++ b/src/commands/configure_shell.rs@@ -540,10 +540,10 @@ fn prompt_for_confirmation(fn prompt_yes_no() -> Result<bool, String> {use anstyle::Style;use std::io::Write;- use worktrunk::styling::{INFO_EMOJI, eprint, eprintln};+ use worktrunk::styling::{PROMPT_EMOJI, eprint, eprintln};let bold = Style::new().bold();- eprint!("{INFO_EMOJI} Proceed? {bold}[y/N]{bold:#} ");+ eprint!("{PROMPT_EMOJI} Proceed? {bold}[y/N]{bold:#} ");io::stderr().flush().map_err(|e| e.to_string())?;let mut input = String::new();diff --git a/src/main.rs b/src/main.rsindex 48443b375..a47f9e727 100644--- a/src/main.rs+++ b/src/main.rs@@ -536,7 +536,7 @@ fn main() {))?;} else {// No action: all shells were already configured- crate::output::info("All shells already configured")?;+ crate::output::success("All shells already configured")?;}// Restart hint: only shown if the current shell's extension changeddiff --git a/src/styling/constants.rs b/src/styling/constants.rsindex 341effe98..97e8e9024 100644--- a/src/styling/constants.rs+++ b/src/styling/constants.rs@@ -73,3 +73,7 @@ pub const HINT_EMOJI: &str = "π‘";/// Primary status: `output::info("All commands already approved")?;`/// Metadata: `cformat!("{INFO_EMOJI} <dim>Showing 5 worktrees...</>")`pub const INFO_EMOJI: &str = "βͺ";++/// Prompt emoji - use for questions requiring user input+/// `eprint!("{PROMPT_EMOJI} Proceed? [y/N] ")`+pub const PROMPT_EMOJI: &str = "β";diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex 1a80436c0..69fa13352 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -128,7 +128,7 @@ fn test_configure_shell_already_exists() {----- stderr -----βͺ Already configured shell extension & completions for [1mzsh[22m @ [1m~/.zshrc[22m- βͺ All shells already configured+ β [32mAll shells already configured[39m");});@@ -818,7 +818,7 @@ fn test_configure_shell_no_warning_when_already_configured() {----- stderr -----βͺ Already configured shell extension & completions for [1mzsh[22m @ [1m~/.zshrc[22m- βͺ All shells already configured+ β [32mAll shells already configured[39m");});}diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 6a74efbab..f428e89a2 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -589,7 +589,7 @@ fn exec_through_wrapper_from(/// repo.root_path(),/// &["y\n"], // Approve the merge/// );-/// // Output will show: "π‘ Allow and remember? [y/N] y"+/// // Output will show: "β Allow and remember? [y/N] y"/// ```#[cfg(test)]fn exec_through_wrapper_interactive(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 4a0f35229..7cdfc107b 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@@ -9,7 +9,7 @@ yβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mπ [36mRunning post-create:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m[0mtest commanddiff --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 2518c2fb5..854cbf637 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@@ -9,7 +9,7 @@ nβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mβͺ Commands declined, continuing worktree creationβ [32m[32mCreated new worktree for [1mtest-decline[22m from [1mmain[22m at [1m[REPO]/repo.test-decline[39m[22m[39mπ‘ [2mRun [90mwt config shell install[39m to enable automatic cd[22mdiff --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 18cfd2d2d..caf20ed72 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@@ -12,7 +12,7 @@ yβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mπ [36mRunning post-create:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m[0mFirst commanddiff --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 fdc012c09..1c75a873a 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@@ -12,7 +12,7 @@ nβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mβͺ Commands declined, continuing worktree creationβ [32m[32mCreated new worktree for [1mtest-mixed-decline[22m from [1mmain[22m at [1m[REPO]/repo.test-mixed-decline[39m[22m[39mπ‘ [2mRun [90mwt config shell install[39m to enable automatic cd[22mdiff --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 1b88702bb..3b07e97bb 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@@ -15,7 +15,7 @@ yβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mπ [36mRunning post-create:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m[0mFirst commanddiff --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 e074904eb..2b58cb226 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@@ -15,7 +15,7 @@ yβͺ post-create [1mtest[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mπ [36mRunning post-create [1minstall[22m:[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m[0m[0mInstalling dependencies...diff --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 be4e0ddcb..5939dfc2b 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@@ -9,7 +9,7 @@ yβͺ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m-π‘ Allow and remember? [1m[y/N][22m+β Allow and remember? [1m[y/N][22mπ‘ [33mFailed to save command approval: Failed to write config file: Permission denied (os error 13)[39mπ‘ [2mApproval will be requested again next time.[22mπ [36mRunning post-create:[39mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__readme_example_approval_prompt.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__readme_example_approval_prompt.snapindex 132fc26fb..5bf807737 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__readme_example_approval_prompt.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__readme_example_approval_prompt.snap@@ -13,4 +13,4 @@ expression: prompt_onlyβͺ post-create test:echo 'Running tests...'-π‘ Allow and remember? [y/N]+β Allow and remember? [y/N]