From bcb50fe7b0b1596ac170b9f3463ffcbcaca49a86 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:46:17 -0400 Subject: [PATCH] fix: derive integrations toggle state from the selected ids (#28807) --- .../chat/MessageInput/IntegrationsMenu.svelte | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte b/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte index 40d7c49dbc..f22e5526c1 100644 --- a/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte +++ b/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte @@ -34,7 +34,6 @@ id: string; name: string; description?: string; - enabled: boolean; meta?: { description?: string }; is_active?: boolean; authenticated?: boolean; @@ -113,8 +112,7 @@ a[tool.id] = { ...tool, name: tool.name, - description: tool.meta?.description, - enabled: selectedToolIds.includes(tool.id) + description: tool.meta?.description }; return a; }, {}); @@ -130,8 +128,7 @@ items[`direct_server:${serverIdx}`] = { id: `direct_server:${serverIdx}`, name, - description: server.info.description ?? '', - enabled: selectedToolIds.includes(`direct_server:${serverIdx}`) + description: server.info.description ?? '' }; } } @@ -150,8 +147,7 @@ a[skill.id] = { ...skill, name: skill.name, - description: skill.description, - enabled: selectedSkillIds.includes(skill.id) + description: skill.description }; return a; }, {}); @@ -229,9 +225,7 @@ return; } - tool.enabled = !tool.enabled; - - const state = tool.enabled; + const state = !selectedToolIds.includes(toolId); await tick(); if (state) { @@ -245,9 +239,7 @@ const skill = skills?.[skillId]; if (!skill) return; - skill.enabled = !skill.enabled; - - const state = skill.enabled; + const state = !selectedSkillIds.includes(skillId); await tick(); if (state) { @@ -506,7 +498,7 @@ {/each} @@ -620,7 +612,7 @@ {#each skillIds as skillId} {/each}