Make Terminal a native feature

- Move the Terminal plugin into src/lib/features/terminal/ on the host Svelte runtime, with xterm 6.0.0 and addon-fit 0.11.0.
- Buttons, shortcuts, Help rows, and the close guard follow the Terminal switch. The first use loads the module.
- Add Settings → Terminal and the terminal settings section. The first start copies the old runestone.terminal key.
- The 16 ANSI colors come from the --rs-ansi-* tokens.
- Off asks first when a shell runs in any window (pty_running).
- Rust: no pty-data or pty-exit events, an owner check for write, resize, and close, output joined up to 64 KiB or 8 ms, and the sessions of a reloaded page close.
- Remove api.pty, the terminal contribution, TerminalSlot, and the plugin loader of the smoke harness.
- Check only the tested switches in the Background smoke test.
- Update the tests, the menu inventory, the docs, and UI-058.
This commit is contained in:
Knotty Wyvern
2026-10-29 19:02:58 -07:00
parent 53b9cea7f0
commit 833f793244
78 changed files with 2971 additions and 659 deletions
+11 -1
View File
@@ -4,7 +4,7 @@
import { message, tr } from "../i18n/index.ts";
import type { PluginCommand, PluginView } from "../plugins/sdk.ts";
export type FeatureId = "git" | "background";
export type FeatureId = "git" | "background" | "terminal";
/** A view of a feature. The workbench shows it as a tab or in the side pane, as it shows a plugin view. */
export interface FeatureViewInfo {
@@ -69,6 +69,16 @@ export const FEATURES: readonly FeatureEntry[] = [
{ id: "pause", title: () => tr("Pause background"), icon: "pause" },
],
},
{
// Terminal replaces the Terminal plugin. Its panel is not a view: the workbench and the terminal window show it
// (`src/lib/features/TerminalHost.svelte`), and the first use loads the module. Its settings are in Settings → Terminal.
id: "terminal", owner: "runestone.terminal", name: message("Terminal"),
description: message("Run shells, tasks, and the active file in a panel below the editor or in a separate window."),
keywords: "terminal shell console powershell bash cmd command prompt task run pty xterm",
defaultOn: true, followsPackage: true,
views: [],
commands: [],
},
];
export function featureEntry(id: FeatureId): FeatureEntry {