MCPcopy Create free account
hub / github.com/aliyun/data-agent-skill / _stream_response

Function _stream_response

scripts/cli/streaming.py:355–410  ·  view source on GitHub ↗

Stream response tokens to stdout in real-time. Uses StreamState to track cross-event context (plan progress, output_conclusion accumulation, tool_call_response lifecycle). Returns (got_content: bool, need_user_confirm: bool, output_text: str).

(
    message_handler: MessageHandler,
    session,
    query: str,
    data_source: Optional[DataSource] = None,
    output_mode: str = "summary",
    output_dir: Optional[Path] = None,
    process_log_handler: Optional[StructuredLogHandler] = None,
    is_attach: bool = False,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

file_query_executorFunction · 0.90
cmd_fileFunction · 0.90
_db_batchFunction · 0.90
_db_singleFunction · 0.90
attach_query_executorFunction · 0.90
cmd_attachFunction · 0.90

Calls 7

StreamStateClass · 0.85
init_structured_loggingFunction · 0.85
_print_eventFunction · 0.85
close_structured_loggingFunction · 0.85
_finalize_streamFunction · 0.85
_outFunction · 0.85
stream_eventsMethod · 0.80

Tested by

no test coverage detected