| 993 | self._tool_message(message, strip, self.tool_warning_color) |
| 994 | |
| 995 | def tool_output(self, *messages, log_only=False, bold=False): |
| 996 | if messages: |
| 997 | hist = " ".join(messages) |
| 998 | hist = f"{hist.strip()}" |
| 999 | self.append_chat_history(hist, linebreak=True, blockquote=True) |
| 1000 | |
| 1001 | if log_only: |
| 1002 | return |
| 1003 | |
| 1004 | messages = list(map(Text, messages)) |
| 1005 | style = dict() |
| 1006 | if self.pretty: |
| 1007 | if self.tool_output_color: |
| 1008 | style["color"] = ensure_hash_prefix(self.tool_output_color) |
| 1009 | style["reverse"] = bold |
| 1010 | |
| 1011 | style = RichStyle(**style) |
| 1012 | self.console.print(*messages, style=style) |
| 1013 | |
| 1014 | def get_assistant_mdstream(self): |
| 1015 | mdargs = dict( |