дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
Plugins get a host-owned WebSocket resource (net.websocket-connect → websocket with id/send/drain/close; dropping it closes the transport). The connection is bound to the project it was opened for, needs the endpoint's net:<host> grant, uses WSS outside loopback with the shared rustls config, and is capped at eight per plugin. Request headers (secret placeholders expanded) go with the handshake, except the ones the handshake owns; an empty subprotocol requests none; the handshake is bounded by the call's I/O budget. Incoming frames queue in a bounded FIFO, signalled by the websocket-ready event. Checked-in components are rebuilt for API 1.6. Co-authored-by: SorPuti <[email protected]>
23 рядки
1.4 KiB
Plaintext
23 рядки
1.4 KiB
Plaintext
package openidea:[email protected];
|
|
|
|
/// Project-scoped decorations (API 1.4). Requires project.read; paths must be inside
|
|
/// an open project. Sets belong to the plugin and disappear when it stops.
|
|
/// Styles: highlight, search, added, modified, removed, warning, error, info,
|
|
/// underline, strikethrough, muted. Unknown styles are ignored. Theme tokens only.
|
|
interface decorations {
|
|
use types.{error, range};
|
|
/// An editor annotation; after is plain text shown after the range.
|
|
record decoration { range: range, style: string, hover: option<string>, after: option<string> }
|
|
/// A project-tree annotation; badge is at most two Unicode characters.
|
|
record file-decoration { badge: option<string>, style: string, tooltip: option<string> }
|
|
/// Replace this set for a file. At most 10,000 items/file and 50 editor sets/plugin.
|
|
/// Metadata is bounded to 4 MiB per plugin. Unknown styles are ignored.
|
|
set: func(path: string, set-id: string, items: list<decoration>) -> result<_, error>;
|
|
/// Remove this editor set from every file/project.
|
|
clear: func(set-id: string) -> result<_, error>;
|
|
/// Replace this set's tree annotation for a file; at most 50 tree sets/plugin.
|
|
set-file: func(path: string, set-id: string, item: file-decoration) -> result<_, error>;
|
|
/// Remove this tree set from every file/project.
|
|
clear-file: func(set-id: string) -> result<_, error>;
|
|
}
|