Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Chainlit_chainlit /cypress /e2e /command /main.py
| import chainlit as cl | |
| commands = [ | |
| {"id": "Picture", "icon": "image", "description": "Use DALL-E"}, | |
| {"id": "Search", "icon": "globe", "description": "Find on the web", "button": True}, | |
| { | |
| "id": "Canvas", | |
| "icon": "pen-line", | |
| "description": "Collaborate on writing and code", | |
| }, | |
| { | |
| "id": "Sticky", | |
| "icon": "pin", | |
| "description": "Persistent tool stays selected", | |
| "persistent": True, | |
| }, | |
| { | |
| "id": "StickyButton", | |
| "icon": "bookmark", | |
| "description": "Persistent button tool", | |
| "button": True, | |
| "persistent": True, | |
| }, | |
| ] | |
| async def start(): | |
| await cl.context.emitter.set_commands(commands) | |
| async def message(msg: cl.Message): | |
| # Clear all commands after choosing Picture to test UI behavior with zero commands | |
| # This simulates a scenario where certain commands might change the available tool set | |
| if msg.command == "Picture": | |
| await cl.context.emitter.set_commands([]) | |
| await cl.Message(content=f"Command: {msg.command}").send() | |
Xet Storage Details
- Size:
- 1.11 kB
- Xet hash:
- a4b0abe46429189c25ba439897b23dd0cb25aa558ac58550fa7674947480ed86
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.