MCPcopy Index your code
hub / github.com/dbcli/mycli / get_custom_toolbar

Function get_custom_toolbar

mycli/main_modes/repl.py:249–264  ·  view source on GitHub ↗
(
    mycli: 'MyCli',
    toolbar_format: str,
)

Source from the content-addressed store, hash-verified

247
248
249def get_custom_toolbar(
250 mycli: 'MyCli',
251 toolbar_format: str,
252) -> FormattedText:
253 if not mycli.prompt_session:
254 return to_formatted_text('')
255 if not mycli.prompt_session.app:
256 return to_formatted_text('')
257 if mycli.prompt_session.app.current_buffer.text:
258 return mycli.last_custom_toolbar_message
259 mycli.last_custom_toolbar_message = render_prompt_string(
260 mycli,
261 toolbar_format,
262 mycli.prompt_session.app.render_counter,
263 )
264 return mycli.last_custom_toolbar_message
265
266
267def maybe_html_escape(string: str, is_html: bool) -> str:

Callers 1

get_toolbar_tokensFunction · 0.85

Calls 1

render_prompt_stringFunction · 0.70

Tested by

no test coverage detected