Release RuneStone 0.1.4 with installable plugins and settings

This commit is contained in:
Knotty Wyvern
2026-10-04 15:05:51 -07:00
parent 0268c5c9f0
commit 6b7af0d527
82 changed files with 4150 additions and 212 deletions
+27 -3
View File
@@ -1,7 +1,31 @@
<script lang="ts">
import { startExternalPlugins } from "$lib/plugins/external";
import { onMount } from "svelte";
import { getCurrentWindow } from "@tauri-apps/api/window";
import Workbench from "$lib/layout/Workbench.svelte";
import TerminalWindow from "$lib/terminal/TerminalWindow.svelte";
import TerminalSlot from "$lib/plugins/TerminalSlot.svelte";
import { pluginHost } from "$lib/plugins/registry";
const terminalRoot = new URLSearchParams(location.search).get("terminalWindow");
let dock: TerminalSlot | undefined = $state();
let error = $state("");
const terminal = $derived.by(() => { void $pluginHost; return pluginHost.get("terminal"); });
onMount(startExternalPlugins);
function keydown(event: KeyboardEvent) {
if (!terminalRoot || event.target instanceof Element && event.target.closest("dialog, [role=menu]")) return;
const action = terminal?.shortcut(event);
if (action && action !== "toggle") { event.preventDefault(); void dock?.command(action).catch(reason => error = String(reason)); }
}
</script>
{#if terminalRoot}<TerminalWindow cwd={terminalRoot} />{:else}<Workbench />{/if}
<svelte:window onkeydown={keydown} />
{#if terminalRoot}
<div class="terminal-window">
{#if error}<p role="alert">{error}</p>{/if}
{#if terminal}
{#key terminal}
<TerminalSlot bind:this={dock} contribution={terminal} cwd={terminalRoot} visible standalone
onClose={() => void getCurrentWindow().destroy().catch(reason => error = String(reason))} />
{/key}
{:else}<p>Install and enable the Terminal plugin in Settings → Plug-ins in the main window.</p>{/if}
</div>
{:else}<Workbench />{/if}
<style>.terminal-window { height: 100vh; display: flex; flex-direction: column; }</style>