diff --git a/Cargo.lock b/Cargo.lock index 99c1c4f5b..e8c7a1c01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4145,7 +4145,7 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "ide-agent" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "encoding_rs", @@ -4169,7 +4169,7 @@ dependencies = [ [[package]] name = "ide-analysis" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ast-grep-core", "ide-core", @@ -4183,7 +4183,7 @@ dependencies = [ [[package]] name = "ide-android" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "serde", @@ -4194,7 +4194,7 @@ dependencies = [ [[package]] name = "ide-build" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "chardetng", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "ide-cli" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dirs 6.0.0", "serde", @@ -4226,7 +4226,7 @@ dependencies = [ [[package]] name = "ide-clipboard" -version = "0.1.42" +version = "0.1.43" dependencies = [ "gtk", "objc2 0.6.5", @@ -4236,7 +4236,7 @@ dependencies = [ [[package]] name = "ide-core" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "encoding_rs", @@ -4253,7 +4253,7 @@ dependencies = [ [[package]] name = "ide-coverage" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-run", @@ -4267,7 +4267,7 @@ dependencies = [ [[package]] name = "ide-dap" -version = "0.1.42" +version = "0.1.43" dependencies = [ "futures", "ide-core", @@ -4293,7 +4293,7 @@ dependencies = [ [[package]] name = "ide-db" -version = "0.1.42" +version = "0.1.43" dependencies = [ "bb8", "blake3", @@ -4324,7 +4324,7 @@ dependencies = [ [[package]] name = "ide-docker" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "serde", @@ -4337,7 +4337,7 @@ dependencies = [ [[package]] name = "ide-extension" -version = "0.1.42" +version = "0.1.43" dependencies = [ "base64 0.22.1", "blake3", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "ide-fonts" -version = "0.1.42" +version = "0.1.43" dependencies = [ "objc2-core-foundation", "objc2-core-text", @@ -4370,7 +4370,7 @@ dependencies = [ [[package]] name = "ide-github" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-vcs", @@ -4383,7 +4383,7 @@ dependencies = [ [[package]] name = "ide-heap" -version = "0.1.42" +version = "0.1.43" dependencies = [ "criterion", "ide-core", @@ -4401,7 +4401,7 @@ dependencies = [ [[package]] name = "ide-host" -version = "0.1.42" +version = "0.1.43" dependencies = [ "base64 0.22.1", "blake3", @@ -4471,7 +4471,7 @@ dependencies = [ [[package]] name = "ide-http" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-vfs", @@ -4490,7 +4490,7 @@ dependencies = [ [[package]] name = "ide-index" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "criterion", @@ -4512,7 +4512,7 @@ dependencies = [ [[package]] name = "ide-jdwp" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-jvm-inspect", "proptest", @@ -4524,7 +4524,7 @@ dependencies = [ [[package]] name = "ide-jsonrpc" -version = "0.1.42" +version = "0.1.43" dependencies = [ "encoding_rs", "futures", @@ -4541,7 +4541,7 @@ dependencies = [ [[package]] name = "ide-jvm-attach" -version = "0.1.42" +version = "0.1.43" dependencies = [ "libc", "tempfile", @@ -4550,7 +4550,7 @@ dependencies = [ [[package]] name = "ide-jvm-inspect" -version = "0.1.42" +version = "0.1.43" dependencies = [ "futures", "serde", @@ -4561,7 +4561,7 @@ dependencies = [ [[package]] name = "ide-language" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "criterion", @@ -4617,7 +4617,7 @@ dependencies = [ [[package]] name = "ide-lsp" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "encoding_rs", @@ -4645,7 +4645,7 @@ dependencies = [ [[package]] name = "ide-mcp" -version = "0.1.42" +version = "0.1.43" dependencies = [ "bytes", "dunce", @@ -4664,7 +4664,7 @@ dependencies = [ [[package]] name = "ide-notebook" -version = "0.1.42" +version = "0.1.43" dependencies = [ "futures", "ide-core", @@ -4687,7 +4687,7 @@ dependencies = [ [[package]] name = "ide-plugin" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "dunce", @@ -4710,7 +4710,7 @@ dependencies = [ [[package]] name = "ide-profiler" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-jvm-attach", @@ -4724,7 +4724,7 @@ dependencies = [ [[package]] name = "ide-remote" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "globset", @@ -4743,7 +4743,7 @@ dependencies = [ [[package]] name = "ide-run" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "encoding_rs", @@ -4767,7 +4767,7 @@ dependencies = [ [[package]] name = "ide-scaffold" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-tools", @@ -4783,7 +4783,7 @@ dependencies = [ [[package]] name = "ide-sdk" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dunce", "ide-core", @@ -4804,7 +4804,7 @@ dependencies = [ [[package]] name = "ide-search" -version = "0.1.42" +version = "0.1.43" dependencies = [ "criterion", "encoding_rs", @@ -4825,7 +4825,7 @@ dependencies = [ [[package]] name = "ide-spell" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "parking_lot", @@ -4838,7 +4838,7 @@ dependencies = [ [[package]] name = "ide-ssh" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dirs 6.0.0", "flate2", @@ -4863,7 +4863,7 @@ dependencies = [ [[package]] name = "ide-syntax" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "ide-language", @@ -4878,7 +4878,7 @@ dependencies = [ [[package]] name = "ide-terminal" -version = "0.1.42" +version = "0.1.43" dependencies = [ "ide-core", "libc", @@ -4891,7 +4891,7 @@ dependencies = [ [[package]] name = "ide-text" -version = "0.1.42" +version = "0.1.43" dependencies = [ "criterion", "ide-core", @@ -4904,7 +4904,7 @@ dependencies = [ [[package]] name = "ide-tools" -version = "0.1.42" +version = "0.1.43" dependencies = [ "flate2", "hex", @@ -4925,7 +4925,7 @@ dependencies = [ [[package]] name = "ide-vcs" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "dunce", @@ -4946,7 +4946,7 @@ dependencies = [ [[package]] name = "ide-vfs" -version = "0.1.42" +version = "0.1.43" dependencies = [ "chardetng", "dunce", @@ -4970,7 +4970,7 @@ dependencies = [ [[package]] name = "ide-web" -version = "0.1.42" +version = "0.1.43" dependencies = [ "dirs 6.0.0", "ide-core", @@ -4986,7 +4986,7 @@ dependencies = [ [[package]] name = "ide-workspace" -version = "0.1.42" +version = "0.1.43" dependencies = [ "blake3", "dunce", @@ -6587,7 +6587,7 @@ dependencies = [ [[package]] name = "openidea" -version = "0.1.42" +version = "0.1.43" dependencies = [ "base64 0.22.1", "blake3", diff --git a/Cargo.toml b/Cargo.toml index 03d3da258..7232b1718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["crates/*", "src-tauri"] exclude = ["sdk", "plugins"] [workspace.package] -version = "0.1.42" +version = "0.1.43" edition = "2024" rust-version = "1.96" license = "Apache-2.0" diff --git a/package.json b/package.json index 908dfcaa9..428f3b9f4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openidea", "private": true, "description": "An open-source IDE inspired by IntelliJ IDEA", - "version": "0.1.42", + "version": "0.1.43", "license": "Apache-2.0", "type": "module", "scripts": { diff --git a/sdk/rust/openidea-plugin/tests/api/released/commit.wit b/sdk/rust/openidea-plugin/tests/api/released/commit.wit index b2b91a22a..e54969c6e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/commit.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/commit.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// The commit being prepared in the window the current command or event came /// from (the Commit tool window, or the Commit dialog while it is open): the diff --git a/sdk/rust/openidea-plugin/tests/api/released/database.wit b/sdk/rust/openidea-plugin/tests/api/released/database.wit index f5d820703..f33bfad17 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/database.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/database.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Plugin-owned project data sources. Requires database.sources and project trust. /// Runs on the Database subsystem's host, including on remote project servers. diff --git a/sdk/rust/openidea-plugin/tests/api/released/decorations.wit b/sdk/rust/openidea-plugin/tests/api/released/decorations.wit index d3d7e9bf6..d14b8b2ea 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/decorations.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/decorations.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// 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. diff --git a/sdk/rust/openidea-plugin/tests/api/released/details.wit b/sdk/rust/openidea-plugin/tests/api/released/details.wit index 6f1b4b2f5..cc494aef1 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/details.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/details.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// What the pane beside the Services tree shows for a plugin's node. interface detail-types { diff --git a/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit b/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit index bb57fc6fb..f69279013 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/diagnostics.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Optional export (world `plugin-diagnostics`): problems in the current, /// possibly unsaved document, for the languages declared with the diff --git a/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit b/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit index 30b8a5c10..8716a002e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/endpoints.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// HTTP endpoints found in a project (`[[contributes.endpoints]]`). interface endpoints-provider { diff --git a/sdk/rust/openidea-plugin/tests/api/released/events.wit b/sdk/rust/openidea-plugin/tests/api/released/events.wit index f8778a5f5..db96f276b 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/events.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/events.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Workbench events, delivered in batches to `event-handler.handle`. interface events { @@ -35,7 +35,9 @@ interface events { /// API 1.5 also delivers `extensions-changed` (JSON array of the extension /// points this plugin declares whose contributions changed) through `other`, /// to the declaring plugin only and without a capability. - /// Kinds: `file-opened`, `file-saved`, `files-changed` (batched disk changes + /// Kinds: `file-opened`, `file-saved`, `document-changed` (versioned UTF-16 + /// replacements from explicit path subscriptions), `websocket-ready` + /// (a host-owned connection has messages to drain), `files-changed` (batched disk changes /// as `other`, with created/modified/removed path lists in JSON), `editor-focused` (the focused editor /// changed), `vcs-changed` (a repository's state changed: commit, /// checkout, fetch…), `action-performed` (an IDE action ran) and @@ -45,7 +47,7 @@ interface events { subscribe: func(kind: string) -> result<_, error>; /// Replaces this kind's subscription with project-relative globs (OR). /// Empty globs pause delivery; `subscribe` restores unfiltered delivery. - /// Kinds: file-opened, file-saved, files-changed. Requires `events`. + /// Kinds: file-opened, file-saved, document-changed, files-changed. Requires `events`. subscribe-paths: func(kind: string, globs: list) -> result<_, error>; unsubscribe: func(kind: string); } diff --git a/sdk/rust/openidea-plugin/tests/api/released/exports.wit b/sdk/rust/openidea-plugin/tests/api/released/exports.wit index 15dc20a66..fd8bab84e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/exports.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/exports.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; interface lifecycle { use types.{context, error}; diff --git a/sdk/rust/openidea-plugin/tests/api/released/extensions.wit b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit index 3e7f82739..786fc370a 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/extensions.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/extensions.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// What other plugins contributed to the extension points this plugin declares /// (`[[extension-points]]` in `plugin.toml`; the contributors list this plugin diff --git a/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit b/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit index ed5ddc9fd..ebbe88124 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/file-actions.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Optional export (world `plugin-file-actions`): quick fixes and /// refactorings that create, rename or delete files, next to the text edits diff --git a/sdk/rust/openidea-plugin/tests/api/released/fs.wit b/sdk/rust/openidea-plugin/tests/api/released/fs.wit index 3acc44efe..15f9cd6cf 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/fs.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/fs.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Files outside the open projects: the configuration of the program a /// plugin integrates with, a tool installed elsewhere, a licence file. diff --git a/sdk/rust/openidea-plugin/tests/api/released/host.wit b/sdk/rust/openidea-plugin/tests/api/released/host.wit index f612a97f1..9ccb0d02c 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/host.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/host.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Writes to the IDE log, tagged with the plugin id. interface log { diff --git a/sdk/rust/openidea-plugin/tests/api/released/hover.wit b/sdk/rust/openidea-plugin/tests/api/released/hover.wit index 45d2409be..a8815f5ad 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/hover.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/hover.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Optional export (world `plugin-hover`): Markdown added to the hover of /// documents of the languages declared with the `hover` provider kind, diff --git a/sdk/rust/openidea-plugin/tests/api/released/indexing.wit b/sdk/rust/openidea-plugin/tests/api/released/indexing.wit index 6efbc8eb1..3df35a6b0 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/indexing.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/indexing.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Cross-file associations a plugin publishes for the files it declares under /// `[[contributes.documentIndexers]]`. The host calls `index` in cancellable @@ -29,6 +29,9 @@ interface document-indexer { /// A range of the document tied to a key the plugin chooses /// (`com.example.UserMapper#findById`, say). Keys are compared as is. + /// Ranges lie inside the document; an empty one marks a position (a + /// definition that is the whole file, at its start): Go to Declaration + /// lands there, Find Usages and Rename skip it. record anchor { key: string, range: range, diff --git a/sdk/rust/openidea-plugin/tests/api/released/injections.wit b/sdk/rust/openidea-plugin/tests/api/released/injections.wit index 605f9c861..a249473e1 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/injections.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/injections.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Embedded languages. The host routes plugin providers and configured language /// servers inside these ranges, preserving host-document UTF-16 coordinates. diff --git a/sdk/rust/openidea-plugin/tests/api/released/inlay.wit b/sdk/rust/openidea-plugin/tests/api/released/inlay.wit index aa96b69bf..7f5fba778 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/inlay.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/inlay.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Optional export (world `plugin-inlay-hints`): inline hints in documents of /// the languages declared with the `inlay-hints` provider kind, including diff --git a/sdk/rust/openidea-plugin/tests/api/released/io.wit b/sdk/rust/openidea-plugin/tests/api/released/io.wit index fae4e6620..0ee9362ee 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/io.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/io.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Problems in files, shown in the editor and the Problems view. interface diagnostics { @@ -43,6 +43,7 @@ interface diagnostics { /// HTTPS with `net:`; unencrypted HTTP with `net.http:`. interface net { use types.{error}; + use workspace.{project}; record header { name: string, @@ -69,9 +70,41 @@ interface net { body: list, } + record websocket-request { + /// `wss://` requires `net:`; loopback `ws://` is allowed for tests. + url: string, + /// Secret placeholders are expanded by the host as for HTTP requests. + /// `host`, `connection`, `upgrade` and `sec-websocket-*` belong to the + /// handshake and are rejected. + headers: list
, + /// Empty for none; otherwise the server must accept this subprotocol. + subprotocol: string, + } + + record websocket-batch { + messages: list>, + /// The transport has ended. Any returned messages are still valid and + /// this connection is removed after this final drain. + closed: bool, + } + /// Fails with `denied` for a host the plugin may not reach, `cancelled` /// when a newer request replaced the call or the user cancelled. fetch: func(req: request) -> result; + /// A project-bound background WebSocket. At most eight may be open for a + /// plugin. Dropping this resource closes the transport and releases it. + resource websocket { + /// Stable connection identifier used by `websocket-ready` events. + id: func() -> u64; + send: func(bytes: list) -> result<_, error>; + drain: func(limit: u32) -> result; + close: func() -> result<_, error>; + } + + /// Creates a project-bound WebSocket resource. The host retains the + /// project binding, so resource methods cannot be redirected to another + /// project. + websocket-connect: func(project: borrow, req: websocket-request) -> result; } /// Secrets the user stored for the plugin (Settings › Plugins, kept in the diff --git a/sdk/rust/openidea-plugin/tests/api/released/language-features.wit b/sdk/rust/openidea-plugin/tests/api/released/language-features.wit index a20253749..b7470459f 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/language-features.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/language-features.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Additional language features, called only for declared API 1.4 provider kinds. /// Editor calls have a 50 ms soft / 500 ms hard budget; formatting has 5 seconds. diff --git a/sdk/rust/openidea-plugin/tests/api/released/mcp.wit b/sdk/rust/openidea-plugin/tests/api/released/mcp.wit index 8d2c811b5..9da68357e 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/mcp.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/mcp.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Discovery of the IDE's built-in MCP server; never exposes its URL or token. interface mcp { diff --git a/sdk/rust/openidea-plugin/tests/api/released/plugin.wit b/sdk/rust/openidea-plugin/tests/api/released/plugin.wit index 739cff517..22f29f6d9 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/plugin.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/plugin.wit @@ -8,7 +8,7 @@ /// `fs` and `workspace`, and everything else goes through the imports below, /// gated by the capabilities granted in `plugin.toml` (a missing one returns /// `error::denied`). -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; world plugin { import log; diff --git a/sdk/rust/openidea-plugin/tests/api/released/providers.wit b/sdk/rust/openidea-plugin/tests/api/released/providers.wit index 870464617..a395516d7 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/providers.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/providers.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Editor features a plugin provides for the languages it declares under /// `[[contributes.providers]]` (the host calls only declared kinds). They run diff --git a/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit b/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit index ebd6ac3cc..d54f901dc 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/run-targets.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Project-scoped targets owned by the registering plugin (API 1.4). interface run-targets { diff --git a/sdk/rust/openidea-plugin/tests/api/released/run.wit b/sdk/rust/openidea-plugin/tests/api/released/run.wit index 357eaba72..7933d08ad 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/run.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/run.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Launches this plugin's configurations in the invoking window's Run tool window. interface run { diff --git a/sdk/rust/openidea-plugin/tests/api/released/semantic.wit b/sdk/rust/openidea-plugin/tests/api/released/semantic.wit index 459a43117..f2a02c472 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/semantic.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/semantic.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Optional export (world `plugin-semantic-tokens`): semantic colouring of /// documents of the languages declared with the `semantic-tokens` provider diff --git a/sdk/rust/openidea-plugin/tests/api/released/types.wit b/sdk/rust/openidea-plugin/tests/api/released/types.wit index f151ca9a6..0a9b506a0 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/types.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/types.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Shared types. Positions are 0-based lines and UTF-16 code unit columns, /// as in the editor and LSP. diff --git a/sdk/rust/openidea-plugin/tests/api/released/views.wit b/sdk/rust/openidea-plugin/tests/api/released/views.wit index 288884d2e..af976a1b3 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/views.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/views.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; /// Declarative views: tool windows declared /// under `[[contributes.views]]` and custom editors under diff --git a/sdk/rust/openidea-plugin/tests/api/released/workspace.wit b/sdk/rust/openidea-plugin/tests/api/released/workspace.wit index 1a7ac9b59..8b6b92d63 100644 --- a/sdk/rust/openidea-plugin/tests/api/released/workspace.wit +++ b/sdk/rust/openidea-plugin/tests/api/released/workspace.wit @@ -1,4 +1,4 @@ -package openidea:plugin@1.5.0; +package openidea:plugin@1.6.0; interface workspace { use types.{error, location}; @@ -111,6 +111,7 @@ interface workspace { interface editor { use types.{error, range, text-edit}; + use workspace.{project}; record document { /// Grows with every change; edits name the version they were made for. @@ -126,6 +127,19 @@ interface editor { /// Only from commands/events of a window. Paths follow views.open-location. open: func(path: string, selection: option) -> result<_, error>; + /// Current version and text of an open project document. Unlike + /// `text-editor.document`, this is available to background events. + /// The path is project-relative and requires `project.read` and + /// `editor.read`. + document-at: func(project: borrow, path: string) -> result; + + /// Applies versioned edits to an open project document from a background + /// event. The path is project-relative and requires `project.read` and + /// `editor.write`. Stale versions are rejected without changing text. + /// These background edits are non-undoable and are not re-emitted as + /// `document-changed` events. + apply-edits-at: func(project: borrow, path: string, version: u64, edits: list) -> result; + /// A file open in an editor. resource text-editor { /// Absolute path of the file. diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d8ecd4311..862a39ac3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "OpenIDEA", - "version": "0.1.42", + "version": "0.1.43", "identifier": "ai.l0ng.openidea", "build": { "beforeDevCommand": "pnpm dev",