дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
Plugins could write the clipboard but not read it. ui.read-clipboard() (SDK host::read_clipboard()) returns the text and a PNG image of the user's clipboard, behind a new clipboard.read capability. Only calls the user started can read: plugin commands and view actions run by the user, not event handlers, web view messages or commands chained through command-runner. The host never reads the clipboard itself: it asks the invoking window (ClipboardRequested / plugin_answer_clipboard), so remote development reads the client's clipboard, and a remote window asks the user first. Plugin API 1.11.0; components rebuilt. Closes #3524 Co-authored-by: bertyhell <[email protected]>
26 рядки
675 B
TOML
26 рядки
675 B
TOML
# Test fixture: `ui.read-clipboard` (API 1.11) from a command, a view's button,
|
|
# a web view message and an event handler; only the first two are the user's.
|
|
id = "test.clipboard"
|
|
name = "Clipboard fixture"
|
|
version = "0.1.0"
|
|
engines.openidea = "^1.11"
|
|
wasm = "dist/plugin.wasm"
|
|
activation = ["on-command:*", "on-view:clipboard", "on-event:editor-focused"]
|
|
|
|
[capabilities]
|
|
optional = ["clipboard.read", "events"]
|
|
|
|
[[contributes.commands]]
|
|
id = "read"
|
|
title = "Read the clipboard"
|
|
|
|
[[contributes.commands]]
|
|
id = "last"
|
|
title = "What the last view action or event read"
|
|
|
|
[[contributes.views]]
|
|
id = "clipboard"
|
|
title = "Clipboard"
|
|
icon = "toolwindow-services"
|
|
location = "right"
|