Skip to content

Commit

Permalink
disable chat and suggestions on busy (#783)
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
  • Loading branch information
ahuang11 and philippjfr authored Dec 4, 2024
1 parent 170482b commit 1d6b60b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lumen/ai/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ async def run_demo(event):
button_style="outline",
on_click=use_suggestion,
margin=5,
disabled=self.interface.param.loading
)
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=self.interface.param.loading
))
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 @@ -378,7 +378,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

0 comments on commit 1d6b60b

Please sign in to comment.