From 3becec6ccfc7dc457270d4e9f0d8c957e8160ddc Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 31 Jul 2026 17:35:34 -0400 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index f83996d776..a57fbc8cf0 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -3113,9 +3113,6 @@ // in the message so the backend can inject their full content. const skillIds = [...selectedSkillIds]; - // Use the user-selected terminal from the dropdown - const activeTerminalId = $selectedTerminalId ?? null; - // Only send terminal_id if the model has terminal capability enabled const terminalEnabled = model.info?.meta?.capabilities?.terminal ?? true; const useChatVariablesFallback = @@ -3139,8 +3136,9 @@ tool_ids: toolIds.length > 0 ? toolIds : undefined, skill_ids: skillIds.length > 0 ? skillIds : undefined, terminal_id: - terminalEnabled && ($terminalServers ?? []).some((t) => t.id && t.id === activeTerminalId) - ? activeTerminalId + terminalEnabled && + ($terminalServers ?? []).some((t) => t.id && t.id === $selectedTerminalId) + ? $selectedTerminalId : undefined, tool_servers: [ ...($toolServers ?? []).filter(