diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-05-16 12:47:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 12:47:18 +0200 |
commit | 5fe4d60c220c872c1e77a7ddf24fec6686c28e95 (patch) | |
tree | b6abec3006de7cd2eaecee149005d55ee4671a6b /zellij-utils | |
parent | 4b7d7c34b72e67168a2ec53b27776047ccddf522 (diff) |
feat(plugins): Plugin workers and strider (#2449)
* mvp of strider fuzzy find
* improve search ui
* various refactoringz
* moar refactoring
* even more refactoring
* tests and more refactoring
* refactor: remove unused stuff
* style(fmt): rustfmt
* debug ci
* debug ci
* correct path for plugin system tests
* fix plugin system ci tests
* remove debugging statements from test
* fix plugin worker persistence
* add test for plugin worker persistence
* style(fmt): rustfmt
* final cleanups
* remove outdated comments
Diffstat (limited to 'zellij-utils')
-rw-r--r-- | zellij-utils/Cargo.toml | 1 | ||||
-rwxr-xr-x | zellij-utils/assets/plugins/compact-bar.wasm | bin | 490119 -> 791665 bytes | |||
-rwxr-xr-x | zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm | bin | 0 -> 732287 bytes | |||
-rwxr-xr-x | zellij-utils/assets/plugins/status-bar.wasm | bin | 621069 -> 920797 bytes | |||
-rwxr-xr-x | zellij-utils/assets/plugins/strider.wasm | bin | 503181 -> 916361 bytes | |||
-rwxr-xr-x | zellij-utils/assets/plugins/tab-bar.wasm | bin | 458835 -> 762202 bytes | |||
-rw-r--r-- | zellij-utils/src/consts.rs | 5 | ||||
-rw-r--r-- | zellij-utils/src/data.rs | 4 | ||||
-rw-r--r-- | zellij-utils/src/errors.rs | 3 |
9 files changed, 13 insertions, 0 deletions
diff --git a/zellij-utils/Cargo.toml b/zellij-utils/Cargo.toml index 95f8b82aa..f12d8c78e 100644 --- a/zellij-utils/Cargo.toml +++ b/zellij-utils/Cargo.toml @@ -39,6 +39,7 @@ regex = "1.5.5" tempfile = "3.2.0" kdl = { version = "4.5.0", features = ["span"] } shellexpand = "3.0.0" +uuid = { version = "0.8.2", features = ["serde", "v4"] } #[cfg(not(target_family = "wasm"))] [target.'cfg(not(target_family = "wasm"))'.dependencies] diff --git a/zellij-utils/assets/plugins/compact-bar.wasm b/zellij-utils/assets/plugins/compact-bar.wasm Binary files differindex d59cb92b8..3145fe1da 100755 --- a/zellij-utils/assets/plugins/compact-bar.wasm +++ b/zellij-utils/assets/plugins/compact-bar.wasm diff --git a/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm Binary files differnew file mode 100755 index 000000000..a5421d720 --- /dev/null +++ b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm diff --git a/zellij-utils/assets/plugins/status-bar.wasm b/zellij-utils/assets/plugins/status-bar.wasm Binary files differindex 63907aed5..8f7ed7826 100755 --- a/zellij-utils/assets/plugins/status-bar.wasm +++ b/zellij-utils/assets/plugins/status-bar.wasm diff --git a/zellij-utils/assets/plugins/strider.wasm b/zellij-utils/assets/plugins/strider.wasm Binary files differindex 39909aaa4..929f5e8c7 100755 --- a/zellij-utils/assets/plugins/strider.wasm +++ b/zellij-utils/assets/plugins/strider.wasm diff --git a/zellij-utils/assets/plugins/tab-bar.wasm b/zellij-utils/assets/plugins/tab-bar.wasm Binary files differindex 5f59fe4fe..a8742f676 100755 --- a/zellij-utils/assets/plugins/tab-bar.wasm +++ b/zellij-utils/assets/plugins/tab-bar.wasm diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs index b851b1524..047cf9862 100644 --- a/zellij-utils/src/consts.rs +++ b/zellij-utils/src/consts.rs @@ -5,6 +5,7 @@ use directories_next::ProjectDirs; use lazy_static::lazy_static; use once_cell::sync::OnceCell; use std::path::PathBuf; +use uuid::Uuid; pub const ZELLIJ_CONFIG_FILE_ENV: &str = "ZELLIJ_CONFIG_FILE"; pub const ZELLIJ_CONFIG_DIR_ENV: &str = "ZELLIJ_CONFIG_DIR"; @@ -29,6 +30,10 @@ lazy_static! { pub static ref ZELLIJ_PROJ_DIR: ProjectDirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap(); pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.cache_dir().to_path_buf(); + pub static ref ZELLIJ_SESSION_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR + .cache_dir() + .to_path_buf() + .join(format!("{}", Uuid::new_v4())); pub static ref ZELLIJ_DEFAULT_THEMES: Themes = { let mut default_themes = Themes::default(); diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index 6da375f51..285532cc3 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -469,6 +469,10 @@ pub enum Event { SystemClipboardFailure, InputReceived, Visible(bool), + CustomMessage( + String, // message + String, // payload + ), } /// Describes the different input modes, which change the way that keystrokes will be interpreted. diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index 8b49112b9..74395e57a 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -365,6 +365,9 @@ pub enum PluginContext { RemoveClient, NewTab, ApplyCachedEvents, + ApplyCachedWorkerMessages, + PostMessageToPluginWorker, + PostMessageToPlugin, } /// Stack call representations corresponding to the different types of [`ClientInstruction`]s. |