Module formatting

Module formatting 

Source
Expand description

Terminal formatting utilities using termimad for rich markdown rendering

Functions§

create_skin
Initialize a custom MadSkin with spec-ai color scheme
is_terminal
Check if we’re in a TTY (terminal) or if output is piped/redirected
render_agent_response
Render agent response with markdown formatting
render_agent_table
Create a formatted table for agent list
render_config
Format configuration display with sections
render_help
Render help text with rich markdown formatting
render_list
Render a formatted list with custom bullet styling
render_markdown
Render markdown text with the spec-ai skin Falls back to plain text if not in a terminal
render_memory
Format memory/history display with role-based color coding
render_run_stats
Render run metadata (memory recall, tools, token usage)
set_plain_text_mode
Force plain text output (for testing) Available for both unit and integration tests