дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-25 02:44:37 +02:00
A plugin's completion was asked once when the popup opened; the editor then only filtered that list, so completions built from what is typed could not be offered. A new optional export, completion-list-provider, returns the items with an incomplete flag and is called instead of providers.completion for that plugin. While the user types on in the same word, only the plugins that marked their list incomplete are asked again; the language server's list and the other plugins' items from the first request are kept. A new word, a trigger character or an incomplete server list asks everyone, as before. API 1.15 shipped with v0.1.51, so this starts API 1.16: wit/ and the SDK copy move to @1.16.0 with ENGINE_VERSION and API_VERSION, and the checked-in components are rebuilt. Closes #4970 Co-authored-by: Rhombicdodecahedron <[email protected]>
56 рядки
2.6 KiB
Plaintext
56 рядки
2.6 KiB
Plaintext
package openidea:[email protected];
|
|
|
|
/// Files outside the open projects: the configuration of the program a
|
|
/// plugin integrates with, a tool installed elsewhere, a licence file.
|
|
///
|
|
/// A plugin's own WASI has no preopened directory. Every path outside its
|
|
/// own `plugin-dir` and install directory is checked against its
|
|
/// `fs.read:<path>` (reading) or `fs.write:<path>` (writing; it doesn't imply
|
|
/// reading) grants; without one covering the path a call returns `denied`
|
|
/// naming the capability the manifest has to declare. The install directory is
|
|
/// read-only. A file inside a project is `workspace.project.read-file` /
|
|
/// `write-file`. `path` is absolute, or starts with `~/` for the user's home.
|
|
interface fs {
|
|
use types.{error};
|
|
use workspace.{file-kind, file-stat};
|
|
|
|
/// The plugin's persistent private directory, created owner-only (0700,
|
|
/// owner-only ACL on Windows), removed on uninstall. Reading and writing
|
|
/// under it needs no fs.* grant; files created there are owner-only.
|
|
plugin-dir: func() -> result<string, error>;
|
|
|
|
/// A text file, decoded as the editor decodes it (BOM and encoding
|
|
/// detection), at most 16 MiB. Unsaved editor contents win, as they do
|
|
/// for `project.read-file`.
|
|
read-file: func(path: string) -> result<string, error>;
|
|
|
|
/// The bytes of a file (images, class files, archives), at most 16 MiB.
|
|
read-bytes: func(path: string) -> result<list<u8>, error>;
|
|
|
|
/// Metadata of an existing path, as `project.stat` reports it; a missing
|
|
/// path is `not-found`.
|
|
stat: func(path: string) -> result<file-stat, error>;
|
|
|
|
/// An entry of a directory.
|
|
record dir-entry {
|
|
/// The entry's name, without its directory.
|
|
name: string,
|
|
kind: file-kind,
|
|
}
|
|
|
|
/// The entries directly under a directory, sorted by name, at most 4096
|
|
/// (like `find-files`); a file is `invalid`.
|
|
read-dir: func(path: string) -> result<list<dir-entry>, error>;
|
|
|
|
/// Replaces the text of a file, or creates it, at most 16 MiB: in one step
|
|
/// (a reader never sees half of it), keeping the file's encoding and BOM;
|
|
/// a new file is UTF-8. `invalid` when the text can't be written in that
|
|
/// encoding, the directory is missing, the path is a directory, or an
|
|
/// editor holds unsaved changes for the file (save them first).
|
|
write-file: func(path: string, text: string) -> result<_, error>;
|
|
|
|
/// Replaces the bytes of a file, or creates it, at most 16 MiB, in one
|
|
/// step; fails like `write-file`.
|
|
write-bytes: func(path: string, bytes: list<u8>) -> result<_, error>;
|
|
}
|