Skip to content

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.toml
index 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 issues
exclude = [
+ # 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.md
index 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.md
index 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.md
index 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.md
index 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.rs
index 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.rs
index 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.rs
index 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 changed
diff --git a/src/styling/constants.rs b/src/styling/constants.rs
index 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.rs
index 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 zsh @ ~/.zshrc
- βšͺ All shells already configured
+ βœ… All shells already configured
");
});
@@ -818,7 +818,7 @@ fn test_configure_shell_no_warning_when_already_configured() {
----- stderr -----
βšͺ Already configured shell extension & completions for zsh @ ~/.zshrc
- βšͺ All shells already configured
+ βœ… All shells already configured
");
});
}
diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rs
index 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.snap
index 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:
  echo 'test command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
πŸ”„ Running post-create:
  echo 'test command'
test command
diff --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.snap
index 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:
  echo 'test command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
βšͺ Commands declined, continuing worktree creation
βœ… Created new worktree for test-decline from main at [REPO]/repo.test-decline
πŸ’‘ Run wt config shell install to enable automatic cd
diff --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.snap
index 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:
  echo 'Third command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
πŸ”„ Running post-create:
  echo 'First command'
First command
diff --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.snap
index 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:
  echo 'Third command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
βšͺ Commands declined, continuing worktree creation
βœ… Created new worktree for test-mixed-decline from main at [REPO]/repo.test-mixed-decline
πŸ’‘ Run wt config shell install to enable automatic cd
diff --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.snap
index 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:
  echo 'Third command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
πŸ”„ Running post-create:
  echo 'First command'
First command
diff --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.snap
index 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 test:
  echo 'Running tests...'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
πŸ”„ Running post-create install:
  echo 'Installing dependencies...'
Installing 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.snap
index 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:
  echo 'test command'
-πŸ’‘ Allow and remember? [y/N]
+❓ Allow and remember? [y/N]
🟑 Failed to save command approval: Failed to write config file: Permission denied (os error 13)
πŸ’‘ Approval will be requested again next time.
πŸ”„ Running post-create:
diff --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.snap
index 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]