Skip to content

Commit 0b87414

Browse files
committed
chore: Add artificial delay to message response
1 parent 11bc384 commit 0b87414

File tree

1 file changed

+4
-0
lines changed
  • tests/playwright/shiny/components/chat/icon

1 file changed

+4
-0
lines changed

tests/playwright/shiny/components/chat/icon/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import asyncio
2+
13
import faicons
24

35
from shiny.express import ui
@@ -22,6 +24,7 @@
2224

2325
@chat_default.on_user_submit
2426
async def handle_user_input_default(user_input: str):
27+
await asyncio.sleep(1)
2528
await chat_default.append_message(f"You said: {user_input}")
2629

2730
# Otter Bot -----------------------------------------------------------------------
@@ -41,6 +44,7 @@ async def handle_user_input_default(user_input: str):
4144

4245
@chat_otter.on_user_submit
4346
async def handle_user_input_otter(user_input: str):
47+
await asyncio.sleep(1)
4448
await chat_otter.append_message(f"You said: {user_input}")
4549

4650
# SVG Bot -------------------------------------------------------------------------

0 commit comments

Comments
 (0)