MCPcopy Create free account
hub / github.com/Chainlit/cookbook / handle_file_selection

Function handle_file_selection

custom-element/app.py:5–8  ·  view source on GitHub ↗
(action)

Source from the content-addressed store, hash-verified

3
4@cl.action_callback("handle_file_selection")
5async def handle_file_selection(action):
6 selected_files = action.payload.get("selected_files", [])
7 msg = cl.Message(content=f"Selected files : {'.'.join(selected_files)}")
8 await msg.send()
9
10@cl.on_chat_start
11async def start():

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected