moar cowboy
This commit is contained in:
parent
04cb8db2b9
commit
46e9858830
|
|
@ -5,7 +5,10 @@ COWBOY_MESSAGES = [
|
|||
"Yippee ki yay motherfucker! 🤠",
|
||||
"Saddle up partner! 🤠",
|
||||
"This ain't my first rodeo! 🤠",
|
||||
"Lock and load, partner! 🤠"
|
||||
"Lock and load, partner! 🤠",
|
||||
"i'll do my best not to fuck it up 🤠",
|
||||
"I'm just a baby 👶",
|
||||
"i'll try not to destroy everything 😏"
|
||||
]
|
||||
|
||||
def get_cowboy_message() -> str:
|
||||
|
|
|
|||
|
|
@ -40,14 +40,14 @@ def run_shell_command(command: str) -> Dict[str, Union[str, int, bool]]:
|
|||
- return_code: The process return code (0 typically means success)
|
||||
- success: Boolean indicating if the command succeeded (return code == 0)
|
||||
"""
|
||||
# Show just the command in a simple panel
|
||||
console.print(Panel(command, title="🐚 Shell", border_style="bright_yellow"))
|
||||
|
||||
# Check if we need approval
|
||||
cowboy_mode = _global_memory.get('config', {}).get('cowboy_mode', False)
|
||||
|
||||
if cowboy_mode:
|
||||
console.print(get_cowboy_message())
|
||||
|
||||
# Show just the command in a simple panel
|
||||
console.print(Panel(command, title="🐚 Shell", border_style="bright_yellow"))
|
||||
|
||||
if not cowboy_mode:
|
||||
if not Confirm.ask("Execute this command?", default=True):
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ def test_get_cowboy_message_returns_string():
|
|||
assert len(message) > 0
|
||||
|
||||
def test_cowboy_message_contains_emoji():
|
||||
"""Test that returned message contains the cowboy emoji"""
|
||||
"""Test that returned message contains at least one of the expected emojis"""
|
||||
message = get_cowboy_message()
|
||||
assert '🤠' in message
|
||||
expected_emojis = ['🤠', '👶', '😏']
|
||||
assert any(emoji in message for emoji in expected_emojis)
|
||||
|
||||
def test_message_from_predefined_list():
|
||||
"""Test that returned message is from our predefined list"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue