feat(plugins): diffs of up to 8 MiB per side from open-diff (#3445)

views.open-diff and content tab reply diffs accept 8 MiB per side (was 1 MiB). A larger side fails with invalid("diff too large: the <side> side is over 8 MiB") from the host call and "Diff too large" for a web view's open-diff message, so plugins can tell the size limit from a malformed request. WIT docs updated and plugin components rebuilt.
This commit is contained in:
l0ng-ai
2026-11-15 03:32:29 +08:00
committed by GitHub
parent 519c8ad8fc
commit ea644dcdb0
93 changed files with 110 additions and 56 deletions
+5 -4
View File
@@ -445,7 +445,7 @@ matching SDK. Released 1.6 plugins keep working. New in 1.7:
two texts in the invoking window's diff viewer, for example a merge request's
file before and after; `file_name` picks the syntax highlighting. Web views
send `{ op: "open-diff", left, right, leftLabel?, rightLabel?, title?, fileName? }`.
Commands and events only; each side at most 1 MiB.
Commands and events only; each side at most 1 MiB (8 MiB on current hosts).
### API 1.5
@@ -669,7 +669,7 @@ then run `openidea-plugin check`.
| `host::write_terminal(key, text)` | `views.write-terminal` | API 1.4: write only to this plugin's still-running terminal in this window; trusted project, commands/events only. |
| `host::open_content_tab(tab)` | `views.open-content-tab` | API 1.4: the shared content editor protocol, without a web view; actions arrive as `content-tab-action`. |
| `host::reply_content_tab(request_id, reply)` | `views.reply-content-tab` | API 1.4: reply to an owned action in the originating window. No capability; commands/events only. |
| `host::open_diff(diff, file_name)` | `views.open-diff` | API 1.7: two texts in the invoking window's diff viewer; `file_name` (at most 256 characters) picks the highlighting. Commands/events only; each side at most 1 MiB. |
| `host::open_diff(diff, file_name)` | `views.open-diff` | API 1.7: two texts in the invoking window's diff viewer; `file_name` (at most 256 characters) picks the highlighting. Commands/events only; each side at most 8 MiB (earlier hosts: 1 MiB), a larger side fails with `Invalid("diff too large: …")`. |
| `RunConfigurations::configurations(root)` | export `run-configurations.configurations` | API 1.4: optional `plugin-run-configurations` world; SDK registration `run_configurations`. Full project list, refreshed on configuration listing. |
| `TestResults::parse(config, chunk)` | export `test-results.parse` | API 1.4: optional `plugin-test-results` world; SDK registration `test_results`. Bounded output batches for `framework = "plugin"`; failures use built-in parsers. |
| `TestResults::select_tests(config, tests)` | export `test-results.select-tests` | API 1.4: full replacement argv for test-tree name paths, or `None` when unsupported (the SDK default). Enables rerunning failed tests and running tree selections. |
@@ -1883,8 +1883,9 @@ are forwarded to the originating desktop window.
with the same content, action, reply and diff behavior. Its key is scoped to the
plugin and window, independently of web views. Save and toolbar actions arrive
as `content-tab-action`; answer with `host::reply_content_tab(request_id, reply)`.
The host accepts replies only from that plugin and window. Content and diff text
are limited to 1 Mi UTF-16 units, with at most 16 actions and one Save action.
The host accepts replies only from that plugin and window. Content is limited to
1 Mi UTF-16 units and each side of a diff to 8 Mi, with at most 16 actions and one
Save action.
### Plugin-backed content editor tabs (API 1.3)
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
56008cb5a36b35b8975b95da971212c95c165de378b0c8b7f7b428d9d9332ec1
93f5619378f0edaf2e78a95b38e92e6e14ffc4377aab425d575dbbcb30c7c3e4
Binary file not shown.
@@ -1 +1 @@
d87e571ebe16283bbffcc7525f69755d5faffb4693ff4a5183de67418976086b
007134d609d842c6f57386e35a6725948ad17fdd6458a2e209398ee38d034a23
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
254da92cdb20bdf432b5bb4e90ef9bdfaff92eca7195fbff38127f47fa231e6e
01d5abc7a65811684cac58e39d733218d5cde46681b7e57231897f6a07318133
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
50ea437aa2b99dc28afd51286fbac7e07d8386f826f222c517a8bd6e4f647a1a
9b29d2a047e223ecd432fb90914c684f708eb8becba6cc72cd55462064d15956
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
28584de67687b8e34376cd391a020d4c246fd98a3b904e15f413b56a650b5f06
0c017a96cee53de17cebb7324dde08f9fb932b17e0a077056f1d30d2eafffc9a
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
335fa8a14e0d517ef1f735b02c49d8d902a57895c862ca8240854bb758796928
dfdb67dc602c53e5a6ce811d1b1c60de1cc933309270eb71aa2f58fef3d5099c
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
d5ddd6d4b5dc7983945163188c31a844cbcbbdfda3fb893afc5a3acca2e012bb
9b95c44f257586bd04b5902b152d236c220ce8aac212e2b04ec16b78c8659b43
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
cdb81586fc7bd1043659a70b73241fa3111b9c86742029f018ca3a362cc3e9c2
2547ae57a16c7437b94e4d7f66a40d5d45ec417e1a17928d1223c1cc4739045c
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
de843867603a4d271af1b7159c3ce927236d1ab7575c5e8f12278b97910c8611
7807c2988d7ba0350674aeb9be578959eab03bfb65339dec79e7f376636683a8
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
756eaa234ef62773134d9c69f627c9bff7a537621b0441a65fb19564848cc301
0c9539d0e929be694e6ad1116e82600b7f556c4e7866adfeb8432b338afe6d05
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
bb6539e78a31a830edd6c59286c0f01d9b95418a20c8f492c962739e9b5f414a
68162a1e231ee6802df110fce6699f49e073837ebebc2c5d8412824e49e0045d
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
84fce12270a15e21be616d264bd9dd6d515bffd38ec37e992232843c80e7a439
edae1f19c6772d3eb147bcb2a8f6c809ab6c1f26767b3c3b563914b6af5b5648
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1e2034c9629187cf72c694ea4afa4e901d1235deb37eaf44a1bb4ef37e2d8fa8
c5ac5c59a503e0fd7f4fff7a582e6fc61869c462d3fb33416f216efc568f1a59
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
69dfc009056d06e0ddc5bbca72171c476a91c6b1a8b1785d10b010c2636ae394
9551ec54d3c094cec9648998b03cbeb0176e34c124f5a748e20cac5a1fc3778a
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
080b26b102929dc4cc12b07b28e39ecb0f1e781efd436663b74d401858ee1d5d
1d001f2c36700f767f305521678f43459bc849e74f6c1765a0baeb76d2cfcab4