Show shell command and its output.
(command, output, error=False)
| 84 | border_style='yellow', box=box.ROUNDED)) |
| 85 | |
| 86 | def show_shell(command, output, error=False): |
| 87 | """Show shell command and its output.""" |
| 88 | content = Text() |
| 89 | content.append(f'$ {command}\n', style='bold cyan') |
| 90 | if output.strip(): |
| 91 | style = 'red' if error else 'white' |
| 92 | content.append(output.strip(), style=style) |
| 93 | else: |
| 94 | content.append('(no output)', style='dim') |
| 95 | border = 'red' if error else 'blue' |
| 96 | console.print(Panel(content, title='Shell', |
| 97 | border_style=border, box=box.ROUNDED)) |
| 98 | |
| 99 | def show_tool_generic(name, args, result): |
| 100 | """Show any other tool call cleanly.""" |
no test coverage detected