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:
@@ -8,7 +8,7 @@ use crate::error::{Error, Result};
|
||||
use crate::plugins::{legacy_packages, LegacyPackage};
|
||||
|
||||
/// The packages that native features replace. A request for another ID fails.
|
||||
pub const LEGACY_PACKAGES: [&str; 2] = ["runestone.git", "runestone.bg-slideshow"];
|
||||
pub const LEGACY_PACKAGES: [&str; 3] = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal"];
|
||||
|
||||
fn check(ids: &[String]) -> Result<()> {
|
||||
if ids.len() > LEGACY_PACKAGES.len() {
|
||||
@@ -34,10 +34,14 @@ mod tests {
|
||||
fn only_the_packages_of_native_features_are_read() {
|
||||
assert!(check(&["runestone.git".into()]).is_ok());
|
||||
assert!(check(&["runestone.git".into(), "runestone.bg-slideshow".into()]).is_ok());
|
||||
assert!(check(&["runestone.terminal".into()]).is_ok());
|
||||
assert!(check(&LEGACY_PACKAGES.map(String::from)).is_ok());
|
||||
assert!(check(&[]).is_ok());
|
||||
for id in ["runestone.csv-viewer", "../plugin-state", "runestone.git/..", ""] {
|
||||
assert!(check(&[id.into()]).is_err(), "{id}");
|
||||
}
|
||||
assert!(check(&["runestone.git".into(), "runestone.bg-slideshow".into(), "runestone.git".into()]).is_err());
|
||||
let too_many = ["runestone.git", "runestone.bg-slideshow", "runestone.terminal", "runestone.git"].map(String::from);
|
||||
assert!(too_many.len() > LEGACY_PACKAGES.len());
|
||||
assert!(check(&too_many).is_err());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user