mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-01 17:59:28 -05:00
refac: tools behaviour
This commit is contained in:
@@ -89,9 +89,10 @@
|
||||
<div class=" flex-shrink-0">
|
||||
<Switch
|
||||
state={tools[toolId].enabled}
|
||||
on:change={async () => {
|
||||
on:change={async (e) => {
|
||||
const state = e.detail;
|
||||
await tick();
|
||||
if (tools[toolId].enabled) {
|
||||
if (state) {
|
||||
selectedToolIds = [...selectedToolIds, toolId];
|
||||
} else {
|
||||
selectedToolIds = selectedToolIds.filter((id) => id !== toolId);
|
||||
|
||||
Reference in New Issue
Block a user