feat(electrobun): add xterm.js terminal with image addon (Sixel/iTerm2)

- Terminal.svelte component with @xterm/xterm + Canvas + Fit + Image addons
- Catppuccin Mocha terminal theme matching main app
- Sixel, iTerm2 inline image protocol support via xterm-addon-image
- ResizeObserver for responsive terminal sizing
- Demo cargo test output in terminal section below agent messages
This commit is contained in:
Hibryda 2026-03-20 01:40:24 +01:00
parent b79fbf688e
commit f97ea95373
10 changed files with 241 additions and 23 deletions

View file

@ -1,4 +1,6 @@
<script lang="ts">
import Terminal from './Terminal.svelte';
// ── Types ────────────────────────────────────────────────────
type AgentStatus = 'running' | 'idle' | 'stalled';
type MsgRole = 'user' | 'assistant' | 'tool-call' | 'tool-result';
@ -165,16 +167,22 @@
role="tabpanel"
aria-label="Model"
>
{#each project.messages as msg (msg.id)}
<div class="msg">
<span class="msg-role {msg.role.split('-')[0]}">{msg.role}</span>
<div
class="msg-body"
class:tool-call={msg.role === 'tool-call'}
class:tool-result={msg.role === 'tool-result'}
>{msg.content}</div>
</div>
{/each}
<div class="agent-messages">
{#each project.messages as msg (msg.id)}
<div class="msg">
<span class="msg-role {msg.role.split('-')[0]}">{msg.role}</span>
<div
class="msg-body"
class:tool-call={msg.role === 'tool-call'}
class:tool-result={msg.role === 'tool-result'}
>{msg.content}</div>
</div>
{/each}
</div>
<!-- Terminal section -->
<div class="terminal-section">
<Terminal />
</div>
</div>
<!-- Docs tab placeholder -->