Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable chat and suggestions on busy #783

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lumen/ai/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import param
import yaml

from panel import Card, bind
from panel import Card, bind, state
from panel.chat import ChatInterface, ChatStep
from panel.layout import Column, FlexBox, Tabs
from panel.pane import HTML
Expand Down Expand Up @@ -247,6 +247,7 @@ async def run_demo(event):
button_style="outline",
on_click=use_suggestion,
margin=5,
disabled=state.param.busy
)
for suggestion in suggestions
],
Expand All @@ -259,6 +260,7 @@ async def run_demo(event):
button_type="primary",
on_click=run_demo,
margin=5,
disabled=state.param.busy
))
disable_js = "cb_obj.origin.disabled = true; setTimeout(() => cb_obj.origin.disabled = false, 3000)"
for b in suggestion_buttons:
Expand Down
2 changes: 1 addition & 1 deletion lumen/ai/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def explore_table_if_single(event):
def get_explorers(load):
if not load:
return
with explore_button.param.update(loading=True):
with explore_button.param.update(loading=True), self._coordinator.interface.param.update(loading=True):
explorers = []
for table in table_select.value:
source = source_map[table]
Expand Down