mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-18 16:08:55 +00:00
views.open-diff takes exactly two texts, so a plugin could not tell the IDE that a file does not exist on one side, and the diff drew an empty pane next to it. API 1.10 adds views.open-file-diff with a file-diff record whose left / right are option<string> (none: the file does not exist there; both none is invalid); the SDK adds host::open_file_diff with a mock, and web views may send null for a missing side. A missing side maps to the same absent text side the VCS diffs use, so the existing side shows alone. open-diff and content-diff are unchanged. The WIT package, ENGINE_VERSION and API_VERSION move to 1.10.0, with the checked-in components rebuilt. Closes #3780 Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>
27 lines
957 B
Plaintext
27 lines
957 B
Plaintext
package openidea:plugin@1.10.0;
|
|
|
|
/// HTTP endpoints found in a project (`[[contributes.endpoints]]`).
|
|
interface endpoints-provider {
|
|
use types.{error, location};
|
|
use invocation.{invocation};
|
|
|
|
/// One HTTP route.
|
|
record endpoint {
|
|
/// `none` accepts any HTTP method.
|
|
method: option<string>,
|
|
/// Path parameters use braces, e.g. `/photos/{id}`.
|
|
path: string,
|
|
/// Shown next to the route, e.g. `Rails`.
|
|
framework: string,
|
|
/// Display name, e.g. `PhotosController#show`.
|
|
handler: option<string>,
|
|
/// Where the route is declared, inside the project.
|
|
location: location,
|
|
}
|
|
|
|
/// The project's routes, complete. Called when the IDE first needs them and
|
|
/// again after a file matching `files` changes; cached in between. Runs in
|
|
/// the background: it can't ask the user.
|
|
endpoints: func(ctx: borrow<invocation>) -> result<list<endpoint>, error>;
|
|
}
|