MCPcopy
hub / github.com/mitmproxy/mitmproxy / sig_message

Method sig_message

mitmproxy/tools/console/statusbar.py:86–103  ·  view source on GitHub ↗
(
        self, message: tuple[str, str] | str, expire: int | None = 1
    )

Source from the content-addressed store, hash-verified

84 self.show_quickhelp()
85
86 def sig_message(
87 self, message: tuple[str, str] | str, expire: int | None = 1
88 ) -> None:
89 if self.prompting:
90 return
91 # Ensure widgets are visible for messages
92 self.ensure_bottom_bar_is_visible()
93 cols, _ = self.master.ui.get_cols_rows()
94 w = urwid.Text(shorten_message(message, cols))
95 self.top._w = w
96 self.bottom._w = urwid.Text("")
97 if expire:
98
99 def cb():
100 if w == self.top._w:
101 self.show_quickhelp()
102
103 signals.call_in.send(seconds=expire, callback=cb)
104
105 def sig_prompt(
106 self, prompt: str, text: str | None, callback: Callable[[str], None]

Calls 3

shorten_messageFunction · 0.85
sendMethod · 0.45