feat(v2): add SSH management, ctx integration, themes, detached mode, auto-updater

SSH session management:
- SshSession struct + ssh_sessions SQLite table in session.rs
- CRUD Tauri commands (ssh_session_list/save/delete) in lib.rs
- SshDialog.svelte (create/edit modal), SshSessionList.svelte (sidebar)
- SSH pane routes to TerminalPane with shell=/usr/bin/ssh + args

ctx context database integration:
- ctx.rs: read-only CtxDb (SQLITE_OPEN_READ_ONLY for ~/.claude-context/context.db)
- 5 Tauri commands (ctx_list_projects/get_context/get_shared/get_summaries/search)
- ContextPane.svelte with project selector, tabs, search
- ctx-bridge.ts adapter

Catppuccin theme flavors (Latte/Frappe/Macchiato/Mocha):
- themes.ts: all 4 palette definitions + buildXtermTheme/applyCssVariables
- theme.svelte.ts: reactive store with SQLite persistence
- SettingsDialog flavor dropdown, TerminalPane theme-aware

Detached pane mode (pop-out windows):
- detach.ts: isDetachedMode/getDetachedConfig from URL params
- App.svelte: conditional rendering of single pane without chrome

Other additions:
- Shiki syntax highlighting (highlight.ts, lazy singleton, 13 languages)
- Tauri auto-updater plugin (tauri-plugin-updater + updater.ts)
- AgentPane markdown rendering with Shiki code highlighting
- New deps: shiki, @tauri-apps/plugin-updater, tauri-plugin-updater
This commit is contained in:
Hibryda 2026-03-06 14:50:00 +01:00
parent 4f2614186d
commit 4db7ccff60
28 changed files with 2992 additions and 51 deletions

View file

@ -6,8 +6,14 @@
import ToastContainer from './lib/components/Notifications/ToastContainer.svelte';
import SettingsDialog from './lib/components/Settings/SettingsDialog.svelte';
import { addPane, focusPaneByIndex, removePane, getPanes, restoreFromDb } from './lib/stores/layout.svelte';
import { initTheme } from './lib/stores/theme.svelte';
import { isDetachedMode, getDetachedConfig } from './lib/utils/detach';
import TerminalPane from './lib/components/Terminal/TerminalPane.svelte';
import AgentPane from './lib/components/Agent/AgentPane.svelte';
let settingsOpen = $state(false);
let detached = isDetachedMode();
let detachedConfig = getDetachedConfig();
import { startAgentDispatcher, stopAgentDispatcher } from './lib/agent-dispatcher';
function newTerminal() {
@ -31,8 +37,9 @@
}
onMount(() => {
initTheme();
startAgentDispatcher();
restoreFromDb();
if (!detached) restoreFromDb();
function handleKeydown(e: KeyboardEvent) {
// Ctrl+N — new terminal
@ -80,17 +87,42 @@
});
</script>
<aside class="sidebar">
<SessionList />
</aside>
<main class="workspace">
<TilingGrid />
</main>
<StatusBar />
{#if detached && detachedConfig}
<div class="detached-pane">
{#if detachedConfig.type === 'terminal' || detachedConfig.type === 'ssh'}
<TerminalPane
shell={detachedConfig.shell}
cwd={detachedConfig.cwd}
args={detachedConfig.args}
/>
{:else if detachedConfig.type === 'agent'}
<AgentPane
sessionId={detachedConfig.sessionId ?? crypto.randomUUID()}
cwd={detachedConfig.cwd}
/>
{:else}
<TerminalPane />
{/if}
</div>
{:else}
<aside class="sidebar">
<SessionList />
</aside>
<main class="workspace">
<TilingGrid />
</main>
<StatusBar />
<SettingsDialog open={settingsOpen} onClose={() => settingsOpen = false} />
{/if}
<ToastContainer />
<SettingsDialog open={settingsOpen} onClose={() => settingsOpen = false} />
<style>
.detached-pane {
height: 100vh;
width: 100vw;
background: var(--bg-primary);
}
.sidebar {
background: var(--bg-secondary);
border-right: 1px solid var(--border);