{#if !activeVoice()?.voiceMode}
Terminal
{/if}
{#each tabs as tab (tab.id)}
{/each}
{#if showMenu}
{#each hosts as h}
{/each}
{/if}
{#if activeTab && tabs.find(t => t.id === activeTab)?.connected && activeVoice()}
{@const v = activeVoice()}
{/if}
{#if !tabs.length}
Click + to open a terminal
{/if}
{#each tabs as tab (tab.id)}
{/each}
{#if activeVoice()?.voiceMode}
{@const v = activeVoice()}
Voice Mode
{#if v.talkMode === "hold"}
{:else if v.talkMode === "tap"}
{:else}
{/if}
{#if v.transcript}
"{v.transcript}"
{:else}
{v.speaking ? 'Speaking...' : v.listening ? 'Listening...' : 'Ready'}
{/if}
{/if}