This commit is contained in:
Timothy Jaeryang Baek
2026-04-17 10:44:29 +09:00
parent bd35809105
commit 398718d505
6 changed files with 32 additions and 3 deletions
+14 -1
View File
@@ -495,6 +495,14 @@
$models.find((m) => m.id === model)?.info?.meta?.capabilities?.code_interpreter ?? true
);
let terminalCapableModels = [];
$: terminalCapableModels = (
atSelectedModel?.id ? [atSelectedModel.id] : selectedModels
).filter(
(model) =>
$models.find((m) => m.id === model)?.info?.meta?.capabilities?.terminal ?? true
);
let toggleFilters = [];
$: toggleFilters = (atSelectedModel?.id ? [atSelectedModel.id] : selectedModels)
.map((id) => ($models.find((model) => model.id === id) || {})?.filters ?? [])
@@ -530,6 +538,11 @@
codeInterpreterEnabled = false;
}
// Clear selected terminal when model doesn't support terminal
$: if ($selectedTerminalId && terminalCapableModels.length === 0) {
selectedTerminalId.set(null);
}
const scrollToBottom = () => {
const element = document.getElementById('messages-container');
element.scrollTo({
@@ -1908,7 +1921,7 @@
{#if !history?.currentId || history.messages[history.currentId]?.done == true}
<!-- Terminal Server Selector -->
{#if ($terminalServers ?? []).length > 0 || ($settings?.terminalServers ?? []).some((s) => s.url)}
{#if terminalCapableModels.length > 0 && (($terminalServers ?? []).length > 0 || ($settings?.terminalServers ?? []).some((s) => s.url))}
<TerminalMenu bind:show={showTerminalMenu} />
{/if}