{ const val = e.currentTarget.value.trim(); onWorkingDirectoryChange(val || null); }} /> {#if workingDirectory} {#if cwdExists === true} {:else if cwdExists === false} {:else} {/if} {/if}
{#if mode === "manual"}
Key
Model
{#if activeModelId}
Thinking
{/if} {:else if mode === "subagent"} {@const subModels = activeAgentModels ?? []} {@const hasSubModels = subModels.length > 1} {@const subActiveIdx = subModels.findIndex( (m) => m.key_id === activeKeyId && m.model_id === activeModelId, )}
SubAgent {activeAgentSlug}
Key {activeKeyId ?? "default"}
Model {activeModelId ?? "default"}
{#if hasSubModels} {@const displayIdx = subActiveIdx >= 0 ? subActiveIdx : 0}
Model fallback chain
{#each subModels as _, i} {i + 1} {/each}
{#each subModels as m, i}
{i + 1}. {m.key_id} / {m.model_id} {effortLabel(m.effort)}
{/each}
{/if}

This tab was spawned by a parent agent. Settings cannot be changed.

{:else} {#if loadingAgents}
Loading agents...
{:else if visibleAgents.length === 0}

No agents configured.

{:else}
{#each visibleAgents as agent (agent.slug + ":" + agent.scope)} {@const isActive = activeAgentSlug === agent.slug} {@const hasMultipleModels = agent.models.length > 1} {@const currentIdx = isActive ? agent.models.findIndex( (m) => m.key_id === activeKeyId && m.model_id === activeModelId, ) : -1}
{ // Only switch agent — don't reset the slider position onAgentChange(agent); const cwdEl = document.getElementById("cwd-input") as HTMLInputElement | null; if (cwdEl) cwdEl.value = agent.cwd ?? ""; }} onkeydown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); onAgentChange(agent); const cwdEl = document.getElementById("cwd-input") as HTMLInputElement | null; if (cwdEl) cwdEl.value = agent.cwd ?? ""; } }} >
{agent.name}
{agent.models.length} model{agent.models.length !== 1 ? "s" : ""} {agent.scope === "global" ? "global" : "project"}
{#if agent.description}

{agent.description}

{/if} {#if isActive && hasMultipleModels} {@const displayIdx = sliderDragging !== null ? sliderDragging : (currentIdx >= 0 ? currentIdx : 0)} {@const displayModel = agent.models[displayIdx]}
{displayModel ? `${displayModel.key_id} / ${displayModel.model_id}` : `${activeKeyId} / ${activeModelId}`} {effortLabel(displayModel?.effort)}
= 0 ? currentIdx : 0} class="range range-xs" step="1" oninput={(e) => { sliderDragging = Number(e.currentTarget.value); }} onchange={(e) => { const idx = Number(e.currentTarget.value); const m = agent.models[idx]; if (m) onModelChange(m.key_id, m.model_id); sliderDragging = null; }} onclick={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} />
{#each agent.models as _, i} {i + 1} {/each}
{/if}
{/each}
{/if} {/if}

While this tab is idle, replays the cached conversation every {warmIntervalLabel} so the provider cache stays warm for your next message. Warming traffic is debug-only — it never touches history, the Cache Rate metric, or context size.

{#if warm.enabled}
Last request (warming) {warm.lastPct === null ? "-%" : `${warm.lastPct}%`}
Next warm in {#if warm.firing} warming… {:else if warmCountdown !== null} {warmCountdown} {:else} — {/if}
{#if warm.error}
{warm.error}
{/if}
{/if}
{#if showKeyModal} {/if} {#if showModelModal} {/if}