Файли
Arnaud Ritti a3d5336642 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]>
2026-11-06 23:02:34 +08:00

41 рядки
1.0 KiB
TOML

# Test fixture: a tool window listing what an external program reports, and a
# terminal following one entry. Covers pinned programs (`process:`), terminals,
# settings and tree views, locally and in remote projects.
id = "jobs"
name = "Jobs"
version = "0.1.0"
description = "Test fixture: lists the jobs `jobs list` prints and follows one in the terminal."
authors = ["OpenIDEA contributors"]
engines.openidea = "^1.0"
wasm = "dist/plugin.wasm"
activation = ["on-view:jobs", "on-command:*"]
[capabilities]
required = ["process:jobs"]
optional = ["project.read", "vcs.read", "clipboard"]
[[contributes.views]]
id = "jobs"
title = "Jobs"
icon = "toolwindow-services"
location = "right"
[[contributes.commands]]
id = "follow"
title = "Jobs: Follow Selected Job"
category = "Jobs"
[[contributes.commands]]
id = "context"
title = "Jobs: Set Context"
category = "Jobs"
[[contributes.commands]]
id = "selection"
title = "Jobs: Show Selected Paths"
category = "Jobs"
[contributes.settings]
title = "Jobs"
schema = "settings.schema.json"