What problem does streamlit-coco solve for a Streamlit app author?#
Answer
B — The library provides session state, transcript streaming, tool cards, and approval plumbing as composable functions, so an app author writes the page and options, not the session bridge.
B — app_viewer(app_dir, ...) spawns a child streamlit run process, embeds it in an iframe, and offers Fix with CoCo by scraping the preview log.
Q5Multiple choice
Which command launches the first-party reference implementation of the preferred pattern (panel() + chat_input_bar())?#
Answer
B — The Makefile maps chat to Run examples/chat_app.py; demo, run-app, and copilot are not Makefile targets.
Q6Multiple choice
Which bundle of prerequisites is accurate for starting the Enablement track?#
Answer
A — Prerequisites are Python 3.10+, a Cortex-Code-enabled Snowflake account, the cortex CLI on PATH (or CORTEX_CODE_CLI_PATH), and a working connections.toml/config.toml — no dedicated warehouse, Docker, or Native App manifest is required.
Q7multiple choice select all
Which of these are part of the preferred-pattern pipeline demonstrated in examples/chat_app.py?#
Answer
A, B, C, D, E — A, B, C, D, E
Q8Multiple choice
Which command installs streamlit-coco for someone who only needs the published package, not a checkout of the development repo?#
Answer
A — The published-package-only path is pip install "streamlit-coco[sdk]"; make install targets a repo checkout, and the other two commands do not install this package.
Every answer is also reachable per question above. This section keeps the full key for offline review and printing.
Show the complete answer key
A1
B — The library provides session state, transcript streaming, tool cards, and approval plumbing as composable functions, so an app author writes the page and options, not the session bridge.
A2
B — panel(session, kwargs) -> CocoChatResult is the native transcript/field output primitive with approvals and a Stop control.
A3
A — copilot_rail() composes panel() into a right-rail Copilot with a connection picker, queued jobs, transcript display config, and example questions.
A4
B — app_viewer(app_dir, ...) spawns a child streamlit run process, embeds it in an iframe, and offers Fix with CoCo by scraping the preview log.
A5
B — The Makefile maps chat to Run examples/chat_app.py; demo, run-app, and copilot are not Makefile targets.
A6
A — Prerequisites are Python 3.10+, a Cortex-Code-enabled Snowflake account, the cortex CLI on PATH (or CORTEX_CODE_CLI_PATH), and a working connections.toml/config.toml — no dedicated warehouse, Docker, or Native App manifest is required.
A7
A, B, C, D, E — A, B, C, D, E
A8
A — The published-package-only path is pip install "streamlit-coco[sdk]"; make install targets a repo checkout, and the other two commands do not install this package.
A9
B — streamlit-coco is released under Apache-2.0.
A10
B — The pack describes version 0.1.9, stated as alpha — the API may still move.