feat(plugins): let plugin code set context keys for its when clauses (#1762)

Plugin API 1.2 adds `ui.set-context(key, value)` and `ui.remove-context(key)`: a plugin sets `plugin.<id>.<key>` for `when` clauses, typed as `context-value` (flag, number or text), in the window the call came from or every window outside a command or event; a window's value wins over the global one. Keys are 1-64 of `A-Za-z0-9_-`, at most 100 per plugin, kept across window reloads and idle reclaim, dropped when the plugin stops or the window closes; remote windows get them through the dispatcher. The Rust SDK takes `impl Into<ContextValue>`. All components are rebuilt for the WIT change.

Closes #1622

Co-authored-by: arnaud-ritti <[email protected]>
Цей коміт міститься в:
Arnaud Ritti authored and GitHub committed 2026-11-06 23:02:34 +08:00
1 джерело 708f1b051b
коміт a3d5336642
50 files changed
+664 -24

No files matched your search

Бінарний файл не відображається.
+1 -1
Переглянути файл
@@ -1 +1 @@
adf2ab3e93e0147350b6db899ec2e44e07862e99f49609aecbc2b866e5282c3d
6183df09a561bc715ec353223b6ae76d0280c179191621e2d0ef809b7b3b2d32