дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-26 20:46:22 +02:00
[[contributes.overlays]] declares a package web page that floats over the workbench at one of nine anchors while its when clause holds. It never takes the keyboard focus when shown (out of the tab order), sits under dialogs, popups and notifications, and can let every click through (interactive = false). The page moves and resizes itself with openidea.overlay.get() / place({ anchor, width, height }); sizes are clamped to 40-800 px. It needs no code and no capability, since the page sees nothing of the IDE.
Overlays are gated on plugin API 1.18.0 (package openidea:[email protected].0, engine, SDK, api_compat, rebuilt components); 1.17 is listed as shipped with 0.1.53.
Part of #6012
Co-authored-by: xirf <[email protected]>
51 рядки
1.6 KiB
Plaintext
51 рядки
1.6 KiB
Plaintext
package openidea:[email protected];
|
|
|
|
/// What the pane beside the Services tree shows for a plugin's node.
|
|
interface detail-types {
|
|
/// A switch above a log; when on, `args` are appended and the program
|
|
/// starts again.
|
|
record log-toggle {
|
|
id: string,
|
|
label: string,
|
|
args: list<string>,
|
|
}
|
|
|
|
/// A program the IDE runs, its output followed in a log (ANSI stripped,
|
|
/// the last 5000 lines) until it exits or the pane closes. Needs the
|
|
/// plugin's `process:<program>` grant; runs in the project root.
|
|
record process-log {
|
|
program: string,
|
|
args: list<string>,
|
|
toggles: list<log-toggle>,
|
|
}
|
|
|
|
/// The body of a tab.
|
|
variant pane {
|
|
/// A centred message: an empty state or why there is nothing to show.
|
|
message(string),
|
|
/// Read-only text the user can select and copy, at most 1 MiB.
|
|
text(string),
|
|
log(process-log),
|
|
}
|
|
|
|
/// A tab of a node's pane; the IDE switches tabs without calling the plugin.
|
|
record tab {
|
|
id: string,
|
|
label: string,
|
|
body: pane,
|
|
}
|
|
}
|
|
|
|
/// The detail pane of the nodes of a plugin's `location = "services"` views.
|
|
/// The nodes themselves, the toolbar and their events come from
|
|
/// `view-provider` (`render` / `handle` of the view).
|
|
interface detail-provider {
|
|
use types.{error};
|
|
use invocation.{invocation};
|
|
use detail-types.{tab};
|
|
|
|
/// The tabs of node `key` of view `view` (at most 8), rendered when the
|
|
/// node is selected and again after `views.refresh(view)`.
|
|
detail: func(view: string, key: string, ctx: borrow<invocation>) -> result<list<tab>, error>;
|
|
}
|