Files
openidea/src/bindings.ts
T
LU XIANGRUIandwildcatDownstairs 9e8722feb6 feat(lsp): lint and format with Biome (#5200)
Adds Biome as a language server (lint diagnostics and code actions) and as a formatter for CSS, GraphQL, JavaScript, TypeScript (and JSX), JSON and JSONC, with a Languages & Frameworks > Biome settings page (path, provider, run on save, enabled languages).

Biome formats instead of Prettier and oxfmt below a biome.json / biome.jsonc or a Biome installation, unless the nearest configuration sets formatter.enabled to false, in which case Prettier keeps formatting. Resolved conflicts with the Tailwind CSS language server: both servers are listed in the language definitions, registry tests and docs.

Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
2026-11-22 19:18:37 +08:00

13210 lines
611 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// @ts-nocheck
/* eslint-disable */
// Generated by tauri-specta. Do not edit; run `pnpm gen:bindings`.
// This file has been generated by Tauri Specta. Do not edit this file manually.
import { invoke as __TAURI_INVOKE, Channel } from "@tauri-apps/api/core";
/** Commands */
export const commands = {
/**
* Accept: copies a worktree task's changed files among `paths` (all without) into the
* local checkout, uncommitted; files the checkout changed itself are left alone and reported.
*/
agentAcceptChanges: (task: string, paths: string[] | null) => typedError<AgentAcceptOutcome, IdeError>(__TAURI_INVOKE("agent_accept_changes", { task, paths })),
/** Answers a non-blocking question, without cancelling the current turn. */
agentAnswerQuestion: (task: string, question: string, answer: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("agent_answer_question", { task, question, answer })),
agentArchive: (task: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_archive", { task })),
/** Content of `path` as `view` compares it (without: when the task started), the left side of its diff. */
agentBaseText: (task: string, path: IpcPath, view:
/** Everything since the commit the task started from. */
"sinceStart" |
/** The uncommitted files against `HEAD`; commits made since the start stay. */
"group" |
/** What the last turn changed, against the checkout as that turn started. */
"lastTurn" | null) => typedError<string | null, IdeError>(__TAURI_INVOKE("agent_base_text", { task, path, view })),
/** Stops the task's current turn, or with `subagent` only that subagent's work. */
agentCancel: (task: string, subagent: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("agent_cancel", { task, subagent })),
/** The task's changed files as `view` compares them (without: since it started). */
agentChanges: (task: string, view:
/** Everything since the commit the task started from. */
"sinceStart" |
/** The uncommitted files against `HEAD`; commits made since the start stay. */
"group" |
/** What the last turn changed, against the checkout as that turn started. */
"lastTurn" | null) => typedError<AgentChange[], IdeError>(__TAURI_INVOKE("agent_changes", { task, view })),
/** Installs the exact version offered if the selected installation still matches. */
agentCliUpdate: (provider: string, offer: AgentCliOffer, request: RequestId) => typedError<AgentCliUpdateResult, IdeError>(__TAURI_INVOKE("agent_cli_update", { provider, offer, request })),
/** Checks the selected installation without modifying it. */
agentCliUpdateCheck: (provider: string, request: RequestId) => typedError<AgentCliUpdateResult, IdeError>(__TAURI_INVOKE("agent_cli_update_check", { provider, request })),
/**
* Slash commands to complete for `provider` in `task`'s directory, or in the project
* before a task exists (skills and custom commands on disk included).
*/
agentCommands: (provider: string, task: string | null) => typedError<AgentCommand[], IdeError>(__TAURI_INVOKE("agent_commands", { provider, task })),
/** Reads the running session's context categories without sending a prompt. */
agentContextUsage: (task: string) => typedError<AgentContextUsage, IdeError>(__TAURI_INVOKE("agent_context_usage", { task })),
agentCreate: (request: NewAgentTask) => typedError<AgentTask_Serialize, IdeError>(__TAURI_INVOKE("agent_create", { request })),
/** Imports a JetBrains `acp.json` file's `agent_servers` entries as custom agents. */
agentCustomImport: (text: string) => typedError<AcpImportOutcome[], IdeError>(__TAURI_INVOKE("agent_custom_import", { text })),
/** Removes a custom agent's file (registry installs go through `agent_registry_remove`). */
agentCustomRemove: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_custom_remove", { id })),
/**
* Saves a new custom ACP agent through its agent file; refuses built-in and
* ACP Registry ids and taken ids.
*/
agentCustomSave: (input: CustomAgentInput) => typedError<null, IdeError>(__TAURI_INVOKE("agent_custom_save", { input })),
agentDelete: (task: string, removeWorktree: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("agent_delete", { task, removeWorktree })),
/** Entries of `task`'s conversation, or of its subagent `subagent`'s. */
agentEntries: (task: string, subagent: string | null) => typedError<AgentEntry[], IdeError>(__TAURI_INVOKE("agent_entries", { task, subagent })),
/** Sessions of the project on this machine that no task holds yet, newest first. */
agentExternalSessions: () => typedError<ExternalSession[], IdeError>(__TAURI_INVOKE("agent_external_sessions")),
/** Copies the task's conversation into a new task, up to its first `turns` turns (all when `None`). */
agentFork: (task: string, turns: number | null) => typedError<AgentTask_Serialize, IdeError>(__TAURI_INVOKE("agent_fork", { task, turns })),
/** The task's uncommitted changes and the commits made since it started. */
agentGroupedChanges: (task: string) => typedError<AgentChanges, IdeError>(__TAURI_INVOKE("agent_grouped_changes", { task })),
/** Hermes Agent profiles on this machine (`default` first); empty without Hermes. */
agentHermesProfiles: () => typedError<HermesProfile[], IdeError>(__TAURI_INVOKE("agent_hermes_profiles")),
/** Imports an external session as a task: its first turn loads and replays it. */
agentImportSession: (provider: string, sessionId: string) => typedError<AgentTask_Serialize, IdeError>(__TAURI_INVOKE("agent_import_session", { provider, sessionId })),
/** Discovers external MCP configuration files on disk (CLI user configs + workspace `.mcp.json`). */
agentMcpDiscoverSources: () => typedError<McpExternalSource[], IdeError>(__TAURI_INVOKE("agent_mcp_discover_sources")),
/** Copies MCP servers from `.mcp.json` and `.vscode/mcp.json` into the workspace settings once. */
agentMcpImport: () => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_import")),
/** Imports selected servers from discovered external MCP configuration files into User or Workspace scope. */
agentMcpImportSelected: (scope: McpScope, selections: McpImportSelection[], overwrite: boolean) => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_import_selected", { scope, selections, overwrite })),
/** Lists configured and discovered MCP servers across User, Workspace, Plugin, and Built-In scopes. */
agentMcpList: () => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_list")),
/** Removes a User or Workspace MCP server and returns the updated list. */
agentMcpRemove: (id: string) => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_remove", { id })),
/** Creates or updates a User or Workspace MCP server and returns the updated list. */
agentMcpSave: (input: McpServerInput) => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_save", { input })),
/**
* Parses and saves one or more MCP servers from a pasted JSON snippet (`{"mcpServers": {...}}` or
* single server object).
*/
agentMcpSaveJson: (scope: McpScope, rawJson: string, fallbackName: string | null, agents: string[]) => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_save_json", { scope, rawJson, fallbackName, agents })),
/** Enables or disables an MCP server and returns the updated list. */
agentMcpSetEnabled: (id: string, enabled: boolean) => typedError<McpServer[], IdeError>(__TAURI_INVOKE("agent_mcp_set_enabled", { id, enabled })),
/** Tests an MCP server by connecting (`initialize`) and listing its tools (`tools/list`). */
agentMcpTest: (id: string) => typedError<McpProbeResult, IdeError>(__TAURI_INVOKE("agent_mcp_test", { id })),
/**
* What the agent reports about itself when it starts (no session: no MCP servers, hooks
* or sign-in run). Remembered until `refresh`.
*/
agentProbe: (provider: string, refresh: boolean) => typedError<AgentProbe, IdeError>(__TAURI_INVOKE("agent_probe", { provider, refresh })),
/** Sends a message; while the agent works it is queued, or with `now` it interrupts the turn. */
agentPrompt: (task: string, prompt: AgentPrompt, now: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("agent_prompt", { task, prompt, now })),
agentProviders: () => typedError<AgentProvider[], IdeError>(__TAURI_INVOKE("agent_providers")),
/** Refreshes the model catalog; force bypasses freshness, not the cooldown. */
agentRefreshModels: (provider: string, force: boolean, model: string | null) => typedError<AgentModelCatalog, IdeError>(__TAURI_INVOKE("agent_refresh_models", { provider, force, model })),
/**
* Installs the registry's current version of agent `id` (also to update it), streaming
* progress through `on_event`. Cancel with `cancel_request(request)`.
*/
agentRegistryInstall: (id: string, request: RequestId, onEvent: Channel<InstallEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("agent_registry_install", { id, request, onEvent })),
/**
* Agents of the ACP Registry this machine can run, with what is installed; the list
* saved earlier when the registry is unreachable. Cancel with `cancel_request(request)`.
*/
agentRegistryList: (request: RequestId) => typedError<AgentRegistry, IdeError>(__TAURI_INVOKE("agent_registry_list", { request })),
/** Removes a registry agent: its agent file and installed files. */
agentRegistryRemove: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_registry_remove", { id })),
agentRename: (task: string, title: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_rename", { task, title })),
/** Answers a permission request; `option: null` cancels it. */
agentRespond: (task: string, permission: number, option: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("agent_respond", { task, permission, option })),
/** Drops the task's turns after its first `turns`; returns the message of the first dropped one. */
agentRollback: (task: string, turns: number) => typedError<{
text: string,
files: IpcPath[],
images: AgentImage[],
} | null, IdeError>(__TAURI_INVOKE("agent_rollback", { task, turns })),
/** Rollback: the task's changed files among `paths` (all without) back as `view` compares them. */
agentRollbackChanges: (task: string, paths: string[] | null, view:
/** Everything since the commit the task started from. */
"sinceStart" |
/** The uncommitted files against `HEAD`; commits made since the start stay. */
"group" |
/** What the last turn changed, against the checkout as that turn started. */
"lastTurn" | null) => typedError<null, IdeError>(__TAURI_INVOKE("agent_rollback_changes", { task, paths, view })),
/** Sends a queued message now, interrupting the current turn. */
agentSendQueuedNow: (task: string, queued: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_send_queued_now", { task, queued })),
/**
* Overrides built-in agent `id`'s command with `command` (its agent file keeps the
* built-in's driver and arguments), or returns it to auto-detection with `None`.
*/
agentSetCommand: (id: string, command: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("agent_set_command", { id, command })),
/** Changes a session setting (model, mode, thinking effort…). */
agentSetConfig: (task: string, option: string, value: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_set_config", { task, option, value })),
/**
* Environment variables built-in agent `id` starts with (saved in its agent file);
* an empty map clears them.
*/
agentSetEnv: (id: string, env: { [key in string]: string }) => typedError<null, IdeError>(__TAURI_INVOKE("agent_set_env", { id, env })),
/** Updates per-session MCP server enable/disable overrides on `task`. */
agentSetMcpOverrides: (task: string, overrides: { [key in string]: boolean }) => typedError<AgentTask_Serialize, IdeError>(__TAURI_INVOKE("agent_set_mcp_overrides", { task, overrides })),
/** Updates per-session skill modes on `task`. */
agentSetSkillOverrides: (task: string, overrides: { [key in string]: AgentSkillMode }) => typedError<AgentTask_Serialize, IdeError>(__TAURI_INVOKE("agent_set_skill_overrides", { task, overrides })),
/**
* Runs a `!` line of the composer in the task's folder with the user's shell, without
* starting a turn; its output goes to the agent with the next message.
*/
agentShell: (task: string, command: string, request: RequestId) => typedError<null, IdeError>(__TAURI_INVOKE("agent_shell", { task, command, request })),
/** Resolves a GitHub `owner/repo[/path][@ref]` source and lists the `SKILL.md` skills in it. */
agentSkillsBrowse: (source: string, request: RequestId) => typedError<RemoteSkillBrowseResult, IdeError>(__TAURI_INVOKE("agent_skills_browse", { source, request })),
/** Installs the selected skill subtree into `~/.agents/skills` (User) or `<workspace>/.agents/skills` (Workspace). */
agentSkillsInstall: (input: InstallRemoteSkillRequest, request: RequestId) => typedError<AgentSkillState_Serialize[], IdeError>(__TAURI_INVOKE("agent_skills_install", { input, request })),
/**
* Every skill discovered in the project, the user's folders and enabled plugins, with
* the mode a session runs it with (without any session's own overrides).
*/
agentSkillsList: () => typedError<AgentSkillState_Serialize[], IdeError>(__TAURI_INVOKE("agent_skills_list")),
/** Fetches one skill's `SKILL.md`, file list, and static security scan warnings before installation. */
agentSkillsPreview: (owner: string, repo: string, gitRef: string, subpath: string, request: RequestId) => typedError<RemoteSkillPreview, IdeError>(__TAURI_INVOKE("agent_skills_preview", { owner, repo, gitRef, subpath, request })),
/**
* Sets how `name` may run in `scope`, in the settings file of that scope, and returns the
* updated list. `SKILL.md` files are never touched; the default `auto` removes the entry.
*/
agentSkillsSetMode: (name: string, scope: McpScope, mode: AgentSkillMode) => typedError<AgentSkillState_Serialize[], IdeError>(__TAURI_INVOKE("agent_skills_set_mode", { name, scope, mode })),
/** Stops one of the task's background tasks. */
agentStopBackground: (task: string, background: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_stop_background", { task, background })),
/**
* Streams the project's agent events to `subscriber`, one of the project's windows (a remote
* host sees them all as one `window`); returns every task.
*/
agentSubscribe: (onEvent: Channel<AgentEvent_Deserialize>, subscriber: string) => typedError<AgentTask_Serialize[], IdeError>(__TAURI_INVOKE("agent_subscribe", { onEvent, subscriber })),
agentUnarchive: (task: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_unarchive", { task })),
/** Drops a queued message and returns it (to edit it). */
agentUnqueue: (task: string, queued: string) => typedError<AgentQueued, IdeError>(__TAURI_INVOKE("agent_unqueue", { task, queued })),
/** Stops the events of a window that closed. */
agentUnsubscribe: (subscriber: string) => typedError<null, IdeError>(__TAURI_INVOKE("agent_unsubscribe", { subscriber })),
/** Locate Duplicates over the files of `scope`. */
analysisLocateDuplicates: (request: RequestId, scope: SearchScope, options: DuplicateOptions) => typedError<DuplicatesReport, IdeError>(__TAURI_INVOKE("analysis_locate_duplicates", { request, scope, options })),
/** Devices `adb` knows about, online ones first. */
androidDevices: () => typedError<AndroidDevice[], IdeError>(__TAURI_INVOKE("android_devices")),
/**
* Follows `serial`'s log until the request is cancelled, in batches of lines.
* `clear` empties the device's buffers first.
*/
androidLogcat: (request: RequestId, serial: string, clear: boolean, onLines: Channel<LogcatLine[]>) => typedError<null, IdeError>(__TAURI_INVOKE("android_logcat", { request, serial, clear, onLines })),
appBuildInfo: () => __TAURI_INVOKE<BuildInfo>("app_build_info"),
/** A window vetoed the quit (user cancelled its unsaved-changes prompt). */
appCancelQuit: () => __TAURI_INVOKE<void>("app_cancel_quit"),
appCheckUpdate: (source: UpdateSource) => typedError<UpdateCheck, IdeError>(__TAURI_INVOKE("app_check_update", { source })),
/** Installs the `openidea` command for this user. */
appCliInstall: () => typedError<CliInstallation, IdeError>(__TAURI_INVOKE("app_cli_install")),
/** Removes the installed `openidea` command; returns the links removed. */
appCliUninstall: () => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("app_cli_uninstall")),
appInfo: () => __TAURI_INVOKE<AppInfo>("app_info"),
/**
* Downloads and installs the available update, streaming progress to `on_progress`.
* Cancellable through `request` until the download completes; the UI then restarts
* with `app_restart`. One install runs at a time.
*/
appInstallUpdate: (source: UpdateSource, request: RequestId, onProgress: Channel<UpdateProgress>) => typedError<null, IdeError>(__TAURI_INVOKE("app_install_update", { source, request, onProgress })),
appLogLocation: () => typedError<LogLocation, IdeError>(__TAURI_INVOKE("app_log_location")),
/**
* Snapshot of process memory and subsystem sizes, summed over all projects.
* Async: the process walk runs on the blocking pool, not the main thread.
*/
appMetrics: () => typedError<AppMetrics, IdeError>(__TAURI_INVOKE("app_metrics")),
/** Quits: closes every window, each of which runs its own unsaved-changes check. */
appQuit: () => __TAURI_INVOKE<void>("app_quit"),
/**
* Release notes of `version` from the update manifest (`latest.json`), read
* through the configured source: the `notes` text under `"en"` plus any
* `notes.<lang>` translations keyed by their base language code, so the page
* can show the UI's language and fall back to English. An install records the
* notes it saw, so this is only for an update installed outside the app.
* `Ok(None)` when the manifest covers another version or carries no notes.
*/
appReleaseNotes: (version: string, source: UpdateSource) => typedError<{ [key in string]: string } | null, IdeError>(__TAURI_INVOKE("app_release_notes", { version, source })),
/** Quits through every window's unsaved-changes check, then starts again. */
appRestart: () => __TAURI_INVOKE<void>("app_restart"),
appUpdateAnnouncement: (version: string, automatic: boolean) => typedError<boolean, IdeError>(__TAURI_INVOKE("app_update_announcement", { version, automatic })),
appUpdateStatus: () => typedError<UpdateStatus, IdeError>(__TAURI_INVOKE("app_update_status")),
appUpdateWindowReady: (ready: boolean, systemLocale: string) => typedError<null, IdeError>(__TAURI_INVOKE("app_update_window_ready", { ready, systemLocale })),
/** Applies a (previewed) workspace edit, e.g. after rename confirmation. */
applyWorkspaceEdit: (edit: WorkspaceEdit) => typedError<null, IdeError>(__TAURI_INVOKE("apply_workspace_edit", { edit })),
/**
* Build › Compile File: compiles one Java source of a linked Maven module with
* `javac`, streaming the console and messages on `on_event`; cancellable with
* `cancel_request(request)`. Diagnostics of `clear` (the files of the previous
* build) are cleared first; the new messages are published as `build`
* diagnostics.
*/
buildCompileFile: (file: string, request: RequestId, clear: string[], onEvent: Channel<BuildEvent>) => typedError<BuildResult, IdeError>(__TAURI_INVOKE("build_compile_file", { file, request, clear, onEvent })),
/** Maven and Gradle projects of the window's project, from the build files plus the last sync. */
buildModel: () => typedError<BuildModel, IdeError>(__TAURI_INVOKE("build_model")),
/**
* Build › Build Project / Rebuild Project / Build Module (`file`: a file or folder of the
* module) / Build Artifacts, streaming the console and messages on `on_event`; cancellable
* with `cancel_request(request)`. Diagnostics of `clear` (the files of the previous build)
* are cleared first; the new messages are published as `build` diagnostics.
*/
buildRun: (kind: BuildKind, file: string | null, cmake: string | null, request: RequestId, clear: string[], onEvent: Channel<BuildEvent>) => typedError<BuildResult, IdeError>(__TAURI_INVOKE("build_run", { kind, file, cmake, request, clear, onEvent })),
/**
* Runs Maven (`help:effective-pom dependency:tree`) or Gradle (`tasks --all`) in the
* background, reporting progress on `on_progress`; cancellable with `cancel_request(request)`.
* Returns the refreshed model; a failed build is reported in its `syncError`.
*/
buildSync: (tool: BuildTool, request: RequestId, offline: boolean, profiles: string[], buildDir: string | null, onProgress: Channel<SyncProgress>) => typedError<BuildModel, IdeError>(__TAURI_INVOKE("build_sync", { tool, request, offline, profiles, buildDir, onProgress })),
cachesLocalDataInfo: () => typedError<LocalDataInfo, IdeError>(__TAURI_INVOKE("caches_local_data_info")),
/** Schedules the invalidation for the next start (`None` cancels a pending one). */
cachesScheduleInvalidation: (options: {
/** Local History of every project. */
localHistory?: boolean,
/** Language server workspaces (jdtls `-data`, …): servers re-import the project. */
languageServers?: boolean,
/** Build tool sync results (Maven / Gradle) and other per-project caches. */
buildCaches?: boolean,
} | null) => typedError<null, IdeError>(__TAURI_INVOKE("caches_schedule_invalidation", { options })),
/**
* Stores (`Some`) or clears (`None`, an empty string counts) the custom
* local-data root; with `migrate`, the current tree moves at the next start.
* Returns the directory that takes effect after a restart. The caller
* restarts the IDE (see `app_restart`).
*/
cachesSetLocalDataDir: (path: string | null, migrate: boolean) => typedError<string, IdeError>(__TAURI_INVOKE("caches_set_local_data_dir", { path, migrate })),
cancelRequest: (id: RequestId) => __TAURI_INVOKE<void>("cancel_request", { id }),
/**
* Stops a background task the backend reported with `cancellable` set; false when it
* has ended or can't be cancelled.
*/
cancelTask: (id: TaskId) => __TAURI_INVOKE<boolean>("cancel_task", { id }),
clearCaches: () => typedError<ClearCachesResult, IdeError>(__TAURI_INVOKE("clear_caches")),
/** Absolute paths on the clipboard, empty when it holds no file list. */
clipboardFileList: () => typedError<string[], IdeError>(__TAURI_INVOKE("clipboard_file_list")),
/** Whether the clipboard holds files: cheap, for the Paste item's enabled state. */
clipboardHasFiles: () => __TAURI_INVOKE<boolean>("clipboard_has_files"),
/**
* Whether the clipboard holds an image (a screenshot): cheap, for the Paste item's
* enabled state.
*/
clipboardHasImage: () => __TAURI_INVOKE<boolean>("clipboard_has_image"),
/**
* The clipboard's image as a PNG data URL: for a paste whose event carried no files
* (WebKitGTK leaves `clipboardData` empty for a raw image, a screenshot), and for
* the project view's Paste, which has no paste event. None when it holds no image.
*/
clipboardImage: () => typedError<string | null, IdeError>(__TAURI_INVOKE("clipboard_image")),
/**
* Replaces the clipboard with `paths`, so Explorer can paste them. Best-effort:
* false when the clipboard stayed busy; the caller keeps working either way.
*/
clipboardSetFileList: (paths: string[]) => typedError<boolean, IdeError>(__TAURI_INVOKE("clipboard_set_file_list", { paths })),
/**
* The clipboard's plain text, read natively as [`clipboard_write_text`] writes it: a Paste
* from a menu has no paste event, and WebKitGTK gives `navigator.clipboard.readText()` no
* text there (#3041). None on Windows, where the WebView's clipboard is used.
*/
clipboardText: () => typedError<string | null, IdeError>(__TAURI_INVOKE("clipboard_text")),
/** Writes text locally, without WebView user-activation requirements. */
clipboardWriteText: (text: string) => typedError<null, IdeError>(__TAURI_INVOKE("clipboard_write_text", { text })),
closeProject: () => __TAURI_INVOKE<void>("close_project"),
/** Reads the report a coverage run left behind. */
coverageCollect: (report: CoverageReportSpec) => typedError<CoverageSuite, IdeError>(__TAURI_INVOKE("coverage_collect", { report })),
/**
* Reads a report collected elsewhere (CI): lcov, a Go cover profile or JaCoCo XML,
* with paths mapped into this project.
*/
coverageImport: (path: IpcPath) => typedError<CoverageSuite, IdeError>(__TAURI_INVOKE("coverage_import", { path })),
/**
* How to run `config` with coverage: the command to launch and where its report will be,
* or which tool is missing.
*/
coveragePrepare: (config: RunConfig_Deserialize) => typedError<CoveragePrepared_Serialize, IdeError>(__TAURI_INVOKE("coverage_prepare", { config })),
/** Cucumber feature files and step definition files, for step navigation. */
cucumberSources: () => typedError<StepSource[], IdeError>(__TAURI_INVOKE("cucumber_sources")),
dbApplyEdits: (id: string, schema: string, table: string, edits: DbRowEdit[]) => typedError<number | null, IdeError>(__TAURI_INVOKE("db_apply_edits", { id, schema, table, edits })),
dbApproveJdbcSource: (source: DataSource_Deserialize) => typedError<null, IdeError>(__TAURI_INVOKE("db_approve_jdbc_source", { source })),
dbCompletion: (id: string) => typedError<DbCompletion, IdeError>(__TAURI_INVOKE("db_completion", { id })),
dbConnect: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_connect", { id })),
dbConnected: () => typedError<string[], IdeError>(__TAURI_INVOKE("db_connected")),
dbConsolePath: (id: string) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("db_console_path", { id })),
/** The query consoles of data source `id`; `create` adds the next one first. */
dbConsoles: (id: string, create: boolean) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("db_consoles", { id, create })),
dbCreateDatabase: (id: string, template: string, statement: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_create_database", { id, template, statement })),
dbDatabaseCatalog: (id: string, database: string) => typedError<DbCatalogSchema[], IdeError>(__TAURI_INVOKE("db_database_catalog", { id, database })),
dbDatabases: (id: string) => typedError<DbDatabases, IdeError>(__TAURI_INVOKE("db_databases", { id })),
dbDdl: (id: string, schema: string, table: string) => typedError<string, IdeError>(__TAURI_INVOKE("db_ddl", { id, schema, table })),
dbDisconnect: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_disconnect", { id })),
dbDropDatabase: (id: string, database: string, statement: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_drop_database", { id, database, statement })),
/** What made the dump at `path` and whether it creates its own database (from its first bytes). */
dbDumpInfo: (path: string) => typedError<DbDumpInfo, IdeError>(__TAURI_INVOKE("db_dump_info", { path })),
dbExecute: (request: RequestId, id: string, statements: SqlStatement[], skip: number, maxRows: number, schema: string | null) => typedError<DbStatementOutcome[], IdeError>(__TAURI_INVOKE("db_execute", { request, id, statements, skip, maxRows, schema })),
dbExecuteStream: (request: RequestId, id: string, statements: SqlStatement[], maxRows: number, schema: string | null, onProgress: Channel<ExecutionEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("db_execute_stream", { request, id, statements, maxRows, schema, onProgress })),
dbExplain: (request: RequestId, id: string, statement: string, schema: string | null) => typedError<DbPlanNode[], IdeError>(__TAURI_INVOKE("db_explain", { request, id, statement, schema })),
/**
* Writes exported result data (CSV, JSON, SQL…) to `path`. Stays in the
* desktop shell: the path comes from a local save dialog, and a remote
* window exports through its local fs commands instead.
*/
dbExportFile: (path: string, text: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_export_file", { path, text })),
dbFinishTransaction: (id: string, commit: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("db_finish_transaction", { id, commit })),
dbHistory: (id: string) => typedError<DbHistoryEntry[], IdeError>(__TAURI_INVOKE("db_history", { id })),
dbJdbcDriverClasses: (jars: string[]) => typedError<string[], IdeError>(__TAURI_INVOKE("db_jdbc_driver_classes", { jars })),
dbJdbcDrivers: () => typedError<DbJdbcDriver_Serialize[], IdeError>(__TAURI_INVOKE("db_jdbc_drivers")),
dbObjectDdl: (id: string, schema: string, kind: DbObjectKind, name: string) => typedError<string, IdeError>(__TAURI_INVOKE("db_object_ddl", { id, schema, kind, name })),
dbRemoveHistory: (id: string, texts: string[] | null) => typedError<null, IdeError>(__TAURI_INVOKE("db_remove_history", { id, texts })),
dbRemoveJdbcDriver: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_remove_jdbc_driver", { id })),
dbRetainCatalog: (id: string, databases: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("db_retain_catalog", { id, databases })),
/**
* Runs `job` against target `id` and streams the tool's output; returns its exit code. Stays
* in the desktop shell like [`db_export_file`]: the paths in `job` are local.
*/
dbRunTool: (request: RequestId, id: string, executable: string, job: DbToolJob, onOutput: Channel<DbToolLine[]>) => typedError<number | null, IdeError>(__TAURI_INVOKE("db_run_tool", { request, id, executable, job, onOutput })),
dbSaveJdbcDriver: (driver: DbJdbcDriver_Deserialize) => typedError<null, IdeError>(__TAURI_INVOKE("db_save_jdbc_driver", { driver })),
dbSaveSourceVisibility: (id: string, available: string[], change: DbVisibilityChange) => typedError<null, IdeError>(__TAURI_INVOKE("db_save_source_visibility", { id, available, change })),
dbSaveSources: (sources: DataSource_Deserialize[]) => typedError<null, IdeError>(__TAURI_INVOKE("db_save_sources", { sources })),
dbSavedCatalog: (id: string) => typedError<{
databases?: DbCatalogDatabase[],
} | null, IdeError>(__TAURI_INVOKE("db_saved_catalog", { id })),
dbSchemaObjects: (id: string, schema: string) => typedError<DbSchemaObjects, IdeError>(__TAURI_INVOKE("db_schema_objects", { id, schema })),
dbSchemas: (id: string) => typedError<string[], IdeError>(__TAURI_INVOKE("db_schemas", { id })),
/** `server_version_num` of the PostgreSQL server of target `id` (connects first). */
dbServerVersion: (id: string) => typedError<number, IdeError>(__TAURI_INVOKE("db_server_version", { id })),
dbSessionContext: (id: string) => typedError<DbSessionContext, IdeError>(__TAURI_INVOKE("db_session_context", { id })),
dbSetManualCommit: (id: string, manual: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("db_set_manual_commit", { id, manual })),
dbSetPassword: (id: string, password: string | null, save: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("db_set_password", { id, password, save })),
dbSetSshSecret: (id: string, secret: string | null, save: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("db_set_ssh_secret", { id, secret, save })),
dbSources: () => typedError<DataSource_Serialize[], IdeError>(__TAURI_INVOKE("db_sources")),
dbStatements: (id: string, text: string, from: number, to: number) => typedError<SqlStatement[], IdeError>(__TAURI_INVOKE("db_statements", { id, text, from, to })),
dbTableDetails: (id: string, schema: string, table: string) => typedError<DbTableDetails, IdeError>(__TAURI_INVOKE("db_table_details", { id, schema, table })),
dbTablePage: (request: RequestId, id: string, schema: string, table: string, filter: string | null, sort: DbSortKey[], offset: number, limit: number) => typedError<DbTablePage, IdeError>(__TAURI_INVOKE("db_table_page", { request, id, schema, table, filter, sort, offset, limit })),
dbTables: (id: string, schema: string) => typedError<DbTableInfo[], IdeError>(__TAURI_INVOKE("db_tables", { id, schema })),
dbTest: (source: DataSource_Deserialize, password: string | null, sshSecret: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("db_test", { source, password, sshSecret })),
/** Data Source › SSH/SSL › Test SSH Tunnel. */
dbTestTunnel: (source: DataSource_Deserialize, sshSecret: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("db_test_tunnel", { source, sshSecret })),
/** Installed copies of `tool`, newest first. */
dbToolInstalls: (tool: DbTool) => typedError<DbToolInstall[], IdeError>(__TAURI_INVOKE("db_tool_installs", { tool })),
/** The long options the executable at `path` lists in its `--help` (`masking-policies`…). */
dbToolOptions: (path: string) => typedError<string[], IdeError>(__TAURI_INVOKE("db_tool_options", { path })),
/** The command line `db_run_tool` would run, without the password. */
dbToolPreview: (id: string, executable: string, job: DbToolJob) => typedError<string, IdeError>(__TAURI_INVOKE("db_tool_preview", { id, executable, job })),
/** The version line of the executable at `path`. */
dbToolVersion: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("db_tool_version", { path })),
dbTrustSshHost: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("db_trust_ssh_host", { id })),
/** Attach to Process: the user's processes a debugger can attach to. */
debugAttachableProcesses: () => typedError<AttachableProcess[], IdeError>(__TAURI_INVOKE("debug_attachable_processes")),
/** Last known verification states of a file's breakpoints (refetch on `breakpointsChanged`). */
debugBreakpointStates: (path: string) => typedError<BreakpointState[], IdeError>(__TAURI_INVOKE("debug_breakpoint_states", { path })),
debugCapabilities: (session: DebugSessionId) => typedError<DebugCapabilities, IdeError>(__TAURI_INVOKE("debug_capabilities", { session })),
/** Completions for an expression typed in Evaluate (`line` / `column` 0-based, UTF-16). */
debugCompletions: (session: DebugSessionId, frameId: number | null, text: string, line: number, column: number) => typedError<DebugCompletion[], IdeError>(__TAURI_INVOKE("debug_completions", { session, frameId, text, line, column })),
debugDataBreakpointInfo: (session: DebugSessionId, container: number, name: string, frameId: number | null) => typedError<DataBreakpointInfo, IdeError>(__TAURI_INVOKE("debug_data_breakpoint_info", { session, container, name, frameId })),
debugEvaluate: (session: DebugSessionId, frameId: number | null, expression: string) => typedError<Variable_Serialize, IdeError>(__TAURI_INVOKE("debug_evaluate", { session, frameId, expression })),
/** Evaluate with an explicit DAP context: `repl`, `watch`, `hover` or `clipboard`. */
debugEvaluateIn: (session: DebugSessionId, frameId: number | null, expression: string, context: string | null) => typedError<Variable_Serialize, IdeError>(__TAURI_INVOKE("debug_evaluate_in", { session, frameId, expression, context })),
debugExceptionFilters: () => typedError<SessionExceptionFilters[], IdeError>(__TAURI_INVOKE("debug_exception_filters")),
/** Force Step Over: step over with every breakpoint suspended until the step ends. */
debugForceStepOver: (session: DebugSessionId, threadId: number) => typedError<null, IdeError>(__TAURI_INVOKE("debug_force_step_over", { session, threadId })),
/** A loopback port that is free right now, for a debug agent the launch line starts. */
debugFreePort: () => typedError<number, IdeError>(__TAURI_INVOKE("debug_free_port")),
/** Dumps the session's JVM and analyzes the dump; cancel with `request`. */
debugHeapCapture: (session: DebugSessionId, request: RequestId, onProgress: Channel<HeapProgress>) => typedError<HeapCaptureResult, IdeError>(__TAURI_INVOKE("debug_heap_capture", { session, request, onProgress })),
debugHeapClasses: (snapshot: HeapSnapshotId) => typedError<HeapClassRow[], IdeError>(__TAURI_INVOKE("debug_heap_classes", { snapshot })),
debugHeapClose: (snapshot: HeapSnapshotId) => typedError<null, IdeError>(__TAURI_INVOKE("debug_heap_close", { snapshot })),
debugHeapCompare: (base: HeapSnapshotId, current: HeapSnapshotId) => typedError<HeapClassDiff[], IdeError>(__TAURI_INVOKE("debug_heap_compare", { base, current })),
/** A page of the dominator tree: under `parent`, of type `classIndex`, or both. */
debugHeapDominators: (snapshot: HeapSnapshotId, parent: number | null, classIndex: number | null, offset: number, limit: number) => typedError<HeapObjectPage, IdeError>(__TAURI_INVOKE("debug_heap_dominators", { snapshot, parent, classIndex, offset, limit })),
/** Analyzes an `.hprof` file; cancel with `request`. */
debugHeapOpen: (path: IpcPath, request: RequestId, onProgress: Channel<HeapProgress>) => typedError<HeapOpenResult, IdeError>(__TAURI_INVOKE("debug_heap_open", { path, request, onProgress })),
/** The shortest path from `object` to a GC root; `null` when it is unreachable. */
debugHeapPath: (snapshot: HeapSnapshotId, object: HeapObjectRef) => typedError<{
steps: HeapPathStep[],
/** Steps left out between `steps[omitted_after - 1]` and `steps[omitted_after]`; 0 for none. */
omitted: number,
omittedAfter: number,
} | null, IdeError>(__TAURI_INVOKE("debug_heap_path", { snapshot, object })),
/** Copies the snapshot's dump to `path`, replacing a file there. */
debugHeapSave: (snapshot: HeapSnapshotId, path: IpcPath) => typedError<null, IdeError>(__TAURI_INVOKE("debug_heap_save", { snapshot, path })),
debugHotReload: (session: DebugSessionId, reason: HotReloadReason) => typedError<null, IdeError>(__TAURI_INVOKE("debug_hot_reload", { session, reason })),
debugHotRestart: (session: DebugSessionId) => typedError<null, IdeError>(__TAURI_INVOKE("debug_hot_restart", { session })),
/** Breakpoints of a debugged page on DOM events and on requests (js-debug). */
debugJsCustomBreakpoints: (session: DebugSessionId, ids: string[], xhr: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("debug_js_custom_breakpoints", { session, ids, xhr })),
/** The body of a response a debugged page received. */
debugJsResponseBody: (session: DebugSessionId, requestId: string) => typedError<JsResponseBody, IdeError>(__TAURI_INVOKE("debug_js_response_body", { session, requestId })),
/**
* The responses a debugged page gets in place of the server's, by a part of the URL; none
* switches the replacing off.
*/
debugJsResponseOverrides: (session: DebugSessionId, rules: JsResponseRule[]) => typedError<null, IdeError>(__TAURI_INVOKE("debug_js_response_overrides", { session, rules })),
/** Starts recording a debugged page's CPU profile. */
debugJsStartProfile: (session: DebugSessionId) => typedError<null, IdeError>(__TAURI_INVOKE("debug_js_start_profile", { session })),
/** Ends the recording: a directory holding the profile as `page.cpuprofile`. */
debugJsStopProfile: (session: DebugSessionId) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("debug_js_stop_profile", { session })),
/** The debuggee JVM's loaded classes (instances and shallow bytes), or why they cannot be read. */
debugJvmMemoryClasses: (session: DebugSessionId) => typedError<JvmMemoryResult, IdeError>(__TAURI_INVOKE("debug_jvm_memory_classes", { session })),
/** The fields (or array elements) of an instance in the stopped JVM. */
debugJvmMemoryFields: (session: DebugSessionId, object: JvmObjectRef) => typedError<JvmFieldsResult, IdeError>(__TAURI_INVOKE("debug_jvm_memory_fields", { session, object })),
/** Up to `limit` live instances of the class in the stopped JVM. */
debugJvmMemoryInstances: (session: DebugSessionId, className: string, limit: number) => typedError<JvmInstancesResult, IdeError>(__TAURI_INVOKE("debug_jvm_memory_instances", { session, className, limit })),
/** The objects that hold a reference to `object`; `limit` 0 selects the default. */
debugJvmMemoryReferrers: (session: DebugSessionId, object: JvmObjectRef, limit: number) => typedError<JvmReferrersResult, IdeError>(__TAURI_INVOKE("debug_jvm_memory_referrers", { session, object, limit })),
/**
* Remote JVM Debug in listen mode: waits (cancellable through `request`) for the remote
* JVM to connect to `host:port`; returns the loopback port java-debug attaches to.
*/
debugListenForJvm: (request: RequestId, host: string, port: number) => typedError<number, IdeError>(__TAURI_INVOKE("debug_listen_for_jvm", { request, host, port })),
debugPause: (session: DebugSessionId, threadId: number) => typedError<null, IdeError>(__TAURI_INVOKE("debug_pause", { session, threadId })),
/** HotSwap (Reload Changed Classes) in a java-debug session. */
debugRedefineClasses: (session: DebugSessionId) => typedError<HotSwapResult, IdeError>(__TAURI_INVOKE("debug_redefine_classes", { session })),
debugResolveVariable: (session: DebugSessionId, variable: Variable_Deserialize) => typedError<Variable_Serialize, IdeError>(__TAURI_INVOKE("debug_resolve_variable", { session, variable })),
/** Reset Frame (Drop Frame). */
debugRestartFrame: (session: DebugSessionId, frameId: number) => typedError<null, IdeError>(__TAURI_INVOKE("debug_restart_frame", { session, frameId })),
debugResume: (session: DebugSessionId, threadId: number) => typedError<null, IdeError>(__TAURI_INVOKE("debug_resume", { session, threadId })),
debugRunTo: (session: DebugSessionId, threadId: number, path: string, line: number, force: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("debug_run_to", { session, threadId, path, line, force })),
debugScopes: (session: DebugSessionId, frameId: number) => typedError<Scope[], IdeError>(__TAURI_INVOKE("debug_scopes", { session, frameId })),
/** Types `text` into the session's program (a `runInTerminal` program). */
debugSendInput: (session: DebugSessionId, text: string) => typedError<null, IdeError>(__TAURI_INVOKE("debug_send_input", { session, text })),
/** This window's live sessions, including adapter-started child sessions. */
debugSessions: () => typedError<SessionInfo[], IdeError>(__TAURI_INVOKE("debug_sessions")),
debugSetBreakpoints: (path: string, breakpoints: Breakpoint[]) => typedError<BreakpointState[], IdeError>(__TAURI_INVOKE("debug_set_breakpoints", { path, breakpoints })),
/** Field watchpoints; states aligned with `breakpoints`. */
debugSetDataBreakpoints: (breakpoints: DataBreakpoint[]) => typedError<BreakpointState[], IdeError>(__TAURI_INVOKE("debug_set_data_breakpoints", { breakpoints })),
debugSetExceptionBreakpoints: (choices: { [key in string]: boolean }) => typedError<null, IdeError>(__TAURI_INVOKE("debug_set_exception_breakpoints", { choices })),
/** Exception breakpoints on chosen classes (all sessions that take them, and later ones). */
debugSetExceptionClassBreakpoints: (breakpoints: ExceptionClassBreakpoint[]) => typedError<null, IdeError>(__TAURI_INVOKE("debug_set_exception_class_breakpoints", { breakpoints })),
/** Method breakpoints (all files); states aligned with `breakpoints`. */
debugSetFunctionBreakpoints: (breakpoints: FunctionBreakpoint[]) => typedError<BreakpointState[], IdeError>(__TAURI_INVOKE("debug_set_function_breakpoints", { breakpoints })),
debugSetVariable: (session: DebugSessionId, container: number, name: string, evaluateName: string | null, frameId: number | null, value: string) => typedError<Variable_Serialize, IdeError>(__TAURI_INVOKE("debug_set_variable", { session, container, name, evaluateName, frameId, value })),
debugStackTrace: (session: DebugSessionId, threadId: number) => typedError<StackFrame[], IdeError>(__TAURI_INVOKE("debug_stack_trace", { session, threadId })),
/** Starts a session owned by this window: its events (and those of child sessions) go here only. */
debugStart: (config: LaunchConfig) => typedError<DebugSessionId, IdeError>(__TAURI_INVOKE("debug_start", { config })),
debugStep: (session: DebugSessionId, threadId: number, kind: StepKind) => typedError<null, IdeError>(__TAURI_INVOKE("debug_step", { session, threadId, kind })),
debugStepInTarget: (session: DebugSessionId, threadId: number, targetId: number) => typedError<null, IdeError>(__TAURI_INVOKE("debug_step_in_target", { session, threadId, targetId })),
/** Smart Step Into: the calls on the current line of `frame_id`. */
debugStepInTargets: (session: DebugSessionId, frameId: number) => typedError<StepInTarget[], IdeError>(__TAURI_INVOKE("debug_step_in_targets", { session, frameId })),
debugStop: (session: DebugSessionId) => typedError<null, IdeError>(__TAURI_INVOKE("debug_stop", { session })),
/** The stream chains around `frame`'s line; `top`: it is the thread's top frame. */
debugStreamChains: (session: DebugSessionId, frame: StackFrame, top: boolean) => typedError<StreamChainInfo_Serialize[], IdeError>(__TAURI_INVOKE("debug_stream_chains", { session, frame, top })),
/**
* Traces chain `chain_index` of [`debug_stream_chains`], whose `range` the UI showed, while the
* program runs it; cancelling `request` stops recording.
*/
debugStreamTrace: (session: DebugSessionId, request: RequestId, threadId: number, frame: StackFrame, chainIndex: number, range: Range, onProgress: Channel<TraceProgress>) => typedError<StreamTraceResult_Serialize, IdeError>(__TAURI_INVOKE("debug_stream_trace", { session, request, threadId, frame, chainIndex, range, onProgress })),
/** Ends the running trace's terminal operation; `None` when no trace runs. */
debugStreamTraceAbort: (session: DebugSessionId) => typedError<{ kind: "interrupted" } | { kind: "stopped" } |
/** Suspended threads that own a monitor the terminal may be waiting for: `(thread id, name)`. */
{ kind: "stuck"; holders: ([number, string])[] } |
/** The terminal had not started. */
{ kind: "cancelled" } |
/** The trace had already parked or failed. */
{ kind: "finished" } | null, IdeError>(__TAURI_INVOKE("debug_stream_trace_abort", { session })),
debugThreads: (session: DebugSessionId) => typedError<ThreadInfo[], IdeError>(__TAURI_INVOKE("debug_threads", { session })),
debugUnityProcesses: () => typedError<AttachableProcess[], IdeError>(__TAURI_INVOKE("debug_unity_processes")),
debugVariables: (session: DebugSessionId, reference: number) => typedError<Variable_Serialize[], IdeError>(__TAURI_INVOKE("debug_variables", { session, reference })),
dependencyVersions: (doc: DocId, offset: number | null, request: RequestId) => typedError<DependencyVersions[], IdeError>(__TAURI_INVOKE("dependency_versions", { doc, offset, request })),
deployCompare: (path: IpcPath, server: string | null, request: RequestId) => typedError<SyncEntry[], IdeError>(__TAURI_INVOKE("deploy_compare", { path, server, request })),
deployCoverage: (paths: IpcPath[]) => typedError<DeploymentCoverage[], IdeError>(__TAURI_INVOKE("deploy_coverage", { paths })),
deployDeleteRemote: (paths: IpcPath[], server: string | null) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("deploy_delete_remote", { paths, server })),
deployDownload: (paths: IpcPath[], server: string | null, request: RequestId) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("deploy_download", { paths, server, request })),
deployInfo: (path: IpcPath, server: string | null) => typedError<{
server: string,
remotePath: string,
webUrl: string | null,
} | null, IdeError>(__TAURI_INVOKE("deploy_info", { path, server })),
deployServerRoot: (server: string) => typedError<DeploymentRoot, IdeError>(__TAURI_INVOKE("deploy_server_root", { server })),
deploySync: (steps: SyncStep[], server: string | null, request: RequestId) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("deploy_sync", { steps, server, request })),
deployTestConnection: (connection: FsConnection, path: string, password: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("deploy_test_connection", { connection, path, password })),
deployUpload: (paths: IpcPath[], server: string | null, request: RequestId) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("deploy_upload", { paths, server, request })),
/**
* Show Diff in External Tool: starts the tool set in the global settings (never a
* project's, which a cloned repository could carry) on the two sides, on this machine
* (a remote window passes the sides as text).
*/
diffExternalTool: (left: ExternalDiffSide, right: ExternalDiffSide, title: string) => typedError<null, IdeError>(__TAURI_INVOKE("diff_external_tool", { left, right, title })),
/**
* An automatic save: `false` (nothing written) when the file changed on disk after the
* buffer was edited, which only an explicit save overwrites.
*/
docAutosave: (doc: DocId) => typedError<boolean, IdeError>(__TAURI_INVOKE("doc_autosave", { doc })),
docClose: (doc: DocId) => typedError<null, IdeError>(__TAURI_INVOKE("doc_close", { doc })),
/**
* Applies a CodeMirror change set; returns the new version. Rejects with
* `outOfSync` when `base_version` is stale; the UI then calls `doc_snapshot`.
*/
docEdit: (doc: DocId, baseVersion: number, changes: ChangeSet) => typedError<number, IdeError>(__TAURI_INVOKE("doc_edit", { doc, baseVersion, changes })),
/**
* Structure view of a Flutter file: its declarations with the widgets they build. `None`
* when the Dart server published no widgets for it; `doc_outline` then applies.
*/
docFlutterOutline: (doc: DocId) => typedError<OutlineItem[] | null, IdeError>(__TAURI_INVOKE("doc_flutter_outline", { doc })),
docFolding: (doc: DocId) => typedError<FoldRange[], IdeError>(__TAURI_INVOKE("doc_folding", { doc })),
/**
* Tree-sitter highlighting for languages the UI has no CodeMirror mode for;
* empty when the grammar has no highlights query or the document is large.
*/
docHighlights: (doc: DocId) => typedError<SyntaxHighlights, IdeError>(__TAURI_INVOKE("doc_highlights", { doc })),
/**
* The language and CodeMirror mode `path` is shown with in an editor, without opening
* it: previews of closed files and diffs. `first_line` is the shown text's (a revision's)
* for hashbang detection; without it the file's on disk counts.
*/
docLanguage: (path: string, firstLine: string | null) => typedError<DocumentLanguage, IdeError>(__TAURI_INVOKE("doc_language", { path, firstLine })),
/**
* Opens a document. Async: reading and decoding a large file must not block
* the main thread (synchronous commands run on it).
*/
docOpen: (path: string) => typedError<DocumentInfo, IdeError>(__TAURI_INVOKE("doc_open", { path })),
/**
* Opens an editable untitled buffer (a new-file tab); it reaches the disk
* through `doc_save_as`, which turns it into a regular file document.
*/
docOpenUntitled: (name: string | null) => typedError<DocumentInfo, IdeError>(__TAURI_INVOKE("doc_open_untitled", { name })),
/**
* Opens a read-only virtual document (see `lsp_virtual_document`) as an
* editor buffer, so syntax features and language-server requests work in it.
*/
docOpenVirtual: (uri: string) => typedError<DocumentInfo, IdeError>(__TAURI_INVOKE("doc_open_virtual", { uri })),
/**
* Structure view: LSP document symbols when available (with tree-sitter
* visibility and type-alias kinds), tree-sitter otherwise.
* Tree-sitter answers come from the per-document tree cache (incremental
* re-parse); large documents get no syntax structure.
*/
docOutline: (doc: DocId) => typedError<OutlineItem[], IdeError>(__TAURI_INVOKE("doc_outline", { doc })),
/** Python class facts for the inheritance inspections: tree-sitter, no language server. */
docPythonFacts: (doc: DocId) => typedError<PythonFacts, IdeError>(__TAURI_INVOKE("doc_python_facts", { doc })),
/** Load Changes from Disk: discards the buffer's unsaved changes and reads its file again. */
docReloadFromDisk: (doc: DocId) => typedError<null, IdeError>(__TAURI_INVOKE("doc_reload_from_disk", { doc })),
docSave: (doc: DocId) => typedError<null, IdeError>(__TAURI_INVOKE("doc_save", { doc })),
docSaveAll: () => typedError<null, IdeError>(__TAURI_INVOKE("doc_save_all")),
/**
* Save As for an untitled buffer: writes it to `path` and re-keys the buffer
* (undo history and version are kept; the language is re-detected).
*/
docSaveAs: (doc: DocId, path: string) => typedError<DocumentInfo, IdeError>(__TAURI_INVOKE("doc_save_as", { doc, path })),
/**
* Extend Selection (⌥↑): syntax ranges around `offset`, innermost first.
* Large documents fall back to word / line / document ranges.
*/
docSelectionRanges: (doc: DocId, offset: number) => typedError<Range[], IdeError>(__TAURI_INVOKE("doc_selection_ranges", { doc, offset })),
docSetBom: (doc: DocId, hasBom: boolean) => typedError<DocumentEncoding, IdeError>(__TAURI_INVOKE("doc_set_bom", { doc, hasBom })),
/** "Reload with Encoding" (`reload`) or "Convert to Encoding"; returns the new encoding and BOM state. */
docSetEncoding: (doc: DocId, encoding: string, reload: boolean) => typedError<DocumentEncoding, IdeError>(__TAURI_INVOKE("doc_set_encoding", { doc, encoding, reload })),
docSetLineEnding: (doc: DocId, lineEnding: LineEnding) => typedError<null, IdeError>(__TAURI_INVOKE("doc_set_line_ending", { doc, lineEnding })),
docSnapshot: (doc: DocId) => typedError<DocumentInfo, IdeError>(__TAURI_INVOKE("doc_snapshot", { doc })),
docSyncFromDisk: () => typedError<null, IdeError>(__TAURI_INVOKE("doc_sync_from_disk")),
/** `docker compose` start / stop / restart / down of a project found through labels. */
dockerComposeOp: (request: RequestId, endpoint: DockerEndpoint, project: string, files: string[], workingDir: string | null, op: ComposeOp, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("docker_compose_op", { request, endpoint, project, files, workingDir, op, onOutput })),
dockerContainerOp: (endpoint: DockerEndpoint, ids: string[], op: ContainerOp) => typedError<null, IdeError>(__TAURI_INVOKE("docker_container_op", { endpoint, ids, op })),
/** One-shot resource usage snapshot of a running container (`docker stats --no-stream`). */
dockerContainerStats: (endpoint: DockerEndpoint, id: string) => typedError<DockerContainerStats, IdeError>(__TAURI_INVOKE("docker_container_stats", { endpoint, id })),
/** Processes running inside a container (`docker top`). */
dockerContainerTop: (endpoint: DockerEndpoint, id: string) => typedError<DockerProcessList, IdeError>(__TAURI_INVOKE("docker_container_top", { endpoint, id })),
/**
* Closes the connection's SSH tunnel and, when nothing else uses it, its SSH connection
* (Services › Disconnect); other endpoints keep nothing open.
*/
dockerDisconnect: (endpoint: DockerEndpoint) => typedError<null, IdeError>(__TAURI_INVOKE("docker_disconnect", { endpoint })),
/** Follows `docker events` until the daemon goes away or the request is cancelled. */
dockerEvents: (request: RequestId, endpoint: DockerEndpoint, onEvent: Channel<DockerEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("docker_events", { request, endpoint, onEvent })),
/** Layers of an image (`docker image history`). */
dockerImageHistory: (endpoint: DockerEndpoint, id: string) => typedError<DockerImageLayer[], IdeError>(__TAURI_INVOKE("docker_image_history", { endpoint, id })),
/** Pretty-printed `docker inspect` JSON. */
dockerInspect: (endpoint: DockerEndpoint, object: DockerObject, id: string) => typedError<string, IdeError>(__TAURI_INVOKE("docker_inspect", { endpoint, object, id })),
/** Streams a container's log lines, in batches, until it stops or the request is cancelled. */
dockerLogs: (request: RequestId, endpoint: DockerEndpoint, id: string, tail: number, follow: boolean, timestamps: boolean, onLines: Channel<DockerLogLine[]>) => typedError<null, IdeError>(__TAURI_INVOKE("docker_logs", { request, endpoint, id, tail, follow, timestamps, onLines })),
dockerPrune: (request: RequestId, endpoint: DockerEndpoint, target: PruneTarget, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("docker_prune", { request, endpoint, target, onOutput })),
/** `docker pull`, logging in first when a saved registry with a password serves the image. */
dockerPull: (request: RequestId, endpoint: DockerEndpoint, reference: string, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("docker_pull", { request, endpoint, reference, onOutput })),
/** Test login to `registry` (`password`, else the saved one) through `endpoint`'s daemon. */
dockerRegistryLogin: (endpoint: DockerEndpoint, registry: DockerRegistry, password: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("docker_registry_login", { endpoint, registry, password })),
dockerRemove: (endpoint: DockerEndpoint, object: DockerObject, ids: string[], force: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("docker_remove", { endpoint, object, ids, force })),
/**
* Environment for a Docker run configuration's command line: selects `endpoint`'s
* daemon and puts the docker executable on `PATH`.
*/
dockerRunEnv: (endpoint: DockerEndpoint) => typedError<{ [key in string]: string }, IdeError>(__TAURI_INVOKE("docker_run_env", { endpoint })),
dockerSaveSettings: (settings: DockerSettings) => typedError<null, IdeError>(__TAURI_INVOKE("docker_save_settings", { settings })),
/** Saves (`None`: forgets) a registry's password. */
dockerSetRegistryPassword: (id: string, password: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("docker_set_registry_password", { id, password })),
/** Docker connections and registries (app-wide). */
dockerSettings: () => typedError<DockerSettings, IdeError>(__TAURI_INVOKE("docker_settings")),
/** Availability plus containers, images, volumes and networks. */
dockerSnapshot: (endpoint: DockerEndpoint) => typedError<DockerSnapshot, IdeError>(__TAURI_INVOKE("docker_snapshot", { endpoint })),
/**
* "Clear caches": drops syntax trees and EditorConfig files of the window's
* project, shrinks the in-memory index and compacts its on-disk cache.
* Ends a process OpenIDEA started (a row of the memory breakdown) and its
* children; its owner (language server, run, terminal) sees it exit. Returns
* false for a process that isn't ours.
*/
endProcess: (pid: number) => typedError<boolean, IdeError>(__TAURI_INVOKE("end_process", { pid })),
/**
* Reload Environment: new child processes get the login shell's current environment
* (and the project's `remoteEnv` on a remote host); running ones keep theirs.
*/
envReload: () => typedError<EnvReloaded, IdeError>(__TAURI_INVOKE("env_reload")),
/**
* True when the plugin's dialogs can't be shown here: Linux with no portal service on the session
* bus (running or activatable) and no `zenity`.
*/
fileDialogNeedsGtk: () => __TAURI_INVOKE<boolean>("file_dialog_needs_gtk"),
/** Folders holding indexed files, for `@` references. */
findDirs: (query: string, limit: number) => typedError<FileMatch[], IdeError>(__TAURI_INVOKE("find_dirs", { query, limit })),
findFiles: (query: string, limit: number) => typedError<FileMatch[], IdeError>(__TAURI_INVOKE("find_files", { query, limit })),
findFilesNamed: (name: string) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("find_files_named", { name })),
findSymbols: (query: string, filter: SymbolFilter, limit: number) => typedError<SymbolMatch[], IdeError>(__TAURI_INVOKE("find_symbols", { query, filter, limit })),
/** Index symbols named exactly one of `names` inside `within` (an agent task's folder). */
findSymbolsNamed: (names: string[], within: IpcPath) => typedError<SymbolMatch[], IdeError>(__TAURI_INVOKE("find_symbols_named", { names, within })),
/** Replaces the project's `flutter daemon`, after a failure or an SDK change. */
flutterDaemonRestart: () => typedError<FlutterDeviceList, IdeError>(__TAURI_INVOKE("flutter_daemon_restart")),
/**
* The project's Flutter devices, starting its `flutter daemon` on first use. Changes arrive as
* `IdeEvent::FlutterDevices`.
*/
flutterDevices: () => typedError<FlutterDeviceList, IdeError>(__TAURI_INVOKE("flutter_devices")),
/** Looks at adb again, for Android devices Flutter doesn't report (awaiting authorization, offline). */
flutterDevicesRefresh: () => typedError<null, IdeError>(__TAURI_INVOKE("flutter_devices_refresh")),
/**
* The address of the project's DevTools server, started on first use. A server that failed or
* exited is only started again by the next request.
*/
flutterDevtoolsUrl: () => typedError<string, IdeError>(__TAURI_INVOKE("flutter_devtools_url")),
fsCompareDirectories: (left: string, right: string, mode: DirectoryCompareMode, request: RequestId, onProgress: Channel<DirectoryCompareProgress>) => typedError<DirectoryCompareEntry[], IdeError>(__TAURI_INVOKE("fs_compare_directories", { left, right, mode, request, onProgress })),
fsCopy: (from: string, to: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_copy", { from, to })),
fsCopyMerge: (sourceRoot: string, destinationRoot: string, path: string, overwrite: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("fs_copy_merge", { sourceRoot, destinationRoot, path, overwrite })),
fsCreateDir: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_create_dir", { path })),
/**
* Creates an empty file; inside a project, honours the EditorConfig
* `charset` (writes the BOM for `utf-8-bom` / UTF-16).
*/
fsCreateFile: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_create_file", { path })),
fsCreateFileBytes: (path: string, data: number[]) => typedError<null, IdeError>(__TAURI_INVOKE("fs_create_file_bytes", { path, data })),
/** Moving to the trash can take a while (large trees): kept off the main thread. */
fsDelete: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_delete", { path })),
/** Moves an item to the Trash and returns the snapshot for Project View Undo. */
fsDeleteWithUndo: (path: string) => typedError<DeletionUndo, IdeError>(__TAURI_INVOKE("fs_delete_with_undo", { path })),
fsEntryKind: (path: string) => typedError<EntryKind, IdeError>(__TAURI_INVOKE("fs_entry_kind", { path })),
/**
* Opens a project file with its default application (Office, PDF readers). The checks run here,
* in the backend, instead of widening the webview's opener permissions: the window must be a
* trusted local project and the file must lie inside it.
*/
fsOpenWithSystem: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_open_with_system", { path })),
/** Size and text/binary classification, from the file's head only. */
fsProbe: (path: string) => typedError<FileProbe, IdeError>(__TAURI_INVOKE("fs_probe", { path })),
fsReadDir: (path: string) => typedError<FileEntry[], IdeError>(__TAURI_INVOKE("fs_read_dir", { path })),
/** An image file as a `data:` URL. */
fsReadImage: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("fs_read_image", { path })),
/** Up to `len` bytes from `offset` (capped per call), base64-encoded. */
fsReadRange: (path: string, offset: number, len: number) => typedError<ByteRange, IdeError>(__TAURI_INVOKE("fs_read_range", { path, offset, len })),
/**
* Reads a text file without opening it as a document (previews, quick
* definition). Prefers the unsaved buffer when the file is open.
*/
fsReadText: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("fs_read_text", { path })),
fsRename: (from: string, to: string) => typedError<null, IdeError>(__TAURI_INVOKE("fs_rename", { from, to })),
/** The existing file or directory a path written in `from` names (`href`, `url()`, a string literal). */
fsResolveReference: (from: IpcPath, value: string) => typedError<string | null, IdeError>(__TAURI_INVOKE("fs_resolve_reference", { from, value })),
/**
* Toggle Read-only Attribute: sets the writable bit (and the open document's
* state). Returns whether the file is read-only now.
*/
fsSetWritable: (path: string, writable: boolean) => typedError<boolean, IdeError>(__TAURI_INVOKE("fs_set_writable", { path, writable })),
/**
* Runs Compare Directories' synchronisation operations in order. A failed operation is
* reported and the rest still run; cancellation stops before the next one.
*/
fsSynchronizeDirectories: (left: string, right: string, operations: DirectorySyncOperation[], request: RequestId, onProgress: Channel<DirectorySyncProgress>) => typedError<DirectorySyncFailure[], IdeError>(__TAURI_INVOKE("fs_synchronize_directories", { left, right, operations, request, onProgress })),
fsUndoDelete: (undo: DeletionUndo) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("fs_undo_delete", { undo })),
/** The repositories of the account gh is signed in to ("Get from Version Control" › GitHub); needs no project. */
ghAccountRepos: () => typedError<GhAccountRepos, IdeError>(__TAURI_INVOKE("gh_account_repos")),
/** A GitHub GraphQL / REST call through `gh api`; returns the response body. */
ghApi: (repo: string | null, request: GhApiRequest) => typedError<string, IdeError>(__TAURI_INVOKE("gh_api", { repo, request })),
ghAvailability: (repo: string | null) => typedError<GhAvailability, IdeError>(__TAURI_INVOKE("gh_availability", { repo })),
ghPrCheckout: (repo: string | null, request: RequestId, number: number, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("gh_pr_checkout", { repo, request, number, onOutput })),
ghPrComment: (repo: string | null, number: number, body: string) => typedError<null, IdeError>(__TAURI_INVOKE("gh_pr_comment", { repo, number, body })),
/** Creates a pull request from the current branch (pushing it first when asked); returns its URL. */
ghPrCreate: (repo: string | null, request: RequestId, pr: CreatePullRequest, onOutput: Channel<string>) => typedError<string, IdeError>(__TAURI_INVOKE("gh_pr_create", { repo, request, pr, onOutput })),
ghPrList: (repo: string | null, query: PrListQuery) => typedError<PullRequestSummary[], IdeError>(__TAURI_INVOKE("gh_pr_list", { repo, query })),
/** Fetches what is missing to diff a pull request locally; returns the revisions to compare. */
ghPrPrepareDiff: (repo: string | null, request: RequestId, number: number, headOid: string, baseOid: string, baseRef: string, nameWithOwner: string, onOutput: Channel<string>) => typedError<PrDiffRevisions, IdeError>(__TAURI_INVOKE("gh_pr_prepare_diff", { repo, request, number, headOid, baseOid, baseRef, nameWithOwner, onOutput })),
ghPrReview: (repo: string | null, number: number, event: ReviewEvent, body: string) => typedError<null, IdeError>(__TAURI_INVOKE("gh_pr_review", { repo, number, event, body })),
ghPrReviewComments: (repo: string | null, number: number) => typedError<PrReviewComment[], IdeError>(__TAURI_INVOKE("gh_pr_review_comments", { repo, number })),
ghPrView: (repo: string | null, number: number) => typedError<PullRequestDetails, IdeError>(__TAURI_INVOKE("gh_pr_view", { repo, number })),
/** Forgets the credential of `key` (a `git_credentials` entry). */
gitCredentialForget: (key: string) => __TAURI_INVOKE<void>("git_credential_forget", { key }),
/** Settings › Git › Saved credentials: `scheme://host` of every saved entry. */
gitCredentials: () => __TAURI_INVOKE<string[]>("git_credentials"),
/** The resolved dependency tree of a Gradle project for one configuration (Dependency Analyzer). */
gradleDependencies: (gradlePath: string, configuration: string, offline: boolean, request: RequestId, buildDir: string | null) => typedError<GradleDependency[], IdeError>(__TAURI_INVOKE("gradle_dependencies", { gradlePath, configuration, offline, request, buildDir })),
gradleLinkProjects: (paths: string[]) => typedError<BuildModel, IdeError>(__TAURI_INVOKE("gradle_link_projects", { paths })),
/**
* The `.toml` of a version catalog the build imports as `group:artifact:version`, once a
* build has downloaded it.
*/
gradlePublishedCatalog: (coordinates: string) => typedError<string | null, IdeError>(__TAURI_INVOKE("gradle_published_catalog", { coordinates })),
gradleUnlinkProjects: (paths: string[]) => typedError<BuildModel, IdeError>(__TAURI_INVOKE("gradle_unlink_projects", { paths })),
/** Shows a GTK file chooser attached to `window`. `None` when the user cancels. */
gtkPickPaths: (options: GtkPickOptions) => typedError<IpcPath[] | null, IdeError>(__TAURI_INVOKE("gtk_pick_paths", { options })),
historyContent: (id: string) => typedError<string, IdeError>(__TAURI_INVOKE("history_content", { id })),
historyList: (path: string) => typedError<HistoryEntry_Serialize[], IdeError>(__TAURI_INVOKE("history_list", { path })),
/** Show History on a folder: snapshots of the files under it (deleted ones included) and labels. */
historyListDir: (path: string) => typedError<DirectoryHistory_Serialize, IdeError>(__TAURI_INVOKE("history_list_dir", { path })),
/** Local History › Put Label…: a named point in the history of every file. */
historyPutLabel: (label: string) => typedError<null, IdeError>(__TAURI_INVOKE("history_put_label", { label })),
/**
* Revert to a snapshot: writes its content to `path` (re-creating a deleted
* file and its folders); an open editor updates in place.
*/
historyRestore: (path: string, id: string) => typedError<null, IdeError>(__TAURI_INVOKE("history_restore", { path, id })),
/**
* Convert to cURL and Copy: request `index` of `text` (the editor buffer of `path`), with
* the variables of `env` substituted, as a cURL command.
*/
httpCurl: (path: string | null, text: string, index: number, env: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("http_curl", { path, text, index, env })),
/**
* The environment file for the request file `path` (`is_private`: the private one): the nearest
* existing one, else a new one next to it.
*/
httpEnvironmentFile: (path: IpcPath, isPrivate: boolean) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("http_environment_file", { path, isPrivate })),
/** Environment names from the `http-client(.private).env.json` files that apply to `path`. */
httpEnvironments: (path: string | null) => typedError<string[], IdeError>(__TAURI_INVOKE("http_environments", { path })),
/**
* Sends request `index` of `text` (the editor buffer of `path`) and records
* the exchange in the response history. Cancel with `cancel_request(request)`.
*/
httpExecute: (request: RequestId, path: string | null, text: string, index: number, env: string | null) => typedError<HttpExchange, IdeError>(__TAURI_INVOKE("http_execute", { request, path, text, index, env })),
/** A pasted `curl …` command as `.http` request text; `None` when it isn't one. */
httpFromCurl: (command: string) => __TAURI_INVOKE<string | null>("http_from_curl", { command }),
httpHistory: () => typedError<HttpHistoryEntry[], IdeError>(__TAURI_INVOKE("http_history")),
httpHistoryClear: () => typedError<null, IdeError>(__TAURI_INVOKE("http_history_clear")),
httpHistoryGet: (id: string) => typedError<HttpExchange, IdeError>(__TAURI_INVOKE("http_history_get", { id })),
/** The requests of an `.http` file (gutter run icons, Run All). */
httpRequests: (text: string) => __TAURI_INVOKE<HttpRequestBlock[]>("http_requests", { text }),
/**
* Where `{{name}}` is defined in the environment files that apply to request file `path`
* (Navigate › Declaration on a variable), private file first.
*/
httpVariableDefinitions: (path: IpcPath, name: string) => typedError<Location[], IdeError>(__TAURI_INVOKE("http_variable_definitions", { path, name })),
indexFileExtensions: () => typedError<ExtensionCount[], IdeError>(__TAURI_INVOKE("index_file_extensions")),
indexStatus: () => typedError<IndexStatus, IdeError>(__TAURI_INVOKE("index_status")),
/**
* Inspect Code: diagnostics of every file in `scope` that a language server
* serves. Files stream through `on_event` as they finish; ends with `Done`.
*/
inspectCode: (request: RequestId, scope: SearchScope, onEvent: Channel<InspectEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("inspect_code", { request, scope, onEvent })),
/** Incremental build of the jdtls workspace serving `module` (e.g. before HotSwap). */
javaBuildWorkspace: (module: string, request: number | null) => typedError<JavaBuildStatus, IdeError>(__TAURI_INVOKE("java_build_workspace", { module, request })),
/**
* The debug adapter for the JVMs of `module`: `java-debug` inside jdtls, or `java-analyzer`
* (`java-analyzer dap`) when jdtls doesn't serve the module and java-analyzer does.
*/
javaDebugAdapter: (module: string) => typedError<string, IdeError>(__TAURI_INVOKE("java_debug_adapter", { module })),
/** Port of java-debug's DAP server inside the jdtls serving `module` (started on demand). */
javaDebugServer: (module: string) => typedError<number, IdeError>(__TAURI_INVOKE("java_debug_server", { module })),
/**
* Cancellable with `cancel_request(request)`.
* Builds according to `policy`, then resolves the runtime (or test)
* classpath and the JDK of the module at `module` (absolute, or relative to the project root).
* A module with Kotlin / Groovy / Scala sources is built by its build system, whose class directories come first.
*/
javaResolveLaunch: (module: string, test: boolean, policy: BuildPolicy, request: RequestId) => typedError<JavaLaunchInfo, IdeError>(__TAURI_INVOKE("java_resolve_launch", { module, test, policy, request })),
/**
* Downloads the latest `vendor` JDK of Java `version` into `location` (default:
* [`jdk_download_location`]), streaming progress through `on_event`; cancellable
* with `cancel_request(request)`. The JDK is then detected like an installed one,
* and language servers waiting for a JDK (jdtls) start on it.
*/
jdkDownload: (vendor: string, version: number, location: string | null, request: RequestId, onEvent: Channel<InstallEvent>) => typedError<Sdk, IdeError>(__TAURI_INVOKE("jdk_download", { vendor, version, location, request, onEvent })),
/** Where Download JDK puts JDKs unless told otherwise. */
jdkDownloadLocation: () => typedError<IpcPath, IdeError>(__TAURI_INVOKE("jdk_download_location")),
/** Java versions `vendor` publishes; cancellable with `cancel_request(request)`. */
jdkDownloadReleases: (vendor: string, request: RequestId) => typedError<JdkReleases, IdeError>(__TAURI_INVOKE("jdk_download_releases", { vendor, request })),
/** JDK distributions Download JDK offers. */
jdkDownloadVendors: () => __TAURI_INVOKE<JdkVendor[]>("jdk_download_vendors"),
/** The Java version the window's jdtls needs; `None` while it isn't installed or doesn't tell. */
jdtlsRequiredJava: () => typedError<number | null, IdeError>(__TAURI_INVOKE("jdtls_required_java")),
jvmFilePresentations: (paths: string[]) => typedError<JvmFilePresentation[], IdeError>(__TAURI_INVOKE("jvm_file_presentations", { paths })),
languages: () => __TAURI_INVOKE<LanguageInfo_Serialize[]>("languages"),
/**
* Edits the loose file `path` in this window without a project (LightEdit);
* a window already in LightEdit keeps its files. Returns the effective (global) settings.
*/
lightEditOpen: (path: string) => typedError<Settings_Serialize, IdeError>(__TAURI_INVOKE("light_edit_open", { path })),
/**
* LightEdit without a file (File › New File from a welcome window); returns
* the effective (global) settings.
*/
lightEditOpenUntitled: () => typedError<Settings_Serialize, IdeError>(__TAURI_INVOKE("light_edit_open_untitled")),
/** Routes frontend logs into the backend `tracing` pipeline. */
logFrontend: (level: LogLevel, message: string) => __TAURI_INVOKE<void>("log_frontend", { level, message }),
/** Resolves (if needed), applies the edit, then runs the command of a code action. */
lspApplyCodeAction: (doc: DocId, action: CodeAction) => typedError<null, IdeError>(__TAURI_INVOKE("lsp_apply_code_action", { doc, action })),
lspCallHierarchy: (request: RequestId, doc: DocId, pos: Pos, direction: HierarchyDirection) => typedError<CallHierarchy, IdeError>(__TAURI_INVOKE("lsp_call_hierarchy", { request, doc, pos, direction })),
lspCanDownloadSources: (uri: string) => typedError<boolean, IdeError>(__TAURI_INVOKE("lsp_can_download_sources", { uri })),
lspChangeSignature: (request: RequestId, doc: DocId, pos: Pos, signature: MethodSignature, delegate: boolean, confirmation: string | null) => typedError<ServerRefactored, IdeError>(__TAURI_INVOKE("lsp_change_signature", { request, doc, pos, signature, delegate, confirmation })),
/** Cancellable code actions with the kinds the servers advertise (Refactor This, refactoring availability). */
lspCodeActionQuery: (request: RequestId, doc: DocId, range: Range, only: string[]) => typedError<CodeActionQuery, IdeError>(__TAURI_INVOKE("lsp_code_action_query", { request, doc, range, only })),
lspCodeActions: (doc: DocId, range: Range, only: string[]) => typedError<CodeAction[], IdeError>(__TAURI_INVOKE("lsp_code_actions", { doc, range, only })),
lspCodeLens: (doc: DocId) => typedError<CodeLens[], IdeError>(__TAURI_INVOKE("lsp_code_lens", { doc })),
lspCompletion: (request: RequestId, doc: DocId, pos: Pos, trigger: string | null) => typedError<CompletionList, IdeError>(__TAURI_INVOKE("lsp_completion", { request, doc, pos, trigger })),
lspDocumentHighlights: (doc: DocId, pos: Pos) => typedError<Highlight[], IdeError>(__TAURI_INVOKE("lsp_document_highlights", { doc, pos })),
/** Links in a document (`href`s, Markdown links, `#include`s…) from its language servers. */
lspDocumentLinks: (doc: DocId) => typedError<DocumentLink[], IdeError>(__TAURI_INVOKE("lsp_document_links", { doc })),
lspExecuteCodeAction: (request: RequestId, doc: DocId, action: CodeAction, answers: FormAnswer[]) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("lsp_execute_code_action", { request, doc, action, answers })),
/**
* Runs a server command (`workspace/executeCommand`), e.g. a completion item's
* follow-up command. Edits the server requests arrive via `workspace/applyEdit`.
*/
lspExecuteCommand: (doc: DocId, command: Command) => typedError<null, IdeError>(__TAURI_INVOKE("lsp_execute_command", { doc, command })),
lspExtractInterface: (request: RequestId, doc: DocId, pos: Pos, members: string[], name: string, destination: string, confirmation: string | null) => typedError<ServerRefactored, IdeError>(__TAURI_INVOKE("lsp_extract_interface", { request, doc, pos, members, name, destination, confirmation })),
lspExtractInterfaceInfo: (request: RequestId, doc: DocId, pos: Pos) => typedError<ExtractInterfaceInfo, IdeError>(__TAURI_INVOKE("lsp_extract_interface_info", { request, doc, pos })),
lspFormat: (doc: DocId, range: {
start: Pos,
end: Pos,
} | null, options: FormatOptions) => typedError<TextEdit[], IdeError>(__TAURI_INVOKE("lsp_format", { doc, range, options })),
lspGoto: (doc: DocId, pos: Pos, kind: GotoKind) => typedError<Location[], IdeError>(__TAURI_INVOKE("lsp_goto", { doc, pos, kind })),
/**
* Go to Implementation of the symbol at `pos`. Implementations found before a
* slower search for the rest arrive on `on_partial`; the result has them all.
* Cancel with `cancel_request(request)`.
*/
lspGotoImplementation: (request: RequestId, doc: DocId, pos: Pos, onPartial: Channel<Location[]>) => typedError<Location[], IdeError>(__TAURI_INVOKE("lsp_goto_implementation", { request, doc, pos, onPartial })),
/** The class at `pos` and the members Pull Members Up / Push Members Down can move. */
lspHierarchyMembers: (request: RequestId, doc: DocId, pos: Pos, kind: HierarchyRefactoring) => typedError<HierarchyMembers, IdeError>(__TAURI_INVOKE("lsp_hierarchy_members", { request, doc, pos, kind })),
/** Checks Pull Members Up / Push Members Down and computes the edit without applying it. */
lspHierarchyRefactor: (request: RequestId, doc: DocId, pos: Pos, kind: HierarchyRefactoring, target: string | null, choices: HierarchyChoice[]) => typedError<HierarchyRefactored, IdeError>(__TAURI_INVOKE("lsp_hierarchy_refactor", { request, doc, pos, kind, target, choices })),
lspHover: (request: RequestId, doc: DocId, pos: Pos) => typedError<{
contents: Markup,
range: Range | null,
} | null, IdeError>(__TAURI_INVOKE("lsp_hover", { request, doc, pos })),
/**
* Refines the implementations `targets` of the method at `pos` to their declarations (Java
* dependencies' class files point at the start of the class). Cancel with
* `cancel_request(request)`.
*/
lspImplementationLocations: (request: RequestId, doc: DocId, pos: Pos, targets: Location[]) => typedError<Location[], IdeError>(__TAURI_INVOKE("lsp_implementation_locations", { request, doc, pos, targets })),
/**
* Implementations of the symbols at `positions`, one list per position (the
* editor's "is implemented / overridden" gutter markers). Cancel with
* `cancel_request(request)`.
*/
lspImplementations: (request: RequestId, doc: DocId, positions: Pos[]) => typedError<Location[][], IdeError>(__TAURI_INVOKE("lsp_implementations", { request, doc, positions })),
lspInlayHints: (doc: DocId, range: Range) => typedError<InlayHint[], IdeError>(__TAURI_INVOKE("lsp_inlay_hints", { doc, range })),
/** Inline (ghost text) suggestions at `pos`; `automatic` when triggered by typing. */
lspInlineCompletion: (request: RequestId, doc: DocId, pos: Pos, automatic: boolean) => typedError<InlineCompletionItem[], IdeError>(__TAURI_INVOKE("lsp_inline_completion", { request, doc, pos, automatic })),
lspJavaMove: (request: RequestId, doc: DocId, kind: string, args: string, confirmation: string | null) => typedError<ServerRefactored, IdeError>(__TAURI_INVOKE("lsp_java_move", { request, doc, kind, args, confirmation })),
lspJavaMoveDestinations: (request: RequestId, doc: DocId, kind: string, args: string) => typedError<string[], IdeError>(__TAURI_INVOKE("lsp_java_move_destinations", { request, doc, kind, args })),
lspJavaSourceTypes: (request: RequestId, doc: DocId, projectName: string | null) => typedError<string[], IdeError>(__TAURI_INVOKE("lsp_java_source_types", { request, doc, projectName })),
lspLibrarySources: (request: RequestId, uri: string, pos: Pos, sources: string | null) => typedError<{
/**
* File path; for virtual targets the URI itself (equal to `uri`), which
* the UI opens as a read-only virtual document.
*/
path: IpcPath,
range: Range,
/** Set for non-`file:` targets, e.g. `jdt://contents/…`. */
uri?: string | null,
} | null, IdeError>(__TAURI_INVOKE("lsp_library_sources", { request, uri, pos, sources })),
/**
* Answers a server's `window/showMessageRequest` question (`null`: dismissed). It runs where the
* language server runs: the question waits in that process, a remote project's server included.
*/
lspMessageRequestAnswer: (id: number, choice: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("lsp_message_request_answer", { id, choice })),
lspPrepareRename: (doc: DocId, pos: Pos) => typedError<{
start: Pos,
end: Pos,
} | null, IdeError>(__TAURI_INVOKE("lsp_prepare_rename", { doc, pos })),
lspPrepareTypeHierarchy: (doc: DocId, pos: Pos) => typedError<{
name: string,
kind: SymbolKind,
detail: string | null,
/** File path, or the URI of a virtual document (see `uri`). */
path: IpcPath,
/** Set for non-`file:` items (library classes). */
uri?: string | null,
range: Range,
selectionRange: Range,
/** Call sites, for call hierarchy. */
fromRanges: Range[],
/**
* The file of `from_ranges` when it is not the item's own: for an outgoing call, the
* file of the prepared item that makes it (a path, or the URI of a virtual document).
*/
fromPath?: IpcPath | null,
} | null, IdeError>(__TAURI_INVOKE("lsp_prepare_type_hierarchy", { doc, pos })),
/**
* References of the symbol at `pos`. `project_wide` also searches project files
* outside the language server's analysis scope; bulk scans over many symbols
* leave it off. Java, `project_wide`: without `libraries`, the dependencies and the JDK
* are not searched; with it, those found in the sources arrive on `on_partial` before
* the slower search for the rest, and the result has them all. Cancel with
* `cancel_request(request)`.
*/
lspReferences: (request: RequestId, doc: DocId, pos: Pos, includeDeclaration: boolean, projectWide: boolean, libraries: boolean, onPartial: Channel<References>) => typedError<References, IdeError>(__TAURI_INVOKE("lsp_references", { request, doc, pos, includeDeclaration, projectWide, libraries, onPartial })),
/** Computes the rename edit without applying it, so the UI can preview conflicts. */
lspRename: (request: RequestId, doc: DocId, pos: Pos, newName: string) => typedError<Renamed, IdeError>(__TAURI_INVOKE("lsp_rename", { request, doc, pos, newName })),
/** Re-emits the language servers' current diagnostics (the UI loaded after they arrived). */
lspResendDiagnostics: () => typedError<null, IdeError>(__TAURI_INVOKE("lsp_resend_diagnostics")),
lspResolveClassFile: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("lsp_resolve_class_file", { path })),
/** Resolves a code action's edit without applying it (intention preview). */
lspResolveCodeAction: (doc: DocId, action: CodeAction) => typedError<CodeAction, IdeError>(__TAURI_INVOKE("lsp_resolve_code_action", { doc, action })),
lspResolveCommand: (request: RequestId, doc: DocId, server: ServerId, command: Command, answers: FormAnswer[]) => typedError<{
command: Command,
formFields: FormField[],
formAnswers: FormAnswer[],
} | null, IdeError>(__TAURI_INVOKE("lsp_resolve_command", { request, doc, server, command, answers })),
lspResolveCompletion: (doc: DocId, item: CompletionItem) => typedError<CompletionItem, IdeError>(__TAURI_INVOKE("lsp_resolve_completion", { doc, item })),
lspRestart: (server: ServerId) => typedError<null, IdeError>(__TAURI_INVOKE("lsp_restart", { server })),
/** Restarts the language servers named `name` in every open project (after a tool update). */
lspRestartNamed: (name: string) => typedError<null, IdeError>(__TAURI_INVOKE("lsp_restart_named", { name })),
lspSemanticTokens: (doc: DocId) => typedError<{
/** Flattened `[line, col, len, typeIdx, modifierBits]` quintuples (absolute). */
data: number[],
tokenTypes: string[],
tokenModifiers: string[],
} | null, IdeError>(__TAURI_INVOKE("lsp_semantic_tokens", { doc })),
lspServers: () => typedError<ServerInfo[], IdeError>(__TAURI_INVOKE("lsp_servers")),
lspSignatureHelp: (doc: DocId, pos: Pos) => typedError<{
signatures: Signature[],
activeSignature: number,
activeParameter: number,
} | null, IdeError>(__TAURI_INVOKE("lsp_signature_help", { doc, pos })),
lspSignatureInfo: (request: RequestId, doc: DocId, pos: Pos) => typedError<MethodSignature, IdeError>(__TAURI_INVOKE("lsp_signature_info", { request, doc, pos })),
lspTypeHierarchy: (doc: DocId, pos: Pos, direction: HierarchyDirection) => typedError<HierarchyItem[], IdeError>(__TAURI_INVOKE("lsp_type_hierarchy", { doc, pos, direction })),
/**
* Contents of a read-only language-server document, including JDT library
* classes and disk class files. Cached per project.
*/
lspVirtualDocument: (uri: string) => typedError<VirtualDocument, IdeError>(__TAURI_INVOKE("lsp_virtual_document", { uri })),
lspWorkspaceSymbols: (request: RequestId, query: string) => typedError<WorkspaceSymbol[], IdeError>(__TAURI_INVOKE("lsp_workspace_symbols", { request, query })),
markRecent: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("mark_recent", { path })),
/**
* Completion of the `<dependency>` coordinate the caret (`offset`, UTF-16) sits
* in the value of in the POM `doc`, from the local repository and Maven Central.
*/
mavenDependencyCompletion: (doc: DocId, offset: number, request: RequestId) => typedError<{
/** UTF-16 offset where the completed text starts: the value's first character. */
from: number,
/**
* UTF-16 offset where the replaced value ends: past the caret when the caret
* sits inside an existing value, which is then replaced whole.
*/
to: number,
/** Which coordinate element the caret is in. */
kind: PomCompletionKind,
/** The suggestions, local repository first. */
options: PomCompletionOption[],
} | null, IdeError>(__TAURI_INVOKE("maven_dependency_completion", { doc, offset, request })),
/** Where the direct dependency `dependency` of the Maven module `pom` is declared. */
mavenDependencyDeclaration: (pom: string, dependency: ArtifactKey) => typedError<Location, IdeError>(__TAURI_INVOKE("maven_dependency_declaration", { pom, dependency })),
/**
* Adds an `<exclusion>` of `exclusion` to the declaration of the direct dependency
* `dependency` of the Maven module `pom`, through the open document when there is one
* (saved). Returns the declaration; nothing changes when it already excludes it.
*/
mavenExcludeDependency: (pom: string, dependency: ArtifactKey, exclusion: ArtifactKey) => typedError<Location, IdeError>(__TAURI_INVOKE("maven_exclude_dependency", { pom, dependency, exclusion })),
/**
* The go-to-declaration target at `pos` of a Maven POM: the definition of the
* `${property}` at the caret, the parent POM, or the dependency / plugin's own POM
* (a project module first, then the local repository). A dependency without a
* resolvable artifact POM falls back to its management entry.
*/
mavenGotoDeclaration: (pom: string, pos: Pos) => typedError<{
/**
* Absolute path of the file with the declaration: the POM itself, or a parent
* POM of the local repository when the definition is inherited from one.
*/
path: string,
range: Range,
/** What was found. */
kind: PomGotoKind,
/** The declaration as named for the user (`example.version`, `com.example:example-lib`). */
label: string,
} | null, IdeError>(__TAURI_INVOKE("maven_goto_declaration", { pom, pos })),
/**
* Gutter targets of the unversioned dependencies and plugins in a Maven POM:
* the management declarations that actually supply their versions, including
* parent POMs and imported BOMs. Cancel with `cancel_request(request)`.
*/
mavenManagedDeclarations: (pom: string, request: RequestId) => typedError<PomManagedDeclaration[], IdeError>(__TAURI_INVOKE("maven_managed_declarations", { pom, request })),
/** The user closed the Run tool window tab of an agent command (`run_command`). */
mcpAgentRunClosed: (name: string) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_agent_run_closed", { name })),
/**
* Settings › Agents › IDE MCP Server › Background projects: the projects this host's server
* keeps loaded without a window.
*/
mcpBackgroundProjects: () => typedError<McpBackgroundProject_Serialize[], IdeError>(__TAURI_INVOKE("mcp_background_projects")),
/**
* Settings › Agents › IDE MCP Server › Regenerate Token: forgets the kept token, and restarts the
* server with a new one. Clients configured with the old token stop working.
*/
mcpRegenerateToken: () => typedError<null, IdeError>(__TAURI_INVOKE("mcp_regenerate_token")),
mcpReportProblems: (reset: boolean, files: FileProblems[]) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_report_problems", { reset, files })),
mcpRespond: (id: number, allow: boolean, error: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_respond", { id, allow, error })),
mcpServerStatus: () => typedError<McpServerStatus, IdeError>(__TAURI_INVOKE("mcp_server_status")),
mcpSetFocusedEditor: (editor: {
path: IpcPath,
/** Zero-based lines and UTF-16 columns, end exclusive. */
selection: Range,
selectedText: string,
} | null, focused: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_set_focused_editor", { editor, focused })),
mcpSetOpenEditors: (paths: IpcPath[]) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_set_open_editors", { paths })),
mcpUiReady: (ready: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_ui_ready", { ready })),
/** Unloads one background project; a root that is not loaded is already unloaded. */
mcpUnloadBackgroundProject: (root: IpcPath) => typedError<null, IdeError>(__TAURI_INVOKE("mcp_unload_background_project", { root })),
/**
* Sets the menu's labels / accelerators and updates the menu when the visible
* items changed. Accelerators of actions that are not on the menu must not call
* `set_menu`, which redraws the macOS menu bar.
*/
menuConfigure: (config: MenuConfig) => __TAURI_INVOKE<void>("menu_configure", { config }),
/** The menu bar for a title bar drawn by the frontend (Windows). */
menuModel: () => __TAURI_INVOKE<MenuNode_Serialize[]>("menu_model"),
/**
* Updates the menu after the recent-projects list changed. Only the Open Recent
* submenu is rewritten when the rest of the menu is unchanged.
*/
menuRefresh: () => __TAURI_INVOKE<void>("menu_refresh"),
/**
* Action ids the focused window cannot run now: their native menu items are
* disabled in place (no rebuild).
*/
menuSetDisabled: (ids: string[]) => __TAURI_INVOKE<void>("menu_set_disabled", { ids }),
/**
* Index definitions named `name` within the roots `from` may navigate into (its own root
* plus its configured dependencies).
*/
navIndexDefinitions: (name: string, from: IpcPath) => typedError<SymbolMatch[], IdeError>(__TAURI_INVOKE("nav_index_definitions", { name, from })),
/**
* Every Python class in the project (attached dependency roots included) and its base names,
* for native inheritance gutter markers.
*/
navInheritance: () => typedError<ClassInheritance[], IdeError>(__TAURI_INVOKE("nav_inheritance")),
/**
* The file a Python import path (`a.b.c`, or `.x` relative to `from`) names; `None` when
* no project or content root has it.
*/
navResolveModule: (name: string, from: IpcPath) => typedError<string | null, IdeError>(__TAURI_INVOKE("nav_resolve_module", { name, from })),
notebookCellDocs: (id: string) => typedError<NotebookCellDoc[], IdeError>(__TAURI_INVOKE("notebook_cell_docs", { id })),
notebookClose: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("notebook_close", { id })),
notebookEdit: (id: string, version: number, edit: NotebookEdit) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_edit", { id, version, edit })),
notebookExecute: (id: string, cells: string[], python: string | null, request: RequestId, onOutput: Channel<NotebookOutputEvent>) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_execute", { id, cells, python, request, onOutput })),
notebookGet: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_get", { id })),
notebookInterrupt: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("notebook_interrupt", { id })),
notebookOpen: (path: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_open", { path })),
notebookRedo: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_redo", { id })),
notebookReload: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_reload", { id })),
notebookRestart: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_restart", { id })),
notebookSave: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_save", { id })),
notebookUndo: (id: string) => typedError<NotebookSnapshot, IdeError>(__TAURI_INVOKE("notebook_undo", { id })),
openProject: (path: string) => typedError<ProjectInfo_Serialize, IdeError>(__TAURI_INVOKE("open_project", { path })),
/** Files and folders that continue `prefix`, a path being typed in `from`. */
pathCompletions: (from: IpcPath, prefix: string) => typedError<PathCompletion[], IdeError>(__TAURI_INVOKE("path_completions", { from, prefix })),
/** An activation event from the UI: `kind` is `language`, `file` (project-relative path) or `view`. */
pluginActivationEvent: (kind: string, value: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_activation_event", { kind, value })),
/**
* This window's clipboard for a plugin's `clipboardRequested`; false when the call no
* longer waits or asked another window.
*/
pluginAnswerClipboard: (requestId: string, answer: ClipboardAnswer) => typedError<boolean, IdeError>(__TAURI_INVOKE("plugin_answer_clipboard", { requestId, answer })),
/** The invoking window's reply to a plugin command request. */
pluginAnswerCommand: (requestId: string, answer: CommandAnswer) => typedError<boolean, IdeError>(__TAURI_INVOKE("plugin_answer_command", { requestId, answer })),
/**
* A window's answer to a plugin's `commitRequested`; false when the call no
* longer waits.
*/
pluginAnswerCommit: (requestId: string, answer: CommitAnswer) => __TAURI_INVOKE<boolean>("plugin_answer_commit", { requestId, answer }),
/**
* Reports the user's answer to a plugin's `promptRequested`: the chosen keys
* (pick), `[text]` (input), anything (confirm: OK), or `None` when dismissed.
*/
pluginAnswerPrompt: (promptId: string, answer: string[] | null) => __TAURI_INVOKE<boolean>("plugin_answer_prompt", { promptId, answer }),
pluginAnswerRunTarget: (id: string, useTarget: boolean) => typedError<Settings_Serialize, IdeError>(__TAURI_INVOKE("plugin_answer_run_target", { id, useTarget })),
/** Validated assets of a plugin whose id starts with `prefix` (icon theme mapping and SVGs). */
pluginAssets: (pluginId: string, prefix: string) => typedError<([string, string])[], IdeError>(__TAURI_INVOKE("plugin_assets", { pluginId, prefix })),
/** Cancels a plugin task (`taskStarted` with `cancellable`). */
pluginCancelTask: (taskId: string) => __TAURI_INVOKE<boolean>("plugin_cancel_task", { taskId }),
/**
* Plugin packages available locally for installation: `<resources>/plugins`
* when bundled, plus the repository's official plugins in debug builds.
*/
pluginCatalog: () => typedError<CatalogPlugin[], IdeError>(__TAURI_INVOKE("plugin_catalog")),
/** Re-approves a plugin's executable, globally or for this window's project. */
pluginChooseProgram: (pluginId: string, capability: string, scope: SettingsScope, path: string | null) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_choose_program", { pluginId, capability, scope, path })),
pluginColorPresentations: (doc: DocId, plugin: string, color: ColorInfo) => typedError<string[], IdeError>(__TAURI_INVOKE("plugin_color_presentations", { doc, plugin, color })),
/**
* Runs plugins' before-commit checks on what `selection` commits, until
* `request` is cancelled.
*/
pluginCommitChecks: (selection: CommitSelection, checks: PluginCommitCheckRef[], request: RequestId) => typedError<PluginCommitCheckResult[], IdeError>(__TAURI_INVOKE("plugin_commit_checks", { selection, checks, request })),
/** Every plugin's console highlight rules (later changes arrive as `consoleRulesChanged`). */
pluginConsoleRules: () => __TAURI_INVOKE<{ [key in string]: ConsoleRule[] }>("plugin_console_rules"),
/** Dispatches a wasm content editor action through the owning plugin's event handler. */
pluginContentTabAction: (pluginId: string, action: ContentTabAction) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_content_tab_action", { pluginId, action })),
/** Plugin context keys in effect for this window (later changes arrive as `contextChanged`). */
pluginContextKeys: () => __TAURI_INVOKE<PluginContextKey[]>("plugin_context_keys"),
/** Waits for the process an `attach-child` plugin configuration's debugger attaches to. */
pluginDebugAttachTarget: (config: string, run: RunId) => typedError<AttachableProcess, IdeError>(__TAURI_INVOKE("plugin_debug_attach_target", { config, run })),
/** Project-scoped decoration snapshots; the window filters to its current root. */
pluginDecorationSets: () => __TAURI_INVOKE<{ [key in string]: DecorationSet[] }>("plugin_decoration_sets"),
pluginEndpoints: (pluginId: string) => typedError<PluginEndpoint[], IdeError>(__TAURI_INVOKE("plugin_endpoints", { pluginId })),
/** Kinds of workbench events plugins want (re-fetch on `subscriptionsChanged`). */
pluginEventKinds: () => __TAURI_INVOKE<EventKind[]>("plugin_event_kinds"),
/** Reports exactly one completion from the operation's launching window. */
pluginFinishOperation: (id: string, status: number | null, stopped: boolean) => typedError<boolean, IdeError>(__TAURI_INVOKE("plugin_finish_operation", { id, status, stopped })),
pluginFormatters: () => typedError<FormatterChoice[], IdeError>(__TAURI_INVOKE("plugin_formatters")),
/** Confirms a plugin waiting for consent (project plugins, new capabilities). */
pluginGrant: (id: string, consent: Consent) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_grant", { id, consent })),
/**
* Installs the plugin package in `path` (a folder with `plugin.toml`) with
* the capabilities the user accepted on the install page.
*/
pluginInstallDir: (path: string, consent: Consent) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_install_dir", { path, consent })),
/** Theme plugins installed in the JetBrains IDEs of this user, the ones in use first. */
pluginInstalledIntellijThemes: () => typedError<InstalledIntellijTheme[], IdeError>(__TAURI_INVOKE("plugin_installed_intellij_themes")),
pluginLanguageVisuals: (doc: DocId) => typedError<PluginLanguageVisuals, IdeError>(__TAURI_INVOKE("plugin_language_visuals", { doc })),
/** Gutter markers of plugin `line-markers` providers for an open document. */
pluginLineMarkers: (doc: DocId) => typedError<LineMarkerInfo[], IdeError>(__TAURI_INVOKE("plugin_line_markers", { doc })),
/** Links a development plugin folder (`openidea-plugin link` does the same from a terminal). */
pluginLink: (path: string) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_link", { path })),
/**
* Installed and linked plugins plus the project plugins of this window's
* project (`<project>/.openidea/plugins/*`, rescanned on every call), with
* the UI contributions to project.
*/
pluginList: () => typedError<PluginsSnapshot, IdeError>(__TAURI_INVOKE("plugin_list")),
/**
* Starts the program of a log tab the plugin's code opened in this window,
* with the toggles in `on`.
*/
pluginLogTabSpawn: (pluginId: string, key: string, on: string[], cols: number, rows: number, onOutput: Channel<string>) => typedError<TerminalInfo, IdeError>(__TAURI_INVOKE("plugin_log_tab_spawn", { pluginId, key, on, cols, rows, onOutput })),
/** The marketplace's plugins: read again when `refresh` or when none was read yet, else the last index read. */
pluginMarket: (refresh: boolean) => typedError<MarketPlugin[], IdeError>(__TAURI_INVOKE("plugin_market", { refresh })),
/** Downloads and checks a marketplace plugin; returns the folder for the install page. */
pluginMarketDownload: (id: string) => typedError<string, IdeError>(__TAURI_INVOKE("plugin_market_download", { id })),
pluginMarketUrl: () => __TAURI_INVOKE<string | null>("plugin_market_url"),
pluginNavigationFiles: () => typedError<NavigationFiles, IdeError>(__TAURI_INVOKE("plugin_navigation_files")),
pluginNavigationGoto: (doc: DocId, pos: Pos) => typedError<{
range: Range,
targets: Location[],
} | null, IdeError>(__TAURI_INVOKE("plugin_navigation_goto", { doc, pos })),
pluginNavigationIndex: (paths: string[], request: RequestId) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_navigation_index", { paths, request })),
pluginNavigationInvalidate: (paths: string[] | null) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_navigation_invalidate", { paths })),
pluginNavigationMarkers: (paths: string[]) => typedError<FileMarkers[], IdeError>(__TAURI_INVOKE("plugin_navigation_markers", { paths })),
/** Parses one batch of an owned test configuration's output. */
pluginParseTestResults: (config: string, chunk: string) => typedError<PluginTestEvent[] | null, IdeError>(__TAURI_INVOKE("plugin_parse_test_results", { config, chunk })),
/** Workbench events from this window (only the kinds of `plugin_event_kinds`). */
pluginPostEvents: (events: WorkbenchEvent[], editor: {
path: string,
language: string,
selections: Range[],
} | null) => __TAURI_INVOKE<void>("plugin_post_events", { events, editor }),
/** Revalidates a plugin run's executable before debugging, including reruns. */
pluginPrepareDebugRun: (config: RunConfig_Deserialize) => typedError<RunConfig_Serialize, IdeError>(__TAURI_INVOKE("plugin_prepare_debug_run", { config })),
/** Validates the package in `path` for the install page (nothing is copied). */
pluginPreviewInstall: (path: string) => typedError<InstallPreview, IdeError>(__TAURI_INVOKE("plugin_preview_install", { path })),
/** The currently approved executable in the selected scope, after revalidating its pin. */
pluginProgram: (pluginId: string, program: string, scope: SettingsScope) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("plugin_program", { pluginId, program, scope })),
/** Reads an IntelliJ theme plugin (`.jar`, Marketplace `.zip`, plugin folder) or `.theme.json` to import. */
pluginReadIntellijTheme: (path: string) => typedError<IntellijThemeSource, IdeError>(__TAURI_INVOKE("plugin_read_intellij_theme", { path })),
/** Re-reads a plugin from disk (after rebuilding a dev plugin). */
pluginReload: (id: string) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_reload", { id })),
/** Revokes one host remembered through net:ask. */
pluginRevokeNetHost: (id: string, host: string) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_revoke_net_host", { id, host })),
/** Goes back to the version the last update of `id` replaced. */
pluginRollBack: (id: string) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_roll_back", { id })),
/** Runs a plugin command in the context of this window's project and focused editor. */
pluginRunCommand: (pluginId: string, commandId: string, arg: string | null, editor: {
path: string,
language: string,
selections: Range[],
} | null, paths: string[] | null, settingsScope: "global" | "project" | null, commandChain: string[] | null, request: number | null) => typedError<string | null, IdeError>(__TAURI_INVOKE("plugin_run_command", { pluginId, commandId, arg, editor, paths, settingsScope, commandChain, request })),
pluginRunTargets: () => typedError<RegisteredRunTarget[], IdeError>(__TAURI_INVOKE("plugin_run_targets")),
/**
* One page of `plugin_id`'s results for its search `category`. Cancellable with
* `cancel_request(request)`.
*/
pluginSearch: (pluginId: string, category: string, query: string, limit: number, request: RequestId) => typedError<PluginSearchPage, IdeError>(__TAURI_INVOKE("plugin_search", { pluginId, category, query, limit, request })),
pluginSecrets: (pluginId: string) => typedError<PluginSecretState[], IdeError>(__TAURI_INVOKE("plugin_secrets", { pluginId })),
/** Selects test-tree paths in an owned plugin test configuration. */
pluginSelectTests: (config: string, tests: string[][]) => typedError<string[] | null, IdeError>(__TAURI_INVOKE("plugin_select_tests", { config, tests })),
/** The Services pane of node `key` of a plugin's `location = "services"` view. */
pluginServiceDetail: (pluginId: string, view: string, key: string) => typedError<ServiceTab[], IdeError>(__TAURI_INVOKE("plugin_service_detail", { pluginId, view, key })),
/**
* Runs the program of the log tab `tab` of node `key`'s Services pane (with
* the toggles in `on`), streaming its output until it exits or `request` is
* cancelled; returns the exit code.
*/
pluginServiceLog: (request: RequestId, pluginId: string, view: string, key: string, tab: string, on: string[], onLine: Channel<PluginOutputLine>) => typedError<number | null, IdeError>(__TAURI_INVOKE("plugin_service_log", { request, pluginId, view, key, tab, on, onLine })),
/**
* The UI reports the focused editor's file (`editor-focused` events), with its
* caret so plugins can scope line labels without re-reading the document.
*/
pluginSetActiveFile: (path: string | null, editor: {
path: string,
language: string,
selections: Range[],
} | null) => __TAURI_INVOKE<void>("plugin_set_active_file", { path, editor }),
/** Grants or revokes one declared capability. */
pluginSetCapability: (id: string, capability: string, granted: boolean) => typedError<PluginInfo, IdeError>(__TAURI_INVOKE("plugin_set_capability", { id, capability, granted })),
pluginSetEnabled: (id: string, enabled: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_set_enabled", { id, enabled })),
/** Sets the marketplace index URL (an `https://…/index.json` or a local path; `None` for the default). */
pluginSetMarketUrl: (url: string | null) => __TAURI_INVOKE<void>("plugin_set_market_url", { url }),
/** Stores a plugin secret (`None` or empty deletes it). The value never goes back to the UI or the plugin. */
pluginSetSecret: (pluginId: string, name: string, value: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_set_secret", { pluginId, name, value })),
/** Selects a plugin theme; both `None` restores the built-in theme. */
pluginSetTheme: (pluginId: string | null, themeId: string | null) => typedError<{
pluginId: string,
theme: ThemeDef,
} | null, IdeError>(__TAURI_INVOKE("plugin_set_theme", { pluginId, themeId })),
/**
* The UI reports the selected plugin theme's resolved frame colour (`#rrggbb[aa]`),
* which new windows open in before their page loads.
*/
pluginSetThemeFrame: (color: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_set_theme_frame", { color })),
/** The UI language (BCP 47) that plugin code reads with `ui.locale()`. */
pluginSetUiLocale: (tag: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_set_ui_locale", { tag })),
/** Writes a package the UI generated (an imported theme); returns the folder for the install page. */
pluginStagePackage: (name: string, files: PackageFile[]) => typedError<string, IdeError>(__TAURI_INVOKE("plugin_stage_package", { name, files })),
/** Every plugin status bar item (later changes arrive as `statusItemChanged`). */
pluginStatusItems: () => __TAURI_INVOKE<PluginStatusItem_Serialize[]>("plugin_status_items"),
/** Routes this window's plugin events to `on_event` (replaces an earlier subscription). */
pluginSubscribe: (onEvent: Channel<PluginEvent_Deserialize>) => __TAURI_INVOKE<void>("plugin_subscribe", { onEvent }),
/** Marks a keyed tab closed before ending its process. */
pluginTerminalSessionClose: (operation: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_terminal_session_close", { operation })),
/** Starts only the pinned command recorded for this window's terminal operation. */
pluginTerminalSessionSpawn: (operation: string, cols: number, rows: number, onOutput: Channel<string>) => typedError<TerminalInfo, IdeError>(__TAURI_INVOKE("plugin_terminal_session_spawn", { operation, cols, rows, onOutput })),
pluginUninstall: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_uninstall", { id })),
pluginUnlink: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_unlink", { id })),
/** Unpacks a package file (`.oiplugin` or `.zip`); returns the folder for the install page. */
pluginUnpackPackage: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("plugin_unpack_package", { path })),
/** A user action in a plugin view or custom editor (`doc`, `editor`: as for rendering). */
pluginViewEvent: (pluginId: string, view: string, event: ViewEvent, doc: number | null, editor: {
path: string,
language: string,
selections: Range[],
} | null) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_view_event", { pluginId, view, event, doc, editor })),
/**
* Content of a plugin view (`doc`: the document of a custom editor; `editor`: for
* a tool window, the window's active editor, as commands get it).
*/
pluginViewRender: (pluginId: string, view: string, viewport: {
firstRow: number,
rows: number,
} | null, doc: number | null, editor: {
path: string,
language: string,
selections: Range[],
} | null) => typedError<View, IdeError>(__TAURI_INVOKE("plugin_view_render", { pluginId, view, viewport, doc, editor })),
/** The page of a plugin's web view or custom editor (`web = …`). */
pluginWebPage: (pluginId: string, view: string) => typedError<WebPage, IdeError>(__TAURI_INVOKE("plugin_web_page", { pluginId, view })),
pluginWebPtySpawn: (pluginId: string, view: string, command: WebPtyCommand, onOutput: Channel<string>) => typedError<TerminalInfo, IdeError>(__TAURI_INVOKE("plugin_web_pty_spawn", { pluginId, view, command, onOutput })),
/**
* Reads the file the user picked in an open dialog for a web view
* (`openidea.openFile`), on this machine; base64.
*/
pluginWebReadFile: (path: string) => typedError<string, IdeError>(__TAURI_INVOKE("plugin_web_read_file", { path })),
/**
* Writes what a web view saves (`openidea.saveFile`) to the path the user
* chose in the save dialog, on this machine.
*/
pluginWebSaveFile: (path: string, base64: string) => typedError<null, IdeError>(__TAURI_INVOKE("plugin_web_save_file", { path, base64 })),
prepareWorkspaceEdit: (edit: WorkspaceEdit) => typedError<WorkspaceEdit, IdeError>(__TAURI_INVOKE("prepare_workspace_edit", { edit })),
/** Reads the profile a profiled run left behind. */
profilerCollect: (spec: ProfileSpec) => typedError<Profile, IdeError>(__TAURI_INVOKE("profiler_collect", { spec })),
/**
* Runs a full garbage collection in the JVMs of a running local run, so a live-object profile
* written when it stops holds only reachable objects. Returns how many JVMs collected; 0 for a
* run that is gone, remote, or has no JVM with an attach listener.
*/
profilerGcBeforeStop: (run: RunId) => typedError<number, IdeError>(__TAURI_INVOKE("profiler_gc_before_stop", { run })),
/** How to run `config` under a sampling profiler, or which profiler is missing. */
profilerPrepare: (config: RunConfig_Deserialize, mode: ProfileMode) => typedError<ProfilePrepared_Serialize, IdeError>(__TAURI_INVOKE("profiler_prepare", { config, mode })),
/** The project open in this window (a settings window: its parent's), if any. */
projectCurrent: () => __TAURI_INVOKE<{
trusted: boolean,
root: IpcPath,
name: string,
displayName: string,
isGit: boolean,
settings: Settings_Serialize,
workspace?: Workspace_Serialize | null,
unity?: UnityProjectInfo | null,
} | null>("project_current"),
/**
* File › Rename Project…: the project's display name (title bar, recent
* projects); an empty `name` restores the folder name. Stored in the project's settings.
*/
projectRename: (name: string) => typedError<ProjectInfo_Serialize, IdeError>(__TAURI_INVOKE("project_rename", { name })),
/**
* Effective source / test / resource / excluded roots of the window's project:
* auto-detected from build files, overridden by Settings › Project Structure.
*/
projectRoots: () => typedError<ProjectRoots, IdeError>(__TAURI_INVOKE("project_roots")),
projectTrustAddLocation: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("project_trust_add_location", { path })),
projectTrustList: () => typedError<TrustDecisions, IdeError>(__TAURI_INVOKE("project_trust_list")),
projectTrustRemoveLocation: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("project_trust_remove_location", { path })),
projectTrustSet: (path: string, trusted: boolean, folder: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("project_trust_set", { path, trusted, folder })),
projectTrustStatus: (path: string) => typedError<TrustStatus, IdeError>(__TAURI_INVOKE("project_trust_status", { path })),
/**
* Sets a `projectStructure.*` key in the settings of `root`, a project attached to the window's
* project (Mark Directory as there). Every open window holding that project follows.
*/
projectWorkspaceMemberSet: (root: string, key: string, value: string) => typedError<null, IdeError>(__TAURI_INVOKE("project_workspace_member_set", { root, key, value })),
/** The workspace projects outside the window's project folder, for Mark Directory as there. */
projectWorkspaceMembers: () => typedError<WorkspaceMember[], IdeError>(__TAURI_INVOKE("project_workspace_members")),
/**
* System Settings › HTTP Proxy › Check connection: GETs `url` through `proxy` as
* edited (not yet applied); the response status, or why there was none.
*/
proxyCheckConnection: (proxy: ProxySettings, url: string) => typedError<string, IdeError>(__TAURI_INVOKE("proxy_check_connection", { proxy, url })),
/**
* The requirements of a `requirements*.txt` / `pyproject.toml` the project's interpreter
* doesn't satisfy; `None` for other files, or with no local interpreter to ask.
*/
pythonRequirements: (doc: DocId, request: RequestId) => typedError<{
/** The interpreter checked, which installs go to. */
python: IpcPath,
unsatisfied: UnsatisfiedRequirement[],
} | null, IdeError>(__TAURI_INVOKE("python_requirements", { doc, request })),
/** Recently opened files, most recent first (⌘E). */
recentFiles: () => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("recent_files")),
/** The welcome screen's project groups. */
recentProjectGroups: () => __TAURI_INVOKE<RecentProjectGroup[]>("recent_project_groups"),
recentProjects: () => __TAURI_INVOKE<RecentProject[]>("recent_projects"),
redoWorkspaceEdit: (id: number) => typedError<null, IdeError>(__TAURI_INVOKE("redo_workspace_edit", { id })),
/** Whether the file move `id` can still be undone. */
refactorCanUndoFileMove: (id: number) => typedError<boolean, IdeError>(__TAURI_INVOKE("refactor_can_undo_file_move", { id })),
/** `workspace/willRenameFiles` on every interested server (before the move). Cancellable. */
refactorFileMoveEdits: (request: RequestId, moves: FileMove[]) => typedError<FileRenameEdits, IdeError>(__TAURI_INVOKE("refactor_file_move_edits", { request, moves })),
/**
* "Search in comments and strings": textual occurrences of the moved files'
* names, qualified names and paths (before the move). Cancellable.
*/
refactorFileMoveTextEdits: (request: RequestId, moves: FileMove[]) => typedError<WorkspaceEdit, IdeError>(__TAURI_INVOKE("refactor_file_move_text_edits", { request, moves })),
/**
* Applies `edit` (from [`refactor_file_move_edits`], possibly empty), moves the
* files and notifies the servers. Returns the id for [`refactor_undo_file_move`].
*/
refactorMoveFiles: (moves: FileMove[], edit: WorkspaceEdit, label: string) => typedError<number, IdeError>(__TAURI_INVOKE("refactor_move_files", { moves, edit, label })),
/** Undoes a file move: moves back and reverts the reference updates. */
refactorUndoFileMove: (id: number) => typedError<UndoOutcome, IdeError>(__TAURI_INVOKE("refactor_undo_file_move", { id })),
/** Browse before connecting, using the desktop's SSH configuration even in a remote window. */
remoteBootstrapList: (ssh: string, path: string) => typedError<RemoteEntry[], IdeError>(__TAURI_INVOKE("remote_bootstrap_list", { ssh, path })),
/**
* File › Remote Development: opens `path` on `target` (an SSH host, a WSL distribution, or a
* dev container, whose project folder is the container's own) in this window (installs /
* starts the server as needed).
*/
remoteConnect: (target: RemoteTarget, path: string, onProgress: Channel<RemoteProgress>) => typedError<RemoteProject_Serialize, IdeError>(__TAURI_INVOKE("remote_connect", { target, path, onProgress })),
/** The remote session of this window (a settings window: its parent's), if any. */
remoteCurrent: () => __TAURI_INVOKE<{
target: RemoteTarget,
root: string,
host: string,
/** `linux`, `macos` or `windows`: the OS the project's commands run on. */
os: string,
commands: string[],
} | null>("remote_current"),
remoteDelete: (connection: FsConnection, path: string) => typedError<null, IdeError>(__TAURI_INVOKE("remote_delete", { connection, path })),
remoteDisconnect: () => __TAURI_INVOKE<void>("remote_disconnect"),
remoteDownloadInto: (connection: FsConnection, paths: string[], target: IpcPath, request: RequestId) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("remote_download_into", { connection, paths, target, request })),
/**
* The project view's Download to…: remote files and folders of this window's project into the
* local folder `target`, each under its own name. Like Remote Host › Download to…, nothing is
* written outside `target`, even through a local symlink inside it.
*/
remoteDownloadLocal: (paths: string[], target: string, request: RequestId, onProgress: Channel<DownloadProgress>) => typedError<TransferReport, IdeError>(__TAURI_INVOKE("remote_download_local", { paths, target, request, onProgress })),
/**
* Forwards `localhost:<remote_port>` of the remote host to the same port here when it is free,
* else to a free one. Nothing needs to listen there yet; connections are opened per use.
*/
remoteForwardPort: (remotePort: number) => typedError<ForwardedPort, IdeError>(__TAURI_INVOKE("remote_forward_port", { remotePort })),
/** The remote ports this window forwards to this machine. */
remoteForwardedPorts: () => __TAURI_INVOKE<ForwardedPort[]>("remote_forwarded_ports"),
/** A client OS file belongs to this machine even when its destination is remote. */
remoteImportLocal: (from: string, to: string, request: RequestId) => typedError<string[], IdeError>(__TAURI_INVOKE("remote_import_local", { from, to, request })),
/**
* Runs a command on the window's remote server; `args` and the result are JSON
* text. Streaming arguments are `{ "$channel": id }`; their values arrive on
* `on_channel` tagged with the id.
*/
remoteInvoke: (cmd: string, args: string, onChannel: Channel<ChannelFrame>) => typedError<string, IdeError>(__TAURI_INVOKE("remote_invoke", { cmd, args, onChannel })),
remoteList: (connection: FsConnection, path: string) => typedError<RemoteEntry[], IdeError>(__TAURI_INVOKE("remote_list", { connection, path })),
remoteMkdir: (connection: FsConnection, path: string) => typedError<null, IdeError>(__TAURI_INVOKE("remote_mkdir", { connection, path })),
remoteOf: (path: IpcPath) => __TAURI_INVOKE<[FsConnection, string] | null>("remote_of", { path }),
remoteOpen: (connection: FsConnection, path: string) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("remote_open", { connection, path })),
remoteRename: (connection: FsConnection, from: string, to: string) => typedError<null, IdeError>(__TAURI_INVOKE("remote_rename", { connection, from, to })),
/** Stops forwarding `remote_port` of `host` (`None`: the remote host itself). */
remoteStopForwarding: (remotePort: number, host: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("remote_stop_forwarding", { remotePort, host })),
/** Records the user's trust decision for the window's remote project on this machine. */
remoteTrustSet: (trusted: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("remote_trust_set", { trusted })),
/** This machine's trust decision for the window's remote project (see [`Connection::authorize`]). */
remoteTrustStatus: () => typedError<TrustStatus, IdeError>(__TAURI_INVOKE("remote_trust_status")),
removeRecent: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("remove_recent", { path })),
removeRecentProject: (path: string) => typedError<null, IdeError>(__TAURI_INVOKE("remove_recent_project", { path })),
/**
* Replace in Files. Runs off the command thread; progress streams through
* `on_event` and ends with `Done`. Cancel with `cancel_request(request)`.
*
* Edits go through the document layer as one patch per file, so open editors
* update live and undo the whole file's replacements in one step. Unsaved
* editor buffers are replaced in place and left unsaved; other open documents
* are saved, and files that were not open are opened transiently, saved and closed.
*
* With `all_in_scope` (Replace All after the search hit its match limit) the
* scope is searched again without the limit and every match in it is replaced,
* as IDEA does: `targets` then only carry the `skip` positions of their files.
*/
replaceInFiles: (request: RequestId, query: SearchQuery, replacement: string, preserveCase: boolean, targets: ReplaceTarget[], allInScope: boolean, onEvent: Channel<ReplaceEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("replace_in_files", { request, query, replacement, preserveCase, targets, allInScope, onEvent })),
/** Before / after text of `path` for Replace › Preview (unsaved buffer included). */
replacePreview: (query: SearchQuery, replacement: string, preserveCase: boolean, path: string, only: Pos[] | null) => typedError<ReplacePreview, IdeError>(__TAURI_INVOKE("replace_preview", { query, replacement, preserveCase, path, only })),
runApplicationBuild: (config: RunConfig_Deserialize, module: string) => typedError<RunConfig_Serialize, IdeError>(__TAURI_INVOKE("run_application_build", { config, module })),
runApplicationPublish: (config: RunConfig_Deserialize, classPaths: string[], mainClass: string) => typedError<null, IdeError>(__TAURI_INVOKE("run_application_publish", { config, classPaths, mainClass })),
/** Kept temporary configurations with the current settings applied. */
runApplySettings: (configs: RunConfig_Deserialize[]) => typedError<RunConfig_Serialize[], IdeError>(__TAURI_INVOKE("run_apply_settings", { configs })),
runCloseStdin: (id: RunId) => typedError<null, IdeError>(__TAURI_INVOKE("run_close_stdin", { id })),
/** Detected configs followed by user-defined ones (user ids win on conflict). */
runConfigs: () => typedError<RunConfig_Serialize[], IdeError>(__TAURI_INVOKE("run_configs")),
runDotnetResolve: (config: RunConfig_Deserialize, debug: boolean) => typedError<RunConfig_Serialize, IdeError>(__TAURI_INVOKE("run_dotnet_resolve", { config, debug })),
/** Variables of the `.env` files a debug launch names, for the debugger to start with. */
runEnvFiles: (files: string[]) => typedError<{ [key in string]: string }, IdeError>(__TAURI_INVOKE("run_env_files", { files })),
/** Writes one of the IDE's Gradle init scripts where the build runs; returns its path. */
runGradleInitScript: (name: string, text: string) => typedError<string, IdeError>(__TAURI_INVOKE("run_gradle_init_script", { name, text })),
/** Writes the Gradle init script adding `jvm_args` to the JVMs the build forks; returns its path. */
runGradleJvmArgsScript: (jvmArgs: string[]) => typedError<string, IdeError>(__TAURI_INVOKE("run_gradle_jvm_args_script", { jvmArgs })),
/** Configurations read from `source`, not saved; names already in `existing` are skipped. */
runImportConfigs: (source: RunImportSource, existing: RunConfig_Deserialize[]) => typedError<RunImport_Serialize, IdeError>(__TAURI_INVOKE("run_import_configs", { source, existing })),
/** Project files run configurations can be imported from (`.vscode/launch.json`). */
runImportSources: () => typedError<RunImportSource[], IdeError>(__TAURI_INVOKE("run_import_sources")),
runList: () => __TAURI_INVOKE<RunInfo[]>("run_list"),
/** Terminal size of a run started with "Emulate terminal in output console". */
runResize: (id: RunId, cols: number, rows: number) => typedError<null, IdeError>(__TAURI_INVOKE("run_resize", { id, cols, rows })),
runSaveConfigs: (configs: RunConfig_Deserialize[], removedDetectedIds: string[] | null) => typedError<null, IdeError>(__TAURI_INVOKE("run_save_configs", { configs, removedDetectedIds })),
runSaveTemplates: (templates: RunConfig_Deserialize[]) => typedError<null, IdeError>(__TAURI_INVOKE("run_save_templates", { templates })),
runStart: (config: RunConfig_Deserialize, onOutput: Channel<OutputChunk>, request: number | null) => typedError<RunInfo, IdeError>(__TAURI_INVOKE("run_start", { config, onOutput, request })),
runStdin: (id: RunId, data: string) => typedError<null, IdeError>(__TAURI_INVOKE("run_stdin", { id, data })),
runStop: (id: RunId) => typedError<null, IdeError>(__TAURI_INVOKE("run_stop", { id })),
/** The environment runs inherit when "Include system environment variables" is on. */
runSystemEnv: () => __TAURI_INVOKE<{ [key in string]: string }>("run_system_env"),
/** Configuration templates: per-type defaults applied to new configurations. */
runTemplates: () => typedError<RunConfig_Serialize[], IdeError>(__TAURI_INVOKE("run_templates")),
/**
* Results from the JUnit XML reports (Surefire, Failsafe, Gradle) of the module at
* `module` (relative to the project root) written since `since_ms` (Unix epoch, ms).
*/
runTestReports: (module: string | null, sinceMs: number | null) => typedError<TestCaseReport[], IdeError>(__TAURI_INVOKE("run_test_reports", { module, sinceMs })),
runTomcatArtifacts: () => typedError<WebArtifact[], IdeError>(__TAURI_INVOKE("run_tomcat_artifacts")),
runTomcatBuild: (config: RunConfig_Deserialize) => typedError<({
/** Stable id, e.g. `npm:dev`, `cargo:run:app`, or a uuid for user-defined. */
id: string,
name: string,
/** `npm` | `cargo` | `gradle` | `maven` | `go` | `python` | `pytest` | `make` | `shell` … */
kind: string,
command: string,
args: string[],
cwd: IpcPath | null,
env: { [key in string]: string },
/** Detected configs are regenerated; user configs persist in `.openidea/run.toml`. */
detected: boolean,
/** Test runner configs render results in the test tree. */
isTest: boolean,
/** DAP adapter that can debug this config, if any. */
debugAdapter: string | null,
/** "Allow multiple instances": Run on a running config starts another one instead of restarting it. */
allowParallel?: boolean,
}) & (RunExtras_Serialize) | null, IdeError>(__TAURI_INVOKE("run_tomcat_build", { config })),
runTomcatHome: (home: string) => typedError<TomcatHome_Serialize, IdeError>(__TAURI_INVOKE("run_tomcat_home", { home })),
runTomcatInstallations: () => typedError<TomcatInstallation_Serialize[], IdeError>(__TAURI_INVOKE("run_tomcat_installations")),
runTomcatSync: (config: RunConfig_Deserialize, module: string, classPaths: string[], resourcesOnly: boolean) => typedError<boolean, IdeError>(__TAURI_INVOKE("run_tomcat_sync", { config, module, classPaths, resourcesOnly })),
runTomcatUpdate: (config: RunConfig_Deserialize, mode: string) => typedError<null, IdeError>(__TAURI_INVOKE("run_tomcat_update", { config, mode })),
/** Temporary configurations as they are kept between sessions: without what settings derived. */
runWithoutDerived: (configs: RunConfig_Deserialize[]) => typedError<RunConfig_Serialize[], IdeError>(__TAURI_INVOKE("run_without_derived", { configs })),
/** The project generators File › New Project offers, in list order. */
scaffoldCatalog: () => __TAURI_INVOKE<GeneratorInfo[]>("scaffold_catalog"),
/**
* Creates a project, streaming progress through `on_event`, and returns its directory,
* trusted. Cancellable with `cancel_request(request)`; a failed or cancelled run leaves nothing.
*/
scaffoldCreate: (req: CreateRequest, request: RequestId, onEvent: Channel<ScaffoldEvent>) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("scaffold_create", { req, request, onEvent })),
/** The first of `base`, `base1`, `base2`, … that names nothing in `location` yet. */
scaffoldFreeName: (location: string, base: string) => typedError<string, IdeError>(__TAURI_INVOKE("scaffold_free_name", { location, base })),
/**
* The fields a generator's project service adds for `values`; cancellable with
* `cancel_request(request)`.
*/
scaffoldOptions: (generator: string, values: { [key in string]: string }, request: RequestId) => typedError<Field[], IdeError>(__TAURI_INVOKE("scaffold_options", { generator, values, request })),
/** The programs a generator needs for `values`, and whether they are installed. */
scaffoldRequirements: (generator: string, values: { [key in string]: string }) => typedError<Requirement[], IdeError>(__TAURI_INVOKE("scaffold_requirements", { generator, values })),
/**
* Whether a project named `name` cannot be created in `location`: something other than an
* empty folder is already there.
*/
scaffoldTargetTaken: (location: string, name: string) => typedError<boolean, IdeError>(__TAURI_INVOKE("scaffold_target_taken", { location, name })),
scopeFiles: (pattern: string, limit: number) => typedError<ScopeFiles, IdeError>(__TAURI_INVOKE("scope_files", { pattern, limit })),
/** The project interpreter when it is a Docker or Compose run target's, with its snapshot. */
sdkContainerPython: () => typedError<{
/** The run target's id. */
target: string,
/** Its name; empty when no run target has the id. */
name: string,
/** The Python version of the snapshot in use; `None`: no snapshot yet. */
version: string | null,
/** The image the snapshot was copied from. */
image: string | null,
/** The copied library folders on this machine. */
folders: IpcPath[],
/** Packages of the snapshot (read-only). */
packages: PythonPackage[],
/** A snapshot is being taken. */
updating: boolean,
} | null, IdeError>(__TAURI_INVOKE("sdk_container_python")),
/** Copies the container's Python libraries again (after the image changed). */
sdkContainerPythonRefresh: () => typedError<{
/** The run target's id. */
target: string,
/** Its name; empty when no run target has the id. */
name: string,
/** The Python version of the snapshot in use; `None`: no snapshot yet. */
version: string | null,
/** The image the snapshot was copied from. */
image: string | null,
/** The copied library folders on this machine. */
folders: IpcPath[],
/** Packages of the snapshot (read-only). */
packages: PythonPackage[],
/** A snapshot is being taken. */
updating: boolean,
} | null, IdeError>(__TAURI_INVOKE("sdk_container_python_refresh")),
/** Installed interpreters / toolchains of `kind`; project-local ones first. */
sdkDetect: (kind: SdkKind) => typedError<Sdk[], IdeError>(__TAURI_INVOKE("sdk_detect", { kind })),
/** The JDK whose home is `path`, as the SDK list shows it; `None` when it is no JDK home. */
sdkJdkAt: (path: string) => typedError<{
/**
* Executable (`python`, `node`, `pnpm`) or directory (Rust toolchain bin
* dir, GOROOT, TypeScript `lib` dir) that the setting stores.
*/
path: IpcPath,
/** Display name, e.g. `Python 3.12 (.venv)` or `stable-aarch64-apple-darwin`. */
name: string,
version: string | null,
/**
* Where it was found: `venv` | `system` | `pyenv` | `conda` | `uv` | `nvm` |
* `rustup` | `bundled` | `workspace` | `path` …
*/
source: string,
/** Environment / toolchain root (virtualenv dir, rustup toolchain dir, GOROOT). */
home: IpcPath | null,
/** Rust standard library sources, Go default GOPATH. */
extra: IpcPath | null,
} | null, IdeError>(__TAURI_INVOKE("sdk_jdk_at", { path })),
/** Looks up `names` (bare command names): `node_modules/.bin` above `near`, then the search path. */
sdkLocateTools: (names: string[], near: string | null) => typedError<LocatedTools, IdeError>(__TAURI_INVOKE("sdk_locate_tools", { names, near })),
/** The Composer project `path` belongs to, when its dependencies need `composer install`. */
sdkPhpComposerInstall: (path: string) => typedError<{
root: IpcPath,
reason: ComposerInstall,
} | null, IdeError>(__TAURI_INVOKE("sdk_php_composer_install", { path })),
/** The PHP interpreter chosen in Settings › Languages & Frameworks › PHP; `None`: the `php` on `PATH`. */
sdkPhpEffective: () => typedError<string | null, IdeError>(__TAURI_INVOKE("sdk_php_effective")),
/** The PHP language level of the project `path` belongs to: the effective one and Auto's. */
sdkPhpLanguageLevel: (path: string) => typedError<PhpLanguageLevels, IdeError>(__TAURI_INVOKE("sdk_php_language_level", { path })),
/**
* The version of the PHP interpreter `php` and of the Xdebug it loads, run in `cwd` (default: the
* project root).
*/
sdkPhpXdebug: (php: string, cwd: string | null) => typedError<PhpXdebug, IdeError>(__TAURI_INVOKE("sdk_php_xdebug", { php, cwd })),
/**
* SDK / library source folders shown under "External Libraries" in the Project view,
* with the Maven / Gradle dependency jars of the build model.
*/
sdkProjectLibraries: (request: RequestId, onGroups: Channel<LibraryGroup[]>) => typedError<LibraryGroup[], IdeError>(__TAURI_INVOKE("sdk_project_libraries", { request, onGroups })),
/** Creates a Python environment with `tool` (`venv` / `uv` / `poetry`); output streams through `on_output`. */
sdkPythonCreateVenv: (tool: VenvTool, base: string, location: string, request: RequestId, onOutput: Channel<string>) => typedError<Sdk, IdeError>(__TAURI_INVOKE("sdk_python_create_venv", { tool, base, location, request, onOutput })),
/** The interpreter the project uses: the configured one, else its virtualenv. */
sdkPythonEffective: (near: string | null) => typedError<string | null, IdeError>(__TAURI_INVOKE("sdk_python_effective", { near })),
/** An existing Python executable or virtualenv folder as an SDK; `None` if Python cannot run. */
sdkPythonInterpreter: (path: string) => typedError<{
/**
* Executable (`python`, `node`, `pnpm`) or directory (Rust toolchain bin
* dir, GOROOT, TypeScript `lib` dir) that the setting stores.
*/
path: IpcPath,
/** Display name, e.g. `Python 3.12 (.venv)` or `stable-aarch64-apple-darwin`. */
name: string,
version: string | null,
/**
* Where it was found: `venv` | `system` | `pyenv` | `conda` | `uv` | `nvm` |
* `rustup` | `bundled` | `workspace` | `path` …
*/
source: string,
/** Environment / toolchain root (virtualenv dir, rustup toolchain dir, GOROOT). */
home: IpcPath | null,
/** Rust standard library sources, Go default GOPATH. */
extra: IpcPath | null,
} | null, IdeError>(__TAURI_INVOKE("sdk_python_interpreter", { path })),
sdkPythonPackages: (python: string, request: RequestId) => typedError<PythonPackage[], IdeError>(__TAURI_INVOKE("sdk_python_packages", { python, request })),
/** Installs (`uninstall = false`) or removes a package; output streams through `on_output`. */
sdkPythonPip: (python: string, requirement: string, uninstall: boolean, upgrade: boolean, request: RequestId, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("sdk_python_pip", { python, requirement, uninstall, upgrade, request, onOutput })),
/** The Python interpreters of the recently opened projects, each with its project. */
sdkPythonProjectInterpreters: () => typedError<ProjectInterpreter[], IdeError>(__TAURI_INVOKE("sdk_python_project_interpreters")),
/**
* Find in Files. Results stream through `on_event`; ends with `Done`.
* Cancel with `cancel_request(request)`.
*/
searchStart: (request: RequestId, query: SearchQuery, onEvent: Channel<SearchEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("search_start", { request, query, onEvent })),
/** Validates a query (e.g. regex syntax) while the user types. */
searchValidate: (query: SearchQuery) => typedError<null, IdeError>(__TAURI_INVOKE("search_validate", { query })),
/**
* Replaces the project groups; returns them as saved (names trimmed and unique, each
* project in one group, only recent projects).
*/
setRecentProjectGroups: (groups: RecentProjectGroup[]) => typedError<RecentProjectGroup[], IdeError>(__TAURI_INVOKE("set_recent_project_groups", { groups })),
/**
* File › Manage IDE Settings › Export Settings…: the global settings plus the
* frontend's IDE-level `storage` (live / file templates, macros) to `path`.
*/
settingsExport: (path: string, storage: { [key in string]: string }) => typedError<null, IdeError>(__TAURI_INVOKE("settings_export", { path, storage })),
/** Effective settings for the window's project, or global settings without one. */
settingsGet: () => __TAURI_INVOKE<Settings_Serialize>("settings_get"),
/**
* Defaults plus the global layer, without any project's values: what new
* projects (and projects without their own value) get.
*/
settingsGetGlobal: () => __TAURI_INVOKE<Settings_Serialize>("settings_get_global"),
/** Import Settings…: replaces the global settings with the file's; every window re-reads them. */
settingsImport: (path: string) => typedError<SettingsImport_Serialize, IdeError>(__TAURI_INVOKE("settings_import", { path })),
/** The settings folders of the JetBrains IDEs installed for this user, to import from. */
settingsListJetbrainsIdes: () => typedError<InstalledIdeSettings[], IdeError>(__TAURI_INVOKE("settings_list_jetbrains_ides")),
/**
* Import Settings… with a JetBrains `settings.zip` or an IDE's settings folder: reads it; the
* frontend maps and applies it.
*/
settingsReadJetbrains: (path: string) => typedError<JetBrainsSettings, IdeError>(__TAURI_INVOKE("settings_read_jetbrains", { path })),
/**
* The removed built-in theme id a settings file of this window still names, if any:
* `settings_get` reports the built-in that stands in for it, so the notice about
* a theme that moved to a plugin can address the installs it concerns.
*/
settingsRemovedTheme: () => __TAURI_INVOKE<string | null>("settings_removed_theme"),
/**
* `value` is JSON text, e.g. `14` or `"dark"`. Every window (for a project
* value: that project's windows) is told (`IdeEvent::SettingsChanged`) so it
* re-reads its effective settings.
*/
settingsSet: (scope: SettingsScope, key: string, value: string) => typedError<Settings_Serialize, IdeError>(__TAURI_INVOKE("settings_set", { scope, key, value })),
/** When a balloon is shown and OpenIDEA is unfocused, mirror it to the OS. */
showSystemNotification: (title: string, body: string) => typedError<null, IdeError>(__TAURI_INVOKE("show_system_notification", { title, body })),
/**
* Misspelt words in the comments, string literals and declared names of
* `doc` that `scope` includes (all of its text for prose). Cancel with
* `cancel_request(request)`.
*/
spellCheck: (doc: DocId, scope: SpellScope, request: RequestId) => typedError<Typo[], IdeError>(__TAURI_INVOKE("spell_check", { doc, scope, request })),
/** Replacements for a misspelt `word`, best first (Typo › Change to…). */
spellSuggest: (word: string) => typedError<string[], IdeError>(__TAURI_INVOKE("spell_suggest", { word })),
/** Spring Web mapping sources for the request-path index of Search Everywhere. */
springRouteSources: () => typedError<RouteSource[], IdeError>(__TAURI_INVOKE("spring_route_sources")),
/** Answers an `IdeEvent::Askpass` prompt (`None`: cancelled); every window drops it. */
sshAskpassAnswer: (id: number, answer: string | null, remember: boolean) => __TAURI_INVOKE<void>("ssh_askpass_answer", { id, answer, remember }),
/** Ids of the configurations with an open connection. */
sshConnected: () => __TAURI_INVOKE<string[]>("ssh_connected"),
sshDisconnect: (id: string) => __TAURI_INVOKE<void>("ssh_disconnect", { id }),
/** Whether connecting with configuration `id` needs a password first. */
sshNeedsSecret: (id: string) => typedError<boolean, IdeError>(__TAURI_INVOKE("ssh_needs_secret", { id })),
/**
* Tools › Start SSH Session: a shell on configuration `id` in a terminal tab, through the
* built-in client with the configuration's saved credentials.
*/
sshOpenTerminal: (id: string, cols: number, rows: number, onOutput: Channel<string>) => typedError<TerminalInfo, IdeError>(__TAURI_INVOKE("ssh_open_terminal", { id, cols, rows, onOutput })),
/** Whether a password is saved under `key` (an FTP deployment server's). */
sshPasswordSaved: (key: string) => __TAURI_INVOKE<boolean>("ssh_password_saved", { key }),
/** Remembers the password / passphrase of configuration `id` (`None` forgets it). */
sshSetSecret: (id: string, secret: string | null, save: boolean) => __TAURI_INVOKE<void>("ssh_set_secret", { id, secret, save }),
/** Test Connection: connects with `config` as edited (not necessarily saved). */
sshTest: (config: SshConfiguration, secret: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("ssh_test", { config, secret })),
/** Trusts the host key that failed the last connection of configuration `id`. */
sshTrustHost: (id: string) => typedError<null, IdeError>(__TAURI_INVOKE("ssh_trust_host", { id })),
/** Languages Search Structurally supports (those with a bundled grammar). */
structuralLanguages: () => typedError<StructuralLanguage[], IdeError>(__TAURI_INVOKE("structural_languages")),
/**
* Search Structurally over `scope`; files with matches stream through
* `on_event`, ending with `Done`. With a replacement, matches carry their
* replacement text (applied by the UI as a workspace edit).
*/
structuralSearch: (request: RequestId, scope: SearchScope, query: StructuralQuery, onEvent: Channel<StructuralEvent>) => typedError<null, IdeError>(__TAURI_INVOKE("structural_search", { request, scope, query, onEvent })),
/** Checks a structural search template (and language) while the user types. */
structuralValidate: (query: StructuralQuery) => typedError<null, IdeError>(__TAURI_INVOKE("structural_validate", { query })),
/** `ERROR` / `MISSING` nodes (e.g. a missing `;`) in document order. */
syntaxErrors: (doc: DocId, request: number | null) => typedError<SyntaxErrors, IdeError>(__TAURI_INVOKE("syntax_errors", { doc, request })),
/**
* The expression a selection denotes (exact or minimally enclosing), with its
* statement, block and caret candidates.
*/
syntaxExpressionAt: (doc: DocId, range: Range, request: number | null) => typedError<ExpressionAt, IdeError>(__TAURI_INVOKE("syntax_expression_at", { doc, range, request })),
/** Identifier tokens spelled `name` in a document, excluding comments and strings. */
syntaxIdentifiers: (doc: DocId, name: string, request: number | null) => typedError<IdentifierOccurrence[], IdeError>(__TAURI_INVOKE("syntax_identifiers", { doc, name, request })),
/**
* [`syntax_identifiers`] over files (open buffers win over disk); files
* without occurrences or without a grammar are left out. Cancellable.
*/
syntaxIdentifiersInFiles: (paths: string[], name: string, request: RequestId) => typedError<FileIdentifiers[], IdeError>(__TAURI_INVOKE("syntax_identifiers_in_files", { paths, name, request })),
/**
* Scope analysis of the identifier at `pos`: its local definition and
* references, or why it is not a local.
*/
syntaxLocals: (doc: DocId, pos: Pos, request: number | null) => typedError<Locals, IdeError>(__TAURI_INVOKE("syntax_locals", { doc, pos, request })),
/** The smallest named node covering `range`, with its ancestors (parent first). */
syntaxNodeAt: (doc: DocId, range: Range, request: number | null) => typedError<{
node: SyntaxNode,
/** Parent first, the root last. */
ancestors: SyntaxNode[],
} | null, IdeError>(__TAURI_INVOKE("syntax_node_at", { doc, range, request })),
/**
* Extend Selection chain plus statement / declaration ranges at `pos`
* (Move Statement, Complete Statement for languages without a Lezer grammar).
*/
syntaxStructuralRanges: (doc: DocId, pos: Pos, request: number | null) => typedError<StructuralRanges, IdeError>(__TAURI_INVOKE("syntax_structural_ranges", { doc, pos, request })),
/**
* What the structure service supports for a language (`tree`: every query,
* `locals`: scope analysis).
*/
syntaxSupport: (language: LanguageId) => typedError<StructureSupport, IdeError>(__TAURI_INVOKE("syntax_support", { language })),
/**
* Every installed family, sorted, each flagged monospaced or not. Read on
* first use (off the command threads), cached, and re-queried on `refresh`.
*/
systemFontFamilies: (refresh: boolean) => typedError<FontFamily[], IdeError>(__TAURI_INVOKE("system_font_families", { refresh })),
/**
* Reports which of `combos` (single-stroke `Alt+Shift+R`-style bindings) are
* already registered to another app. Empty everywhere but Windows.
*/
systemProbeHotkeys: (combos: string[]) => typedError<string[], IdeError>(__TAURI_INVOKE("system_probe_hotkeys", { combos })),
/** Installed shells for the Terminal's "New Predefined Session" menu. */
termAvailableShells: () => __TAURI_INVOKE<string[]>("term_available_shells"),
/** Shell used when Settings › Terminal › Shell path is empty. */
termDefaultShell: () => __TAURI_INVOKE<string>("term_default_shell"),
/**
* Whether the session is running a command (closing its tab asks first). A
* `tcgetpgrp` or one process snapshot: async only to stay off the main thread.
*/
termIsBusy: (id: TerminalId) => typedError<boolean, IdeError>(__TAURI_INVOKE("term_is_busy", { id })),
termKill: (id: TerminalId) => typedError<null, IdeError>(__TAURI_INVOKE("term_kill", { id })),
termResize: (id: TerminalId, cols: number, rows: number) => typedError<null, IdeError>(__TAURI_INVOKE("term_resize", { id, cols, rows })),
/**
* Async to stay off the main thread: forking the IDE (its whole address space)
* to start the shell takes tens of milliseconds, a frozen UI if run there.
*/
termSpawn: (options: TerminalOptions, onOutput: Channel<string>) => typedError<TerminalInfo, IdeError>(__TAURI_INVOKE("term_spawn", { options, onOutput })),
termStoreImage: (id: TerminalId, data: number[], mime: string) => typedError<string, IdeError>(__TAURI_INVOKE("term_store_image", { id, data, mime })),
termWrite: (id: TerminalId, data: string) => typedError<null, IdeError>(__TAURI_INVOKE("term_write", { id, data })),
/**
* Installs (or reinstalls) a tool into `<app-data>/tools`, streaming output through
* `on_event`. Cancel with `cancel_request(request)`.
*/
toolsInstall: (name: string, request: RequestId, onEvent: Channel<InstallEvent>) => typedError<ToolInfo, IdeError>(__TAURI_INVOKE("tools_install", { name, request, onEvent })),
/** Status of every known language server / debug adapter and the languages using it. */
toolsList: () => typedError<ToolInfo[], IdeError>(__TAURI_INVOKE("tools_list")),
/** Removes a tool the IDE installed. */
toolsUninstall: (name: string) => typedError<ToolInfo, IdeError>(__TAURI_INVOKE("tools_uninstall", { name })),
/**
* Newer versions of the tools the IDE installed (release downloads and npm packages).
* Cancel with `cancel_request(request)`.
*/
toolsUpdates: (request: RequestId) => typedError<ToolUpdate[], IdeError>(__TAURI_INVOKE("tools_updates", { request })),
undoWorkspaceEdit: (id: number) => typedError<null, IdeError>(__TAURI_INVOKE("undo_workspace_edit", { id })),
vcsAddToIgnore: (paths: string[], destination: IgnoreDestination) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("vcs_add_to_ignore", { paths, destination })),
vcsAddWorktree: (repo: string | null, path: string, commitish: string, newBranch: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_add_worktree", { repo, path, commitish, newBranch })),
vcsApplyPatch: (repo: string | null, patch: string) => typedError<ApplyOutcome, IdeError>(__TAURI_INVOKE("vcs_apply_patch", { repo, patch })),
vcsBlame: (path: string, text: string | null, revision: string | null) => typedError<BlameLine[], IdeError>(__TAURI_INVOKE("vcs_blame", { path, text, revision })),
/**
* History for Selection: commits that changed `lines` (0-based, inclusive) of `path`'s
* editor text. Cancellable with `cancel_request(request)`.
*/
vcsBlockHistory: (request: RequestId, path: string, text: string | null, lines: [number, number]) => typedError<BlockHistory, IdeError>(__TAURI_INVOKE("vcs_block_history", { request, path, text, lines })),
vcsBranchInfo: (repo: string | null) => typedError<BranchInfo, IdeError>(__TAURI_INVOKE("vcs_branch_info", { repo })),
vcsBranches: (repo: string | null) => typedError<Branch[], IdeError>(__TAURI_INVOKE("vcs_branches", { repo })),
vcsChangelistsLoad: () => typedError<ChangelistState, IdeError>(__TAURI_INVOKE("vcs_changelists_load")),
vcsChangelistsSave: (changelists: ChangelistState) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_changelists_save", { changelists })),
vcsCheckout: (repo: string | null, branch: string, create: boolean, options: {
mode?: CheckoutMode,
/** Required when checking out a remote branch whose local namesake is ahead of it. */
diverged?: DivergedLocal | null,
/** Check the branch out even though another worktree has it checked out. */
ignoreOtherWorktrees?: boolean,
} | null) => typedError<CheckoutOutcome, IdeError>(__TAURI_INVOKE("vcs_checkout", { repo, branch, create, options })),
/** Clones a repository (Get from VCS). Works without an open project. */
vcsClone: (request: RequestId, url: string, dest: string, depth: number | null, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_clone", { request, url, dest, depth, onOutput })),
vcsCommit: (repo: string | null, message: string, options: CommitOptions) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_commit", { repo, message, options })),
vcsCommitFiles: (repo: string | null, commit: string) => typedError<ChangedFile[], IdeError>(__TAURI_INVOKE("vcs_commit_files", { repo, commit })),
/** Combined changes of several commits, `commits` oldest first. */
vcsCommitsChanges: (repo: string | null, commits: string[]) => typedError<RevisionChange[], IdeError>(__TAURI_INVOKE("vcs_commits_changes", { repo, commits })),
vcsComparePaths: (paths: string[], revision: string, repositories: string[] | null, request: RequestId) => typedError<CompareResult, IdeError>(__TAURI_INVOKE("vcs_compare_paths", { paths, revision, repositories, request })),
vcsCompareScope: (paths: string[]) => typedError<CompareScope, IdeError>(__TAURI_INVOKE("vcs_compare_scope", { paths })),
/** `git config --get <key>` in the project repository; `None` when unset. */
vcsConfigGet: (repo: string | null, key: string) => typedError<string | null, IdeError>(__TAURI_INVOKE("vcs_config_get", { repo, key })),
/** The user's side is `ours` (sides swapped during a rebase, as in IDEA). */
vcsConflictVersions: (path: string) => typedError<MergeVersions, IdeError>(__TAURI_INVOKE("vcs_conflict_versions", { path })),
/** New Branch: creates `name` at `start` (HEAD when absent), optionally checking it out. */
vcsCreateBranch: (repo: string | null, name: string, start: string | null, checkout: boolean, overwrite: boolean | null) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_create_branch", { repo, name, start, checkout, overwrite })),
vcsCreatePatch: (repo: string | null, source: PatchSource) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_create_patch", { repo, source })),
vcsCreateTag: (repo: string | null, name: string, commit: string, message: string | null, force: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_create_tag", { repo, name, commit, message, force })),
vcsDeleteBranch: (repo: string | null, branch: string) => typedError<DeletedBranch, IdeError>(__TAURI_INVOKE("vcs_delete_branch", { repo, branch })),
/** Tag › Delete: the result is what "Restore" needs. */
vcsDeleteTag: (repo: string | null, name: string) => typedError<DeletedTag, IdeError>(__TAURI_INVOKE("vcs_delete_tag", { repo, name })),
/** The auto-detected git executable (shown as the field's placeholder). */
vcsDetectedGit: () => __TAURI_INVOKE<string | null>("vcs_detected_git"),
/** Directory Mappings: the repository roots detection finds, before any are excluded or added. */
vcsDetectedRoots: () => typedError<string[], IdeError>(__TAURI_INVOKE("vcs_detected_roots")),
/** Line hunks between two arbitrary texts (diff viewer, commit dialog). */
vcsDiffHunks: (oldText: string, newText: string) => __TAURI_INVOKE<LineHunk[]>("vcs_diff_hunks", { oldText, newText }),
/**
* Added and deleted lines between two revisions (Git Log › lines added and deleted).
* `paths` limits the diff to those repository-relative paths; empty diffs every file.
*/
vcsDiffNumstat: (repo: string | null, from: string, to: string, paths: string[]) => typedError<FileLineStats[], IdeError>(__TAURI_INVOKE("vcs_diff_numstat", { repo, from, to, paths })),
/** Files that differ between two revisions (the "N files updated" of Update Project). */
vcsDiffRevisions: (repo: string | null, from: string, to: string) => typedError<ChangedFile[], IdeError>(__TAURI_INVOKE("vcs_diff_revisions", { repo, from, to })),
vcsDiffText: (path: string, staged: boolean) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_diff_text", { path, staged })),
/** Compare with Local: tracked files that differ between `rev` and the working tree. */
vcsDiffWithWorktree: (repo: string | null, rev: string) => typedError<ChangedFile[], IdeError>(__TAURI_INVOKE("vcs_diff_with_worktree", { repo, rev })),
vcsDiscard: (paths: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_discard", { paths })),
vcsEditRemote: (repo: string | null, edit: RemoteEdit) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_edit_remote", { repo, edit })),
vcsFileAt: (path: string, rev: string | null) => typedError<string | null, IdeError>(__TAURI_INVOKE("vcs_file_at", { path, rev })),
/**
* The file's git mode at `rev` (`100644`, `100755`, `120000`…), `"WT"` for the
* worktree; `None` when absent there. Lets the diff viewer report a mode-only change.
*/
vcsFileMode: (path: string, rev: string | null) => typedError<string | null, IdeError>(__TAURI_INVOKE("vcs_file_mode", { path, rev })),
/**
* Settings › Git › Test: runs `git --version` on `path`, or on the auto-detected
* executable when `path` is empty.
*/
vcsGitVersion: (path: string) => typedError<GitExecutableInfo, IdeError>(__TAURI_INVOKE("vcs_git_version", { path })),
/** Whether the repository has the executable Git hook `name` (Push dialog › Run Git hooks). */
vcsHasHook: (repo: string | null, name: string) => typedError<boolean, IdeError>(__TAURI_INVOKE("vcs_has_hook", { repo, name })),
vcsIgnoreBlameRevision: (path: string, commit: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_ignore_blame_revision", { path, commit })),
/** `git init` in `dir` (File › New Project… "Create Git repository"). */
vcsInit: (dir: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_init", { dir })),
/** Gutter change markers for a file, computed against its current (unsaved) text. */
vcsLineHunks: (path: string) => typedError<LineHunk[], IdeError>(__TAURI_INVOKE("vcs_line_hunks", { path })),
vcsLog: (repo: string | null, query: LogQuery) => typedError<Commit_Serialize[], IdeError>(__TAURI_INVOKE("vcs_log", { repo, query })),
vcsLogDetails: (repo: string | null, revision: string) => typedError<LogDetails, IdeError>(__TAURI_INVOKE("vcs_log_details", { repo, revision })),
vcsLogDetailsBatch: (repo: string | null, revisions: string[], request: RequestId) => typedError<LogDetails[], IdeError>(__TAURI_INVOKE("vcs_log_details_batch", { repo, revisions, request })),
vcsLogRefs: (repo: string | null) => typedError<{ [key in string]: string }, IdeError>(__TAURI_INVOKE("vcs_log_refs", { repo })),
vcsLogUsers: (repo: string | null) => typedError<string[], IdeError>(__TAURI_INVOKE("vcs_log_users", { repo })),
vcsMerge: (repo: string | null, branch: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_merge", { repo, branch })),
/** The best common ancestor of `a` and `b` (`git merge-base`), if any. */
vcsMergeBase: (repo: string | null, a: string, b: string) => typedError<string | null, IdeError>(__TAURI_INVOKE("vcs_merge_base", { repo, a, b })),
/** Merge dialog: merges `branches` into the current branch. */
vcsMergeWith: (repo: string | null, branches: string[], options: MergeOptions) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_merge_with", { repo, branches, options })),
vcsMoveWorktree: (repo: string | null, path: string, to: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_move_worktree", { repo, path, to })),
vcsOpenExternalLog: (path: string) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("vcs_open_external_log", { path })),
/**
* Local history operation that may take a while (hooks, large checkouts); git's
* output streams through `on_output`. Cancellable.
*/
vcsOperation: (repo: string | null, request: RequestId, op: GitOperation, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_operation", { repo, request, op, onOutput })),
vcsPatchPreview: (repo: string | null, patch: string) => typedError<PatchFile[], IdeError>(__TAURI_INVOKE("vcs_patch_preview", { repo, patch })),
vcsPendingPatch: (repo: string | null, options: CommitOptions) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_pending_patch", { repo, options })),
vcsRebase: (repo: string | null, onto: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_rebase", { repo, onto })),
/** Rebase dialog: rebases the current branch onto `upstream` (or `--onto`). */
vcsRebaseWith: (repo: string | null, upstream: string, options: RebaseOptions) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_rebase_with", { repo, upstream, options })),
/** Network operation; progress lines stream through `on_output`. Cancellable. */
vcsRemote: (repo: string | null, request: RequestId, op: RemoteOp, onOutput: Channel<string>) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_remote", { repo, request, op, onOutput })),
vcsRemotes: (repo: string | null) => typedError<Remote[], IdeError>(__TAURI_INVOKE("vcs_remotes", { repo })),
vcsRemoveWorktree: (repo: string | null, path: string, force: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_remove_worktree", { repo, path, force })),
vcsRenameBranch: (repo: string | null, from: string, to: string, unsetUpstream: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_rename_branch", { repo, from, to, unsetUpstream })),
/** "Restore" of the branch-deleted notification. */
vcsRestoreBranch: (repo: string | null, deleted: DeletedBranch) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_restore_branch", { repo, deleted })),
/** Undo of a history rewrite (Edit Commit Message, Drop, Squash). */
vcsRestoreHead: (repo: string | null, before: string, after: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_restore_head", { repo, before, after })),
/** "Restore" of the tag-deleted notification. */
vcsRestoreTag: (repo: string | null, deleted: DeletedTag) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_restore_tag", { repo, deleted })),
vcsRevisionChildren: (repo: string | null, revision: string, directory: string) => typedError<string[], IdeError>(__TAURI_INVOKE("vcs_revision_children", { repo, revision, directory })),
vcsRevisionFiles: (repo: string | null, revision: string) => typedError<string[], IdeError>(__TAURI_INVOKE("vcs_revision_files", { repo, revision })),
/**
* Edit Commit Message: rewrites the commit and its descendants without touching the
* working tree.
*/
vcsReword: (repo: string | null, commit: string, message: string) => typedError<HeadChange, IdeError>(__TAURI_INVOKE("vcs_reword", { repo, commit, message })),
/** The project's repositories, the primary one first. */
vcsRoots: () => typedError<VcsRoot[], IdeError>(__TAURI_INVOKE("vcs_roots")),
/**
* Git User Name Is Not Defined: sets `user.name` / `user.email` for commits in the
* repository, or globally.
*/
vcsSetUserIdentity: (repo: string | null, name: string, email: string, global: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_set_user_identity", { repo, name, email, global })),
vcsShelfDelete: (id: string, path: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_shelf_delete", { id, path })),
vcsShelfDiff: (id: string) => typedError<ShelfDiffFile[], IdeError>(__TAURI_INVOKE("vcs_shelf_diff", { id })),
vcsShelfImport: (repo: string | null, name: string, patch: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_shelf_import", { repo, name, patch })),
vcsShelfPatch: (id: string, path: string | null) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_shelf_patch", { id, path })),
vcsShelfRename: (id: string, name: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_shelf_rename", { id, name })),
/** Shelve Changes: saves the changes of `paths` as a patch on the shelf and reverts them. */
vcsShelve: (name: string, paths: string[]) => typedError<ShelvedChangeList, IdeError>(__TAURI_INVOKE("vcs_shelve", { name, paths })),
vcsShelves: () => typedError<ShelvedChangeList[], IdeError>(__TAURI_INVOKE("vcs_shelves")),
vcsStage: (paths: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stage", { paths })),
/**
* Stages only the selected hunks of a file's working-tree changes.
* Indices refer to `vcs_diff_hunks(index_text, worktree_text)`.
*/
vcsStageHunks: (path: string, hunks: number[]) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stage_hunks", { path, hunks })),
vcsStagePatch: (patch: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stage_patch", { patch })),
vcsStashApply: (repo: string | null, index: number, pop: boolean, reinstateIndex: boolean, branch: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stash_apply", { repo, index, pop, reinstateIndex, branch })),
vcsStashDrop: (repo: string | null, index: number) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stash_drop", { repo, index })),
vcsStashPush: (repo: string | null, message: string | null, includeUntracked: boolean, keepIndex: boolean, paths: string[] | null) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_stash_push", { repo, message, includeUntracked, keepIndex, paths })),
vcsStashes: (repo: string | null) => typedError<Stash[], IdeError>(__TAURI_INVOKE("vcs_stashes", { repo })),
/** Changes of every repository of the project. */
vcsStatus: () => typedError<FileStatus[], IdeError>(__TAURI_INVOKE("vcs_status")),
/** Changes of `paths` only: the dirty-scope refresh after a watcher batch. */
vcsStatusPaths: (paths: string[]) => typedError<FileStatus[], IdeError>(__TAURI_INVOKE("vcs_status_paths", { paths })),
vcsTags: (repo: string | null) => typedError<string[], IdeError>(__TAURI_INVOKE("vcs_tags", { repo })),
/**
* Undo Commit: moves HEAD back to the commit's parent, keeping its changes staged.
* Returns the undone commit's message.
*/
vcsUndoCommit: (repo: string | null, commit: string) => typedError<string, IdeError>(__TAURI_INVOKE("vcs_undo_commit", { repo, commit })),
/**
* Unshelve: applies the shelved patch (3-way merging; conflicts are left for the
* merge UI); with `remove`, deletes it from the shelf.
*/
vcsUnshelve: (id: string, remove: boolean, path: string | null) => typedError<ApplyOutcome, IdeError>(__TAURI_INVOKE("vcs_unshelve", { id, remove, path })),
vcsUnstage: (paths: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_unstage", { paths })),
/**
* Branches › Update Selected: fast-forwards local `branches` to their upstreams, one
* fetch per remote; the result says what happened to each. Cancellable.
*/
vcsUpdateBranches: (repo: string | null, request: RequestId, branches: string[], onOutput: Channel<string>) => typedError<BranchUpdate[], IdeError>(__TAURI_INVOKE("vcs_update_branches", { repo, request, branches, onOutput })),
vcsWorktrees: (repo: string | null) => typedError<Worktree[], IdeError>(__TAURI_INVOKE("vcs_worktrees", { repo })),
/** Create Patch › Save to file. */
vcsWritePatch: (path: string, patch: string) => typedError<null, IdeError>(__TAURI_INVOKE("vcs_write_patch", { path, patch })),
/** The browsers installed on this machine. */
webBrowsers: () => typedError<Browser[], IdeError>(__TAURI_INVOKE("web_browsers")),
/** The web reference at `pos` of `doc` and its targets; `None` when there is no reference. */
webGoto: (doc: DocId, pos: Pos) => typedError<{
reference: WebReference,
targets: Location[],
} | null, IdeError>(__TAURI_INVOKE("web_goto", { doc, pos })),
/** Opens `url` in `browser` (an id from `web_browsers`), or the default browser. */
webOpen: (url: string, browser: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("web_open", { url, browser })),
/** Whether `url` (a server on this machine) answers with an HTML document, i.e. has a page to open. */
webServesPage: (url: string) => typedError<boolean, IdeError>(__TAURI_INVOKE("web_serves_page", { url })),
/** Paths in an HTML document or stylesheet that name no existing file. */
webUnresolvedReferences: (doc: DocId) => typedError<FileReference[], IdeError>(__TAURI_INVOKE("web_unresolved_references", { doc })),
/**
* The built-in server's URL for `path` (started on first use). A file whose language is
* HTML (Settings › File Types can make it so) is served as a page, whatever its extension.
*/
webUrl: (path: IpcPath) => typedError<string, IdeError>(__TAURI_INVOKE("web_url", { path })),
windowCloseContext: () => __TAURI_INVOKE<CloseContext>("window_close_context"),
/** Release the opening window's reservation after navigation or cancellation. */
windowCompleteLaunch: () => typedError<null, IdeError>(__TAURI_INVOKE("window_complete_launch")),
/** Focuses the next / previous window (⌘` / ⇧⌘`). */
windowCycle: (forward: boolean) => __TAURI_INVOKE<void>("window_cycle", { forward }),
/**
* Drags `paths` (local files and folders) out of `window` while the primary mouse button is
* still down, so the app they are dropped on copies them (#2867). Resolves when the drag ends,
* with whether a target took the files.
*/
windowDragFiles: (paths: string[]) => typedError<boolean, IdeError>(__TAURI_INVOKE("window_drag_files", { paths })),
/**
* Flash (`true`) or stop flashing (`false`) this window's taskbar button, like IDEA when a
* breakpoint is hit while the window is in the background (macOS bounces the dock icon,
* Linux sets the urgency hint). A focused window is never flashed: the user is already
* looking at it, and re-flashing it would steal attention for nothing.
*/
windowFlashTaskbar: (flash: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("window_flash_taskbar", { flash })),
/** This window kept its project open (unsaved-changes prompt cancelled); stops a batch close. */
windowGroupCancelClose: () => __TAURI_INVOKE<void>("window_group_cancel_close"),
windowGroupClose: (label: string) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_close", { label })),
/** Closes several project tabs one by one (each asks about its own unsaved changes), then selects `keep`. */
windowGroupCloseTabs: (keep: string, labels: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_close_tabs", { keep, labels })),
windowGroupCurrent: () => typedError<WindowTab[], IdeError>(__TAURI_INVOKE("window_group_current")),
windowGroupDetach: (label: string) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_detach", { label })),
/**
* Adds window `label` to this window's group as a new project tab and selects it. Unlike
* [`window_group_merge`], unrelated windows keep their own group.
*/
windowGroupJoin: (label: string) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_join", { label })),
windowGroupMerge: () => typedError<null, IdeError>(__TAURI_INVOKE("window_group_merge")),
windowGroupReorder: (labels: string[]) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_reorder", { labels })),
windowGroupRestore: () => typedError<null, IdeError>(__TAURI_INVOKE("window_group_restore")),
windowGroupSelect: (label: string) => typedError<null, IdeError>(__TAURI_INVOKE("window_group_select", { label })),
/** Whether this window is in native full screen (on macOS, also a tab of a fullscreen group). */
windowIsFullscreen: () => __TAURI_INVOKE<boolean>("window_is_fullscreen"),
/** Opens an empty (welcome) window; returns its label. */
windowNew: () => typedError<string, IdeError>(__TAURI_INVOKE("window_new")),
/**
* Opens a window listing the files that differ between two revisions of this window's project.
* `background` (`#rrggbb`) paints it until its page has loaded.
*/
windowOpenComparison: (comparison: ComparisonLaunch, background: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_open_comparison", { comparison, background })),
/**
* Opens this window's Sync with Deployed window comparing `paths` with `server` (or hands them
* to the open one). `background` (`#rrggbb`) paints a new window until its page has loaded.
*/
windowOpenDeployment: (server: string, paths: string[], background: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_open_deployment", { server, paths, background })),
/**
* Opens a window showing `diff` next to this window ("Show Diff in New Window").
* `background` (`#rrggbb`) paints it until its page has loaded.
*/
windowOpenDiff: (diff: DiffLaunch_Deserialize, background: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_open_diff", { diff, background })),
/**
* Opens a lightweight editor window for `editor` next to this project window ("Open in New Window").
* `background` (`#rrggbb`) paints it until its page has loaded.
*/
windowOpenEditor: (editor: EditorLaunch_Deserialize, background: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_open_editor", { editor, background })),
/**
* Detaches an editor tab: opens `file` in a forced new window (`project`, None
* for LightEdit, decided by the caller), bypassing the focus-an-existing-window
* routing of [`window_open_project`] / [`window_open_files`].
*/
windowOpenFileInNewWindow: (project: string | null, file: string) => typedError<OpenOutcome, IdeError>(__TAURI_INVOKE("window_open_file_in_new_window", { project, file })),
/**
* Loose `files` opened from a window without a local project: a file inside a local project
* open in some window goes to that window, the others to the LightEdit window (this one,
* another, or a new one from a remote project window). Returns the files this window opens
* itself, in LightEdit.
*/
windowOpenFiles: (files: string[]) => typedError<IpcPath[], IdeError>(__TAURI_INVOKE("window_open_files", { files })),
/**
* Opens `path` in a new window (`new_window`) or tells the caller to open it
* itself (`current`). A project already open in some window is focused instead.
* `files` then open in that project's editor.
*/
windowOpenProject: (path: string, newWindow: boolean, files: string[]) => typedError<OpenOutcome, IdeError>(__TAURI_INVOKE("window_open_project", { path, newWindow, files })),
/** Projects open in project windows, in window order (title bar project widget). */
windowOpenProjects: () => typedError<OpenProject[], IdeError>(__TAURI_INVOKE("window_open_projects")),
/**
* [`window_open_project`] for folder `path` of `target` (an SSH host or a WSL distribution;
* Remote Development); a new window connects itself.
*/
windowOpenRemote: (target: RemoteTarget, path: string, newWindow: boolean) => typedError<OpenOutcome, IdeError>(__TAURI_INVOKE("window_open_remote", { target, path, newWindow })),
/**
* Opens this window's Settings window on `page` (or focuses it and navigates);
* `new_projects` edits the global layer only ("Settings for New Projects").
* `background` (`#rrggbb`) paints a new window until its page has loaded.
*/
windowOpenSettings: (page: string | null, newProjects: boolean, background: string | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_open_settings", { page, newProjects, background })),
/** Appearance › Smooth scrolling for this window's web view (Linux only) */
windowSetSmoothScrolling: (enabled: boolean) => typedError<null, IdeError>(__TAURI_INVOKE("window_set_smooth_scrolling", { enabled })),
/** Height of the web title bar in native logical pixels (CSS height × IDE zoom). */
windowSetTitlebarHeight: (height: number | null) => typedError<null, IdeError>(__TAURI_INVOKE("window_set_titlebar_height", { height })),
/**
* Starts dragging `window` while the primary mouse button is still down; returns whether a drag began.
*
* macOS WebKit can deliver a tap's `mousedown` after the button is already up. AppKit would then run
* its drag loop with no release left to end it, and the window follows the pointer until the next click.
*/
windowStartDrag: () => typedError<boolean, IdeError>(__TAURI_INVOKE("window_start_drag")),
/** What this window was opened for (taken once). */
windowTakeLaunch: () => __TAURI_INVOKE<{
/** Project folder to open. */
project: IpcPath | null,
/**
* Files to open in the editor: in `project` once it is open, else in this
* window's project or (without one) in LightEdit.
*/
files: IpcPath[],
/** Remote project to open (Remote Development). */
remote: RemoteLaunch | null,
/** Settings windows: the page to show. */
settingsPage: string | null,
/** Settings windows: edit the global layer only ("Settings for New Projects"). */
newProjects: boolean,
/** Where to place the caret in some of `files` (`openidea --line 12 --column 5 <file>`). */
positions: FilePosition[],
/** Comparison windows: the revisions to compare (boxed: most launches have none). */
comparison: ComparisonLaunch | null,
/** Diff windows: the diff to show (boxed: most launches have none). */
diffWindow: DiffLaunch_Serialize | null,
/** `openidea diff a.txt b.txt`: the two files to open in the diff viewer (boxed: most launches have none). */
diff: DiffFilesLaunch | null,
/** Files requested after the pending diff take focus after it opens. */
diffBeforeFiles: boolean,
/** Deployment windows: the server and local selection to compare. */
deployment: DeploymentLaunch | null,
/** Editor windows: the file to show (Open in New Window → lightweight aux editor). */
editor: EditorLaunch_Serialize | null,
} | null>("window_take_launch"),
/**
* Local bootstrap snapshot for a `settings-<parent>` window, avoiding a sequential
* startup IPC waterfall and any blocking SSH `project_current` round-trip before first paint.
*/
windowTakeSettingsInit: () => __TAURI_INVOKE<SettingsWindowInit_Serialize>("window_take_settings_init"),
windowToggleFullscreen: () => typedError<boolean, IdeError>(__TAURI_INVOKE("window_toggle_fullscreen")),
/** Fills the work area without the platform zoom animation. Returns whether it is filled now. */
windowToggleZoom: () => typedError<boolean, IdeError>(__TAURI_INVOKE("window_toggle_zoom")),
workspaceAttach: (path: string) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("workspace_attach", { path })),
workspaceCreate: (path: string, name: string, projects: string[]) => typedError<IpcPath, IdeError>(__TAURI_INVOKE("workspace_create", { path, name, projects })),
workspaceDiscoverProjects: (request: RequestId, folders: string[]) => typedError<ProjectDiscovery, IdeError>(__TAURI_INVOKE("workspace_discover_projects", { request, folders })),
workspaceUpdate: (name: string, projects: string[]) => typedError<ProjectInfo_Serialize, IdeError>(__TAURI_INVOKE("workspace_update", { name, projects })),
/**
* Installed WSL distros, for the "Connect to WSL" picker. `wsl.exe` can stall while the WSL
* service starts, so the wait is bounded.
*/
wslDistros: () => typedError<string[], IdeError>(__TAURI_INVOKE("wsl_distros")),
/**
* The WSL project a `\\wsl.localhost\<distro>\…` folder stands for, so the frontend opens it
* through the distro and not as a network folder. `None` for any other path.
*/
wslResolve: (path: string) => __TAURI_INVOKE<{
target: RemoteTarget,
path: string,
} | null>("wsl_resolve", { path }),
};
/* Types */
export type AbortState = { kind: "interrupted" } | { kind: "stopped" } |
/** Suspended threads that own a monitor the terminal may be waiting for: `(thread id, name)`. */
{ kind: "stuck"; holders: ([number, string])[] } |
/** The terminal had not started. */
{ kind: "cancelled" } |
/** The trace had already parked or failed. */
{ kind: "finished" };
/** What importing one entry of a JetBrains `acp.json` file did. */
export type AcpImportOutcome = {
/** The `agent_servers` key the entry was imported from. */
name: string,
/** The id its agent file would get (also when skipped). */
id: string,
saved: boolean,
/** Why the entry was skipped; empty when it was saved. */
reason?: string,
};
export type ActionPerformed = {
action: string,
title: string,
source: ActionSource,
shortcut: string | null,
};
/** How the user started an action. */
export type ActionSource = "keyboard" | "menu" | "toolbar" | "contextMenu" | "search" | "other";
/** Tools › Actions on Save (Reformat code is `editor.formatOnSave`). */
export type ActionsOnSaveSettings = {
optimizeImports?: boolean,
/** Run code cleanup (`source.fixAll`). */
cleanup?: boolean,
};
export type ActiveTheme = {
pluginId: string,
theme: ThemeDef,
};
/** What accepting a worktree task's changes copied into the local checkout. */
export type AgentAcceptOutcome = {
/** Relative paths copied into the checkout (uncommitted), including ones already identical. */
accepted: string[],
/** Files left alone because the checkout has its own edits to them. */
skipped: AgentAcceptSkipped[],
};
/** A file accept left alone, with why. */
export type AgentAcceptSkipped = {
path: string,
reason: string,
};
/** Why a task needs the user's attention (native / in-app notify). */
export type AgentAttentionReason = "finished" | "input" | "failed";
/** A task the agent runs in the background while the conversation goes on. */
export type AgentBackgroundTask = {
id: string,
/** What it is, as the agent names it (`local_bash`, `local_agent`, `monitor`…). */
kind: string,
description: string,
/** When the client first saw it (ms since the epoch). */
startedMs: number | null,
};
/**
* What a task's agent can do beyond a plain conversation, as it reported when its
* session started.
*/
export type AgentCapabilities = {
/** Images in messages. */
images?: boolean,
/** The conversation can be copied into a new task (`session/fork`). */
fork?: boolean,
/** Its latest turns can be dropped. */
rollback?: boolean,
/** A message can join the running turn instead of waiting for it. */
steer?: boolean,
/** It reports its background tasks and stops them one by one. */
backgroundTasks?: boolean,
/** The connected agent can report a breakdown of its context window. */
contextUsage?: boolean,
};
/**
* A file the task changed: against [`AgentTask::base_commit`], or against `HEAD` in the
* grouped view.
*/
export type AgentChange = {
path: IpcPath,
relPath: string,
kind: ChangeKind,
added: number,
removed: number,
/** Path before a rename; the left side of its diff reads this path. */
oldPath: string | null,
/** The repository the file is in, when the task's project holds nested repositories. */
repo: IpcPath | null,
};
/** A task's uncommitted files and the commits made since it started. */
export type AgentChanges = {
/** Files changed against `HEAD`, less those changed before the task started and untouched since. */
uncommitted: AgentChange[],
/**
* Commits from the task's start (exclusive) to `HEAD` (inclusive), newest first. Empty
* for tasks working in the project's own checkout.
*/
commits: AgentCommit[],
};
/** Which comparison a rollback of the task's changes uses. */
export type AgentChangesView =
/** Everything since the commit the task started from. */
"sinceStart" |
/** The uncommitted files against `HEAD`; commits made since the start stay. */
"group" |
/** What the last turn changed, against the checkout as that turn started. */
"lastTurn";
export type AgentCliOffer = {
current: string,
latest: string,
prefix: string,
};
export type AgentCliUpdateResult = {
status: "available",
} & AgentCliOffer | {
status: "permission",
} & AgentCliOffer | ({ status: "current"; current: string }) & { code?: never } | ({ status: "channel"; current: string }) & { code?: never } | ({ status: "updated"; current: string }) & { code?: never } | ({ status: "unmanaged" }) & { code?: never; current?: never } | ({ status: "error"; code: string }) & { current?: never };
export type AgentCommand = {
/** Without the leading `/`. */
name: string,
description: string,
/** What to type after the command, when it takes input. */
hint: string | null,
source?: AgentCommandSource,
};
/** Why the executable cannot be changed in built-in agent settings. */
export type AgentCommandReadOnlyReason = "packageRunner" | "registry" | "customAgent";
export type AgentCommandSource = "command" | "skill";
/** A commit made while the task ran, with the files it changed against its first parent. */
export type AgentCommit = {
id: string,
shortId: string,
summary: string,
message: string,
timeMs: number | null,
/** First parent, or `None` for a root commit. */
parent: string | null,
files: AgentChange[],
};
/** A setting chosen for a new task, by [`AgentConfigOption::id`]. */
export type AgentConfigChoice = {
id: string,
value: string,
};
/** A session setting: an ACP select config option, or the older `modes` / `models`. */
export type AgentConfigOption = {
id: string,
name: string,
description: string | null,
/** ACP category: `model`, `mode`, `thought_level`, or agent-specific. */
category: string | null,
current: string | null,
/** Initial default value reported by the agent, preserved across session updates for Reset. */
defaultValue?: string | null,
values: AgentConfigValue[],
via: AgentConfigVia,
};
/** One value of a select-type session setting. */
export type AgentConfigValue = {
value: string,
name: string,
description: string | null,
/** Relative cost category from ACP `_meta` (`copilotPriceCategory`, e.g. `low`, `medium`, `high`, `very_high`). */
costCategory?: string | null,
/** Usage multiplier from ACP `_meta` (`copilotUsage`, e.g. `1x`, `0x`, `3x`). */
usageMultiplier?: string | null,
/** Detailed per-tier token pricing from `_meta.pricing` when available. */
pricing?: AgentModelPricing | null,
};
/** How a setting is changed. */
export type AgentConfigVia =
/** `session/set_config_option`. */
"option" |
/** `session/set_mode` (agents that report `modes` instead of a mode config option). */
"mode" |
/** `session/set_model` (agents that report `models` instead of a model config option). */
"model";
export type AgentContextCategory = {
name: string,
tokens: number,
kind: string | null,
};
export type AgentContextUsage = {
categories: AgentContextCategory[],
totalTokens: number,
maxTokens: number,
model: string,
isAutoCompactEnabled: boolean | null,
autoCompactThreshold: number | null,
};
export type AgentCost = {
amount: number | null,
/** ISO 4217 code, e.g. `USD`. */
currency: string,
};
/** One item of a task's conversation. */
export type AgentEntry = { type: "user"; text: string;
/** Names of the files and images sent with it. */
attachments: string[];
/** The images sent with it, shown in the conversation. */
images?: AgentImage[];
/** When it was sent (ms since the epoch); `None` in tasks saved before this was kept. */
sentMs?: number | null;
/** When the turn it started ended; `None` while it runs or when it was cut off. */
doneMs?: number | null;
/** Sent into a running turn rather than starting one. */
steered?: boolean } | { type: "agent"; text: string } |
/** A question that can be answered while the agent keeps working, or after the turn ends. */
{ type: "question"; id: string; title: string; questions: AgentQuestion[];
/** The submitted answers, or `Skipped`; `None` while unanswered. */
chosen: string | null } | { type: "thought"; text: string;
/** When the reasoning started (ms since the epoch); `None` in tasks saved before. */
startedMs?: number | null } | { type: "tool"; id: string; title: string;
/** ACP tool kind: `read`, `edit`, `execute`, `search`, `fetch`, `think`… */
kind: string; status: AgentToolStatus; locations: IpcPath[];
/** Text the tool reported (command output…), truncated. */
output: string | null; diffs: AgentToolDiff[];
/** When the call started and ended (ms since the epoch); `None` in tasks saved before. */
startedMs?: number | null; endedMs?: number | null } | { type: "plan"; items: AgentPlanItem[] } |
/** A subagent the agent started: its own session, whose entries are listed separately. */
{ type: "subagent";
/** The subagent's session id. */
id: string; title: string | null; description: string | null; status: AgentSubagentStatus; error: string | null;
/** What it was asked to do, last. */
prompt: string | null;
/** Its answer. */
reply: string | null;
/** Tool calls it made. */
tools: number;
/** Title of its latest tool call. */
activity: string | null; startedMs: number | null;
/** When it last stopped working; `None` while it works. */
endedMs: number | null;
/** Whether it can be stopped on its own. */
cancellable: boolean } |
/** A message between sessions in a subagent's conversation: its task (`incoming`) or its report. */
{ type: "message"; incoming: boolean; text: string } | { type: "permission"; id: number; title: string;
/**
* The shell command the request asks to run, from its structured input; `None` for
* any other request, whatever its title says.
*/
command?: string | null; options: AgentPermissionOption[];
/**
* Set when the request asks `AskUserQuestion`'s questions; answered with a JSON object
* of question to answer instead of an option.
*/
questions?: AgentQuestion[];
/**
* Set when the agent asks for a form (ACP elicitation); answered with a JSON object of
* field name to its values, `decline`, or nothing to cancel.
*/
form?: AgentForm | null;
/** Name of the chosen option, or `None` while pending. Cancelled requests read "Cancelled". */
chosen: string | null } | { type: "error"; message: string };
/** Streamed to the window that subscribed (`AgentManager::subscribe`). */
export type AgentEvent = AgentEvent_Serialize | AgentEvent_Deserialize;
/** Streamed to the window that subscribed (`AgentManager::subscribe`). */
export type AgentEvent_Deserialize =
/** A task was created or its metadata changed. */
({ type: "task"; task: AgentTask_Deserialize }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; text?: never } | ({ type: "removed"; id: string }) & { catalog?: never; entry?: never; eventId?: never; from?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The task's conversation was cut to its first `length` entries (turns rolled back). */
({ type: "truncated"; task: string; length: number }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; limits?: never; provider?: never; reason?: never; subagent?: never; text?: never } |
/** Entry `index` of `task` (of its subagent `subagent`) was added or replaced. */
({ type: "entry"; task: string; subagent: string | null; index: number; entry: AgentEntry }) & { catalog?: never; eventId?: never; from?: never; id?: never; length?: never; limits?: never; provider?: never; reason?: never; text?: never } |
/**
* Text was appended to entry `index` (an agent message or a thought): it read the first
* `from` UTF-16 units of its text when the previous event for it was sent.
*/
({ type: "append"; task: string; subagent: string | null; index: number; from: number; text: string }) & { catalog?: never; entry?: never; eventId?: never; id?: never; length?: never; limits?: never; provider?: never; reason?: never } |
/** An agent reported the usage limits of its account (shared by every task of `provider`). */
({ type: "limits"; provider: string; limits: AgentLimit[] }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** A model lookup started or completed, including unsuccessful lookups. */
({ type: "modelCatalog"; catalog: AgentModelCatalog }) & { entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The installed or configured agent providers changed. */
({ type: "providers" }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The task needs attention once (finished turn, explicit input, or failure). */
({ type: "attention"; task: string; eventId: string; reason: AgentAttentionReason }) & { catalog?: never; entry?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; subagent?: never; text?: never };
/** Streamed to the window that subscribed (`AgentManager::subscribe`). */
export type AgentEvent_Serialize =
/** A task was created or its metadata changed. */
({ type: "task"; task: AgentTask_Serialize }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; text?: never } | ({ type: "removed"; id: string }) & { catalog?: never; entry?: never; eventId?: never; from?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The task's conversation was cut to its first `length` entries (turns rolled back). */
({ type: "truncated"; task: string; length: number }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; limits?: never; provider?: never; reason?: never; subagent?: never; text?: never } |
/** Entry `index` of `task` (of its subagent `subagent`) was added or replaced. */
({ type: "entry"; task: string; subagent: string | null; index: number; entry: AgentEntry }) & { catalog?: never; eventId?: never; from?: never; id?: never; length?: never; limits?: never; provider?: never; reason?: never; text?: never } |
/**
* Text was appended to entry `index` (an agent message or a thought): it read the first
* `from` UTF-16 units of its text when the previous event for it was sent.
*/
({ type: "append"; task: string; subagent: string | null; index: number; from: number; text: string }) & { catalog?: never; entry?: never; eventId?: never; id?: never; length?: never; limits?: never; provider?: never; reason?: never } |
/** An agent reported the usage limits of its account (shared by every task of `provider`). */
({ type: "limits"; provider: string; limits: AgentLimit[] }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** A model lookup started or completed, including unsuccessful lookups. */
({ type: "modelCatalog"; catalog: AgentModelCatalog }) & { entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The installed or configured agent providers changed. */
({ type: "providers" }) & { catalog?: never; entry?: never; eventId?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; reason?: never; subagent?: never; task?: never; text?: never } |
/** The task needs attention once (finished turn, explicit input, or failure). */
({ type: "attention"; task: string; eventId: string; reason: AgentAttentionReason }) & { catalog?: never; entry?: never; from?: never; id?: never; index?: never; length?: never; limits?: never; provider?: never; subagent?: never; text?: never };
/** A form the agent asks the user to fill in (ACP `elicitation/create`, form mode). */
export type AgentForm = {
fields: AgentFormField[],
};
export type AgentFormField = {
/** The property name the answer is keyed by. */
name: string,
title: string,
description?: string,
required?: boolean,
kind: AgentFormFieldKind,
/** The choices of a `choice` or `choices` field. */
options?: AgentFormOption[],
/** The initial answer: option values, a text, a number, or `true` / `false`. */
default?: string[],
/** Bounds: the number of a `number` / `integer`, the length of a `text`, the count of `choices`. */
min?: number | null,
max?: number | null,
};
export type AgentFormFieldKind = "text" | "number" | "integer" | "boolean" |
/** One of `options`. */
"choice" |
/** Any of `options`. */
"choices";
export type AgentFormOption = {
value: string,
label: string,
description?: string,
};
export type AgentImage = {
mimeType: string,
/** Base64, without a `data:` prefix. */
data: string,
name: string | null,
};
/** One usage-limit window of an agent's account. */
export type AgentLimit = {
/** The window as the agent names it: `five_hour`, `seven_day`, `seven_day_opus`… */
window: string,
/** Share of the window used, 0–100. */
usedPercent: number | null,
/** When the window resets (ms since the epoch), if the agent said. */
resetsMs: number | null,
};
/** An MCP server passed to coding agents in `session/new`, `session/load` and `session/fork`. */
export type AgentMcpServer = AgentMcpServer_Serialize | AgentMcpServer_Deserialize;
/** An MCP server passed to coding agents in `session/new`, `session/load` and `session/fork`. */
export type AgentMcpServer_Deserialize = {
transport?: McpTransport,
enabled?: boolean,
command?: string | null,
args?: string[],
env?: { [key in string]: string },
url?: string | null,
headers?: { [key in string]: string },
/**
* Agent provider ids this server is enabled for (e.g. `["claude", "codex"]`);
* empty means enabled for all agents.
*/
agents?: string[],
};
/** An MCP server passed to coding agents in `session/new`, `session/load` and `session/fork`. */
export type AgentMcpServer_Serialize = {
transport: McpTransport,
enabled: boolean,
command?: string | null,
args?: string[],
env?: { [key in string]: string },
url?: string | null,
headers?: { [key in string]: string },
/**
* Agent provider ids this server is enabled for (e.g. `["claude", "codex"]`);
* empty means enabled for all agents.
*/
agents?: string[],
};
/** Authoritative choices for new tasks, independent of any running session's settings. */
export type AgentModelCatalog = {
provider: string,
config: AgentConfigOption[],
thoughtLevels: { [key in string]: AgentConfigOption[] },
refreshing: boolean,
refreshedAtMs: number | null,
retryAtMs: number | null,
error: string | null,
};
/** Pricing and context-tier metadata attached to a model [`AgentConfigValue`]. */
export type AgentModelPricing = {
/** `"low"`, `"medium"`, `"high"`, or `"very_high"`. */
costTier?: string | null,
/** Request-based billing multiplier (e.g. `1.0`, `0.33`, `3.0`), when applicable. */
multiplier?: number | null,
/** Token pricing keyed by context tier (`"default"`, `"long_context"`). */
tiers?: { [key in string]: AgentTokenPricing },
};
export type AgentPermissionOption = {
id: string,
name: string,
/** `allow_once`, `allow_always`, `reject_once` or `reject_always`. */
kind: string,
};
export type AgentPlanItem = {
content: string,
/** `pending`, `in_progress` or `completed`. */
status: string,
};
/**
* What an agent says about itself when it starts (`initialize` only: no session, so no
* MCP servers, hooks or sign-in run).
*/
export type AgentProbe = {
provider: string,
/** The agent's own name and version, when it reports them. */
name: string | null,
version: string | null,
/** How it is driven: `ACP v1`, `ACP v2` or `native`. */
protocol: string,
capabilities: AgentCapabilities,
/** Ways to sign in it offers. */
authMethods: string[],
/** Why it could not be started. */
error: string | null,
};
/** A message to the agent: text, plus files to look at and images. */
export type AgentPrompt = {
text: string,
files: IpcPath[],
images: AgentImage[],
};
export type AgentProvider = {
id: string,
name: string,
/** The command line that starts its ACP server. */
command: string,
/** Executable and arguments actually launched, without flattening paths containing spaces. */
program: string,
args: string[],
defaultProgram: string | null,
defaultArgs: string[],
loginHint: string | null,
commandOverridden: boolean,
commandEditable: boolean,
commandReadOnlyReason: AgentCommandReadOnlyReason | null,
/** Whether the command was found (on `PATH`). */
installed: boolean,
/** The built-in command can be owned by a global npm package. */
canCheckCliUpdate?: boolean,
/** Environment variables it starts with (from its agent file). */
env: { [key in string]: string },
/** Settings (models, modes…) the agent offered last time it ran; empty before its first session. */
config: AgentConfigOption[],
/** Thinking-level options by model value; absent models have not reported their levels. */
thoughtLevels?: { [key in string]: AgentConfigOption[] },
/** Slash commands it offered last time. */
commands: AgentCommand[],
source: AgentSource,
};
/** A question the agent asks with `AskUserQuestion`, answered by picking options or typing. */
export type AgentQuestion = {
/** Stable answer identity when the provider supplies question ids. */
answerKey?: string | null,
header?: string,
question: string,
multiSelect?: boolean,
options: AgentQuestionOption[],
};
export type AgentQuestionOption = {
label: string,
description?: string,
preview?: string | null,
};
export type AgentQueued = {
id: string,
prompt: AgentPrompt,
};
export type AgentRegistry = {
agents: RegistryAgent[],
/** Set when the registry could not be reached and the copy saved earlier is shown. */
warning: string | null,
};
/** An API request the agent is about to retry. */
export type AgentRetry = {
attempt: number,
maxRetries: number | null,
/** When the next attempt starts (ms since the epoch). */
retryAtMs: number | null,
error: string | null,
};
/** Tools › Agents: Command Execution Policy (whitelist and blacklist patterns). */
export type AgentSecuritySettings = {
/** Commands or patterns (`git status*`, `pwd`) automatically approved without prompting. */
allowedCommands?: string[],
/** Commands or patterns (`rm -rf *`, `mkfs*`) automatically rejected. */
blockedCommands?: string[],
};
export type AgentSessionStats = {
/** The last turn's tokens (`session/prompt` result `usage`). */
tokens?: AgentTokens | null,
/** How many times the agent compressed the conversation (Hermes `compressionDepth`). */
compressions?: number,
};
/** Settings › Agents: what the conversation shows and how messages are sent. */
export type AgentSettings = AgentSettings_Serialize | AgentSettings_Deserialize;
/** Settings › Agents: what the conversation shows and how messages are sent. */
export type AgentSettings_Deserialize = {
/** Context window use. */
showContextUsage?: boolean,
/** Time the agent spent on the task. */
showWorkTime?: boolean,
/** The account's usage-limit windows (Claude's 5-hour and weekly limits). */
showUsageLimits?: boolean,
/** What the session has cost so far, as the agent reports it. */
showCost?: boolean,
/** A finished turn's work folds into one line under its message, leaving the reply. */
foldTurns?: boolean,
/** Streaming text is revealed at a steady pace rather than chunk by chunk. */
smoothText?: boolean,
/** Conversations and the composer expand to the full width of the pane instead of staying in a centred column. */
fitWindowWidth?: boolean,
thinking?: ThinkingDisplay,
toolCalls?: ToolCallDisplay,
/** A tool call's output (a command's, a diff) is shown without opening it. */
expandToolOutput?: boolean,
sendWith?: SendKey,
/**
* What sending does while the agent works: queue the message for after the turn, or
* send it into the turn.
*/
whileRunning?: WhileRunning,
/**
* Whether new tasks start in the agent's mode that approves everything (Claude Code's
* bypass permissions, Codex's full access) or in one that asks. User settings only.
*/
newTaskApprovals?: NewTaskApprovals,
/** Settings new tasks of an agent start with: agent id → option id → value. */
defaults?: { [key in string]: { [key in string]: string } },
/**
* MCP servers passed to coding agents in `session/new`, `session/load` and `session/fork`,
* keyed by server name (`[agents.mcpServers.<name>]`).
*/
mcpServers?: { [key in string]: AgentMcpServer_Deserialize },
/**
* How agent skills may run, keyed by skill name (`[agents.skills.<name>]`); `SKILL.md`
* files on disk are never modified.
*/
skills?: { [key in string]: AgentSkillPolicy_Deserialize },
};
/** Settings › Agents: what the conversation shows and how messages are sent. */
export type AgentSettings_Serialize = {
/** Context window use. */
showContextUsage: boolean,
/** Time the agent spent on the task. */
showWorkTime: boolean,
/** The account's usage-limit windows (Claude's 5-hour and weekly limits). */
showUsageLimits: boolean,
/** What the session has cost so far, as the agent reports it. */
showCost: boolean,
/** A finished turn's work folds into one line under its message, leaving the reply. */
foldTurns: boolean,
/** Streaming text is revealed at a steady pace rather than chunk by chunk. */
smoothText: boolean,
/** Conversations and the composer expand to the full width of the pane instead of staying in a centred column. */
fitWindowWidth: boolean,
thinking: ThinkingDisplay,
toolCalls: ToolCallDisplay,
/** A tool call's output (a command's, a diff) is shown without opening it. */
expandToolOutput: boolean,
sendWith: SendKey,
/**
* What sending does while the agent works: queue the message for after the turn, or
* send it into the turn.
*/
whileRunning: WhileRunning,
/**
* Whether new tasks start in the agent's mode that approves everything (Claude Code's
* bypass permissions, Codex's full access) or in one that asks. User settings only.
*/
newTaskApprovals: NewTaskApprovals,
/** Settings new tasks of an agent start with: agent id → option id → value. */
defaults: { [key in string]: { [key in string]: string } },
/**
* MCP servers passed to coding agents in `session/new`, `session/load` and `session/fork`,
* keyed by server name (`[agents.mcpServers.<name>]`).
*/
mcpServers: { [key in string]: AgentMcpServer_Serialize },
/**
* How agent skills may run, keyed by skill name (`[agents.skills.<name>]`); `SKILL.md`
* files on disk are never modified.
*/
skills: { [key in string]: AgentSkillPolicy_Serialize },
};
/** One discovered skill: a folder with a `SKILL.md`. */
export type AgentSkill = AgentSkill_Serialize | AgentSkill_Deserialize;
/** How an agent skill may run (`[agents.skills.<name>] mode = …`). */
export type AgentSkillMode =
/** The model decides when to use it. */
"auto" |
/** Only when the user invokes it with `/name`. */
"slashOnly" |
/** Never. */
"off";
/** Which layer decided a skill's [`AgentSkillState::mode`]. */
export type AgentSkillOrigin = "none" | "session" | "workspace" | "user" |
/** An untrusted workspace's skills and policies may only turn skills off. */
"trust";
/** A skill's policy in Settings › Agents › Skills, stored without touching its `SKILL.md`. */
export type AgentSkillPolicy = AgentSkillPolicy_Serialize | AgentSkillPolicy_Deserialize;
/** A skill's policy in Settings › Agents › Skills, stored without touching its `SKILL.md`. */
export type AgentSkillPolicy_Deserialize = {
mode?: AgentSkillMode,
};
/** A skill's policy in Settings › Agents › Skills, stored without touching its `SKILL.md`. */
export type AgentSkillPolicy_Serialize = {
mode: AgentSkillMode,
};
/** Which CLI's own folders a skill was discovered in (Settings › Agents › Skills groups by it). */
export type AgentSkillSource =
/** The project's `.agents/skills` and `.openidea/skills`. */
"workspace" |
/** The user's `~/.agents/skills` (what `npx skills add` fills). */
"user" |
/** Contributed by an enabled OpenIDEA plugin (`[[contributes.skills]]`). */
"plugin" |
/** The project's `.claude/skills`. */
"claudeWorkspace" |
/** `~/.claude/skills`. */
"claudeUser" |
/** The project's `.github/skills` (Copilot's repository skills). */
"githubWorkspace" |
/** `~/.copilot/skills` and `~/.copilot/installed-plugins/*`. */
"copilotUser" |
/** The project's `.codex/skills`. */
"codexWorkspace" |
/** `~/.codex/skills`. */
"codexUser" |
/** The project's `.cursor/skills`. */
"cursorWorkspace" |
/** `~/.cursor/skills`. */
"cursorUser";
/**
* A skill as Settings › Agents › Skills shows it: discovery plus the effective mode and
* which layer decided it.
*/
export type AgentSkillState = AgentSkillState_Serialize | AgentSkillState_Deserialize;
/**
* A skill as Settings › Agents › Skills shows it: discovery plus the effective mode and
* which layer decided it.
*/
export type AgentSkillState_Deserialize = {
skill: AgentSkill_Deserialize,
mode: AgentSkillMode,
/**
* What set `mode`: a session override, the workspace, the user's settings, workspace
* trust, or nothing (the default `auto`).
*/
origin: AgentSkillOrigin,
};
/**
* A skill as Settings › Agents › Skills shows it: discovery plus the effective mode and
* which layer decided it.
*/
export type AgentSkillState_Serialize = {
skill: AgentSkill_Serialize,
mode: AgentSkillMode,
/**
* What set `mode`: a session override, the workspace, the user's settings, workspace
* trust, or nothing (the default `auto`).
*/
origin: AgentSkillOrigin,
};
/** One discovered skill: a folder with a `SKILL.md`. */
export type AgentSkill_Deserialize = {
/** The frontmatter `name`, else the folder's name. */
name: string,
description: string,
/** Optional `argument-hint` from frontmatter, completed in the `/` menu. */
hint?: string | null,
/** Canonical folder holding `SKILL.md` (symlinks resolved, so duplicates collapse). */
path: IpcPath,
source: AgentSkillSource,
/** Other skill roots whose symlinked entry resolved to this same canonical `path`. */
alsoIn?: AgentSkillSource[],
/** False when frontmatter sets `user-invocable: false` (omitted from `/` completion). */
userInvocable?: boolean,
/** True when frontmatter sets `disable-model-invocation: true` (defaults to `slashOnly`). */
disableModelInvocation?: boolean,
/** True when frontmatter sets `context: fork` (passed through natively to supporting CLIs). */
contextFork?: boolean,
/** Optional `paths` / `globs` patterns from frontmatter (passed through natively to supporting CLIs). */
paths?: string[],
/** The `SKILL.md` passes validation (`name` matches its folder, `description` present). */
valid: boolean,
/** What validation found (`name` mismatch, missing or over-long description…). */
warnings: string[],
};
/** One discovered skill: a folder with a `SKILL.md`. */
export type AgentSkill_Serialize = {
/** The frontmatter `name`, else the folder's name. */
name: string,
description: string,
/** Optional `argument-hint` from frontmatter, completed in the `/` menu. */
hint?: string | null,
/** Canonical folder holding `SKILL.md` (symlinks resolved, so duplicates collapse). */
path: IpcPath,
source: AgentSkillSource,
/** Other skill roots whose symlinked entry resolved to this same canonical `path`. */
alsoIn?: AgentSkillSource[],
/** False when frontmatter sets `user-invocable: false` (omitted from `/` completion). */
userInvocable: boolean,
/** True when frontmatter sets `disable-model-invocation: true` (defaults to `slashOnly`). */
disableModelInvocation: boolean,
/** True when frontmatter sets `context: fork` (passed through natively to supporting CLIs). */
contextFork: boolean,
/** Optional `paths` / `globs` patterns from frontmatter (passed through natively to supporting CLIs). */
paths?: string[],
/** The `SKILL.md` passes validation (`name` matches its folder, `description` present). */
valid: boolean,
/** What validation found (`name` mismatch, missing or over-long description…). */
warnings: string[],
};
/** Where an agent comes from. */
export type AgentSource = { kind: "builtin" } |
/** Defined by the user in `<config>/agents/<id>.toml`. */
{ kind: "custom" } |
/** Installed from the ACP Registry. */
{ kind: "registry"; version: string;
/** A newer version the registry offers. */
update: string | null };
export type AgentStatus =
/** Creating the worktree / starting the agent. */
"starting" | "running" |
/** Waiting for a permission answer. */
"needsInput" |
/** The turn ended; the result can be reviewed or the conversation continued. */
"ready" | "failed" |
/** The account's usage limit was reached; the conversation can go on once it resets. */
"limited" | "archived";
/** What a subagent is doing, as its parent reports it. */
export type AgentSubagentStatus = "running" |
/** One of its requests (a permission) waits for an answer. */
"needsInput" | "done" | "cancelled" | "failed";
export type AgentTask = AgentTask_Serialize | AgentTask_Deserialize;
export type AgentTask_Deserialize = {
/** Original project folder; absent in tasks saved before per-task roots. */
projectRoot?: IpcPath | null,
id: string,
title: string,
/** [`AgentProvider::id`]. */
provider: string,
/** Model the task runs on (its `model` setting), when known. */
model: string | null,
status: AgentStatus,
isolation: Isolation,
/** Directory the agent works in (the worktree, or the project root). */
cwd: IpcPath,
/** Branch of the task's worktree. */
branch: string | null,
/** Branch (or revision) the worktree was created from. */
base: string | null,
/** Commit the task's changes are compared against (worktree tasks; local ones use `HEAD`). */
baseCommit: string | null,
/** Why the task failed, when it did. */
error: string | null,
createdMs: number | null,
updatedMs: number | null,
/**
* The session's settings (model, mode, thinking effort…) as last reported, with the
* user's choices applied.
*/
config: AgentConfigOption[],
/** Slash commands the agent offers. */
commands: AgentCommand[],
/** Context window use, when the agent reports it. */
usage: AgentUsage | null,
/** Messages waiting for the current turn to end, oldest first. */
queue: AgentQueued[],
capabilities?: AgentCapabilities,
/** When a [`AgentStatus::Limited`] task's limit resets (ms since the epoch), if the agent said. */
resetsMs?: number | null,
/**
* The agent is retrying a failed API request (connection lost, overloaded…); cleared
* by its next output or any status change.
*/
retry?: AgentRetry | null,
/** What the agent runs in the background (shells, subagents, monitors), oldest first. */
background?: AgentBackgroundTask[],
/** Per-session MCP server enable/disable overrides (`server_name` -> `enabled`), including `"openidea"`. */
mcpOverrides?: { [key in string]: boolean },
/** Per-session skill modes (`skill name` -> mode), on top of the settings' policies. */
skillOverrides?: { [key in string]: AgentSkillMode },
/** Token counts of the last turn and context compressions, when the agent reports them. */
stats?: AgentSessionStats,
};
export type AgentTask_Serialize = {
/** Original project folder; absent in tasks saved before per-task roots. */
projectRoot: IpcPath | null,
id: string,
title: string,
/** [`AgentProvider::id`]. */
provider: string,
/** Model the task runs on (its `model` setting), when known. */
model: string | null,
status: AgentStatus,
isolation: Isolation,
/** Directory the agent works in (the worktree, or the project root). */
cwd: IpcPath,
/** Branch of the task's worktree. */
branch: string | null,
/** Branch (or revision) the worktree was created from. */
base: string | null,
/** Commit the task's changes are compared against (worktree tasks; local ones use `HEAD`). */
baseCommit: string | null,
/** Why the task failed, when it did. */
error: string | null,
createdMs: number | null,
updatedMs: number | null,
/**
* The session's settings (model, mode, thinking effort…) as last reported, with the
* user's choices applied.
*/
config: AgentConfigOption[],
/** Slash commands the agent offers. */
commands: AgentCommand[],
/** Context window use, when the agent reports it. */
usage: AgentUsage | null,
/** Messages waiting for the current turn to end, oldest first. */
queue: AgentQueued[],
capabilities: AgentCapabilities,
/** When a [`AgentStatus::Limited`] task's limit resets (ms since the epoch), if the agent said. */
resetsMs: number | null,
/**
* The agent is retrying a failed API request (connection lost, overloaded…); cleared
* by its next output or any status change.
*/
retry: AgentRetry | null,
/** What the agent runs in the background (shells, subagents, monitors), oldest first. */
background: AgentBackgroundTask[],
/** Per-session MCP server enable/disable overrides (`server_name` -> `enabled`), including `"openidea"`. */
mcpOverrides?: { [key in string]: boolean },
/** Per-session skill modes (`skill name` -> mode), on top of the settings' policies. */
skillOverrides?: { [key in string]: AgentSkillMode },
/** Token counts of the last turn and context compressions, when the agent reports them. */
stats: AgentSessionStats,
};
/** Token pricing (Credits per 1M tokens) and context window capacity for one tier. */
export type AgentTokenPricing = {
input: number | null,
output: number | null,
cacheRead?: number | null,
cacheWrite?: number | null,
contextTokens?: number | null,
};
export type AgentTokens = {
input: number,
cached: number,
output: number,
};
export type AgentToolDiff = {
path: IpcPath,
added: number,
removed: number,
};
export type AgentToolStatus = "pending" | "running" | "completed" | "failed";
export type AgentUsage = {
/** Tokens in the context window. */
used: number,
/** Size of the context window. */
size: number,
/** What the session has cost so far (ACP `usage_update.cost`), when the agent reports it. */
cost?: AgentCost | null,
};
/** One entry of `adb devices -l`. */
export type AndroidDevice = {
/** `adb -s` value: a USB serial number, `emulator-5554`, or `host:port`. */
serial: string,
/** `device` (usable), `offline`, `unauthorized` or `no permissions`. */
state: string,
model: string | null,
product: string | null,
/** The device's own name from the build (`ro.product.device`). */
device: string | null,
transportId: string | null,
};
export type AppInfo = {
version: string,
platform: string,
windowsBuildNumber: number | null,
configDir: IpcPath,
/** User data (plugins, scratches, Local History); follows `OPENIDEA_DATA_DIR`. */
dataDir: IpcPath,
/** Linux on a Wayland display: GTK draws the frameless windows' shadow and resize edges. */
wayland: boolean,
/** Caption buttons of the frameless title bar: the desktop's layout on Linux. */
windowButtons: WindowButtonLayout,
};
export type AppMetrics = {
/** Resident memory of the backend process (the WebView runs in its own processes). */
rssBytes: number | null,
/**
* Bytes allocated through malloc in the backend process (macOS only; there
* is no garbage-collected heap).
*/
heapBytes: number | null,
/** Physical memory of the machine. */
totalMemoryBytes: number | null,
uptimeMs: number | null,
startup: StartupMetrics,
/** Open projects (windows with a project). */
projects: number,
openDocuments: number,
indexFiles: number,
indexSymbols: number,
indexing: boolean,
/** Language server processes that are starting or running. */
languageServers: number,
syntax: SyntaxCacheStats,
/**
* Footprint per process group: the backend and its WebView processes,
* each language server (with its child processes), debug adapters, Run
* processes and terminals.
*/
memory: ProcessMemory[],
};
export type AppearanceSettings = AppearanceSettings_Serialize | AppearanceSettings_Deserialize;
export type AppearanceSettings_Deserialize = {
/**
* A built-in theme id (`light`, `dark`, `dark-hc`, …), `system` (legacy
* "Sync with OS"), or a plugin's theme: `plugin:<plugin-id>/<theme-id>`.
*/
theme?: string,
accent?: string,
uiFontSize?: number | null,
locale?: string,
/** Follow the OS light/dark mode with the preferred themes below. */
syncWithOs?: boolean,
preferredLightTheme?: string,
preferredDarkTheme?: string,
/** A plugin's file icon theme (`<plugin-id>/<theme-id>`); empty = the built-in icons. */
fileIconTheme?: string,
fileIconThemeOptions?: { [key in string]: FileIconThemeOptions },
/** IDE zoom in percent (50–300). */
zoom?: number,
/** Apply `ui_font_family` / `ui_font_size` (otherwise the theme's). */
useCustomFont?: boolean,
uiFontFamily?: string,
/** Font tried when `ui_font_family` lacks a glyph; empty = none. */
uiFontFallback?: string,
contrastScrollbars?: boolean,
/** Adjust colours for red-green vision deficiency. */
redGreenVision?: boolean,
differentToolWindowBackground?: boolean,
compactMode?: boolean,
/** IDEA "Use smaller indents in trees": tool window trees indent less per level. */
smallTreeIndents?: boolean,
/** Linux: WebKit animates each mouse wheel step */
smoothScrolling?: boolean,
fullPathInTitle?: boolean,
projectColorsInToolbar?: boolean,
dndWithAltOnly?: boolean,
menuIcons?: boolean,
/** `hamburger` | `merged` | `toolbar` (a separate row): main menu presentation in the frameless title bar. */
mainMenuStyle?: string,
/** A lone Alt press focuses or opens the main menu (IDEA `ide.windows.main.menu.focus.on.alt`). */
mainMenuAlt?: boolean,
/**
* Settings open in a native window of their own (IDEA parity); off opens them
* as a dialog inside the project window, which needs no new webview.
*/
settingsInSeparateWindow?: boolean,
/** `subpixel` | `greyscale` | `none` */
ideAntialiasing?: string,
editorAntialiasing?: string,
showToolWindowBars?: boolean,
showToolWindowNames?: boolean,
showToolWindowBadges?: boolean,
widescreenToolWindows?: boolean,
/** Each tool window keeps its own size; off, the windows of a side share one. */
rememberToolWindowSizes?: boolean,
/** View › Appearance › Toolbar; hidden leaves IDEA's compact window header. */
showMainToolbar?: boolean,
showStatusBar?: boolean,
/**
* View › Appearance › Navigation Bar: the file path breadcrumbs, shown in
* the status bar by default, above the editor, or not at all.
*/
navigationBar?: NavigationBarPosition,
/**
* Status bar widgets shown (`true`) or hidden (`false`) by the user
* (status bar context menu); widgets not listed use their default.
*/
statusBarWidgets?: { [key in string]: boolean },
/** Customize Main Toolbar; `None` = the default toolbar. */
mainToolbar?: MainToolbarSettings | null,
/** Appearance › Background Image: an image shown through the IDE window. */
backgroundImage?: BackgroundImageSettings,
/** Appearance › Presentation Assistant: the name and shortcut of each action run. */
presentationAssistant?: PresentationAssistantSettings,
};
export type AppearanceSettings_Serialize = {
/**
* A built-in theme id (`light`, `dark`, `dark-hc`, …), `system` (legacy
* "Sync with OS"), or a plugin's theme: `plugin:<plugin-id>/<theme-id>`.
*/
theme: string,
accent: string,
uiFontSize: number | null,
locale: string,
/** Follow the OS light/dark mode with the preferred themes below. */
syncWithOs: boolean,
preferredLightTheme: string,
preferredDarkTheme: string,
/** A plugin's file icon theme (`<plugin-id>/<theme-id>`); empty = the built-in icons. */
fileIconTheme: string,
fileIconThemeOptions: { [key in string]: FileIconThemeOptions },
/** IDE zoom in percent (50–300). */
zoom: number,
/** Apply `ui_font_family` / `ui_font_size` (otherwise the theme's). */
useCustomFont: boolean,
uiFontFamily: string,
/** Font tried when `ui_font_family` lacks a glyph; empty = none. */
uiFontFallback: string,
contrastScrollbars: boolean,
/** Adjust colours for red-green vision deficiency. */
redGreenVision: boolean,
differentToolWindowBackground: boolean,
compactMode: boolean,
/** IDEA "Use smaller indents in trees": tool window trees indent less per level. */
smallTreeIndents: boolean,
/** Linux: WebKit animates each mouse wheel step */
smoothScrolling: boolean,
fullPathInTitle: boolean,
projectColorsInToolbar: boolean,
dndWithAltOnly: boolean,
menuIcons: boolean,
/** `hamburger` | `merged` | `toolbar` (a separate row): main menu presentation in the frameless title bar. */
mainMenuStyle: string,
/** A lone Alt press focuses or opens the main menu (IDEA `ide.windows.main.menu.focus.on.alt`). */
mainMenuAlt: boolean,
/**
* Settings open in a native window of their own (IDEA parity); off opens them
* as a dialog inside the project window, which needs no new webview.
*/
settingsInSeparateWindow: boolean,
/** `subpixel` | `greyscale` | `none` */
ideAntialiasing: string,
editorAntialiasing: string,
showToolWindowBars: boolean,
showToolWindowNames: boolean,
showToolWindowBadges: boolean,
widescreenToolWindows: boolean,
/** Each tool window keeps its own size; off, the windows of a side share one. */
rememberToolWindowSizes: boolean,
/** View › Appearance › Toolbar; hidden leaves IDEA's compact window header. */
showMainToolbar: boolean,
showStatusBar: boolean,
/**
* View › Appearance › Navigation Bar: the file path breadcrumbs, shown in
* the status bar by default, above the editor, or not at all.
*/
navigationBar: NavigationBarPosition,
/**
* Status bar widgets shown (`true`) or hidden (`false`) by the user
* (status bar context menu); widgets not listed use their default.
*/
statusBarWidgets: { [key in string]: boolean },
/** Customize Main Toolbar; `None` = the default toolbar. */
mainToolbar: MainToolbarSettings | null,
/** Appearance › Background Image: an image shown through the IDE window. */
backgroundImage: BackgroundImageSettings,
/** Appearance › Presentation Assistant: the name and shortcut of each action run. */
presentationAssistant: PresentationAssistantSettings,
};
export type ApplyOutcome = {
/** Repository-relative paths changed without conflicts. */
applied: string[],
/** Repository-relative paths left with conflicts (index stages for the merge UI). */
conflicts: string[],
};
/** Arduino tool discovery paths and default board FQBN, configured in `settings.toml`. */
export type ArduinoSettings = {
cli?: string,
clangd?: string,
languageServer?: string,
cliConfig?: string,
fqbn?: string,
};
/** Packaging artifact definition (Project Structure › Artifacts). */
export type ArtifactConfig = {
name?: string,
kind?: ArtifactKind,
/** Module relative path (`"."` for root module). */
module?: string,
/** Output directory (relative to project root or absolute). */
outputDirectory?: string,
/** Main class for executable JAR artifacts. */
mainClass?: string,
/** Project library names included in the packaged artifact (`WEB-INF/lib` or JAR manifest). */
includeLibraries?: string[],
};
/** `groupId:artifactId` of a dependency. */
export type ArtifactKey = {
groupId: string,
artifactId: string,
};
/** Packaging type of a Project Structure artifact. */
export type ArtifactKind = "jar" | "war" | "warExploded";
/** What an askpass prompt asks for. */
export type AskpassKind =
/** Password or passphrase: hidden input. */
"secret" |
/** User name: visible input. */
"text" |
/** Yes / no (an unknown host key); answered with `yes` or `no`. */
"confirm";
export type AttachKind = "unity" | "java" | "node" | "python" | "dotnet" | "go" | "native";
export type AttachableProcess = {
pid: number,
/** Executable name. */
name: string,
commandLine: string,
kind: AttachKind,
/** Debug adapter that attaches to it. */
adapter: string,
/** Debug port the process listens on (JDWP, `--inspect`, `debugpy --listen`). */
host: string | null,
port: number | null,
};
/** Editor › General › Auto Import (LSP code actions). */
export type AutoImportSettings = {
addUnambiguous?: boolean,
optimizeOnTheFly?: boolean,
importsOnPaste?: ImportsOnPaste,
};
/** When local changes are uploaded to the default deployment server. */
export type AutoUpload = "never" |
/** Files saved with Save / Save All (⌘S). */
"onExplicitSave" |
/** Every save, including autosave and external changes. */
"always";
/** Appearance › Background Image. An empty `path` shows no image. */
export type BackgroundImageSettings = {
path?: string,
/** Percent, 0–100. */
opacity?: number,
/** `scale` (cover the window) | `plain` (original size) | `tile`. */
fill?: string,
/**
* Where the image is anchored: `center`, `top-left`, `top`, `top-right`, `left`, `right`,
* `bottom-left`, `bottom`, `bottom-right`.
*/
anchor?: string,
};
/** A step run before a configuration launches; a failing step aborts the launch. */
export type BeforeLaunchTask = {
/**
* `run` (another configuration id) | `build` (project, or `target` = CMake build id) |
* `tool` (external tool id) |
* `command` (a shell command line) | `toolWindow` (tool window id).
*/
kind: string,
target?: string,
};
export type BlameLine = {
commit: string,
author: string,
timeMs: number | null,
summary: string,
};
/** History for Selection: the commits that changed a block of lines, newest first. */
export type BlockHistory = {
/** The selected lines in HEAD (0-based, inclusive); None when none of them is committed. */
headLines: [number, number] | null,
revisions: BlockRevision[],
};
/** A commit that changed the block, with the block in its first parent and in it. */
export type BlockRevision = {
id: string,
shortId: string,
author: string,
email: string,
timeMs: number | null,
summary: string,
/** Repository-relative path of the file in this commit (before a later rename). */
path: string,
/** The block before the commit; empty when the commit added it. */
before: string,
after: string,
/** 0-based first line of the block before and after the commit. */
beforeLine: number,
afterLine: number,
};
export type Branch = {
name: string,
remote: boolean,
current: boolean,
upstream: string | null,
ahead: number,
behind: number,
lastCommitMs: number | null,
/** Tip commit id. */
commit?: string,
};
export type BranchInfo = {
/** `None` when HEAD is detached. */
head: string | null,
headCommit: string | null,
upstream: string | null,
ahead: number,
behind: number,
/** Merge / rebase / cherry-pick in progress. */
operation: string | null,
};
export type BranchUpdate = {
branch: string,
status: BranchUpdateStatus,
/** Why it failed. */
message: string | null,
};
/** What Update Selected did to one local branch. */
export type BranchUpdateStatus = "updated" | "upToDate" |
/** Diverged from its upstream: left as it is. */
"notFastForward" | "noUpstream" | "failed";
/** Editor › General › Breadcrumbs. */
export type BreadcrumbsSettings = {
show?: boolean,
/** `top` | `bottom` of the editor. */
placement?: string,
/** Language ids breadcrumbs are turned off for. */
disabledLanguages?: string[],
};
export type Breakpoint = {
line: number,
condition: string | null,
hitCondition: string | null,
/** Logpoint message; when set the breakpoint logs instead of suspending. */
logMessage: string | null,
enabled: boolean,
};
export type BreakpointState = {
line: number,
verified: boolean,
message: string | null,
};
/** An installed browser. */
export type Browser = {
/** `chrome`, `firefox`, `safari`, `edge`, `brave`, `chromium`. */
id: string,
name: string,
};
export type BuildEvent =
/** The build starts: its tree root. */
{ kind: "started"; system: BuildSystem; title: string } |
/** A command starts (echoed in the console). */
{ kind: "step"; command: string; cwd: IpcPath } |
/** Console output (one or more lines, each ending in `\n`). */
{ kind: "output"; text: string; stderr: boolean } | { kind: "message"; message: BuildMessage } |
/** Status bar progress; `fraction` 0..1 or `None` when indeterminate. */
{ kind: "progress"; message: string; fraction: number | null };
export type BuildInfo = {
version: string,
/** Build id from CI (`OPENIDEA_BUILD` at compile time), else `dev`. */
build: string,
profile: string,
os: string,
arch: string,
tauri: string,
/** An update endpoint is configured ("Check for Updates…" is offered). */
updates: boolean,
};
export type BuildKind =
/** Incremental compile of sources and tests. */
"build" |
/** Clean, then build. */
"rebuild" |
/** Package the outputs (`package`, `assemble`, `cargo build --release`, `npm run build`). */
"artifacts";
/** A compiler message in IDE coordinates (0-based line, UTF-16 column). */
export type BuildMessage = {
severity: Severity,
text: string,
/** Absolute path; `None` for messages about the build itself. */
path: IpcPath | null,
range: Range | null,
code: string | null,
};
/** The build systems of a project; `None` when the project does not use one. */
export type BuildModel = {
maven: MavenModel | null,
gradle?: GradleModel[],
/** sbt builds, read from their `build.sbt` (sbt is not started). */
sbt?: SbtBuild[],
};
/** How a Java launch builds the project before starting (IDEA's Before launch › Build). */
export type BuildPolicy =
/** Build the way this project's backend does it: incremental when possible. */
"automatic" |
/** Incremental build (IDEA's "Build"/Make). */
"make" |
/** Clean the output, then build (IDEA's Rebuild). */
"rebuild" |
/** Do not build; still resolve the module, JDK and classpath. */
"noBuild" |
/**
* Incremental build; a project with compile errors may still start with its last
* successfully compiled classes (IDEA's "Build, no error check").
*/
"makeAndContinueOnErrors";
export type BuildResult = {
system: BuildSystem,
title: string,
success: boolean,
errors: number,
warnings: number,
durationMs: number | null,
messages: BuildMessage[],
};
/** Build, Execution, Deployment › Compiler (Build tool window behaviour). */
export type BuildSettings = {
/** When to open the Build tool window: `always` | `onError` | `never`. */
openToolWindow?: string,
/** When to focus the Build tool window: `always` | `onError` | `never`. */
focusToolWindow?: string,
};
export type BuildSystem = "maven" | "gradle" | "cargo" | "go" | "typescript" | "cmake" | "dotnet" |
/** A Java project without a build tool, compiled from its Project Structure. */
"javac";
export type BuildTool = "maven" | "gradle";
/** A slice of a file: `data` is base64; `total` is the file size. */
export type ByteRange = {
offset: number,
data: string,
total: number,
};
export type CMakeProfile = {
name?: string,
buildType?: string,
generator?: string,
cmakeArgs?: string[],
/** Empty uses cmake-build-<lowercase build type>. */
buildDir?: string,
buildArgs?: string[],
env?: { [key in string]: string },
};
/** Absent profiles retain automatic discovery for existing projects. */
export type CMakeSettings = CMakeSettings_Serialize | CMakeSettings_Deserialize;
/** Absent profiles retain automatic discovery for existing projects. */
export type CMakeSettings_Deserialize = {
profiles?: CMakeProfile[] | null,
};
/** Absent profiles retain automatic discovery for existing projects. */
export type CMakeSettings_Serialize = {
profiles?: CMakeProfile[] | null,
};
export type CallHierarchy = {
/** The symbol the hierarchy is for: the first item the server prepared at the position. */
root?: HierarchyItem | null,
items: HierarchyItem[],
incomplete: ReferencesIncomplete | null,
};
/** A capability as the UI shows it. */
export type CapabilityInfo = {
/** `project.read`, `net:crates.io`, … */
id: string,
risk: Risk,
description: string,
/** Declared under `optional`: the plugin runs without it. */
optional: boolean,
/** Currently granted. */
granted: boolean,
};
/**
* The caret moved in the focused editor. Positions are 0-based; `col` counts
* UTF-16 code units, as everywhere in the plugin API.
*/
export type CaretMoved = {
path: string,
line: number,
col: number,
/** The caret came to rest at this position; plugins may load what a hover needs. */
settled?: boolean,
};
/**
* A plugin package available for installation from a local catalog
* directory (the samples shipped with the IDE). Not installed by listing it.
*/
export type CatalogPlugin = {
id: string,
name: string,
version: string,
description: string,
authors: string[],
homepage: string | null,
changeNotes: string | null,
icon: PluginIcon | null,
/** Package directory; install with `install_from_dir(path)`. */
path: IpcPath,
hasCode: boolean,
capabilities: CapabilityInfo[],
contributions: ContributionCount[],
/** Why the package cannot be installed as is (e.g. its WASM is not built). */
problem: string | null,
};
export type ChainUnavailable = { kind: "notTopFrame" } | { kind: "notAtChainStart" } | { kind: "insideChainLambda" } | { kind: "notJavaStreamRoot"; root: string } | { kind: "lazyTerminal"; op: string } | { kind: "noTerminal" } | { kind: "unknownOperation"; op: string } | { kind: "syntaxError" } |
/** The session has no stream tracer: not java-debug, or its jdtls has no inspector bundle. */
{ kind: "noBackend" };
export type ChangeKind = "added" | "modified" | "deleted" | "renamed" | "untracked" | "ignored" | "conflicted";
/**
* Ordered, non-overlapping changes, all expressed in the coordinates of the
* original document (CodeMirror `ChangeSet` semantics).
*/
export type ChangeSet = {
changes: TextChange[],
};
export type ChangedFile = {
path: string,
kind: ChangeKind,
oldPath: string | null,
/** Set when the entry is a symbolic link (git mode `120000`); only revision diffs fill it. */
link?: LinkTarget | null,
};
export type Changelist = {
id: string,
name: string,
comment?: string,
};
/** User change lists of a project and which list each changed file belongs to. */
export type ChangelistState = {
lists: Changelist[],
/** Id of the active list (receives new changes). */
active: string,
/** Project-relative path → list id. Files not listed belong to the active list. */
files?: { [key in string]: string },
};
/** A value for one streaming argument of a remote command (`data`: JSON text). */
export type ChannelFrame = {
id: number,
data: string,
};
export type CheckStatus = "pending" | "success" | "failure" | "cancelled" | "skipped" | "neutral";
/**
* How Checkout treats local changes that the switch would overwrite (IDEA's Smart
* Checkout dialog).
*/
export type CheckoutMode =
/** Fail with [`CheckoutOutcome::LocalChanges`] and change nothing. */
"normal" |
/** Stash local changes, switch, and restore them (conflicts are left to resolve). */
"smart" |
/** Discard the local changes in the way (`git switch --discard-changes`). */
"force";
export type CheckoutOptions = {
mode?: CheckoutMode,
/** Required when checking out a remote branch whose local namesake is ahead of it. */
diverged?: DivergedLocal | null,
/** Check the branch out even though another worktree has it checked out. */
ignoreOtherWorktrees?: boolean,
};
/**
* Result of [`Repo::checkout_with`]; the non-`Done` variants other than `Conflicts`
* left the repository untouched.
*/
export type CheckoutOutcome = { kind: "done" } |
/** These local changes (repository-relative paths) would be overwritten. */
{ kind: "localChanges"; files: string[] } |
/**
* These untracked files (repository-relative paths) would be overwritten by the
* checkout; with `removed`, they would be removed by it (tracked here, absent
* from the target).
*/
{ kind: "untrackedFiles"; files: string[]; removed: boolean } |
/** Local branch `local` has commits that remote branch `remote` does not. */
{ kind: "localBranchAhead"; local: string; remote: string } |
/**
* Switched, but restoring the local changes (Smart Checkout) or the rebase stopped
* on conflicts in these files.
*/
{ kind: "conflicts"; files: string[] } |
/**
* Git refused: `branch` is checked out in the linked worktree at `path`. Nothing
* changed; the branch can be worked on there.
*/
{ kind: "checkedOutInWorktree"; branch: string; path: string };
export type ChoiceOption = {
value: string,
label: string,
};
/**
* A Python class definition and the base names written in its source. The UI builds a
* name → locations index from every class in the project (attached dependency roots
* included) to compute ↑ overrides / ↓ overridden gutter markers without a language
* server's type-hierarchy provider.
*/
export type ClassInheritance = {
/** Start of the class definition's selection range (0-based line, UTF-16 column). */
path: IpcPath,
line: number,
col: number,
name: string,
/**
* Base names as written in source (bare name, e.g. `AllToAllTokenDispatcher`; a
* qualified name keeps only its last segment).
*/
bases: string[],
};
export type ClassifiedReference = {
/** Optional for older Java extensions; missing means unclassified. */
access?: ReferenceAccess | null,
location: Location,
kind: ReferenceKind,
/** The usage's line, when the server has it at hand (a library class's). */
text?: string | null,
};
export type ClearCachesResult = {
/** Syntax trees dropped (they are rebuilt on demand). */
syntaxTrees: number,
rssBeforeBytes: number | null,
rssAfterBytes: number | null,
};
export type CliInstallation = {
path: IpcPath,
pathDirectory: IpcPath | null,
};
/** A window's answer to `ClipboardRequested`: its machine's clipboard. */
export type ClipboardAnswer =
/** `None` for a kind the clipboard doesn't hold; `png` is base64. */
{ kind: "content"; text: string | null; png: string | null } |
/** The user refused (a remote window asks first). */
{ kind: "refused" } |
/** The window could not read the clipboard. */
{ kind: "failed"; message: string };
export type CloseContext = {
/** Quit is in progress (exit was already confirmed). */
quitting: boolean,
/** Number of open project windows (settings windows excluded), including the caller. */
windows: number,
};
export type CodeAction = {
title: string,
/** Diagnostics this action fixes, in IDE coordinates. */
diagnostics?: Diagnostic[],
/** Original server diagnostics, including encoding and data, for codeAction/resolve. */
originalDiagnostics?: string | null,
/** LSP kind, e.g. `quickfix`, `refactor.extract`, `source.organizeImports`. */
kind: string | null,
isPreferred: boolean,
disabledReason: string | null,
edit: WorkspaceEdit | null,
command: Command | null,
data: string | null,
server: ServerId,
};
/**
* Code actions at a range plus the kinds the servers advertise
* (`codeActionProvider.codeActionKinds`), so the UI can tell "not available
* here" from "not supported by the server".
*/
export type CodeActionQuery = {
actions: CodeAction[],
/** Union of the advertised kinds; `None` when a server does not list them. */
advertisedKinds: string[] | null,
};
/** Editor › Code Editing. */
export type CodeEditingSettings = {
/** Highlight usages of element at caret. */
highlightUsages?: boolean,
highlightBraces?: boolean,
/** Highlight other occurrences of the selected text. */
highlightSelection?: boolean,
quickDocOnHover?: boolean,
quickDocDelay?: number,
/** Next / previous error goes to errors only (skips warnings). */
nextErrorErrorsOnly?: boolean,
stickyLinesMax?: number,
};
export type CodeLens = {
range: Range,
command: Command | null,
};
/** Editor › Code Style (General tab + per-language overrides). */
export type CodeStyleSettings = CodeStyleSettings_Serialize | CodeStyleSettings_Deserialize;
/** Editor › Code Style (General tab + per-language overrides). */
export type CodeStyleSettings_Deserialize = {
/** Line separator for new files: `system` | `lf` | `crlf` | `cr`. */
lineSeparator?: string,
hardWrapAt?: number,
visualGuides?: number[],
/** Detect and use existing file indents for editing. */
detectIndents?: boolean,
/** Enable EditorConfig support. */
editorconfig?: boolean,
languages?: { [key in string]: LanguageCodeStyle_Deserialize },
/** Formatter › Do not format: globs (`*.min.js`, `generated/**`) Reformat Code skips. */
doNotFormat?: string[],
/** Formatter › Turn formatter on/off with markers in code comments. */
formatterTagsEnabled?: boolean,
formatterOffTag?: string,
formatterOnTag?: string,
/** The markers are regular expressions. */
formatterTagsRegexp?: boolean,
};
/** Editor › Code Style (General tab + per-language overrides). */
export type CodeStyleSettings_Serialize = {
/** Line separator for new files: `system` | `lf` | `crlf` | `cr`. */
lineSeparator: string,
hardWrapAt: number,
visualGuides: number[],
/** Detect and use existing file indents for editing. */
detectIndents: boolean,
/** Enable EditorConfig support. */
editorconfig: boolean,
languages: { [key in string]: LanguageCodeStyle_Serialize },
/** Formatter › Do not format: globs (`*.min.js`, `generated/**`) Reformat Code skips. */
doNotFormat: string[],
/** Formatter › Turn formatter on/off with markers in code comments. */
formatterTagsEnabled: boolean,
formatterOffTag: string,
formatterOnTag: string,
/** The markers are regular expressions. */
formatterTagsRegexp: boolean,
};
/** Editor › Inlay Hints › Code Vision position (IDEA's "Default position for metrics"). */
export type CodeVisionPosition =
/** A row of its own above the declaration. */
"top" |
/** After the end of the declaration's first line. */
"right";
/** ColorInfo data. */
export type ColorInfo = {
range: Range,
red: number | null,
green: number | null,
blue: number | null,
alpha: number | null,
};
export type Command = {
title: string,
command: string,
arguments: string[],
};
/** The invoking window's response to a command request. */
export type CommandAnswer = { kind: "value"; value: string | null } | { kind: "notFound" } | { kind: "failed"; value: string };
export type CommandForm = {
command: Command,
formFields: FormField[],
formAnswers: FormAnswer[],
};
export type Commit = Commit_Serialize | Commit_Deserialize;
/** A window's answer to a [`CommitRequest`]. */
export type CommitAnswer =
/** The window's project has no repository. */
{ kind: "noRepository" } | { kind: "selection"; selection: CommitSelection } |
/** The message was replaced. */
{ kind: "done" } |
/** The draft is no longer at the revision. */
{ kind: "stale" };
/** Commit Options (IDEA's commit options popup). */
export type CommitOptions = {
amend: boolean,
signOff: boolean,
/** `--author`, e.g. `Name <mail@example.com>`; `None` or blank uses the configured user. */
author: string | null,
/** False skips the pre-commit and commit-msg hooks (`--no-verify`). */
runHooks: boolean,
/**
* Files committed with only some of their changes (IDEA's partial commit). They are
* committed through a temporary index, so neither the working tree nor the other
* entries of the index change; afterwards their index entries match the new commit.
*/
partial?: PartialCommitFile[],
/** Files committed with their working-tree content, staged or not. */
stage?: IpcPath[],
/** Staged files left out of the commit; they stay staged afterwards. */
exclude?: IpcPath[],
};
/** A problem a plugin's before-commit check reported (WIT `commit-checker.commit-problem`). */
export type CommitProblem = {
message: string,
/** Absolute path of the file it is in, if any (IPC form). */
path: string | null,
range: Range | null,
};
/** What a plugin asks of a window's Commit view. */
export type CommitRequest =
/**
* What Commit would commit now ([`CommitAnswer::Selection`]); unsaved
* editors of the included files are saved first.
*/
{ kind: "selection" } |
/** Replace the message if the draft is still at `revision`. */
{ kind: "setMessage"; revision: number; message: string };
/**
* What a window's Commit view would commit: per repository, the options
* `vcs_commit` would get.
*/
export type CommitSelection = {
/** Changes whenever the message, the included changes or Amend do. */
revision: number,
message: string,
amend: boolean,
repositories: CommitSelectionRepo[],
};
export type CommitSelectionRepo = {
root: IpcPath,
options: CommitOptions,
};
/** Version Control › Commit: commit checks and commit-message inspections. */
export type CommitSettings = {
/**
* Commit from the Commit tool window; off = Local Changes in the Git tool
* window and a Commit dialog.
*/
nonModal?: boolean,
includeChangesByDefault?: boolean,
/** Start with an empty message instead of the last one / the changelist's. */
clearInitialMessage?: boolean,
analyzeCode?: boolean,
checkTodo?: boolean,
reformat?: boolean,
optimizeImports?: boolean,
cleanup?: boolean,
blankLineAfterSubject?: boolean,
limitSubject?: boolean,
subjectLimit?: number,
limitBody?: boolean,
bodyLimit?: number,
showRightMargin?: boolean,
wrapAtMargin?: boolean,
/** Plugin before-commit checks turned off (`<plugin id>/<check id>`); the rest run. */
disabledPluginChecks?: string[],
/**
* Double-click / Enter in the changes view: `None` follows the interface (the
* Commit tool window opens the diff, Local Changes the source file).
*
* No `skip_serializing_if`: an unset value must still appear in
* `Settings::default()`, or `SettingsStore::set` rejects the key as unknown.
*/
doubleClickOpensDiff?: boolean | null,
/** Team conventions for Generate Commit Message with Agent, added to its prompt. */
agentInstructions?: string,
/** The coding agent Generate Commit Message with Agent uses; empty follows the latest task's agent. */
agent?: string,
/** That agent's model for commit messages; empty keeps the model the agent would use. */
agentModel?: string,
/** That model's thinking level for commit messages; empty keeps the agent's. */
agentEffort?: string,
/** Show the Generate Commit Message with Agent button above the commit message. */
agentButton?: boolean,
};
export type Commit_Deserialize = {
id: string,
shortId: string,
parents: string[],
/** Connections in the filtered graph; never use these as revision/diff parents. */
graphParents?: string[] | null,
graphDashed?: boolean[],
/** Repository-relative filename at this revision in rename-following history. */
historyPath?: string | null,
logPosition?: number | null,
logTotal?: number | null,
/** Newest committer time at or after this row if newer than the row's commit. */
logMergeTimeMs?: number | null,
graphBoundaryParents?: string[],
/** Reachability from HEAD, computed independently of the visible filters. */
onCurrentBranch?: boolean | null,
author: string,
email: string,
committer?: string,
committerEmail?: string,
timeMs: number | null,
summary: string,
message: string,
messageTruncated?: boolean,
refs: string[],
/** Committer time (Log › View Options › Commit Timestamp). */
commitTimeMs?: number | null,
/** Legacy alias of `graph_dashed`, indexed by displayed parents. */
dashed?: boolean[],
};
export type Commit_Serialize = {
id: string,
shortId: string,
parents: string[],
/** Connections in the filtered graph; never use these as revision/diff parents. */
graphParents?: string[] | null,
graphDashed?: boolean[],
/** Repository-relative filename at this revision in rename-following history. */
historyPath?: string | null,
logPosition?: number | null,
logTotal?: number | null,
/** Newest committer time at or after this row if newer than the row's commit. */
logMergeTimeMs?: number | null,
graphBoundaryParents?: string[],
/** Reachability from HEAD, computed independently of the visible filters. */
onCurrentBranch?: boolean | null,
author: string,
email: string,
committer: string,
committerEmail: string,
timeMs: number | null,
summary: string,
message: string,
messageTruncated: boolean,
refs: string[],
/** Committer time (Log › View Options › Commit Timestamp). */
commitTimeMs: number | null,
/** Legacy alias of `graph_dashed`, indexed by displayed parents. */
dashed?: boolean[],
};
export type CompareResult = {
repositories: RepositoryComparison[],
skippedPaths: IpcPath[],
};
export type CompareScope = {
repositories: IpcPath[],
/** Selected content outside registered repositories; workspace parents expand to their skipped children. */
skippedPaths: IpcPath[],
singleFile: boolean,
};
/** Files that differ between `from` and `to` (the working tree when `None`). */
export type ComparisonLaunch = {
from: ComparisonRevision,
to: ComparisonRevision | null,
scope: ComparisonScope | null,
repo: IpcPath | null,
};
/** A Git revision and how the comparison window names it. */
export type ComparisonRevision = {
rev: string,
label: string,
};
/** Limits a comparison to some paths (Compare with Branch on a selection). */
export type ComparisonScope = {
paths: IpcPath[],
repositories: IpcPath[] | null,
};
export type CompletionItem = {
label: string,
/** e.g. `(req: CreateOrderRequest)` shown right after the label. */
labelDetail: string | null,
/**
* `labelDetails.description`: a return type or module path, shown right-aligned. Servers
* such as JDT.LS also send the whole signature as `detail`, which would repeat the label.
*/
labelDescription: string | null,
/**
* The signature or type when the server sent no `label_description`; the documentation panel
* shows it either way.
*/
detail: string | null,
kind: CompletionKind | null,
documentation: Markup | null,
sortText: string | null,
filterText: string | null,
preselect: boolean,
deprecated: boolean,
/** Text to insert; snippet syntax when `is_snippet`. */
insertText: string,
isSnippet: boolean,
/** Range replaced on accept; `None` = word at cursor. */
replaceRange: Range | null,
/** IDEA "Replace" (⇥) range when it differs from insert range. */
replaceRangeTab: Range | null,
additionalEdits: TextEdit[],
commitCharacters: string[],
command: Command | null,
/** Opaque server data for `completionItem/resolve`. */
data: string | null,
server: ServerId,
};
export type CompletionKind = "text" | "method" | "function" | "constructor" | "field" | "variable" | "class" | "interface" | "module" | "property" | "unit" | "value" | "enum" | "keyword" | "snippet" | "color" | "file" | "reference" | "folder" | "enumMember" | "constant" | "struct" | "event" | "operator" | "typeParameter";
export type CompletionList = {
isIncomplete: boolean,
items: CompletionItem[],
};
/** Editor › General › Code Completion. */
export type CompletionSettings = {
matchCase?: boolean,
/** `first` letter only | `all` letters. */
caseSensitivity?: string,
/** Show suggestions as you type. */
autoPopup?: boolean,
/** Insert the selected suggestion by pressing space, dot, or other context-dependent keys. */
insertOnSpecialKeys?: boolean,
/** Insert a sole suggestion of explicit (⌃Space) completion right away. */
autoInsertSingle?: boolean,
/** Sort suggestions by name instead of relevance. */
sortAlphabetically?: boolean,
/** Add `()` after function and method suggestions. */
insertParentheses?: boolean,
showDocumentation?: boolean,
documentationDelay?: number,
parameterInfo?: boolean,
parameterInfoDelay?: number,
};
export type ComposeFileOverride = "kept" | "excluded";
export type ComposeOp = "start" | "stop" | "restart" |
/** Stops and removes the project's containers and networks. */
"down";
/** Why `composer install` is due in a Composer project. */
export type ComposerInstall =
/** No `vendor/autoload.php`. */
"missing" |
/** A package of `composer.lock` is not installed, or at another version. */
"outdated";
/** The Composer project `path` belongs to, when its dependencies need `composer install`. */
export type ComposerInstallState = {
root: IpcPath,
reason: ComposerInstall,
};
/** The user's answer on an install or consent page. */
export type Consent = {
/**
* Optional capabilities the user accepted (`net:crates.io`, …). Required
* ones are implied by consenting at all.
*/
optional: string[],
/**
* The user accepted a package signed by another key than the installed
* copy ([`InstallPreview::signer_changed`]).
*/
signerChange?: boolean,
};
/** A plugin's highlight rule for Run and Debug console output (API 1.12, `ui.set-console-rules`). */
export type ConsoleRule = {
pattern: string,
ignoreCase: boolean,
/** A console palette colour (`red`, `bright-blue`); `None` keeps the text's own. */
foreground: string | null,
background: string | null,
/** `bold`, `italic`, `underline`, `strikethrough`, `dim`. */
styles: string[],
/** The whole line, or only the matched text. */
wholeLine: boolean,
enabled: boolean,
};
/** Build, Execution, Deployment › Console. */
export type ConsoleSettings = {
softWrap?: boolean,
overrideBuffer?: boolean,
bufferKb?: number,
/** Encoding of process output (`UTF-8`, `windows-1252`, `GBK`…). */
encoding?: string,
/** Consecutive lines containing any of these are folded. */
foldPatterns?: string[],
/** Log lines take the colour of their level (Run/Debug consoles). */
logColors?: LogLevelColors,
};
export type ContainerOp = "start" | "stop" | "restart" | "pause" | "unpause" | "kill";
/** The project interpreter when it is a run target's. */
export type ContainerPython = {
/** The run target's id. */
target: string,
/** Its name; empty when no run target has the id. */
name: string,
/** The Python version of the snapshot in use; `None`: no snapshot yet. */
version: string | null,
/** The image the snapshot was copied from. */
image: string | null,
/** The copied library folders on this machine. */
folders: IpcPath[],
/** Packages of the snapshot (read-only). */
packages: PythonPackage[],
/** A snapshot is being taken. */
updating: boolean,
};
/** ContentAction data exchanged with the IDE. */
export type ContentAction = {
id: string,
label: string,
icon: string | null,
primary: boolean,
save: boolean,
};
/** ContentDiff data exchanged with the IDE. */
export type ContentDiff = {
left: string,
right: string,
leftLabel: string | null,
rightLabel: string | null,
title: string | null,
};
/** ContentTab data exchanged with the IDE. */
export type ContentTab = {
key: string,
title: string,
fileName: string | null,
language: string | null,
content: string,
readOnly: boolean,
actions: ContentAction[],
};
/** ContentTabAction data exchanged with the IDE. */
export type ContentTabAction = {
requestId: string,
key: string,
action: string,
content: string,
};
/** ContentTabReply data exchanged with the IDE. */
export type ContentTabReply = {
content: string | null,
saved: boolean | null,
readOnly: boolean | null,
status: string | null,
error: string | null,
diff: ContentDiff | null,
};
/** Number of declarations of one extension point. */
export type ContributionCount = {
point: string,
count: number,
};
/** A contribution as the plugin details page lists it. */
export type ContributionInfo = {
point: string,
label: string,
};
export type CoveragePrepared = CoveragePrepared_Serialize | CoveragePrepared_Deserialize;
export type CoveragePrepared_Deserialize = ({ status: "ready"; runner: string;
/** What to launch instead of the configuration. */
launch: RunConfig_Deserialize; report: CoverageReportSpec }) & { install?: never; message?: never; reason?: never; tool?: never } | ({ status: "missingTool"; tool: string; message: string; install: InstallCommand | null }) & { launch?: never; reason?: never; report?: never; runner?: never } | ({ status: "unsupported"; reason: string }) & { install?: never; launch?: never; message?: never; report?: never; runner?: never; tool?: never };
export type CoveragePrepared_Serialize = ({ status: "ready"; runner: string;
/** What to launch instead of the configuration. */
launch: RunConfig_Serialize; report: CoverageReportSpec }) & { install?: never; message?: never; reason?: never; tool?: never } | ({ status: "missingTool"; tool: string; message: string; install: InstallCommand | null }) & { launch?: never; reason?: never; report?: never; runner?: never } | ({ status: "unsupported"; reason: string }) & { install?: never; launch?: never; message?: never; report?: never; runner?: never; tool?: never };
/** Where the report of a prepared run will be, and how to read it. */
export type CoverageReportSpec =
/** An lcov tracefile; relative `SF:` paths resolve against `base`. */
{ kind: "lcov"; runner: string; path: IpcPath; base: IpcPath } |
/** `go test -coverprofile`; import paths under `module` map to `module_dir`. */
{ kind: "goProfile"; path: IpcPath; module: string; moduleDir: IpcPath } |
/** SimpleCov's `.resultset.json`; relative paths resolve against `base`. */
{ kind: "simpleCov"; path: IpcPath; base: IpcPath } |
/** Every JaCoCo XML report (Maven `target/site/jacoco`, Gradle `build/reports/jacoco`) under `dir`. */
{ kind: "jacoco"; dir: IpcPath } |
/** The tool's raw data is exported to lcov by `argv` first (coverage.py: `… -m coverage lcov -o <lcov>`). */
{ kind: "exported"; runner: string; argv: string[]; cwd: IpcPath; env: { [key in string]: string }; lcov: IpcPath };
/** One coverage run's report. */
export type CoverageSuite = {
/** Tool that produced it, e.g. `cargo-llvm-cov`, `JaCoCo`. */
runner: string,
/** Whether branch counts are meaningful (lcov `BRDA`, JaCoCo); Go profiles only have blocks. */
hasBranches: boolean,
/** Sorted by path. */
files: FileCoverage[],
};
export type CreatePullRequest = {
title: string,
body: string,
base: string,
draft: boolean,
/** Push the current branch (setting its upstream) before creating. */
push: boolean,
};
export type CreateRequest = {
generator: string,
/** The parent directory; the project is `<location>/<name>`. */
location: IpcPath,
name: string,
git: boolean,
values: { [key in string]: string },
};
/**
* Payload for creating a custom ACP agent (always the ACP driver); the id
* becomes the `<config>/agents/<id>.toml` file name.
*/
export type CustomAgentInput = {
id: string,
name: string,
command: string,
args?: string[],
env?: { [key in string]: string },
};
/** Imported editor colour scheme on top of a built-in base. */
export type CustomColorScheme = CustomColorScheme_Serialize | CustomColorScheme_Deserialize;
/** Imported editor colour scheme on top of a built-in base. */
export type CustomColorScheme_Deserialize = {
name: string,
parent: string,
attributes: { [key in string]: TextAttributesOverride_Deserialize },
};
/** Imported editor colour scheme on top of a built-in base. */
export type CustomColorScheme_Serialize = {
name: string,
parent: string,
attributes: { [key in string]: TextAttributesOverride_Serialize },
};
/** A named profile made with Copy. */
export type CustomInspectionProfile = {
name?: string,
overrides?: { [key in string]: InspectionOverride },
};
export type CustomKeymap = {
name?: string,
/** Bundled preset the keymap derives from, e.g. `intellij-macos`. */
parent?: string,
/** Action id → bindings on top of `parent`; an empty list unbinds. */
overrides?: { [key in string]: string[] },
};
/**
* A field watchpoint (DAP data breakpoint) on a `dataId` from [`DebugManager::data_breakpoint_info`]
* (java-debug ids, `Class#field`, stay valid across sessions).
*/
export type DataBreakpoint = {
dataId: string,
/** `read`, `write` or `readWrite` (adapter default when unset). */
accessType: string | null,
condition: string | null,
hitCondition: string | null,
enabled: boolean,
};
/** Answer of `dataBreakpointInfo`: `data_id` is `None` when the value cannot be watched. */
export type DataBreakpointInfo = {
dataId: string | null,
description: string,
accessTypes: string[],
};
export type DataSource = DataSource_Serialize | DataSource_Deserialize;
export type DataSource_Deserialize = {
id?: string,
name?: string,
driver?: DbDriver,
/** An app-wide driver profile id; classpaths never come from a project. */
jdbcDriver?: string,
host?: string,
port?: number | null,
database?: string,
user?: string,
/** SQLite database file (absolute, or relative to the project root). */
file?: IpcPath | null,
ssl?: DbSslMode,
/** Keep the password in the saved passwords. */
savePassword?: boolean,
/** Refuse statements other than queries (enforced by the database session where possible). */
readOnly?: boolean,
/** SSH tunnel settings (`None`: never configured; kept but unused when not `enabled`). */
ssh?: DbSsh | null,
/** Wire-compatible product preset (`cockroachdb`, `tidb`…; empty: the driver itself). */
vendor?: string,
color?: DbColor | null,
comment?: string,
/** Connect with [`DataSource::url`] instead of the host / port / database fields. */
urlOnly?: boolean,
url?: string,
/** PEM files; `~/` is the home directory. */
sslCaFile?: string,
sslCertFile?: string,
sslKeyFile?: string,
options?: DbOptions,
introspection?: DbIntrospection_Deserialize,
properties?: DbProperty[],
/** Snowflake settings (`None`: not a Snowflake data source, or all defaults). */
snowflake?: DbSnowflake | null,
/**
* Stored app-wide and listed in every project. Implied by the file it is read from,
* so not written to it.
*/
global?: boolean,
/** Plugin id owning this source; absent for user-managed sources. */
pluginOwner?: string | null,
/** Id private to the owner, never used as a connection target. */
pluginSourceId?: string | null,
};
export type DataSource_Serialize = {
id: string,
name: string,
driver: DbDriver,
/** An app-wide driver profile id; classpaths never come from a project. */
jdbcDriver?: string,
host: string,
port: number | null,
database: string,
user: string,
/** SQLite database file (absolute, or relative to the project root). */
file: IpcPath | null,
ssl: DbSslMode,
/** Keep the password in the saved passwords. */
savePassword: boolean,
/** Refuse statements other than queries (enforced by the database session where possible). */
readOnly: boolean,
/** SSH tunnel settings (`None`: never configured; kept but unused when not `enabled`). */
ssh: DbSsh | null,
/** Wire-compatible product preset (`cockroachdb`, `tidb`…; empty: the driver itself). */
vendor: string,
color: DbColor | null,
comment: string,
/** Connect with [`DataSource::url`] instead of the host / port / database fields. */
urlOnly: boolean,
url: string,
/** PEM files; `~/` is the home directory. */
sslCaFile: string,
sslCertFile: string,
sslKeyFile: string,
options: DbOptions,
introspection: DbIntrospection_Serialize,
properties: DbProperty[],
/** Snowflake settings (`None`: not a Snowflake data source, or all defaults). */
snowflake: DbSnowflake | null,
/**
* Stored app-wide and listed in every project. Implied by the file it is read from,
* so not written to it.
*/
global: boolean,
/** Plugin id owning this source; absent for user-managed sources. */
pluginOwner?: string | null,
/** Id private to the owner, never used as a connection target. */
pluginSourceId?: string | null,
};
/** Database settings: Query Execution and SQL Resolution Scopes. */
export type DatabaseSettings = {
/**
* A console's result sets show under the statements that produced them, in the editor,
* instead of in the Services view's result tabs.
*/
inEditorResults?: boolean,
/**
* Languages & Frameworks › SQL Resolution Scopes: the data source SQL in a file or folder
* resolves against (completion, inspections, navigation), most specific path first.
*/
resolutionScopes?: SqlResolutionScope[],
};
/** System Settings › Date Formats (Git log, Local History, blame). */
export type DateFormatSettings = {
/** Use `pattern` / `use24_hour` instead of the system locale's format. */
overrideSystem?: boolean,
/** `dd`, `MM`, `MMM`, `yy`, `yyyy` placeholders. */
pattern?: string,
use24Hour?: boolean,
/** "Today", "Yesterday", "5 min ago". */
pretty?: boolean,
};
export type DbCatalogDatabase = {
name: string,
/** When this database was read, in milliseconds since the Unix epoch. */
readAt: number | null,
schemas: DbCatalogSchema[],
};
/** A schema of a database and its tables and views. */
export type DbCatalogSchema = {
name: string,
tables: DbTableInfo[],
};
export type DbCellValue = {
column: string,
/** `None` is SQL NULL. */
value: string | null,
};
/** IDEA's data source colours (tree node and console tab tint), e.g. red for production. */
export type DbColor = "red" | "orange" | "yellow" | "green" | "blue" | "violet";
export type DbColumnInfo = {
name: string,
dataType: string,
nullable: boolean,
default: string | null,
primaryKey: boolean,
};
/** The schema model SQL completion and resolution work from. */
export type DbCompletion = {
/** Schema unqualified names resolve to. */
defaultSchema: string,
tables: DbCompletionTable[],
foreignKeys: DbForeignKey[],
};
export type DbCompletionColumn = {
name: string,
dataType: string,
nullable: boolean,
primaryKey: boolean,
/** Has a default (or is generated): optional in INSERT. */
hasDefault: boolean,
};
export type DbCompletionTable = {
schema: string,
name: string,
kind: DbTableKind,
columns: DbCompletionColumn[],
};
export type DbDatabases = {
/** The database the data source connects to (its setting, or the server default). */
current: string,
names: string[],
};
export type DbDriver = "sqlite" | "postgres" |
/** MySQL and MariaDB. */
"mysql" |
/** Microsoft SQL Server. */
"sqlServer" | "clickhouse" |
/** Oracle Database (pure-Rust thin driver, no client library). */
"oracle" | "snowflake" | "jdbc";
export type DbDumpContent = "all" | "schemaOnly" | "dataOnly";
export type DbDumpFormat =
/** SQL text, restored with `psql`. */
"plain" | "custom" |
/** A directory of files; the only format `pg_dump` writes in parallel. */
"directory" | "tar";
/** What a restore needs to know about a dump before it runs. */
export type DbDumpInfo = {
kind: DbDumpKind,
/**
* An SQL dump that runs `CREATE DATABASE` itself: `mysqldump --databases` / `--all-databases`,
* or `pg_dump --create`. Archives say `false`; `pg_restore --create` decides for them.
*/
createsDatabase: boolean,
};
/** What made a dump, read from its first bytes (a directory: its `toc.dat`). */
export type DbDumpKind =
/** `pg_dump` custom or tar archive, or a directory archive: `pg_restore`. */
"postgresArchive" |
/** Plain SQL from `pg_dump`: `psql`. */
"postgresSql" |
/** `mysqldump` / `mariadb-dump`: `mysql`. */
"mysqlSql" | "unknown";
export type DbDumpStatements = "copy" | "inserts" | "columnInserts";
/** `schema.table (columns) REFERENCES ref_schema.ref_table (ref_columns)`. */
export type DbForeignKey = {
schema: string,
table: string,
columns: string[],
refSchema: string,
refTable: string,
refColumns: string[],
};
export type DbHistoryEntry = {
text: string,
/** Milliseconds since the Unix epoch. */
time: number | null,
};
export type DbIndexInfo = {
name: string,
unique: boolean,
columns: string[],
};
/** Schemas tab: the databases / schemas the tree shows. Names may use `*` and `?`. */
export type DbIntrospection = DbIntrospection_Serialize | DbIntrospection_Deserialize;
/** Schemas tab: the databases / schemas the tree shows. Names may use `*` and `?`. */
export type DbIntrospection_Deserialize = {
allDatabases?: boolean,
databases?: string[],
allSchemas?: boolean,
schemas?: string[],
/** A database can replace the source's schema rules with all schemas or a list of exact names. */
schemasByDatabase?: { [key in string]: DbSchemaSelection },
/** `pg_catalog`, `information_schema`, `mysql`…, and service databases (`rdsadmin`…). */
showSystem?: boolean,
/** PostgreSQL template databases (`template0`, `template1`). */
showTemplates?: boolean,
/**
* Object filter: the tree lists only tables, views, routines and sequences matching
* one of these patterns (`*`, `?`; separated by commas or spaces). Empty: all.
*/
objectFilter?: string,
};
/** Schemas tab: the databases / schemas the tree shows. Names may use `*` and `?`. */
export type DbIntrospection_Serialize = {
allDatabases: boolean,
databases: string[],
allSchemas: boolean,
schemas: string[],
/** A database can replace the source's schema rules with all schemas or a list of exact names. */
schemasByDatabase?: { [key in string]: DbSchemaSelection },
/** `pg_catalog`, `information_schema`, `mysql`…, and service databases (`rdsadmin`…). */
showSystem: boolean,
/** PostgreSQL template databases (`template0`, `template1`). */
showTemplates: boolean,
/**
* Object filter: the tree lists only tables, views, routines and sequences matching
* one of these patterns (`*`, `?`; separated by commas or spaces). Empty: all.
*/
objectFilter: string,
};
export type DbJdbcDriver = DbJdbcDriver_Serialize | DbJdbcDriver_Deserialize;
export type DbJdbcDriver_Deserialize = {
id: string,
name: string,
/** Data source preset id; absent for a generic JDBC profile. */
vendor?: string | null,
jars: string[],
className: string,
urlTemplate: string,
};
export type DbJdbcDriver_Serialize = {
id: string,
name: string,
/** Data source preset id; absent for a generic JDBC profile. */
vendor?: string | null,
jars: string[],
className: string,
urlTemplate: string,
};
export type DbMysqlOptions = {
/** Empty: the databases the dump names. */
database: string,
/** Runs the remaining statements after an error. */
force: boolean,
};
/** Switches that `mysqldump` turns on by default (`--opt`) only take a flag when turned off. */
export type DbMysqldumpOptions = {
/** Empty: every database. */
databases: string[],
/** Only with exactly one database. */
tables: string[],
addDropTable: boolean,
disableKeys: boolean,
addLocks: boolean,
addDropTrigger: boolean,
noData: boolean,
completeInsert: boolean,
createOptions: boolean,
routines: boolean,
events: boolean,
/** A consistent InnoDB snapshot without locks; needs no RELOAD privilege. */
singleTransaction: boolean,
/** Wins over `single_transaction`. */
lockAllTables: boolean,
/** `None`: the client has no `--masking-policies`. */
maskingPolicies: boolean | null,
};
/** Schema objects other than tables and columns (Go to DDL, Drop). */
export type DbObjectKind = "function" | "procedure" | "package" | "trigger" | "sequence";
/** Options tab: session settings applied to every connection. */
export type DbOptions = {
transaction?: DbTxMode,
/** PostgreSQL `search_path` (unqualified names resolve there). */
defaultSchema?: string,
/** Session time zone (`TimeZone` / `time_zone`); empty keeps the default. */
timeZone?: string,
/** Statements run on every new connection. */
startupScript?: string,
/** Run `SELECT 1` this often while connected. */
keepAliveSecs?: number | null,
/** Disconnect after this long without statements (enforced by the UI, which sees the activity). */
autoDisconnectSecs?: number | null,
/** PostgreSQL: show only the configured database, its schemas right under the data source. */
singleDatabase?: boolean,
};
/** An Oracle package (its procedures and functions are not listed separately). */
export type DbPackageInfo = {
name: string,
};
/** Name lists hold `pg_dump` patterns (`*`, `?`, quoted names). */
export type DbPgDumpOptions = {
format: DbDumpFormat,
statements: DbDumpStatements,
content: DbDumpContent,
schemas: string[],
tables: string[],
excludeTables: string[],
/** Plain format only: archives get DROP / CREATE at restore. */
clean: boolean,
ifExists: boolean,
create: boolean,
noOwner: boolean,
noPrivileges: boolean,
/** Directory format only. */
jobs: number,
};
export type DbPgRestoreOptions = {
content: DbDumpContent,
schemas: string[],
/** Creates the database the archive names; the target is only connected to. */
create: boolean,
clean: boolean,
ifExists: boolean,
noOwner: boolean,
noPrivileges: boolean,
singleTransaction: boolean,
exitOnError: boolean,
/** Ignored with a single transaction, which `pg_restore` cannot split. */
jobs: number,
};
/** One operation of a plan; `parent` indexes the plan's node list (roots: `None`). */
export type DbPlanNode = {
parent: number | null,
/** `Full Scan`, `Index Scan`, `Hash Join`… */
operation: string,
/** The object it works on and its key details (`table: o;`). */
params: string,
properties: DbPlanProperty[],
};
export type DbPlanProperty = {
name: string,
value: string,
};
/**
* Advanced tab: a driver property. PostgreSQL: run-time parameters (and
* `application_name`); MySQL: session variables (and `charset`, `collation`);
* SQLite: pragmas. See [`crate::conn`].
*/
export type DbProperty = {
name?: string,
value?: string,
};
export type DbPsqlOptions = {
singleTransaction: boolean,
stopOnError: boolean,
};
export type DbQueryResult = {
statement: string,
columns: DbResultColumn[],
/** Cell text; `None` is SQL NULL. Binary values are `0x…` hex. */
rows: ((string | null)[])[],
/** Rows changed by a DML statement (`None` for queries). */
affected: number | null,
/** More rows exist beyond the limit. */
hasMore: boolean,
elapsedMs: number | null,
/** Until the server's first answer; the rest of `elapsed_ms` is fetching. */
executionMs: number | null,
};
export type DbResultColumn = {
name: string,
typeName: string,
};
export type DbRoutineInfo = {
name: string,
/** `Function` or `Procedure`. */
kind: DbObjectKind,
arguments: string,
/** Result type of a function. */
returns: string | null,
};
/**
* A pending change of the table editor. `key` identifies the row: its primary
* key columns with their original values.
*/
export type DbRowEdit = { kind: "update"; key: DbCellValue[]; values: DbCellValue[] } | { kind: "insert"; values: DbCellValue[] } | { kind: "delete"; key: DbCellValue[] };
/** A schema object the tree lists by name under a folder of its kind. */
export type DbSchemaObject = {
/** `stage`, `stream`, `task`, `pipe`, `fileFormat`. */
kind: string,
name: string,
/** What the list says about it (a stage's type, a stream's table, a task's schedule). */
detail: string,
};
/** A schema's routines (procedures and functions), packages and sequences. */
export type DbSchemaObjects = {
routines: DbRoutineInfo[],
packages: DbPackageInfo[],
sequences: DbSequenceInfo[],
/** Objects of kinds only some databases have (Snowflake stages, streams, tasks…). */
others?: DbSchemaObject[],
};
export type DbSchemaSelection = {
all?: boolean,
names?: string[],
};
export type DbSequenceInfo = {
name: string,
dataType: string,
};
/** What a Snowflake session computes with and acts as, and what it may switch to. */
export type DbSessionContext = {
/** Empty: no warehouse is in use. */
warehouse: string,
role: string,
warehouses: string[],
roles: string[],
};
/**
* Snowflake connection settings beyond the shared ones: the account identifier is
* [`DataSource::host`], the schema [`DbOptions::default_schema`].
*/
export type DbSnowflake = {
warehouse?: string,
role?: string,
auth?: DbSnowflakeAuth,
/**
* PEM private key of [`DbSnowflakeAuth::KeyPair`]; `~/` is the home directory. Only the
* path is stored: the key is read from the file at each login.
*/
privateKeyFile?: string,
};
/**
* How a Snowflake data source signs in. The data source's one saved secret is what the
* method needs: the private key's passphrase, the password, or the token.
*/
export type DbSnowflakeAuth =
/** RSA key pair: a JWT signed with the private key file. */
"keyPair" |
/** User name and password. */
"password" |
/** Programmatic access token. */
"token" |
/** OAuth access token. */
"oAuth" |
/** Single sign-on in the web browser. */
"browser";
export type DbSortKey = {
column: string,
descending: boolean,
};
/** What introspection has read of a data source. */
export type DbSourceCatalog = {
databases?: DbCatalogDatabase[],
};
/** Connect through an SSH tunnel: the database host and port are reached from `host`. */
export type DbSsh = {
enabled?: boolean,
/** A Settings › SSH Configurations id to connect with; empty = the fields below. */
config?: string,
/** Host name, or a `Host` alias of `~/.ssh/config` with [`DbSshAuth::OpenSsh`]. */
host?: string,
port?: number | null,
user?: string,
auth?: SshAuth,
/** Private key for [`DbSshAuth::KeyPair`]; `~/` is the home directory. */
keyFile?: string,
/** Keep the SSH password / key passphrase in the saved passwords. */
saveSecret?: boolean,
};
export type DbSslMode = "disable" | "prefer" | "require" |
/** Require, and check the server certificate against the CA file. */
"verifyCa" |
/** [`DbSslMode::VerifyCa`], and check that the certificate names the host. */
"verifyFull";
/** One statement of a console run. */
export type DbStatementOutcome = {
statement: SqlStatement,
result: DbQueryResult | null,
error: string | null,
};
export type DbTableDetails = {
columns: DbColumnInfo[],
indexes: DbIndexInfo[],
foreignKeys: DbForeignKey[],
triggers: DbTriggerInfo[],
};
export type DbTableInfo = {
name: string,
kind: DbTableKind,
};
export type DbTableKind = "table" | "view" | "materializedView";
export type DbTablePage = {
result: DbQueryResult,
details: DbTableDetails,
offset: number | null,
};
export type DbTool = "pgDump" | "pgRestore" | "psql" | "mysqldump" | "mysql";
/** An installed copy of a tool. */
export type DbToolInstall = {
path: string,
/** First line of `--version`, e.g. `pg_dump (PostgreSQL) 17.2`. */
version: string,
};
/** A run of a client tool: which one, the file it writes or reads, and its options. */
export type DbToolJob = { tool: "pgDump"; file: string; options: DbPgDumpOptions } |
/** `file`: an archive, or a directory archive. */
{ tool: "pgRestore"; file: string; options: DbPgRestoreOptions } | { tool: "psql"; file: string; options: DbPsqlOptions } | { tool: "mysqldump"; file: string; options: DbMysqldumpOptions } |
/** `file` goes to the standard input. */
{ tool: "mysql"; file: string; options: DbMysqlOptions };
/** A line the tool wrote. */
export type DbToolLine = {
stderr: boolean,
text: string,
};
export type DbTriggerInfo = {
name: string,
/** `before`, `after`, `instead of`. */
timing: string,
/** `insert`, `update or delete`… */
events: string,
};
/** Transaction control of the data source's consoles. */
export type DbTxMode = "auto" | "manual";
export type DbVisibilityChange = { kind: "databases"; selection: DbSchemaSelection } | { kind: "schemas"; selection: DbSchemaSelection } | { kind: "databaseSchemas"; database: string; selection: DbSchemaSelection | null };
/** What a session's adapter supports, for enabling actions. */
export type DebugCapabilities = {
restartFrame: boolean,
stepInTargets: boolean,
functionBreakpoints: boolean,
dataBreakpoints: boolean,
/** `setVariable` or `setExpression`. */
setValue: boolean,
conditionalBreakpoints: boolean,
hitConditionalBreakpoints: boolean,
logPoints: boolean,
/** HotSwap ("Reload Changed Classes"): java-debug's `redefineClasses` request. */
hotCodeReplace: boolean,
/**
* The session debugs a JVM, so it has a Memory view; [`DebugManager::jvm_memory_classes`]
* says why when it has no data (platform, remote JVM, ...).
*/
jvmMemory: boolean,
/**
* The session has a JVM inspector: instances, fields and referrers while suspended. Can
* change during the session ([`ide_core::event::DebugEvent::Capabilities`]).
*/
jvmInstances: boolean,
/** The session can be asked for a heap dump ([`DebugManager::jvm_heap_dump`]). */
jvmHeap: boolean,
/**
* The session debugs a page in a browser: js-debug's requests for pages apply
* ([`DebugManager::js_set_custom_breakpoints`]).
*/
jsPage: boolean,
/** The adapter evaluates expressions while the program runs, without a stack frame. */
liveEvaluate: boolean,
/**
* A stream chain can be traced while the program runs it ([`DebugManager::stream_trace`]).
* Can change during the session, like `jvm_instances`.
*/
streamTrace: boolean,
};
/** A completion the adapter offers for an expression (DAP `completions`). */
export type DebugCompletion = {
label: string,
/** What to insert, when it differs from `label`. */
text: string | null,
/** DAP item type: `method`, `field`, `variable`, `class`, `keyword`, … */
kind: string | null,
detail: string | null,
sortText: string | null,
};
export type DebugEvent =
/**
* First event of every session (only build output of a root session's
* `cargo` step can precede it). `parent` is set for adapter-started child sessions.
*/
{ kind: "started"; name: string; adapter: string; parent: DebugSessionId | null } | { kind: "initialized" } | { kind: "stopped"; threadId: number; reason: string; description: string | null; allThreadsStopped: boolean } | { kind: "continued"; threadId: number; allThreadsContinued: boolean } | { kind: "output"; category: string; output: string } | { kind: "thread"; threadId: number; started: boolean } |
/**
* The program runs in a terminal the IDE gave it (`runInTerminal`): what is typed for it
* in the debug console reaches its input.
*/
{ kind: "programInput" } | { kind: "breakpointsChanged"; path: IpcPath } | { kind: "terminated" } | { kind: "exited"; code: number } |
/**
* java-debug's `hotcodereplace` event: `change_type` is `BUILD_COMPLETE` (classes
* changed and can be reloaded), `STARTING`, `END`, `WARNING` or `ERROR`.
*/
{ kind: "hotCodeReplace"; changeType: string; message: string } |
/**
* `flutter debug_adapter`'s `flutter.appStarted` event (launch and attach): the session is
* a Flutter app that can take a hot reload now. The plain Dart adapter never sends it.
*/
{ kind: "flutterAppStarted" } |
/** The VM Service of a Flutter session's app, which DevTools connects to. */
{ kind: "flutterVmService"; uri: string;
/** The Flutter device the app runs on. */
device: string | null } |
/** Flutter's inspector selected a widget: its source, 0-based. */
{ kind: "flutterNavigate"; path: IpcPath; line: number; column: number } |
/** The session's capabilities changed after it started: fetch them again. */
{ kind: "capabilities" } |
/**
* The adapter's `invalidated` event: what it shows for `areas` (`all`, `stacks`, `threads`,
* `variables`; empty means all) is stale and has to be fetched again.
*/
{ kind: "invalidated"; areas: string[] } | { kind: "jvmBackend"; state: JvmBackendState } |
/** A step in the life of one request of a debugged page. */
{ kind: "jsNetwork"; event: JsNetworkEvent } |
/** The adapter does not report the requests of this page: there will be no `JsNetwork`. */
{ kind: "jsNetworkUnavailable" };
/** A debug adapter session. */
export type DebugSessionId = number;
/** Build, Execution, Deployment › Debugger (+ Data Views, Stepping, Python Debugger). */
export type DebuggerSettings = {
showOnBreakpoint?: boolean,
focusAppOnBreakpoint?: boolean,
hideOnTermination?: boolean,
/** A breakpoint or exception hit brings the Debug tool window's Threads & Variables tab to the front. */
variablesOnBreakpoint?: boolean,
breakpointsAnyFile?: boolean,
/** While suspended, hovering the start of a line shows a Run to Cursor button. */
runToCursorInlay?: boolean,
inlineValues?: boolean,
/** Data Views: list variables by name instead of the adapter's order. */
sortValues?: boolean,
/** Data Views: evaluate watches while the program runs, where the debugger can (JavaScript). */
liveWatches?: boolean,
valueTooltip?: boolean,
/** While suspended, selecting an expression shows its value. */
valueTooltipOnSelection?: boolean,
valueTooltipDelay?: number,
/** Stepping: do not step into library code (debugpy `justMyCode`, js-debug `skipFiles`). */
skipLibraryCode?: boolean,
/** JavaScript: debugging a dev server (`vite`, `next dev`) also opens its page in a browser session. */
debugServerPage?: boolean,
/** Flutter: saving a Dart file of a running debug session hot reloads the app. */
flutterHotReloadOnSave?: boolean,
python?: PythonDebuggerSettings,
};
/** An editor decoration. */
export type Decoration = {
range: Range,
style: string,
hover: string | null,
after: string | null,
};
/** A plugin-owned editor or project-tree decoration set for one file. */
export type DecorationSet = {
root: IpcPath,
path: IpcPath,
setId: string,
tree: boolean,
items: Decoration[],
file: FileDecoration | null,
};
/** A deleted local branch, enough to restore it (IDEA's "Restore" notification action). */
export type DeletedBranch = {
name: string,
/** The commit the branch pointed at. */
tip: string,
/** Its upstream (`origin/x`), restored with it. */
upstream: string | null,
/** It was not fully merged: its own commits are now unreachable from any branch. */
unmerged: boolean,
};
export type DeletedFile = {
path: IpcPath,
id: string,
};
/** A deleted tag, enough to restore it (Restore in the tag-deleted notification). */
export type DeletedTag = {
name: string,
/** What the tag pointed at: its tag object (annotated tags) or commit. */
target: string,
};
/**
* Paths and contents captured for one delete operation. Directory history is
* intentionally broader and can contain paths deleted in an earlier operation.
*/
export type DeletionUndo = {
directories: IpcPath[],
files: DeletedFile[],
skipped: IpcPath[],
};
export type Dependency = {
id: string,
name: string,
description: string,
};
export type DependencyGroup = {
name: string,
items: Dependency[],
};
/** A plugin another one requires. */
export type DependencyInfo = {
id: string,
/** The installed plugin's name, when it is installed. */
name: string | null,
/** The requirement as written (`^0.2`). */
version: string | null,
optional: boolean,
state: DependencyState,
};
/** Dependency scope for a module dependency or project library (IDEA's Modules › Dependencies). */
export type DependencyScope = "compile" | "test" | "runtime" | "provided";
/** How one dependency stands right now, for the plugin details page. */
export type DependencyState = "satisfied" | "missing" | "disabled" |
/** Installed, wrong version. */
"version" |
/** Installed and enabled, but cannot run itself. */
"blocked";
export type DependencyUpdate = {
latest: string,
replacement: string,
};
export type DependencyVersions = {
dependency: ManifestDependency,
versions: string[],
update: DependencyUpdate | null,
};
/** A plugin that needs another one. */
export type DependentInfo = {
id: string,
name: string,
/** Switched off by the user: disabling the plugin it needs changes nothing for it. */
enabled: boolean,
};
/** Where a local file is deployed. */
export type DeployedPath = {
server: string,
remotePath: string,
webUrl: string | null,
};
/**
* Mapping eligibility uses a common synthetic server root: mapping and exclusion
* paths are both relative to that root, so checking never opens a connection.
*/
export type DeploymentCoverage = {
server: string,
paths: string[],
skipped: TransferError[],
};
/** Named set of deployment servers that files are uploaded to together. */
export type DeploymentGroup = {
id?: string,
name?: string,
/** [`DeploymentServer::id`]s, in upload order. */
servers?: string[],
};
/** Local files to compare with a deployment server (Sync with Deployed). */
export type DeploymentLaunch = {
/** Deployment server id. */
server: string,
paths: IpcPath[],
};
export type DeploymentMapping = {
/** Project-relative folder, or absolute inside the project; empty = the project root. */
local?: string,
/** Remote folder, relative to the server root (a leading `/` is the root too). */
deployment?: string,
/** Web path, relative to the server's URL. */
web?: string,
};
/** Resolved root and project mappings of the Remote Host browser. */
export type DeploymentRoot = {
root: string,
mappings: ResolvedMapping[],
};
/** A deployment filesystem and how project folders map onto it. */
export type DeploymentServer = {
kind?: DeploymentType,
id?: string,
name?: string,
/** [`SshConfiguration::id`]. */
sshConfig?: string,
/** FTP / FTPS servers. */
ftp?: FtpConnection,
/** Absolute remote folder the mappings are relative to; empty = the login directory. */
rootPath?: string,
/** Web server URL of the root (Open in Browser on the deployed file). */
webUrl?: string,
mappings?: DeploymentMapping[],
/** Remote paths (relative to the root) never touched. */
excludedPaths?: string[],
};
/** Build, Execution, Deployment › Deployment (and its Options page). */
export type DeploymentSettings = {
servers?: DeploymentServer[],
/** Server groups: Upload to… on a group uploads to each of its servers. */
groups?: DeploymentGroup[],
/** Server used by Upload / Download / Sync and automatic upload; empty = none. */
defaultServer?: string,
autoUpload?: AutoUpload,
/** Delete remote files when their local file is deleted (automatic upload). */
deleteRemote?: boolean,
/** Keep local modification times on uploaded files. */
preserveTimestamps?: boolean,
/** File names never uploaded or downloaded (`*` and `?` wildcards; `;`-separated in the UI). */
exclude?: string[],
};
export type DeploymentType = "sftp" | "ftp" |
/** FTP secured with `AUTH TLS` (explicit FTPS). */
"ftps" | "local";
export type Diagnostic = {
range: Range,
severity: Severity,
message: string,
/** Producer, e.g. `rust-analyzer`, `eslint`. */
source: string | null,
code: string | null,
unnecessary?: boolean,
deprecated?: boolean,
/**
* Language server (or tool) that reported it, e.g. `basedpyright`; `source`
* is what the producer calls itself. Inspection profiles key on this.
*/
server?: string | null,
};
/** The two files of a command-line diff (`openidea diff a.txt b.txt`), both sides editable. */
export type DiffFilesLaunch = {
left: IpcPath,
right: IpcPath,
};
/** The diff a diff window shows (IDEA's "Show Diff in New Window"), from the UI's `DiffData`. */
export type DiffLaunch = DiffLaunch_Serialize | DiffLaunch_Deserialize;
/** The diff a diff window shows (IDEA's "Show Diff in New Window"), from the UI's `DiffData`. */
export type DiffLaunch_Deserialize = {
/** Absolute path of the file (the right side's path). */
path: string,
left: DiffSide_Deserialize,
right: DiffSide_Deserialize,
/** 0-based line of the right side to reveal. */
line?: number | null,
};
/** The diff a diff window shows (IDEA's "Show Diff in New Window"), from the UI's `DiffData`. */
export type DiffLaunch_Serialize = {
/** Absolute path of the file (the right side's path). */
path: string,
left: DiffSide_Serialize,
right: DiffSide_Serialize,
/** 0-based line of the right side to reveal. */
line?: number | null,
};
/** One side of a diff window's comparison (the UI's `DiffSide`, `diffInput.ts`). */
export type DiffSide = DiffSide_Serialize | DiffSide_Deserialize;
/** One side of a diff window's comparison (the UI's `DiffSide`, `diffInput.ts`). */
export type DiffSide_Deserialize =
/** File content at a Git revision (`HEAD`, `:0` = index, a commit id). */
({ type: "rev"; rev: string; path?: string | null; label?: string | null }) & { id?: never; labelDetail?: never; text?: never } |
/** The working file (unsaved editor buffer included). */
({ type: "worktree"; label?: string | null; labelDetail?: string | null }) & { id?: never; path?: never; rev?: never; text?: never } |
/** Another file (Compare With…, Compare Files). */
({ type: "file"; path: string; label?: string | null }) & { id?: never; labelDetail?: never; rev?: never; text?: never } |
/** Literal text, such as clipboard contents or an editor selection. */
({ type: "text"; text: string; label: string; labelDetail?: string | null }) & { id?: never; path?: never; rev?: never } |
/** A Local History revision. */
({ type: "history"; id: string; label: string }) & { labelDetail?: never; path?: never; rev?: never; text?: never };
/** One side of a diff window's comparison (the UI's `DiffSide`, `diffInput.ts`). */
export type DiffSide_Serialize =
/** File content at a Git revision (`HEAD`, `:0` = index, a commit id). */
({ type: "rev"; rev: string; path?: string | null; label?: string | null }) & { id?: never; labelDetail?: never; text?: never } |
/** The working file (unsaved editor buffer included). */
({ type: "worktree"; label?: string | null; labelDetail?: string | null }) & { id?: never; path?: never; rev?: never; text?: never } |
/** Another file (Compare With…, Compare Files). */
({ type: "file"; path: string; label?: string | null }) & { id?: never; labelDetail?: never; rev?: never; text?: never } |
/** Literal text, such as clipboard contents or an editor selection. */
({ type: "text"; text: string; label: string; labelDetail?: string | null }) & { id?: never; path?: never; rev?: never } |
/** A Local History revision. */
({ type: "history"; id: string; label: string }) & { labelDetail?: never; path?: never; rev?: never; text?: never };
export type DirectoryCompareEntry = {
path: string,
status: DirectoryCompareStatus,
leftKind: EntryKind | null,
rightKind: EntryKind | null,
leftLink?: string | null,
rightLink?: string | null,
/** File sizes in bytes; directories and symlinks have none. */
leftSize?: number | null,
rightSize?: number | null,
/** Last modification, milliseconds since the Unix epoch. */
leftModified?: number | null,
rightModified?: number | null,
};
/** What makes two files equal (IDEA's "Compare by"). */
export type DirectoryCompareMode =
/** Identical bytes. */
"content" |
/** The same text once decoded, whatever the encoding, BOM or line separators. */
"text" | "size" | "sizeAndTimestamp";
export type DirectoryCompareProgress = {
scanned: number,
compared: number,
total: number | null,
bytesRead: number | null,
path: string,
};
export type DirectoryCompareStatus = "leftOnly" | "rightOnly" | "different" | "equal";
/** Changes under a folder (Show History on a directory). */
export type DirectoryHistory = DirectoryHistory_Serialize | DirectoryHistory_Deserialize;
/** Changes under a folder (Show History on a directory). */
export type DirectoryHistory_Deserialize = {
/** Snapshots of files under the folder and labels, newest first. */
entries: HistoryEntry_Deserialize[],
/** Files with history that no longer exist on disk. */
deleted: IpcPath[],
};
/** Changes under a folder (Show History on a directory). */
export type DirectoryHistory_Serialize = {
/** Snapshots of files under the folder and labels, newest first. */
entries: HistoryEntry_Serialize[],
/** Files with history that no longer exist on disk. */
deleted: IpcPath[],
};
/** One row's synchronisation, applied by [`DirectorySyncOperation`] batches. */
export type DirectorySyncAction = "copyToLeft" | "copyToRight" | "deleteLeft" | "deleteRight";
export type DirectorySyncFailure = {
path: string,
action: DirectorySyncAction,
message: string,
};
export type DirectorySyncOperation = {
/** Relative to both comparison roots. */
path: string,
action: DirectorySyncAction,
/** A copy may replace what is already at the destination (confirmed by the user). */
overwrite: boolean,
};
export type DirectorySyncProgress = {
done: number,
total: number,
path: string,
};
/** See [`IdeEvent::Direnv`]. */
export type DirenvStatus =
/** `direnv` is not installed (on the search path). */
{ kind: "notInstalled" } |
/** direnv refuses the `.envrc` until the user approves it with `direnv allow`. */
{ kind: "blocked" } |
/** `direnv export` failed or took too long: what it printed last. */
{ kind: "failed"; message: string } |
/** `.envrc`, `flake.nix` or `flake.lock` (a file name in the project root) changed. */
{ kind: "changed"; file: string };
export type DiscoveredProject = {
path: IpcPath,
root: IpcPath,
relative_path: string,
};
/** Checking out remote `origin/x` while local `x` has commits `origin/x` lacks. */
export type DivergedLocal =
/** Rebase local `x` onto `origin/x` (IDEA "Rebase onto Remote"). */
"rebase" |
/** Reset local `x` to `origin/x` (IDEA "Drop Local Commits"). */
"reset";
/** An open document buffer. */
export type DocId = number;
/** Whether docker can be used, and why not. */
export type DockerAvailability = { kind: "ready"; clientVersion: string; serverVersion: string;
/** Active docker context (`default`, `orbstack`, `desktop-linux`…). */
context: string | null } |
/** No `docker` executable was found. */
{ kind: "notInstalled" } |
/** The CLI is there but cannot reach a daemon (not started, wrong context…). */
{ kind: "daemonDown"; message: string; context: string | null };
export type DockerConnection = {
id: string,
name: string,
endpoint: DockerEndpoint,
};
export type DockerContainer = {
id: string,
name: string,
image: string,
command: string,
/** `running`, `exited`, `paused`, `created`, `restarting`, `removing`, `dead`. */
state: string,
/** Human status, e.g. `Up 2 hours (healthy)`. */
status: string,
ports: string,
createdAt: string,
/** `com.docker.compose.project` label. */
composeProject: string | null,
composeService: string | null,
/** `com.docker.compose.project.working_dir` label. */
composeWorkingDir: string | null,
/** `com.docker.compose.project.config_files` label (comma-separated in docker). */
composeFiles: string[],
/** Mounted volume names or host paths reported by `docker ps` (`Mounts`). */
mounts?: string[],
/** Connected network names reported by `docker ps` (`Networks`). */
networks?: string[],
/** User and tool labels assigned to the container. */
labels?: { [key in string]: string },
};
/** Live resource metrics returned by `docker stats --no-stream --no-trunc --format '{{json .}}'`. */
export type DockerContainerStats = {
cpuPerc: string,
memUsage: string,
memPerc: string,
netIo: string,
blockIo: string,
pids: string,
};
/** Which daemon a docker command talks to. */
export type DockerEndpoint =
/** Whatever the CLI is configured for (`DOCKER_HOST`, the current context). */
{ kind: "default" } |
/** A local daemon socket, e.g. `/var/run/docker.sock` (or a `npipe://` URL on Windows). */
{ kind: "socket"; path: string } |
/**
* A remote daemon, e.g. `tcp://build:2376` or `ssh://me@build`; with TLS when
* `tls_cert_dir` holds `ca.pem`, `cert.pem` and `key.pem`.
*/
{ kind: "tcp"; host: string; tlsCertDir: string | null } |
/** A named `docker context`. */
{ kind: "context"; name: string } |
/**
* A daemon on the host of an SSH configuration (Settings › Tools › SSH Configurations),
* reached with the IDE's own SSH client and its saved credentials. The host resolves it to
* a local [`DockerEndpoint::Tcp`] tunnel before running docker; unresolved, the CLI is
* pointed at an address it rejects rather than at another daemon.
*/
{ kind: "ssh"; config: string };
/** One relevant `docker events` entry. */
export type DockerEvent = {
/** `container`, `image`, `volume`, `network`. */
object: string,
action: string,
id: string,
name: string | null,
};
export type DockerImage = {
id: string,
/** `<none>` for dangling images. */
repository: string,
tag: string,
size: string,
createdSince: string,
};
/** One layer in `docker image history --no-trunc --format '{{json .}}'`. */
export type DockerImageLayer = {
id: string,
createdBy: string,
size: string,
createdSince: string,
createdAt: string,
comment: string,
};
/** A line of `docker logs` output. */
export type DockerLogLine = {
stderr: boolean,
text: string,
};
export type DockerNetwork = {
id: string,
name: string,
driver: string,
scope: string,
composeProject: string | null,
createdAt?: string,
ipv6?: boolean,
internal?: boolean,
labels?: { [key in string]: string },
};
export type DockerObject = "container" | "image" | "volume" | "network";
/** Process table returned by `docker top <container>`. */
export type DockerProcessList = {
titles: string[],
processes: string[][],
};
/** A registry to log in to (Docker Hub, GHCR, a private one). The password is stored separately. */
export type DockerRegistry = {
id: string,
name: string,
/** `docker.io`, `ghcr.io`, `registry.example.com:5000`. */
address: string,
username?: string,
};
export type DockerSettings = {
connections?: DockerConnection[],
registries?: DockerRegistry[],
};
/** Everything the Services tree shows, fetched in one go. */
export type DockerSnapshot = {
availability: DockerAvailability,
/** The docker executable in use, e.g. for `docker exec -it` in a terminal. */
executable: string | null,
containers: DockerContainer[],
images: DockerImage[],
volumes: DockerVolume[],
networks: DockerNetwork[],
/** Lists that failed although the daemon answered (shown, not fatal). */
errors: string[],
/** Global CLI options selecting the connection's daemon (for `docker exec` in a terminal). */
globalArgs?: string[],
};
export type DockerVolume = {
name: string,
driver: string,
mountpoint: string,
composeProject: string | null,
scope?: string,
labels?: { [key in string]: string },
};
/** Local changes accepted by the editor's shared document model. */
export type DocumentChanged = {
path: string,
/**
* The open project `path` is relative to, set when the event is handed to a plugin
* (the editor posts the absolute path and `null`).
*/
project: string | null,
baseVersion: number,
version: number,
changes: DocumentTextChange[],
};
/** Encoding and BOM currently applied to an open document. */
export type DocumentEncoding = {
encoding: string,
hasBom: boolean,
};
/** What the UI needs to show an opened document. */
export type DocumentInfo = {
id: DocId,
path: IpcPath,
text: string,
version: number,
language: LanguageId,
encoding: string,
hasBom: boolean,
lineEnding: LineEnding,
readOnly: boolean,
dirty: boolean,
/**
* Whether "Reload with Encoding" can re-decode this document's source
* bytes: true for files and virtual documents the backend can re-read
* (archive entries, JDT sources with an editable attachment encoding,
* Git revisions); false for server-generated content (decompiled code).
*/
canReloadEncoding: boolean,
/**
* Larger than `ide_vfs::LARGE_FILE_THRESHOLD`: language servers, syntax
* structure and folding are disabled; the editor should drop heavy features.
*/
large?: boolean,
/** Effective `.editorconfig` properties, when any section applies. */
editorconfig?: EditorConfigProps | null,
/**
* Set for read-only virtual documents (library classes a language server
* provides, e.g. `jdt://…`); `path` then holds the same URI.
*/
uri?: string | null,
/**
* CodeMirror mode replacing the language's own one (an Angular project's
* HTML templates).
*/
uiMode?: string | null,
};
/** The language and CodeMirror mode a file is shown with, like `DocumentInfo`. */
export type DocumentLanguage = {
language: LanguageId,
/** CodeMirror mode replacing the language's own one (`DocumentInfo::ui_mode`). */
uiMode?: string | null,
};
/**
* A link in a document (`textDocument/documentLink`): an HTML `href`, a
* Markdown link, an `#include`, a JSON `$schema`…
*/
export type DocumentLink = {
range: Range,
/** A `file:` target. */
path: IpcPath | null,
/** The `#fragment` of a `file:` target (`L12`, `L12,5`, a heading or element id). */
fragment: string | null,
/** Any other target (`https:`, …). */
url: string | null,
tooltip: string | null,
};
/** One UTF-16 replacement in a locally edited editor document. */
export type DocumentTextChange = {
from: number,
to: number,
insert: string,
};
/** One file of a [`remote_download_local`] transfer starting: `done` of `total` files are finished. */
export type DownloadProgress = {
path: string,
done: number,
total: number,
};
export type DuplicateGroup = {
tokens: number,
/** Lines of the first fragment. */
lines: number,
language: LanguageId,
fragments: Fragment[],
};
export type DuplicateOptions = {
/** Shortest duplicate reported, in tokens. */
minTokens: number,
/** Treat all identifiers as equal (finds copies with renamed variables). */
anonymizeIdentifiers: boolean,
/** Treat all literals as equal. */
anonymizeLiterals: boolean,
};
export type DuplicatesReport = {
groups: DuplicateGroup[],
/** Files tokenised (files without a grammar are skipped). */
files: number,
tokens: number,
/** More groups were found than reported. */
truncated: boolean,
cancelled: boolean,
elapsedMs: number,
};
/** An item of a frontend-listed menu slot. */
export type DynamicItem = {
action: string,
arg: string | null,
label: string,
/** Drawn with a check mark in this state; `None` for a plain item. */
checked?: boolean | null,
};
/** Editor › General › Appearance. */
export type EditorAppearanceSettings = {
caretBlinking?: boolean,
/** Blink period in ms. */
caretBlinkPeriod?: number,
/** Fade the caret in and out instead of toggling it; rounds its corners. */
smoothCaretBlinking?: boolean,
blockCaret?: boolean,
/** Animate the caret between positions when it is moved. */
smoothCaretMovement?: boolean,
/** Smooth caret movement curve: `snappy` | `gliding`. */
caretMovementStyle?: string,
lineNumbers?: boolean,
/** Gutter numbering: `absolute` | `relative` | `hybrid` (absolute on the caret line, distances elsewhere). */
lineNumberMode?: string,
methodSeparators?: boolean,
/** Sub-options of `editor.showWhitespace`. */
whitespaceLeading?: boolean,
whitespaceInner?: boolean,
whitespaceTrailing?: boolean,
indentGuides?: boolean,
/** Colour indent guides by depth (`--syn-rainbow-*`), while `indent_guides` is on. */
rainbowIndentGuides?: boolean,
/** Right margin and visual guides from Code Style. */
hardWrapGuides?: boolean,
intentionBulb?: boolean,
/**
* Draw doc comments (Javadoc, KDoc, JSDoc, rustdoc) as rendered documentation
* instead of their source, as IDEA's option of the same name. View › Active
* Editor › Render Documentation Comments overrides this for one editor.
*/
renderDocComments?: boolean,
/** Distraction Free Mode: width of the centred text column, in characters. */
distractionFreeWidth?: number,
};
/**
* Effective EditorConfig properties of one file. `None` = not specified
* (or `unset`), so the IDE setting applies.
*/
export type EditorConfigProps = {
indentStyle: IndentStyle | null,
/** Columns per indentation level (`indent_size = tab` resolves to `tab_width`). */
indentSize: number | null,
tabWidth: number | null,
endOfLine: LineEnding | null,
/** `utf-8`, `utf-8-bom`, `utf-16le`, `utf-16be` or `latin1`. */
charset: string | null,
trimTrailingWhitespace: boolean | null,
insertFinalNewline: boolean | null,
maxLineLength: number | null,
};
/** Editor › General (mouse, scrolling, soft wraps, virtual space, saving). */
export type EditorGeneralSettings = {
/** Change font size with ⌘ + mouse wheel. */
wheelZoom?: boolean,
/** Scope of ⌘ + mouse wheel font zoom: `active` editor | `all` editors. */
wheelZoomScope?: string,
markdownImageFolder?: string,
markdownImageNamePattern?: string,
/** Drag-and-drop of selected text inside the editor. */
dragAndDrop?: boolean,
/** When the caret moves out of view: `minimize` scrolling | `center` the caret line. */
caretScroll?: string,
/** Glob patterns (`;`-separated) of files soft-wrapped when `editor.softWrap` is on. */
softWrapFiles?: string,
/** Wrapped parts keep the original line's indent. */
softWrapIndent?: boolean,
/** Show virtual space at the file bottom. */
scrollPastEnd?: boolean,
/** Remove trailing spaces on save from: `modified` lines | `all` lines. */
stripTrailingScope?: string,
/** Keep trailing spaces on the caret line when stripping. */
keepTrailingOnCaretLine?: boolean,
removeTrailingBlankLines?: boolean,
/** Copy as rich text (HTML with syntax colours) by default. */
richTextCopy?: boolean,
};
/**
* What a lightweight editor window shows: a file, with optional caret / selection (0-based), or
* the tab of another editor kind.
*/
export type EditorLaunch = EditorLaunch_Serialize | EditorLaunch_Deserialize;
/**
* What a lightweight editor window shows: a file, with optional caret / selection (0-based), or
* the tab of another editor kind.
*/
export type EditorLaunch_Deserialize = {
path?: IpcPath | null,
/** The tab's editor input, as JSON. */
input?: string | null,
line?: number | null,
column?: number | null,
endLine?: number | null,
endColumn?: number | null,
};
/**
* What a lightweight editor window shows: a file, with optional caret / selection (0-based), or
* the tab of another editor kind.
*/
export type EditorLaunch_Serialize = {
path?: IpcPath | null,
/** The tab's editor input, as JSON. */
input?: string | null,
line?: number | null,
column?: number | null,
endLine?: number | null,
endColumn?: number | null,
};
export type EditorSettings = EditorSettings_Serialize | EditorSettings_Deserialize;
export type EditorSettings_Deserialize = {
fontFamily?: string,
fontSize?: number | null,
lineHeight?: number | null,
tabSize?: number,
insertSpaces?: boolean,
softWrap?: boolean,
showWhitespace?: boolean,
inlayHints?: boolean,
stickyScroll?: boolean,
formatOnSave?: boolean,
/** Editor colour scheme id; `theme-default` follows the IDE theme. */
colorScheme?: string,
/** Imported editor schemes, stored in user settings. */
customSchemes?: { [key in string]: CustomColorScheme_Deserialize },
/** Color Scheme edits: scheme id → attribute id → override. */
colorOverrides?: { [key in string]: { [key in string]: TextAttributesOverride_Deserialize } },
/**
* Color Scheme › Language Defaults › Semantic highlighting: local variables and
* parameters get a colour derived from their name (IDEA's rainbow identifiers).
*/
semanticHighlighting?: boolean,
/**
* Docstring markup format whose tags and keywords the Python editor highlights
* (`plain`, `rest`, `epytext`, `google`, `numpy`).
*/
docstringFormat?: string,
/** Color Scheme › Language Defaults › Rainbow brackets: `()`, `[]`, `{}` coloured by depth. */
rainbowBrackets?: boolean,
/** The bracket kinds rainbow brackets colour. */
rainbowBracketKinds?: RainbowBracketKinds,
/** Colours the rainbow bracket depth cycles through (2–5). */
rainbowBracketColors?: number,
ligatures?: boolean,
/** Editor › Font and Tools › Terminal › Font: the font pickers list only monospaced fonts. */
onlyMonospacedFonts?: boolean,
/** Fallback font for glyphs the main font lacks; empty = none. */
fallbackFont?: string,
/** Typography Settings › Main font weight (CSS 100–900), as IDEA. */
fontWeight?: number,
/** Typography Settings › Bold font weight: wherever the editor renders bold. */
boldFontWeight?: number,
general?: EditorGeneralSettings,
appearance?: EditorAppearanceSettings,
breadcrumbs?: BreadcrumbsSettings,
completion?: CompletionSettings,
autoImport?: AutoImportSettings,
folding?: FoldingSettings,
tabs?: EditorTabsSettings,
smartKeys?: SmartKeysSettings,
codeEditing?: CodeEditingSettings,
inlay?: InlayHintsSettings,
inlineCompletion?: InlineCompletionSettings,
/** Gutter icon groups turned off (`run`, `breakpoints`, `bookmarks`, `vcs`, `blame`). */
gutterIconsDisabled?: string[],
showGutterIcons?: boolean,
codeStyle?: CodeStyleSettings_Deserialize,
encodings?: EncodingSettings,
};
export type EditorSettings_Serialize = {
fontFamily: string,
fontSize: number | null,
lineHeight: number | null,
tabSize: number,
insertSpaces: boolean,
softWrap: boolean,
showWhitespace: boolean,
inlayHints: boolean,
stickyScroll: boolean,
formatOnSave: boolean,
/** Editor colour scheme id; `theme-default` follows the IDE theme. */
colorScheme: string,
/** Imported editor schemes, stored in user settings. */
customSchemes: { [key in string]: CustomColorScheme_Serialize },
/** Color Scheme edits: scheme id → attribute id → override. */
colorOverrides: { [key in string]: { [key in string]: TextAttributesOverride_Serialize } },
/**
* Color Scheme › Language Defaults › Semantic highlighting: local variables and
* parameters get a colour derived from their name (IDEA's rainbow identifiers).
*/
semanticHighlighting: boolean,
/**
* Docstring markup format whose tags and keywords the Python editor highlights
* (`plain`, `rest`, `epytext`, `google`, `numpy`).
*/
docstringFormat: string,
/** Color Scheme › Language Defaults › Rainbow brackets: `()`, `[]`, `{}` coloured by depth. */
rainbowBrackets: boolean,
/** The bracket kinds rainbow brackets colour. */
rainbowBracketKinds: RainbowBracketKinds,
/** Colours the rainbow bracket depth cycles through (2–5). */
rainbowBracketColors: number,
ligatures: boolean,
/** Editor › Font and Tools › Terminal › Font: the font pickers list only monospaced fonts. */
onlyMonospacedFonts: boolean,
/** Fallback font for glyphs the main font lacks; empty = none. */
fallbackFont: string,
/** Typography Settings › Main font weight (CSS 100–900), as IDEA. */
fontWeight: number,
/** Typography Settings › Bold font weight: wherever the editor renders bold. */
boldFontWeight: number,
general: EditorGeneralSettings,
appearance: EditorAppearanceSettings,
breadcrumbs: BreadcrumbsSettings,
completion: CompletionSettings,
autoImport: AutoImportSettings,
folding: FoldingSettings,
tabs: EditorTabsSettings,
smartKeys: SmartKeysSettings,
codeEditing: CodeEditingSettings,
inlay: InlayHintsSettings,
inlineCompletion: InlineCompletionSettings,
/** Gutter icon groups turned off (`run`, `breakpoints`, `bookmarks`, `vcs`, `blame`). */
gutterIconsDisabled: string[],
showGutterIcons: boolean,
codeStyle: CodeStyleSettings_Serialize,
encodings: EncodingSettings,
};
/** Editor › General › Editor Tabs. */
export type EditorTabsSettings = {
/** `top` | `bottom` | `none`. */
placement?: string,
multipleRows?: boolean,
/** One row that doesn't fit: `scroll` the tabs panel | `squeeze` the tabs. */
oneRowOverflow?: string,
pinnedSeparateRow?: boolean,
showFileIcon?: boolean,
showExtension?: boolean,
showDirectoryForNonUnique?: boolean,
/** Mark modified tabs with an asterisk. */
markModified?: boolean,
showFullPathOnHover?: boolean,
showCloseButton?: boolean,
/** `right` | `left` (with `show_close_button`). */
closeButtonPosition?: string,
sortAlphabetically?: boolean,
previewTab?: boolean,
openAtEnd?: boolean,
tabLimit?: number,
/** When the limit is reached close `unchanged` (non-modified) tabs first, or the `lru` one. */
closingPolicy?: string,
/** When the current tab is closed activate the `left` | `right` | `mru` tab. */
activateOnClose?: string,
};
/** Editor › File Encodings. */
export type EncodingSettings = {
/** Fallback for files outside the project that are not valid UTF-8 (WHATWG label). */
global?: string,
/** Encoding of new files and fallback for project files that are not valid UTF-8. */
project?: string,
/** Fallback for `.properties` files. */
properties?: string,
/** Display properties Unicode escapes as characters and save non-ASCII as escapes. */
nativeToAscii?: boolean,
/** Create UTF-8 files: `never` (no BOM) | `always` (with BOM) | `windows` (with BOM on Windows). */
utf8Bom?: string,
};
export type EntryKind = "file" | "dir" | "symlink";
/** What Reload Environment changed. */
export type EnvReloaded = {
/** Names of the variables new child processes now get differently (added, changed or removed). */
changed: string[],
/** The `devcontainer.json` whose `remoteEnv` applies, if any. */
devcontainer: string | null,
/** Whether the login shell was read (it isn't on Windows). */
shellRead: boolean,
};
export type ErrorData = { type: "tool"; tool: string; missing: boolean };
export type ErrorKind = "notFound" | "alreadyExists" | "permissionDenied" | "invalidInput" |
/** Document version mismatch; the UI must resync the full text. */
"outOfSync" | "cancelled" | "timedOut" |
/** A required external tool (language server, git, debugger) is unavailable. */
"unavailable" | "io" | "protocol" | "internal";
/** Kinds of workbench events a plugin can subscribe to (`on-event:<kind>`). */
export type EventKind = "document-changed" | "websocket-ready" | "file-closed" | "settings-changed" | "input-mode-changed" | "run-exited" | "terminal-exited" | "content-tab-action" | "extensions-changed" | "file-opened" | "file-saved" | "files-changed" | "editor-focused" | "caret-moved" | "action-performed" | "vcs-changed" |
/** Problems of the window's files changed (a language server or a report). */
"problems-changed" | "scheduled";
export type ExceptionClassBreakpoint = {
id: string,
/** Fully qualified binary name (`com.acme.Outer$Inner`); its subclasses stop too. */
className: string,
caught: boolean,
uncaught: boolean,
enabled: boolean,
/** Patterns (`com.acme.*`, `*Test`, a full name) for the class whose code throws. */
classFilters: string[],
classExclusionFilters: string[],
};
/** What a session's exception class breakpoints can do. */
export type ExceptionClassSupport = {
/** Whose class names the session takes: `java`. */
family: string,
condition: boolean,
classFilters: boolean,
/** Filters on the class whose code catches the exception. */
catchFilters: boolean,
};
/** An exception breakpoint filter offered by an adapter (`exceptionBreakpointFilters`). */
export type ExceptionFilter = {
filter: string,
label: string,
description: string | null,
/** Enabled unless the user chose otherwise. */
default: boolean,
supportsCondition: boolean,
};
export type ExecutionEvent = { type: "started"; index: number } | { type: "completed"; index: number; outcome: DbStatementOutcome } | { type: "done"; error: IdeError | null };
/** Result of `expression_at` (Extract Variable / Introduce … fallback). */
export type ExpressionAt = {
/**
* The expression exactly matching the (whitespace-trimmed) selection, else
* the smallest expression enclosing it; for an empty selection the
* innermost expression at the caret. `None` when the selection is not
* inside an expression.
*/
expression: SyntaxNode | null,
/** `expression` spans exactly the trimmed selection. */
exact: boolean,
/**
* Expressions from `expression` outwards up to the statement, innermost
* first (IDEA's "choose expression" popup for a caret selection).
*/
candidates: SyntaxNode[],
/** The statement (direct child of a block / statement list) containing the expression. */
statement: SyntaxNode | null,
/** The block / statement list that contains `statement`. */
block: SyntaxNode | null,
/**
* Innermost lambda / nested function between the expression and the
* statement: inserting a declaration before `statement` would move the
* expression out of that function, so callers must not do it blindly.
*/
functionBoundary: SyntaxNode | null,
/** The statement (or the expression when there is none) contains syntax errors. */
hasError: boolean,
};
/** How many indexed files share an extension (lower case, without the dot). */
export type ExtensionCount = {
extension: string,
files: number,
};
/** An extension point a plugin declared. */
export type ExtensionPointInfo = {
id: string,
description: string,
/** Plugin ids contributing to it now. */
contributors: string[],
};
/** Tools › Diff & Merge › External Diff Tools: a program that shows two files' differences. */
export type ExternalDiffSettings = {
/** Offer Show Diff in External Tool in diff viewers. */
enabled?: boolean,
/** The program to start. */
path?: string,
/** Its arguments: `%1` the left file, `%2` the right file, `%3` the diff's title. */
parameters?: string,
};
/** One side of the diff: a file on disk, or text written to a temporary file. */
export type ExternalDiffSide = {
/** A saved file, passed to the tool as it is. */
path: string | null,
/** Content without a file of its own (a revision, a text), written to a temporary file. */
text: string | null,
/** The temporary file's name; its extension lets the tool pick a syntax. */
name: string,
};
/** A formatter that runs outside the language servers, with its own settings group. */
export type ExternalFormatter = "prettier" | "oxfmt" | "biome" | "ruff";
/** An external formatter (Prettier, oxfmt, Biome, Ruff) and the languages it formats. */
export type ExternalFormatterSettings = {
/** Empty path: project node_modules (Prettier/oxfmt/Biome), managed installation, then PATH. */
path?: string,
/** Ruff only: directory containing its configuration, or a configuration file. */
configurationDirectory?: string,
languages?: string[],
/** Prefer this formatter even when a language server offers formatting. */
prefer?: boolean,
runOnSave?: boolean,
};
/** A session on this machine that no task holds yet. */
export type ExternalSession = {
/** The [`crate::AgentProvider`] id that owns it (`claude`, `codex`). */
provider: string,
/** The id resuming it names (`--resume`, `thread/resume`). */
sessionId: string,
title: string,
/** Where it ran, when the transcript names one. */
cwd: string | null,
/** File modification time, ms since the epoch. */
updatedMs: number | null,
};
/** Tools › External Tools entry. */
export type ExternalTool = {
id?: string,
name?: string,
description?: string,
group?: string,
enabled?: boolean,
program?: string,
/** Arguments with macros (`$FilePath$`, `$ProjectFileDir$`…), shell-quoted. */
arguments?: string,
workingDirectory?: string,
synchronizeAfter?: boolean,
openConsole?: boolean,
};
/**
* What Extract Interface starts from: the file's class, the members the interface can declare and
* the packages it can go to (as JSON, passed back unchanged).
*/
export type ExtractInterfaceInfo = {
className: string,
members: InterfaceMember[],
packages: string[],
};
/** Framework facet attached to a module (Project Structure › Facets). */
export type FacetConfig = {
/** `"web"` | `"spring"` | `"jpa"`. */
kind?: string,
/** Module relative path (`"."` for root module). */
module?: string,
/** Deployment descriptor path (e.g. `src/main/webapp/WEB-INF/web.xml`, `src/main/resources/META-INF/persistence.xml`). */
descriptor?: string,
/** Web resource root directory for Web facets (e.g. `src/main/webapp`). */
webRoot?: string,
};
export type Field = {
id: string,
label: string,
kind: FieldKind,
/**
* A template over the fields before it: `{{id}}`, `{{id|filter}}` (filters:
* `path`, `ident`, `kebab`, `snake`, `pascal`, `lower`, `json`).
*/
default: string,
/** Shown only while each listed field has one of its values. */
visible: { [key in string]: string[] },
hint: string,
};
export type FieldKind = { type: "text"; pattern: string | null; placeholder: string } | { type: "choice"; options: ChoiceOption[]; segmented: boolean } | { type: "checkbox" } |
/** An installed SDK of this kind (`jdk`); the value is its home, empty = automatic. */
{ type: "sdk"; sdk: string } |
/** Several ids out of grouped items; the value is comma-separated. */
{ type: "dependencies"; groups: DependencyGroup[] };
export type FieldValue = { kind: "label"; value: string } | { kind: "readonlyText"; value: {
text: string,
multiline: boolean,
} } | { kind: "text"; value: string } | { kind: "multiline"; value: string } | { kind: "checkbox"; value: boolean } | { kind: "choice"; value: {
options: string[],
selected: string,
} };
export type FileColor = {
/**
* A built-in scope (`Tests`, `Production`, `Project Files`, `Non-Project Files`) or a
* `scopes` entry, by name.
*/
scope?: string,
/** A palette name (`blue`, `green`, `orange`, `rose`, `violet`, `yellow`, `gray`) or `#rrggbb`. */
color?: string,
};
export type FileColorSettings = {
enabled?: boolean,
editorTabs?: boolean,
projectView?: boolean,
/** Scope → colour; the first scope that holds a file gives its colour. */
colors?: FileColor[],
};
export type FileCoverage = {
path: IpcPath,
/** Sorted by line. */
lines: LineCoverage[],
linesTotal: number,
linesCovered: number,
branchesTotal: number,
branchesCovered: number,
};
/** A tree decoration. */
export type FileDecoration = {
badge: string | null,
style: string,
tooltip: string | null,
/** Text shown after the name (API 1.7 `set-file-note`). */
note?: string | null,
/** `[[contributes.fileIcons]]` id for this file or folder (API 1.8 `set-file-icon`). */
icon?: string | null,
};
/** A diff opened by a plugin (API 1.10): `None` is a side where the file doesn't exist. */
export type FileDiff = {
left: string | null,
right: string | null,
leftLabel: string | null,
rightLabel: string | null,
title: string | null,
};
export type FileEdit = { kind: "edit"; path: IpcPath; edits: TextEdit[];
/** LSP TextDocumentEdit version; null/unversioned edits use content preconditions. */
version?: number | null } | { kind: "create"; path: IpcPath; overwrite: boolean } | { kind: "rename"; from: IpcPath; to: IpcPath } | { kind: "delete"; path: IpcPath; recursive: boolean };
export type FileEntry = {
name: string,
path: IpcPath,
kind: EntryKind,
size: number,
/** Milliseconds since the Unix epoch. */
mtimeMs: number | null,
/** Matched by .gitignore or the exclude settings. */
ignored: boolean,
/** Matched by the exclude settings (IDEA's "excluded": dimmed, excluded-folder icon). */
excluded: boolean,
hidden: boolean,
/**
* For symlinks: what the link points to (`None` when dangling); `None`
* for other entries.
*/
targetKind?: EntryKind | null,
};
/**
* Main toolbar entries per side, in order: title widget ids (`project`,
* `vcs.branch`…) or `action:<id>`. Widgets in neither list nor `hidden`
* (registered later) keep their default place.
*/
export type FileIconThemeOptions = {
groups?: { [key in string]: boolean },
choices?: { [key in string]: string },
hideFiles?: boolean,
hideFolders?: boolean,
hollowFolders?: boolean,
hideUiIcons?: boolean,
hidePsiIcons?: boolean,
monochrome?: string | null,
saturation?: number | null,
opacity?: number | null,
iconSize?: number | null,
rowHeight?: number | null,
accent?: string | null,
};
/** Identifier occurrences in one file (`identifiers_in_files`). */
export type FileIdentifiers = {
path: IpcPath,
occurrences: IdentifierOccurrence[],
};
/**
* Added and deleted lines of one file between two revisions (`git diff --numstat`).
* A rename keeps the counts of the content change; a pure rename is `0`/`0`.
*/
export type FileLineStats = {
/** Path after the change (the only path, when the file was not renamed). */
path: string,
oldPath: string | null,
added: number,
removed: number,
};
/** The resolved gutter markers of one file. */
export type FileMarkers = {
path: string,
version: number | null,
markers: IndexedMarker[],
};
export type FileMatch = {
path: IpcPath,
/** Path relative to the project root, as displayed. */
relPath: string,
score: number,
/** Matched char indices within `rel_path`. */
indices: number[],
};
/** All matches in one file; streamed to the UI as they are found. */
export type FileMatches = {
path: IpcPath,
relPath: string,
matches: LineMatch[],
};
/** One file or folder move. */
export type FileMove = {
from: IpcPath,
to: IpcPath,
};
/** A caret position for a file opened from the command line: 0-based line and column. */
export type FilePosition = {
path: IpcPath,
line: number,
column: number,
};
/** What the editor needs to know before choosing a viewer for a file. */
export type FileProbe = {
size: number,
/** Content looks binary (same heuristic as text loading). */
binary: boolean,
/** Above the read-only threshold: the text editor would open it read-only. */
tooLarge: boolean,
};
export type FileProblems = {
path: IpcPath,
items: Diagnostic[],
};
/** A path written in a document: an HTML URL attribute, a CSS `url()` / `@import`. */
export type FileReference = {
range: Range,
value: string,
};
/** Reference updates for a file / folder move (`workspace/willRenameFiles`). */
export type FileRenameEdits = {
/** Edits of every server that took part, in terms of the paths before the move. */
edit: WorkspaceEdit,
/** Servers asked (their filters matched one of the moved paths). */
servers: string[],
/** Servers that failed; their references are not updated. */
errors: string[],
};
export type FileSettings = {
/** Save on focus loss / tab switch, like IDEA. */
autoSave?: boolean,
/** Re-check open files against disk when the IDE window gains focus. */
syncOnFocus?: boolean,
exclude?: string[],
/** Ignored Files and Folders: name patterns hidden everywhere; see [`crate::ignored`]. */
ignoredNames?: string[],
trimTrailingWhitespace?: boolean,
ensureFinalNewline?: boolean,
/** Local History keeps changes from this many working days (days with changes), like IDEA. */
localHistoryDays?: number,
/** Upper bound for a project's Local History in MB; the oldest revisions go first. */
localHistoryMaxMb?: number,
/** File Types › Recognized File Types: the user's changes, by language id. */
fileTypes?: { [key in string]: FileTypeAssociation },
/** Override File Type: file (project-relative and `/`-separated, or absolute) → language id. */
fileTypeOverrides?: { [key in string]: string },
/**
* File Types › Files opened in associated applications: file-name patterns
* (`*.xlsx`) opened with the system application instead of an editor.
*/
associatedApplications?: string[],
/** Compose detection choices, keyed by project-relative file path. */
composeFileOverrides?: { [key in string]: ComposeFileOverride },
};
export type FileStamp = {
size: number,
mtime: number | null,
};
export type FileStatus = {
path: IpcPath,
relPath: string,
/** Staged change, if any. */
staged: ChangeKind | null,
/** Unstaged (working tree) change, if any. */
unstaged: ChangeKind | null,
renamedFrom: string | null,
};
/** One language's file name and hashbang patterns on top of its definition. */
export type FileTypeAssociation = {
/** Added file name patterns: `*.foo`, `Jenkinsfile`, `Dockerfile.*` (`*` and `?` wildcards). */
patterns?: string[],
/** Patterns of the definition (`*.ext`, file names) the user removed. */
removedPatterns?: string[],
/** Interpreters run by a `#!` first line, e.g. `node` for `#!/usr/bin/env node`. */
hashbangs?: string[],
};
/** Debounced worktree changes. Paths use the same absolute form as `file-saved`. */
export type FilesChanged = {
created: string[],
modified: string[],
removed: string[],
};
/** See [`FlutterDeviceList`]. */
export type FlutterDaemonStatus = { kind: "stopped" } |
/** Started; the first device discovery has not finished. */
{ kind: "starting" } | { kind: "ready" } |
/** No `flutter` executable on the search path. */
{ kind: "notInstalled" } |
/** The daemon could not start or exited: what it printed last. It is not restarted on its own. */
{ kind: "failed"; message: string };
/** A target `flutter run -d <id>` can name, or an Android device adb sees but Flutter can't use yet. */
export type FlutterDevice = {
id: string,
name: string,
/** `android`, `ios`, `macos`, `web`, … */
platformType: string | null,
/** `mobile`, `desktop` or `web`. */
category: string | null,
emulator: boolean,
/** The adb state keeping it from being used (`unauthorized`, `offline`, …). */
unavailable: string | null,
};
/** The project's Flutter devices, best default first. */
export type FlutterDeviceList = {
status: FlutterDaemonStatus,
devices: FlutterDevice[],
};
export type FocusedEditor = {
path: IpcPath,
/** Zero-based lines and UTF-16 columns, end exclusive. */
selection: Range,
selectedText: string,
};
export type FoldKind = "region" | "comment" | "imports";
export type FoldRange = {
start_line: number,
end_line: number,
kind: FoldKind,
};
export type FoldingOutlineVisibility = "hover" | "always";
/** Editor › General › Code Folding. */
export type FoldingSettings = {
showOutline?: boolean,
outlineVisibility?: FoldingOutlineVisibility,
fileHeader?: boolean,
imports?: boolean,
docComments?: boolean,
};
/**
* One installed family. `monospaced` is the font system's own flag (fixed
* pitch; on Linux also fontconfig's dual-width CJK monospace).
*/
export type FontFamily = {
name: string,
monospaced: boolean,
};
/** The string form supported by gopls's experimental interactive command protocol. */
export type FormAnswer = {
id: string,
value: string,
};
export type FormField = {
id: string,
description: string,
required: boolean,
default?: string | null,
error?: string | null,
};
export type FormatOptions = {
tabSize: number,
insertSpaces: boolean,
onSave?: boolean,
/** External formatter to run whatever the settings select. */
tool?: ExternalFormatter | null,
};
export type FormatterChoice = {
id: string,
name: string,
languages: string[],
};
/** A port of the remote host reachable on this machine at `localhost:local_port`. */
export type ForwardedPort = {
remotePort: number,
localPort: number,
/**
* The host the port belongs to, as a dev container reaches it (a Compose service from
* `forwardPorts`); `None` for the remote host itself.
*/
host: string | null,
};
/** One occurrence of a duplicated code fragment. */
export type Fragment = {
path: IpcPath,
relPath: string,
range: Range,
/** The fragment's source, from the start of its first line (capped). */
text: string,
};
export type FsConnection = { kind: "sftp"; ssh: string } |
/** `server`: the deployment server whose saved password is used. */
{ kind: "ftp"; server: string; secure: boolean; ftp: FtpConnection } | { kind: "local" };
/**
* Host and login of an FTP / FTPS deployment server. The password is kept with
* the saved passwords, under the server's id.
*/
export type FtpConnection = {
host?: string,
/** `None`: 21. */
port?: number | null,
/** Empty: anonymous login. */
user?: string,
/** Passive mode (the client opens data connections); off: active mode. */
passive?: boolean,
};
/**
* A method breakpoint (DAP function breakpoint). `name` uses the adapter's syntax:
* `pkg.Class#method` for java-debug, `pkg.Func` / `pkg.(*T).Method` for Delve, a plain
* function name for debugpy and LLDB.
*/
export type FunctionBreakpoint = {
name: string,
condition: string | null,
hitCondition: string | null,
enabled: boolean,
};
export type GeneralSettings = {
reopenLastProject?: boolean,
confirmExit?: boolean,
/** When on, the last window closes instead of showing the Welcome screen. */
closeWithoutWelcome?: boolean,
/** When on, closing a window drops its saved editor tabs, so they are not restored next time. */
closeTabsWithWindow?: boolean,
/** Where Open… puts a project while one is open: `ask` | `new` | `same` | `attach`. */
openProjectIn?: string,
/** Initial folder of the Open / Clone dialogs; empty = the OS default. */
defaultProjectDirectory?: string,
/** Save all files after `idle_seconds` without input. */
saveOnIdle?: boolean,
idleSeconds?: number,
dateFormat?: DateFormatSettings,
/**
* File › Power Save Mode: no automatic popups (completion, parameter info,
* quick documentation) or background highlighting (usages, code vision).
*/
powerSaveMode?: boolean,
/** File › Rename Project… (project layer): the name shown for the project; empty = its folder name. */
projectName?: string,
/** Where updates come from: `auto` (the CNB mirror for the Chinese UI, else GitHub) | `github` | `cnb`. */
updateSource?: string,
autoCheckUpdates?: boolean,
/** System Settings › Updates: open the What's New page after the app starts a new version. */
showWhatsNewAfterUpdate?: boolean,
/** The version the app last started with, so the first start after an update is recognisable. */
lastRunVersion?: string,
};
/** One entry of File › New Project. */
export type GeneratorInfo = {
id: string,
name: string,
group: string,
icon: string,
order: number,
description: string,
/** Offer "Create Git repository". */
git: boolean,
fields: Field[],
/** More fields come from `scaffold_options` (a project service's metadata). */
dynamic: boolean,
};
/** A repository of the signed-in account (owned, collaborator, or organization member). */
export type GhAccountRepo = {
/** `owner/name`. */
nameWithOwner: string,
description: string | null,
private: boolean,
fork: boolean,
archived: boolean,
/** What `git clone` takes: HTTPS, or SSH when gh's `git_protocol` is `ssh`. */
cloneUrl: string,
};
/** The account's repositories, or why they can't be listed. */
export type GhAccountRepos = { kind: "ready"; login: string; repos: GhAccountRepo[] } |
/** No `gh` executable was found. */
{ kind: "notInstalled" } |
/** `gh auth login` has not been run (or the token expired). */
{ kind: "notLoggedIn"; message: string } | { kind: "error"; message: string };
/**
* A GitHub API call through `gh api`: GraphQL (`endpoint` `graphql`, `body`
* `{"query", "variables"}`) or REST (`repos/{owner}/{repo}/…`, gh fills in the
* placeholders from the project's remote).
*/
export type GhApiRequest = {
/** `GET`, `POST`, `PATCH`, `PUT`, `DELETE`. */
method: string,
endpoint: string,
/** JSON request body, sent on stdin. */
body: string | null,
/** Follow REST `Link` pages; the result is the array of all pages (`--slurp`). */
paginate: boolean,
};
/** Whether pull requests can be shown for the project, and why not. */
export type GhAvailability = { kind: "ready"; repo: GhRepo;
/** The signed-in user. */
login: string | null } |
/** No `gh` executable was found. */
{ kind: "notInstalled" } |
/** `gh auth login` has not been run (or the token expired). */
{ kind: "notLoggedIn"; message: string } |
/** The project has no GitHub remote (or is not a git repository). */
{ kind: "notGitHub"; message: string } | { kind: "error"; message: string };
export type GhRepo = {
/** `owner/name`. */
nameWithOwner: string,
url: string,
defaultBranch: string | null,
/** Merge methods the repository allows (all of them when gh does not say). */
mergeCommitAllowed: boolean,
squashMergeAllowed: boolean,
rebaseMergeAllowed: boolean,
/** The signed-in user's permission: `ADMIN`, `MAINTAIN`, `WRITE`, `TRIAGE`, `READ`; empty when unknown. */
viewerPermission: string,
};
export type GitExecutableInfo = {
/** `git version …` output. */
version: string,
/** The executable that was run. */
path: string,
};
export type GitOperation =
/** Continue the merge / rebase / cherry-pick / revert in progress. */
{ op: "continue" } |
/** Stage and Retry: stage the changes of tracked files, then continue. */
{ op: "stageAndContinue" } | { op: "abort" } | { op: "skip" } |
/** Commits oldest first; `record_origin` adds "(cherry picked from commit …)". */
{ op: "cherryPick"; commits: string[]; recordOrigin?: boolean } |
/** Commits newest first. */
{ op: "revert"; commits: string[] } | { op: "reset"; commit: string; mode: ResetMode } |
/** Rebases `base..HEAD` (`base: None` = from the root) following `entries`, oldest first. */
{ op: "interactiveRebase"; base: string | null; entries: RebaseEntry[] };
export type GitSettings = {
/** Show blame after the current editor line. */
inlineBlame?: boolean,
/**
* A click (or Enter / Space) on the inline blame label opens its commit; off, the
* label is plain text and a click on it places the caret as past the line end.
*/
inlineBlameClickable?: boolean,
showBranchInProjectView?: boolean,
/** Branch operations from the branches popup act on every repository of the project. */
syncBranchOperations?: boolean,
/** Path to the git executable; empty = auto-detect. */
executable?: string,
/** Default of Update Project: `merge` | `rebase`. */
updateMethod?: string,
/** Push rejected (non-fast-forward): update the branch and push again. */
autoUpdateOnPushRejected?: boolean,
warnCrlf?: boolean,
warnDetachedHead?: boolean,
/** Background check for incoming commits: `auto` | `always` | `never`. */
incomingCheck?: string,
/** Minutes between background checks for incoming commits. */
incomingCheckInterval?: number,
/** Branch name globs, `;`/`,`-separated; force push to them is prohibited. */
protectedBranches?: string,
/** Initial state of Commit Options › Sign-off Commit. */
signOff?: boolean,
/** Ask before committing files larger than `large_file_mb`. */
warnLargeFiles?: boolean,
largeFileMb?: number,
/** Ask before committing names that are invalid on Windows or differ only in case. */
warnBadFileNames?: boolean,
/** Commit and Push opens the Push dialog; otherwise it pushes right away. */
showPushDialog?: boolean,
/** With `show_push_dialog`: only for commits to protected branches. */
pushDialogOnlyProtected?: boolean,
/** Stashes and shelves share one tab. */
combineStashAndShelf?: boolean,
/**
* The non-modal Commit tool window works on the index: Staged / Unstaged groups,
* stage and unstage instead of inclusion checkboxes, and no change lists.
*/
stagingArea?: boolean,
/**
* Scan the working tree with `git status` (for file systems whose metadata only
* the system git reads correctly) instead of in process.
*/
cliStatus?: boolean,
};
export type GoBuildTags = {
/** Empty values inherit the selected toolchain's defaults. */
os?: string,
arch?: string,
version?: string,
compiler?: string,
/** Empty = automatic, "1" = enabled, "0" = disabled. */
cgo?: string,
custom?: string,
experiments?: string,
};
export type GoModules = {
env?: { [key in string]: string },
autoVendor?: boolean,
};
export type GoSettings = {
/** Empty = the `go` on `PATH`. */
goroot?: string,
/** Empty = `go env GOPATH`. */
gopath?: string,
/** Format with gofumpt, a stricter gofmt (gopls `gofumpt`). */
gofumpt?: boolean,
buildTags?: GoBuildTags,
modules?: GoModules,
};
export type GotoKind = "definition" | "declaration" | "typeDefinition" | "implementation";
/** One line of the report: an occurrence of a dependency where it is requested. */
export type GradleDependency = {
/** `group`, empty for a project dependency. */
group: string,
/** Artifact name, or the project path (`:core`) of a project dependency. */
name: string,
/** The version asked for here; `None` when a platform or constraint supplies it. */
requested: string | null,
/** The version Gradle selected (`-> 1.2`), when it differs from the request. */
selected: string | null,
/** A project of the build (`project :core`, or a module substituted by one). */
project: boolean,
/** `(*)`: listed with its dependencies earlier in the tree. */
repeated: boolean,
/** `(c)`: a dependency constraint rather than a dependency. */
constraint: boolean,
/** `(n)` / `FAILED`: not resolved. */
unresolved: boolean,
children: GradleDependency[],
};
export type GradleDistribution = "wrapper" | "local";
export type GradleModel = {
/** Project-relative directory of the build (where `settings.gradle` is); `""` = project root. */
dir: string,
/** The root project first, then subprojects in `include` order. */
projects: GradleProject[],
javaVersion: number | null,
/** `gradlew` of the build (absolute), else `gradle`. */
command: string,
/** Environment for runs (`JAVA_HOME`); filled in by the shell. */
env: { [key in string]: string },
/** When the task list was last read from Gradle (Unix ms); `None` = static defaults. */
syncedAt: number | null,
stale: boolean,
syncError: string | null,
};
export type GradleProject = {
/**
* Gradle path: `:` for the root project, `:app`, `:libs:core`; for a project of a
* nested build its identity path (`:lib:core`), which addresses its tasks from the root.
*/
path: string,
name: string,
/** Project-relative directory. */
dir: string,
/** Project-relative build script, if any. */
buildFile: string | null,
tasks: GradleTask[],
/** Configurations Gradle can resolve, or null before Gradle reports the project. */
resolvableConfigurations?: string[] | null,
/**
* Identity path of the nested build holding the project (`:lib` for `includeBuild`,
* `:buildSrc`); null for the opened build.
*/
build?: string | null,
};
/** IDEA's "Build and run using" for Gradle builds; IDEA defaults to Gradle. */
export type GradleRunUsing =
/** A `JavaExec` task on the source set's runtime classpath (`gradleRun.gradle`). */
"gradle" |
/** The Java language server's classpath, launched by OpenIDEA. */
"ide";
/** Build Tools › Gradle. */
export type GradleSettings = {
/** Linked build directories; absent preserves automatic discovery, empty unlinks all builds. */
linkedProjects?: string[] | null,
/** Empty = Project JDK; otherwise a JDK home. */
jvm?: string,
distribution?: GradleDistribution,
/** Used only for the local distribution. */
home?: string,
/** Empty = Gradle's default user home. */
userHome?: string,
/** IDEA's "Build and run using": who builds and launches an Application main. */
runUsing?: GradleRunUsing,
};
export type GradleTask = {
name: string,
/** Lower-case group (`build`, `build setup`, `other`). */
group: string,
description: string | null,
};
export type GtkFilter = {
name: string,
extensions: string[],
};
export type GtkPickOptions = {
title: string | null,
defaultPath: string | null,
directory: boolean,
multiple: boolean,
/** A save dialog: one path, with overwrite confirmation. */
save: boolean,
filters: GtkFilter[],
};
/** GutterAction data. */
export type GutterAction = {
line: number,
icon: string | null,
tooltip: string,
command: string,
argument: string | null,
};
/** HEAD before and after a history rewrite, for its Undo. */
export type HeadChange = {
before: string,
after: string,
};
export type HeapCaptureResult = { status: "ready"; snapshot: HeapSnapshotInfo } | { status: "unavailable"; reason: JvmHeapUnavailable } | { status: "cancelled" };
/** One class name in two snapshots; a side without the name has zeros. */
export type HeapClassDiff = {
name: string,
baseCount: number,
count: number,
baseShallow: number,
shallow: number,
baseRetained: number,
retained: number,
/**
* Several classes have this name on one side or both, so the sides cannot be matched: each
* side shows the sum over its classes, and there is no difference to show.
*/
ambiguous: boolean,
};
export type HeapClassRow = {
/** Type slot, as `classIndex` in [`crate::HeapIndex::dominated`]. */
classIndex: number,
name: string,
count: number,
shallow: number,
retained: number,
unreachableCount: number,
/**
* Another class has the same name (several class loaders): nothing joined by name, such as a
* second snapshot, can tell them apart.
*/
ambiguous: boolean,
};
/** How an object is held by the next step of a path to a GC root. */
export type HeapEdge =
/** An instance field; the name is empty when the dump does not show which one. */
{ kind: "field"; name: string } | { kind: "element"; index: number } | { kind: "static"; name: string } |
/** From an instance to its class. */
{ kind: "classOf" } | { kind: "superClass" } | { kind: "classLoader" } |
/** `thread` is the name of the thread whose root it is, when the dump has it. */
{ kind: "root"; root: HeapRootKind; thread: string | null };
export type HeapObjectPage = {
rows: HeapObjectRow[],
/** Rows of every page together. */
total: number,
};
/**
* An object of one snapshot: its index in the [`crate::HeapIndex`] columns. Any value may
* arrive over IPC; queries answer an index that names no object with nothing.
*/
export type HeapObjectRef = number;
export type HeapObjectRow = {
object: HeapObjectRef,
className: string,
/** The object's hprof id in hex, `0x1300`. */
address: string,
shallow: number,
retained: number,
/** Has children in the dominator tree. */
hasChildren: boolean,
/** The text of a `java.lang.String`, or the name of the class a class object stands for. */
preview: string | null,
};
export type HeapOpenResult = { status: "ready"; snapshot: HeapSnapshotInfo } |
/** Bytes, for the index next to the dump. */
{ status: "notEnoughDiskSpace"; needed: number; available: number } | { status: "cancelled" };
export type HeapOrigin =
/** Dumped from a live debug session. */
{ kind: "captured"; session: DebugSessionId; pid: number; javaVersion: string; takenWhileSuspended: boolean; dumpMs: number } |
/** An `.hprof` the user opened; it is never deleted. */
{ kind: "file"; path: IpcPath };
export type HeapPathStep = {
object: HeapObjectRow,
/** How the next step holds this object; on the last step, the root. */
via: HeapEdge,
};
export type HeapPhase = "reading" | "linking" | "dominators" | "retained" | "paths" | "saving";
export type HeapProgress = { type: "dumping" } | { type: "analyzing"; phase: HeapPhase; done: number; total: number };
export type HeapRootKind = "unknown" | "jniGlobal" | "jniLocal" | "javaFrame" | "nativeStack" | "stickyClass" | "threadBlock" | "monitorUsed" | "threadObject";
/** A path from an object up to its GC root. A long one keeps only the steps nearest each end. */
export type HeapRootPath = {
steps: HeapPathStep[],
/** Steps left out between `steps[omitted_after - 1]` and `steps[omitted_after]`; 0 for none. */
omitted: number,
omittedAfter: number,
};
export type HeapSnapshotId = number;
export type HeapSnapshotInfo = {
id: HeapSnapshotId,
label: string,
origin: HeapOrigin,
summary: HeapSummary,
/** Unix time in milliseconds when the snapshot was opened. */
createdMs: number,
};
/** Counts over instances and arrays; class objects (class dumps) are left out. */
export type HeapSummary = {
/** `reachable_objects + unreachable_objects`. */
objects: number,
reachableObjects: number,
reachableBytes: number,
unreachableObjects: number,
unreachableBytes: number,
/** Class dumps in the dump. */
classes: number,
weakEdgesSkipped: number,
sizeSource: SizeSource,
analysisMs: number,
};
/** A profile and the name Hermes shows for it (`hermes profile list`). */
export type HermesProfile = {
/** What `hermes -p` takes; `default` is the Hermes home itself. */
name: string,
/** `display_name` from the profile's `profile.yaml`, else the name. */
label: string,
};
export type HierarchyChoice = {
id: string,
makeAbstract: boolean,
};
export type HierarchyClass = {
/** Server-owned identity, passed back as the pull-up destination. */
id: string,
name: string,
qualifiedName: string,
interface: boolean,
};
export type HierarchyDirection =
/** Callers / supertypes. */
"incoming" |
/** Callees / subtypes. */
"outgoing";
export type HierarchyItem = {
name: string,
kind: SymbolKind,
detail: string | null,
/** File path, or the URI of a virtual document (see `uri`). */
path: IpcPath,
/** Set for non-`file:` items (library classes). */
uri?: string | null,
range: Range,
selectionRange: Range,
/** Call sites, for call hierarchy. */
fromRanges: Range[],
/**
* The file of `from_ranges` when it is not the item's own: for an outgoing call, the
* file of the prepared item that makes it (a path, or the URI of a virtual document).
*/
fromPath?: IpcPath | null,
};
export type HierarchyMember = {
id: string,
/** `name(Params) : Type`, as the server renders it. */
label: string,
kind: HierarchyMemberKind,
/** The member at the caret. */
selected: boolean,
/** Can be declared abstract in the destination (pull up) or kept abstract (push down). */
abstractable: boolean,
};
export type HierarchyMemberKind = "field" | "method" | "type";
/**
* The class at a position and what can move: pull-up destinations, or the subclasses
* members are pushed into.
*/
export type HierarchyMembers = {
className: string,
targets: HierarchyClass[],
members: HierarchyMember[],
};
/** A checked refactoring: what the server found, and the edit unless a problem is fatal. */
export type HierarchyRefactored = {
problems: RefactoringProblem[],
edit: WorkspaceEdit | null,
};
/** IDEA's class-hierarchy refactorings. */
export type HierarchyRefactoring = "pullUp" | "pushDown";
export type Highlight = {
range: Range,
kind: HighlightKind,
};
export type HighlightKind = "text" | "read" | "write";
export type HistoryEntry = HistoryEntry_Serialize | HistoryEntry_Deserialize;
export type HistoryEntry_Deserialize = {
/** Content hash (blake3 hex); identifies the stored blob. Empty for labels. */
id: string,
path: IpcPath,
timestampMs: number | null,
/** e.g. "Saved", "External change", "Deleted", "Before refactoring: Move". */
label: string,
size: number,
kind?: HistoryKind,
};
export type HistoryEntry_Serialize = {
/** Content hash (blake3 hex); identifies the stored blob. Empty for labels. */
id: string,
path: IpcPath,
timestampMs: number | null,
/** e.g. "Saved", "External change", "Deleted", "Before refactoring: Move". */
label: string,
size: number,
kind: HistoryKind,
};
export type HistoryKind =
/** A stored revision of `path`. */
"snapshot" |
/**
* A user label ("Put Label…") or system event ("Before Git checkout")
* for everything under `path` (the project root); has no content.
*/
"label";
/** What triggered a hot reload; `flutter debug_adapter` takes it as `reason`. */
export type HotReloadReason = "manual" | "save";
/** Result of [`DebugManager::redefine_classes`]. */
export type HotSwapResult = {
/** Fully qualified names of the classes reloaded (empty: nothing had changed). */
changedClasses: string[],
errorMessage: string | null,
};
export type Hover = {
contents: Markup,
range: Range | null,
};
/** An action rendered at the left edge of a line and revealed by hover. */
export type HoverAction = {
/** The line the button is drawn on; normally the declaration line. */
line: number,
/** First line whose leftmost strip reveals this action, inclusive. */
startLine: number,
/** Last line whose leftmost strip reveals this action, inclusive. */
endLine: number,
icon: string | null,
label: string,
tooltip: string | null,
command: string,
argument: string | null,
};
/** One request with its outcome. */
export type HttpExchange = {
entry: HttpHistoryEntry,
request: PreparedRequest,
response: HttpResponse | null,
};
export type HttpHistoryEntry = {
id: string,
/** Unix epoch, ms. */
timeMs: number | null,
name: string | null,
method: string,
url: string,
/** `None` when the request failed. */
status: number | null,
totalMs: number | null,
/** The `.http` file the request came from. */
file: IpcPath | null,
error: string | null,
};
/** One request of a file, as shown by the gutter and the Run All list. */
export type HttpRequestBlock = {
/** 0-based index among the file's requests. */
index: number,
name: string | null,
method: string,
/** URL as written (variables not substituted). */
url: string,
/** 0-based line of the request line. */
line: number,
/** First and last line (0-based, inclusive) of the block, separator excluded. */
startLine: number,
endLine: number,
};
export type HttpResponse = {
status: number,
statusText: string,
version: string,
headers: ([string, string])[],
contentType: string | null,
/** Followed redirects, first hop first; empty when not redirected. */
redirects?: RedirectHop[],
/** Body as text (lossy UTF-8); `None` for binary bodies. */
body: string | null,
/** Size in bytes as received (after decompression). */
size: number | null,
truncated: boolean,
/** Request start → response headers. */
ttfbMs: number | null,
/** Request start → body fully read. */
totalMs: number | null,
};
export type HunkKind = "added" | "modified" | "deleted";
/** A hunk identified by its line ranges (0-based), see [`LineHunk`]. */
export type HunkRange = {
start: number,
lines: number,
oldStart: number,
oldLines: number,
};
/**
* The single error type that crosses the IPC boundary.
*
* Crates keep rich internal errors and convert at their public edge; the UI
* switches on `kind` and shows `message`.
*/
export type IdeError = {
kind: ErrorKind,
message: string,
/** Structured detail for errors the UI acts on; `null` for plain errors. */
data?: ErrorData | null,
};
export type IdeEvent =
/** Project data source settings changed; reload the Database tree. */
{ type: "dbSourcesChanged" } | { type: "mcpRequest"; id: number; request: McpUiRequest } | { type: "mcpRequestClosed"; id: number } |
/** Project window membership or selection changed. */
{ type: "windowGroupsChanged" } |
/** A project was loaded or unloaded for the MCP server without a window of its own. */
{ type: "mcpBackgroundProjectsChanged" } |
/** A window entered or left full screen, itself or as a member of a full-screen window group. */
{ type: "windowFullscreenChanged" } |
/**
* This remote window's connection to its host ended on its own (network loss, the host or
* its server went away); the window's project is unreachable until it reconnects.
*/
{ type: "remoteConnectionLost"; host: string } | { type: "projectTrustChanged"; root: IpcPath; trusted: boolean } |
/**
* The project's direnv environment (`.envrc`) could not be loaded, or a file it is read
* from changed and it can be reloaded.
*/
{ type: "direnv"; root: IpcPath; status: DirenvStatus } |
/** The project's `flutter daemon` changed state, or a device came or went. */
{ type: "flutterDevices"; list: FlutterDeviceList } |
/** Files or directories changed on disk (after debouncing, ignore rules applied). */
{ type: "fsChanged"; created: IpcPath[]; modified: IpcPath[]; removed: IpcPath[];
/** Subtrees whose ignore rules changed, after the matchers were rebuilt. */
ignoreRules?: IpcPath[] } |
/** Excluded or ignored folders whose contents changed; they stay out of `FsChanged`. */
{ type: "excludedDirsChanged"; dirs: IpcPath[] } |
/**
* The backend changed a document (reload from disk, formatting, refactoring).
* The UI applies `changes` on top of `base_version`, yielding `version`.
*/
{ type: "docPatched"; doc: DocId; baseVersion: number; version: number; changes: TextChange[];
/** Part of a grouped transaction; the editor must not record a file-local undo. */
workspaceEdit?: boolean } |
/** A document's dirty flag changed (saved / modified externally). */
{ type: "docDirty"; doc: DocId; dirty: boolean;
/** Text version when this transition occurred, including when it was saved. */
version: number } |
/**
* An open document's file changed on disk while the buffer had unsaved changes. The buffer
* keeps them (autosave leaves the file alone); the UI offers to load the disk version.
*/
{ type: "docDiskConflict"; doc: DocId; path: string } |
/** A complete workspace edit can be undone as one operation. */
{ type: "workspaceEditApplied"; id: number; paths: IpcPath[];
/** Files the edit renamed, as the edit named them: editors open on them follow. */
moves: FileMove[];
/**
* Made by an agent through the MCP server's tools: undoable like a refactoring, but
* not announced as one.
*/
byAgent: boolean } |
/**
* An open document's language changed (Settings › File Types, Override File
* Type), or its UI mode (a framework's root marker appeared or went).
*/
{ type: "docLanguage"; doc: DocId; language: LanguageId;
/** See `DocumentInfo::ui_mode`. */
uiMode: string | null } |
/** Full replacement of diagnostics for one file from one producer. */
{ type: "diagnostics"; path: IpcPath; source: string; items: Diagnostic[] } |
/** Progress of a background task; `fraction` is `None` when indeterminate. */
{ type: "task"; id: TaskId; title: string; message: string | null; fraction: number | null; done: boolean;
/** The UI may stop it with `cancel_task(id)` (see [`crate::task`]). */
cancellable: boolean } |
/** Project indexing state changed (dumb mode on/off). */
{ type: "indexState"; indexing: boolean; files: number; symbols: number } |
/** Git status / branch information should be refreshed. */
{ type: "vcsChanged"; root: IpcPath } | { type: "languageServer"; server: ServerId; name: string;
/** What the user sees as the server when another program serves in its place. */
label?: string | null; status: ServerStatus; message: string | null } |
/** A running server lacks a capability; the UI offers the managed tool as a replacement. */
{ type: "languageServerWarning"; name: string; message: string; installTool: string } |
/**
* A stopped language server left the project's list (disabled in settings, or a
* fallback that a preferred server took over from again).
*/
{ type: "languageServerRemoved"; server: ServerId } |
/**
* A language server asked clients to re-request one kind of data for its
* open documents (`workspace/inlayHint/refresh`, …), e.g. after indexing.
*/
{ type: "lspRefresh"; server: ServerId; kind: LspRefreshKind } |
/**
* A language server asked the user to choose an action, e.g. Dart's
* "Renamed field will be invisible in …" warning during a rename. Answered
* with `lsp_message_request_answer`; the server cancels if we reply null.
*/
{ type: "lspMessageRequest"; id: number; server: string; message: string; actions: string[] } |
/** The request was answered or timed out; every window drops its dialog. */
{ type: "lspMessageRequestDone"; id: number } | { type: "terminalExited"; terminal: TerminalId; code: number | null } | { type: "runExited"; run: RunId; code: number | null } | { type: "debug"; session: DebugSessionId; event: DebugEvent } | { type: "notify"; level: NotifyLevel; title: string; body: string | null } |
/**
* A setting was written (any window); the windows it concerns (all for a
* global value, the project's for a project value) re-read their effective settings.
*/
{ type: "settingsChanged"; key: string } | { type: "updateStatusChanged"; status: UpdateStatus } | { type: "updateAvailable"; update: UpdateInfo } |
/**
* The project's source / test / resource / excluded roots changed (build files
* changed or folders were marked); the UI re-reads them with `project_roots`.
*/
{ type: "projectRootsChanged"; root: IpcPath } |
/** A child process (`ssh`, `git`) asks for a credential; answered with `ssh_askpass_answer`. */
{ type: "askpass"; id: number; prompt: string; kind: AskpassKind;
/** The dialog offers "Remember" for the answer (git HTTPS passwords). */
remember: boolean } |
/** Prompt `id` was answered (in any window) or gave up. */
{ type: "askpassDone"; id: number } |
/**
* The kernel of an open notebook changed state (`starting`, `idle`, `busy`,
* `dead`); `message` says why it failed to start or died.
*/
{ type: "notebookKernel";
/** Backend document incarnation; stale queued events cannot target a reopen. */
id: string; path: IpcPath; state: string; message: string | null };
/** An identifier-like token whose text equals the searched name. */
export type IdentifierOccurrence = {
range: Range,
/** Node kind, e.g. `identifier`, `type_identifier`, `property_identifier`. */
kind: string,
/**
* Member / label position (`obj.name`, `name: value` labels): refers to
* a member, not to a variable in scope.
*/
qualified: boolean,
};
export type IgnoreDestination = "gitignore" | "localExclude";
export type ImportedRunConfig = ImportedRunConfig_Serialize | ImportedRunConfig_Deserialize;
export type ImportedRunConfig_Deserialize = {
config: RunConfig_Deserialize,
/** Keys of the source entry with no equivalent here (`preLaunchTask`, `justMyCode`…). */
ignored: string[],
};
export type ImportedRunConfig_Serialize = {
config: RunConfig_Serialize,
/** Keys of the source entry with no equivalent here (`preLaunchTask`, `justMyCode`…). */
ignored: string[],
};
export type ImportsOnPaste = "ask" | "always" | "never";
export type IndentConfig = IndentConfig_Serialize | IndentConfig_Deserialize;
export type IndentConfig_Deserialize = {
"tab-size": number,
"insert-spaces": boolean,
};
export type IndentConfig_Serialize = {
tabSize: number,
insertSpaces: boolean,
};
export type IndentStyle = "space" | "tab";
/** A published plugin version. */
export type IndexEntry = {
id: string,
name: string,
version: string,
description?: string,
authors?: string[],
publisher: string,
/** The package, relative to the index (or an absolute URL). */
download: string,
/** [`package_digest`] of its contents. */
digest: string,
capabilities?: string[],
/**
* The plugin API versions it loads in (a semver requirement): its
* manifest's `engines.openidea` and the API its component was built for.
* Required: an entry without one is offered to no IDE.
*/
engine?: string,
/** Marketplace categories (`CATEGORIES`); an IDE ignores those it doesn't know. */
categories?: string[],
/**
* The manifest's icon, sanitised by whoever wrote the index and again by
* the IDE before showing it.
*/
icon?: PluginIcon | null,
/** Where to read more: the manifest's homepage, else the registry's source repository. */
homepage?: string | null,
/** This version's release notes (the manifest's `change-notes`). */
notes?: string | null,
/** Downloads of the plugin's packages, as counted by whoever serves them. */
downloads?: number | null,
/** Picked by the marketplace's maintainers. */
featured?: boolean,
/**
* Project-relative paths whose presence makes the plugin worth suggesting
* (`pom.xml`, `config/routes.rb`).
*/
suggest?: string[],
};
export type IndexStatus = {
indexing: boolean,
files: number,
symbols: number,
};
export type IndexedMarker = {
range: Range,
targets: Location[],
pluginId: string,
/** The `[[contributes.markerIcons]]` id whose `markers` prefix matches the marker's key. */
icon: string | null,
};
/** Injection data. */
export type Injection = {
range: Range,
language: string,
};
export type InlayHint = {
position: Pos,
label: string,
kind: InlayKind,
paddingLeft: boolean,
paddingRight: boolean,
tooltip: string | null,
/**
* The label's parts when the server split it (empty for a plain label);
* their values concatenate to `label`.
*/
parts: InlayLabelPart[],
};
/** Editor › Inlay Hints. */
export type InlayHintsSettings = {
types?: boolean,
parameters?: boolean,
/** Hints of other kinds (chaining, closing labels…). */
other?: boolean,
disabledLanguages?: string[],
/** Code vision as a whole (usages, author and language-server lenses); the switches below apply while it is on. */
codeVision?: boolean,
/** Code vision: usages above declarations. */
codeVisionUsages?: boolean,
/** Code vision: last author of a declaration (VCS blame) beside its usages. */
codeVisionAuthor?: boolean,
/** Code vision: "no usages" on declarations nothing uses (IDEA shows it; clicking searches everywhere). */
codeVisionNoUsages?: boolean,
/** Code vision: where the usages go, above the declaration or at the end of its line. */
codeVisionUsagesPosition?: CodeVisionPosition,
/** Code vision: where the author goes, above the declaration or at the end of its line. */
codeVisionAuthorPosition?: CodeVisionPosition,
};
export type InlayKind = "type" | "parameter" | "other";
/** One part of an inlay hint label, e.g. a type name that navigates to its declaration. */
export type InlayLabelPart = {
value: string,
tooltip: string | null,
/** Declaration the part stands for (⌘-click navigates there). */
location: Location | null,
};
/** One `textDocument/inlineCompletion` suggestion (ghost text at the caret). */
export type InlineCompletionItem = {
/** Text that replaces `range`; snippets arrive as their plain text. */
insertText: string,
/** Replaced range; `None` inserts at the caret. */
range: Range | null,
/** What the typed text is matched against while the suggestion stays shown (default: `insert_text`). */
filterText: string | null,
/** Run after the suggestion is accepted. */
command: Command | null,
server: ServerId,
};
/**
* Editor › General › Inline Completion: ghost text from language servers that
* support `textDocument/inlineCompletion` (LSP 3.18).
*/
export type InlineCompletionSettings = {
enabled?: boolean,
/** Ask only once typing has paused for `pause_ms`, instead of right after each change. */
onlyOnPause?: boolean,
pauseMs?: number,
disabledLanguages?: string[],
};
/** The focused editor's input mode and optional visual sub-mode. */
export type InputMode = {
path: string,
mode: string,
sub: string | null,
};
export type InspectEvent =
/** Files about to be inspected. */
{ type: "started"; total: number } |
/** A file finished (with or without problems). */
{ type: "file"; file: InspectedFile; done: number } | { type: "done"; summary: InspectSummary };
export type InspectSummary = {
/** Files inspected by a language server. */
files: number,
problems: number,
/** Files in scope no language server serves. */
skipped: number,
/** Files whose server failed or never became ready. */
failed: number,
cancelled: boolean,
elapsedMs: number,
};
export type InspectedFile = {
path: IpcPath,
relPath: string,
diagnostics: Diagnostic[],
};
/** IDEA's highlighting levels. */
export type InspectionLevel = "error" | "warning" | "weakWarning" | "serverProblem" | "typo" |
/** Reported (Problems, Inspect Code) but not highlighted in the editor. */
"none";
/** Changes to one inspection; absent fields keep the inspection's defaults. */
export type InspectionOverride = {
enabled?: boolean | null,
severity?: InspectionLevel | null,
/**
* The inspection's own options (Typo: `processCode`, `processLiterals`,
* `processComments`); absent ones keep their defaults.
*/
options?: { [key in string]: boolean } | null,
};
export type InspectionSettings = {
/**
* Profile in effect for the project: `default`, `project`, or a copy
* as `ide:<key>` / `project:<key>`.
*/
profile?: string,
/** The `Default` profile (IDE level): inspection id → override. */
default?: { [key in string]: InspectionOverride },
/** The `Project Default` profile (stored with the project). */
project?: { [key in string]: InspectionOverride },
/** Profiles copied at IDE level (global settings), by key. */
ideProfiles?: { [key in string]: CustomInspectionProfile },
/** Profiles copied at project level (project settings), by key. */
projectProfiles?: { [key in string]: CustomInspectionProfile },
};
/** A command line that installs a missing tool (run in the Run tool window). */
export type InstallCommand = {
command: string,
args: string[],
cwd: IpcPath | null,
};
/** Streamed install progress. */
export type InstallEvent =
/** One line of installer output. */
{ type: "line"; text: string } |
/** Download progress; `fraction` is 0..1 when the size is known. */
{ type: "progress"; fraction: number | null; message: string };
/** What the install page shows before anything is copied. */
export type InstallPreview = {
id: string,
name: string,
version: string,
description: string,
authors: string[],
hasCode: boolean,
capabilities: CapabilityInfo[],
contributions: ContributionCount[],
warnings: string[],
/** Version currently installed under the same id. */
replaces: string | null,
/** Not signed by a publisher the marketplace index trusts: warn the user. */
unsigned: boolean,
/** The verified publisher. */
publisher: string | null,
/**
* Replaces an installed copy signed with another key, which didn't
* endorse this package's (or this one is unsigned): the user confirms it
* ([`Consent::signer_change`]).
*/
signerChanged: boolean,
/**
* Something to confirm: a first install, an unsigned package, another
* signer, or capabilities the installed version wasn't granted or
* refused. Without, an update installs with the grants it has.
*/
needsConsent: boolean,
};
export type InstallRemoteSkillRequest = {
owner: string,
repo: string,
gitRef: string,
subpath: string,
scope: McpScope,
/** Must be `true` when the static security scan produces any warnings. */
confirmWarnings?: boolean,
/** Must be `true` to replace an existing folder of the same name in `scope`. */
overwrite?: boolean,
};
/** The settings folder of a JetBrains IDE (or Android Studio) of this user. */
export type InstalledIdeSettings = {
/** The IDE and its version: `IntelliJ IDEA 2025.2`. */
ide: string,
/** What Import Settings reads. */
path: IpcPath,
};
/** A theme of a plugin installed in a JetBrains IDE. */
export type InstalledIntellijTheme = {
/** The IDE and its version: `IntelliJ IDEA 2025.2`. */
ide: string,
/** The plugin's name. */
plugin: string,
/** What to import: the plugin's folder or jar. */
path: IpcPath,
themeId: string,
themeName: string,
dark: boolean,
/** The IDE is set to this theme. */
active: boolean,
};
export type IntellijThemeFile = {
/** The `themeProvider` id (what `laf.xml` names), or the file name without `.theme.json`. */
id: string,
/** The `.theme.json`, comments removed. */
theme: string,
/** The editor scheme (`.icls` XML) its `editorScheme` names, when the plugin has it. */
editorScheme: string | null,
};
/** A theme plugin's themes, as read from its files. */
export type IntellijThemeSource = {
/** The plugin's `<name>`, or the theme's for a loose file. */
name: string,
pluginId: string | null,
version: string | null,
vendor: string | null,
themes: IntellijThemeFile[],
};
/** A member Extract Interface can declare in the new interface. */
export type InterfaceMember = {
name: string,
/** The method's return type or the field's type. */
typeName: string,
/** The method's parameter types; `None` for a field. */
parameters: string[] | null,
/** The server's handle of the member, passed back unchanged. */
handleIdentifier: string,
};
/** Optional parts of the invalidation; the symbol index is always rebuilt. */
export type InvalidateCachesOptions = {
/** Local History of every project. */
localHistory?: boolean,
/** Language server workspaces (jdtls `-data`, …): servers re-import the project. */
languageServers?: boolean,
/** Build tool sync results (Maven / Gradle) and other per-project caches. */
buildCaches?: boolean,
};
/** A path field of an IPC type. */
export type IpcPath = string;
export type Isolation =
/** A new git worktree on its own branch. */
"worktree" |
/** The project's own checkout. */
"local";
export type IssueLink = {
/** Regular expression matched in commit messages. */
pattern?: string,
/** Link with `$0` (whole match) / `$1`… (groups) placeholders. */
link?: string,
};
/** Result of `java/buildWorkspace` (jdtls `BuildWorkspaceStatus`). */
export type JavaBuildStatus = "failed" | "succeeded" |
/** Compiled, but some project has compile errors. */
"withErrors" | "cancelled";
/** One error diagnostic; `line` / `column` are 1-based for display. */
export type JavaCompileError = {
path: IpcPath,
line: number,
column: number,
message: string,
};
/** Everything needed to launch a class of a module: build outcome, classpath and JDK. */
export type JavaLaunchInfo = {
/** `None` when no build was requested. */
build: JavaBuildStatus | null,
projectRoot: IpcPath | null,
classPaths: string[],
modulePaths: string[],
/** Path list separator of the host that runs the JVM. */
pathListSeparator: string,
/** JDK home jdtls compiles the project against. */
javaHome: IpcPath | null,
/** The `java` launcher to use (filled in by the caller from the installed JDKs). */
javaExec: string | null,
/**
* How a launcher that builds the command line itself must shorten it (java-debug's
* `shortenCommandLine`: `none` | `jarmanifest` | `argfile`; filled in by the caller).
*/
shortenCommandLine: string | null,
/** First compile errors of the workspace when the build had errors. */
errors: JavaCompileError[],
/** All compile errors (`errors` is capped). */
errorCount: number,
/** Likely causes of the errors worth telling the user (e.g. a missing Lombok agent). */
hints: string[],
};
export type JavaSettings = {
/**
* Project JDK home; empty = per module, the installed JDK matching the
* Java version it targets.
*/
jdk?: string,
/** Project Java language level (`8`, `11`, `17`, `21`, `25`); empty = SDK default. */
languageLevel?: string,
/**
* JDK home the Java language server (jdtls) runs on, apart from the project
* JDK (IDEA's "JDK for importer"); empty = the project JDK when new enough,
* else the first installed one that is.
*/
jdtlsJdk?: string,
/**
* Extra JVM options for the Java language server (jdtls), space-separated
* (VS Code's `java.jdt.ls.vmargs`).
*/
jdtlsVmArgs?: string,
/** Share one JDT LS across builds in an ordinary project window; other windows remain separate. */
jdtlsShared?: boolean,
/**
* JDK homes added by hand (Platform Settings › SDKs › Add JDK from Disk…), listed with the
* detected ones.
*/
addedJdks?: string[],
/** Build Tools › Maven. */
maven?: MavenSettings,
/** Build Tools › Gradle. */
gradle?: GradleSettings,
};
/** Java versions a vendor publishes. */
export type JdkReleases = {
/** Feature versions, newest first. */
versions: number[],
/** The long-term-support ones among them. */
lts: number[],
/** The version offered first (the newest LTS). */
recommended: number,
};
/** A JDK distribution the IDE can download. */
export type JdkVendor = {
id: string,
name: string,
};
/**
* A JetBrains IDE's settings folder or exported archive: every
* entry name, and the text of the entries OpenIDEA maps (the frontend does the mapping).
*/
export type JetBrainsSettings = {
entries: string[],
/**
* Entry name → text, for the files OpenIDEA reads: `colors/*.icls`, `keymaps/*.xml`,
* `codestyles/*.xml` and some of `options/`.
*/
files: { [key in string]: string },
};
/** The script frame that made a request, where the browser ran it (0-based line and column). */
export type JsInitiator = {
function: string,
url: string,
line: number,
column: number,
};
/**
* What a debugged page's browser reports about a request, reduced to what the Network view
* shows. Events of one request share `request_id`; each kind fills its own fields.
*/
export type JsNetworkEvent = {
kind: JsNetworkKind,
requestId: string,
/** The browser's monotonic clock, comparable between the events of a page. */
timestampMs: number,
/** Request and response. */
url: string | null,
method: string | null,
/** `Fetch`, `XHR`, `Script`, `Document`, … */
resourceType: string | null,
status: number | null,
mimeType: string | null,
/** The request's headers, or the response's. */
headers: { [key in string]: string },
/** Bytes received over the network, once finished. */
encodedLength: number | null,
errorText: string | null,
initiator: JsInitiator | null,
};
/** Which step of a request a [`JsNetworkEvent`] reports. */
export type JsNetworkKind = "request" | "response" | "finished" | "failed";
/** The body of a response, as text or as the browser's base64 for binary content. */
export type JsResponseBody = {
body: string,
base64Encoded: boolean,
/** The body was longer than [`RESPONSE_BODY_LIMIT`] and is cut there. */
truncated: boolean,
};
/** A response given in place of the server's to every request whose URL contains `url_contains`. */
export type JsResponseRule = {
urlContains: string,
status: number,
contentType: string,
body: string,
};
/** The backend that reads a debugged JVM's objects (instances, fields, referrers). */
export type JvmBackendState = { kind: "ready" } |
/** Turned off for the rest of the session: the debug adapter lacks what it needs. */
{ kind: "unsupported"; detail: string } |
/** The Kotlin JDWP link only forwards now; inspecting stops. */
{ kind: "degraded"; detail: string } | { kind: "closed" };
export type JvmClassRow = {
name: string,
module: string | null,
instances: number,
bytes: number,
/** Change since the previous snapshot; `None` on the first one and for ambiguous rows. */
deltaInstances: number | null,
deltaBytes: number | null,
/** Several classes share this name (different class loaders), so it has no delta. */
ambiguous: boolean,
};
/** For arrays `name` is `"[i]"`. */
export type JvmField = {
name: string,
value: JvmValue,
};
export type JvmFieldsResult = { status: "ready"; fields: JvmField[] } | { status: "unavailable"; reason: JvmInspectUnavailable };
export type JvmFilePresentation = {
path: string,
presentation: JvmPresentation,
};
export type JvmHeapUnavailable =
/** The reason a class table could not be read applies to the dump too. */
{ kind: "memory"; reason: JvmMemoryUnavailable } |
/** Bytes. */
{ kind: "notEnoughDiskSpace"; needed: number; available: number } | { kind: "dumpFailed"; message: string } | { kind: "dumpTimedOut"; seconds: number };
export type JvmInspectUnavailable =
/** The session has no inspector: not a JVM session, not ready yet, or turned off. */
{ kind: "noBackend" } |
/** The debug adapter lacks what the inspector needs; turned off for the session. */
{ kind: "unsupported"; detail: string } | { kind: "notSuspended" } |
/** The object is from an earlier stop, or the program stopped or resumed meanwhile. */
{ kind: "stale" } | { kind: "collected" } | { kind: "classNotLoaded" } | { kind: "vmNotFound" } |
/** Transient: ask again. */
{ kind: "timedOut" } | { kind: "backendClosed" };
export type JvmInstancesResult = { status: "ready";
/** Goes into the [`JvmObjectRef`] of each instance. */
generation: number; instances: JvmValue[];
/** The limit was reached; there may be more. */
truncated: boolean } | { status: "unavailable"; reason: JvmInspectUnavailable };
export type JvmMemoryResult = { status: "ready"; snapshot: JvmMemorySnapshot } | { status: "unavailable"; reason: JvmMemoryUnavailable;
/** The debugger could count the classes if the program were paused. */
canCountWhenPaused: boolean };
export type JvmMemorySnapshot = {
/** Largest `bytes` first. */
rows: JvmClassRow[],
totalInstances: number,
totalBytes: number,
/** Empty when unknown. */
javaVersion: string,
takenWhileSuspended: boolean,
/** A previous snapshot from the same source exists; deltas are against it. */
hasBaseline: boolean,
/** Wall time of the histogram or count request. */
elapsedMs: number,
source: JvmMemorySource,
};
export type JvmMemorySource =
/** `GC.class_histogram -all`: sizes, and objects not yet collected. */
"histogram" |
/** JDWP `InstanceCounts`: reachable objects only, no sizes (`bytes` is 0). */
"debugger";
export type JvmMemoryUnavailable =
/** An attach session whose JVM is remote, or local but not found by its JDWP port. */
{ kind: "attachedJvmNotFound" } |
/**
* An attach through the IDE's listen-mode relay: the JVM connected to the IDE, so it has
* no JDWP listener to be found by.
*/
{ kind: "listenModeNotSupported" } | { kind: "unsupportedPlatform" } | { kind: "noJvmProcess" } | { kind: "listenerNotRunning" } |
/** `java_major` is 0 when the version is unknown. */
{ kind: "unsafeWhileSuspended"; javaMajor: number } | { kind: "programExited" } | { kind: "timedOut" };
export type JvmObjectRef = {
/** The `generation` of the [`JvmInstancesResult`] the object came from. */
generation: number,
id: number,
};
export type JvmPresentation = {
kind: JvmTypeKind | null,
springBoot: boolean,
runnable: boolean,
/** `@Deprecated`, or a Java `@deprecated` Javadoc tag. */
deprecated: boolean,
};
export type JvmReferrer = {
value: JvmValue,
/** Field names, or `"[i]"` for array slots, through which `value` points at the object. */
via: string[],
};
export type JvmReferrersResult = { status: "ready"; referrers: JvmReferrer[]; truncated: boolean } | { status: "unavailable"; reason: JvmInspectUnavailable };
export type JvmTypeKind = "class" | "abstractClass" | "interface" | "enum" | "record" | "annotation" | "exception" | "object";
export type JvmValue = { kind: "null" } | { kind: "primitive"; typeName: string; text: string } |
/** `text` is `None` when `length` exceeds [`STRING_PREVIEW_CHARS`]. */
{ kind: "string"; id: number; text: string | null; length: number } | { kind: "boxed"; id: number; typeName: string; text: string } | { kind: "object"; id: number; typeName: string } | { kind: "array"; id: number; typeName: string; length: number };
/** Editor › Code Style › <Language> › Tabs and Indents (unset fields inherit). */
export type LanguageCodeStyle = LanguageCodeStyle_Serialize | LanguageCodeStyle_Deserialize;
/** Editor › Code Style › <Language> › Tabs and Indents (unset fields inherit). */
export type LanguageCodeStyle_Deserialize = {
/** Java formatter: `default` | `intellij` | `custom` (other languages ignore it). */
formatter?: string | null,
/** Eclipse formatter XML; relative paths start at the project root. */
formatterPath?: string | null,
useTab?: boolean | null,
tabSize?: number | null,
indent?: number | null,
hardWrapAt?: number | null,
/** Comment Code › Line comment at first column. */
lineCommentAtFirstColumn?: boolean | null,
/** Comment Code › Add a space at line comment start. */
lineCommentAddSpace?: boolean | null,
/** PHP: align `=>` in multi-line arrays after formatting (other languages ignore it). */
alignKeyValuePairs?: boolean | null,
/** PHP: align `=` of consecutive assignment statements after formatting. */
alignConsecutiveAssignments?: boolean | null,
};
/** Editor › Code Style › <Language> › Tabs and Indents (unset fields inherit). */
export type LanguageCodeStyle_Serialize = {
/** Java formatter: `default` | `intellij` | `custom` (other languages ignore it). */
formatter?: string | null,
/** Eclipse formatter XML; relative paths start at the project root. */
formatterPath?: string | null,
useTab?: boolean | null,
tabSize?: number | null,
indent?: number | null,
hardWrapAt?: number | null,
/** Comment Code › Line comment at first column. */
lineCommentAtFirstColumn?: boolean | null,
/** Comment Code › Add a space at line comment start. */
lineCommentAddSpace?: boolean | null,
/** PHP: align `=>` in multi-line arrays after formatting (other languages ignore it). */
alignKeyValuePairs?: boolean | null,
/** PHP: align `=` of consecutive assignment statements after formatting. */
alignConsecutiveAssignments?: boolean | null,
};
/** Language identifier, e.g. `rust`, `typescript`, `kotlin`. Matches LSP `languageId`. */
export type LanguageId = string;
/** The UI-facing view of a language. */
export type LanguageInfo = LanguageInfo_Serialize | LanguageInfo_Deserialize;
/** The UI-facing view of a language. */
export type LanguageInfo_Deserialize = {
id: LanguageId,
name: string,
extensions: string[],
uiMode: string | null,
lineComment: string | null,
blockComment: [string, string] | null,
indent: IndentConfig_Deserialize | null,
/** A debug adapter is configured (breakpoints make sense in these files). */
debuggable?: boolean,
/** Names of the configured language servers (Settings › Inspections). */
languageServers?: string[],
/** Exact file names and file-name patterns of the definition (Settings › File Types). */
filenames?: string[],
/** First-line regex of the definition (shebangs, `<?php`). */
firstLine?: string | null,
/** Content of a new scratch file; `$END$` marks where the caret goes. */
scratchTemplate?: string | null,
/** Syntax nodes whose `<` `>` rainbow brackets colour (Color Scheme › Rainbow brackets). */
rainbowBrackets?: RainbowBracketNodes,
};
/** The UI-facing view of a language. */
export type LanguageInfo_Serialize = {
id: LanguageId,
name: string,
extensions: string[],
uiMode: string | null,
lineComment: string | null,
blockComment: [string, string] | null,
indent: IndentConfig_Serialize | null,
/** A debug adapter is configured (breakpoints make sense in these files). */
debuggable?: boolean,
/** Names of the configured language servers (Settings › Inspections). */
languageServers?: string[],
/** Exact file names and file-name patterns of the definition (Settings › File Types). */
filenames?: string[],
/** First-line regex of the definition (shebangs, `<?php`). */
firstLine?: string | null,
/** Content of a new scratch file; `$END$` marks where the caret goes. */
scratchTemplate?: string | null,
/** Syntax nodes whose `<` `>` rainbow brackets colour (Color Scheme › Rainbow brackets). */
rainbowBrackets?: RainbowBracketNodes,
};
export type LanguageServerSettings = LanguageServerSettings_Serialize | LanguageServerSettings_Deserialize;
export type LanguageServerSettings_Deserialize = {
/** `false` keeps the server from starting for any language. */
enabled?: boolean,
/**
* Executable to launch instead of the definition's; required for a server
* defined here (one with `languages`).
*/
command?: string,
/** Replaces the definition's arguments. */
args?: string[] | null,
/** Added to the server's environment. */
env?: { [key in string]: string },
/** Merged over the definition's `initializationOptions` (sent once at startup). */
initializationOptions?: unknown | null,
/**
* Answers the server's `workspace/configuration` requests; changes are pushed
* with `workspace/didChangeConfiguration` without a restart.
*/
settings?: unknown | null,
/**
* Language ids a server defined here serves (`python`); empty for the servers
* of the language definitions.
*/
languages?: string[],
/** Files marking a workspace root for a server defined here (`pyproject.toml`). */
rootMarkers?: string[],
/**
* Replaces the definition's `features`: what the server is used for
* (`code-action`, `hover`, …); an empty list means everything.
*/
features?: string[] | null,
/**
* Replaces the definition's `code-action-kinds` (`refactor`); an empty
* list keeps every kind.
*/
codeActionKinds?: string[] | null,
};
export type LanguageServerSettings_Serialize = {
/** `false` keeps the server from starting for any language. */
enabled: boolean,
/**
* Executable to launch instead of the definition's; required for a server
* defined here (one with `languages`).
*/
command: string,
/** Replaces the definition's arguments. */
args?: string[] | null,
/** Added to the server's environment. */
env: { [key in string]: string },
/** Merged over the definition's `initializationOptions` (sent once at startup). */
initializationOptions?: unknown | null,
/**
* Answers the server's `workspace/configuration` requests; changes are pushed
* with `workspace/didChangeConfiguration` without a restart.
*/
settings?: unknown | null,
/**
* Language ids a server defined here serves (`python`); empty for the servers
* of the language definitions.
*/
languages: string[],
/** Files marking a workspace root for a server defined here (`pyproject.toml`). */
rootMarkers: string[],
/**
* Replaces the definition's `features`: what the server is used for
* (`code-action`, `hover`, …); an empty list means everything.
*/
features?: string[] | null,
/**
* Replaces the definition's `code-action-kinds` (`refactor`); an empty
* list keeps every kind.
*/
codeActionKinds?: string[] | null,
};
export type LanguagesSettings = {
/** Explicit plugin formatter, by language id. Empty entries use the normal formatter policy. */
pluginFormatters?: { [key in string]: string },
python?: PythonSettings,
node?: NodeSettings,
php?: PhpSettings,
rust?: RustSettings,
go?: GoSettings,
typescript?: TypeScriptSettings,
prettier?: ExternalFormatterSettings,
oxfmt?: ExternalFormatterSettings,
biome?: ExternalFormatterSettings,
ruff?: ExternalFormatterSettings,
java?: JavaSettings,
ruby?: RubySettings,
markdown?: MarkdownSettings,
arduino?: ArduinoSettings,
zig?: ZigSettings,
};
/** What a freshly opened window should do once its frontend is up. */
export type Launch = Launch_Serialize | Launch_Deserialize;
export type LaunchConfig = {
name: string,
/** DAP adapter name from `languages/*.toml` (or a built-in: codelldb, debugpy, js-debug, delve, netcoredbg). */
adapter: string,
/** `launch` or `attach`. */
request: string,
program: string | null,
args: string[],
cwd: IpcPath | null,
env: { [key in string]: string },
/**
* Adapter specific extra arguments as JSON text, merged into the launch request.
* A `"cargo": {"args": [...], "filter": {"name", "kind"}}` entry builds with cargo
* and launches the produced executable; `"debugServer": <port>` connects to an
* adapter already listening on that local port (e.g. java-debug inside jdtls)
* instead of starting one, `"debugServer": "host:port"` to one on another machine
* (`dlv --headless`, `debugpy --listen`).
*/
extraJson: string | null,
};
/** What a freshly opened window should do once its frontend is up. */
export type Launch_Deserialize = {
/** Project folder to open. */
project: IpcPath | null,
/**
* Files to open in the editor: in `project` once it is open, else in this
* window's project or (without one) in LightEdit.
*/
files: IpcPath[],
/** Remote project to open (Remote Development). */
remote: RemoteLaunch | null,
/** Settings windows: the page to show. */
settingsPage: string | null,
/** Settings windows: edit the global layer only ("Settings for New Projects"). */
newProjects: boolean,
/** Where to place the caret in some of `files` (`openidea --line 12 --column 5 <file>`). */
positions?: FilePosition[],
/** Comparison windows: the revisions to compare (boxed: most launches have none). */
comparison?: ComparisonLaunch | null,
/** Diff windows: the diff to show (boxed: most launches have none). */
diffWindow?: DiffLaunch_Deserialize | null,
/** `openidea diff a.txt b.txt`: the two files to open in the diff viewer (boxed: most launches have none). */
diff?: DiffFilesLaunch | null,
/** Files requested after the pending diff take focus after it opens. */
diffBeforeFiles?: boolean,
/** Deployment windows: the server and local selection to compare. */
deployment?: DeploymentLaunch | null,
/** Editor windows: the file to show (Open in New Window → lightweight aux editor). */
editor?: EditorLaunch_Deserialize | null,
};
/** What a freshly opened window should do once its frontend is up. */
export type Launch_Serialize = {
/** Project folder to open. */
project: IpcPath | null,
/**
* Files to open in the editor: in `project` once it is open, else in this
* window's project or (without one) in LightEdit.
*/
files: IpcPath[],
/** Remote project to open (Remote Development). */
remote: RemoteLaunch | null,
/** Settings windows: the page to show. */
settingsPage: string | null,
/** Settings windows: edit the global layer only ("Settings for New Projects"). */
newProjects: boolean,
/** Where to place the caret in some of `files` (`openidea --line 12 --column 5 <file>`). */
positions: FilePosition[],
/** Comparison windows: the revisions to compare (boxed: most launches have none). */
comparison: ComparisonLaunch | null,
/** Diff windows: the diff to show (boxed: most launches have none). */
diffWindow: DiffLaunch_Serialize | null,
/** `openidea diff a.txt b.txt`: the two files to open in the diff viewer (boxed: most launches have none). */
diff: DiffFilesLaunch | null,
/** Files requested after the pending diff take focus after it opens. */
diffBeforeFiles: boolean,
/** Deployment windows: the server and local selection to compare. */
deployment: DeploymentLaunch | null,
/** Editor windows: the file to show (Open in New Window → lightweight aux editor). */
editor: EditorLaunch_Serialize | null,
};
/** One SDK or library with its source folders (`< Python 3.12 (.venv) >`). */
export type LibraryGroup = {
/** Display name, e.g. `Python 3.12 (.venv)`. */
name: string,
/** `python` | `jdk` | `nodeModules` | `nodeCore` | `rust` | `cargo` | `go` | `goModules` | `maven` | `gradle` | `classpath` | `zig` | `zigPackages`. */
kind: string,
roots: LibraryRoot[],
};
export type LibraryRoot = {
/**
* Folder name, e.g. `python3.12` or `site-packages`, the package (`serde 1.0.200`)
* or the archive (`src.zip`, `guava-33.0.0-jre-sources.jar`).
*/
name: string,
/** A folder, or an archive's root (`<archive>!`). */
path: IpcPath,
};
/** Coverage of one source line. */
export type LineCoverage = {
/** 0-based. */
line: number,
/** Execution count (JaCoCo: covered instructions); 0 = not covered. */
hits: number,
branchesTotal: number,
branchesCovered: number,
};
export type LineEnding = "lf" | "crLf" | "cr";
/** Line-level change against HEAD for editor gutter markers (0-based lines). */
export type LineHunk = {
kind: HunkKind,
start: number,
/** Lines in the current text (0 for pure deletions). */
lines: number,
oldStart: number,
oldLines: number,
/** Original text of the hunk, for the inline diff popup / rollback. */
oldText: string,
};
/** A gutter marker from a plugin's `line-markers` provider. */
export type LineMarkerInfo = {
pluginId: string,
/** 0-based. */
line: number,
/** `navigate` (default), `implemented`, `implementing`, `run`. */
icon: string | null,
tooltip: string,
/** Opened on click. */
target: Location | null,
};
export type LineMatch = {
/** 0-based line. */
line: number,
/**
* Line text, truncated around the matches for very long lines: such a line comes as one
* `LineMatch` per window, so the same `line` can repeat.
*/
text: string,
/** UTF-16 column ranges within `text`. */
ranges: ([number, number])[],
/** Column offset of `text` in the real line (non-zero when truncated). */
textOffset: number,
};
/** Link from an output element to the input element it came from. */
export type Link = {
parent: number | null,
ambiguous: boolean,
};
/** What a symbolic link in a revision points to, resolved inside that revision's tree. */
export type LinkTarget = "dir" | "file" |
/** Dangling, outside the repository (absolute or above its root), or a link loop. */
"unresolved";
/** Settings › System Settings › Caches: where the local data lives. */
export type LocalDataInfo = {
/** The directory in use by this run. */
current: string,
/** The OS default (what clearing the custom directory returns to). */
defaultDir: string,
/** The custom root stored by Settings, if any (`current` is `<root>/<identifier>`). */
customRoot: string | null,
/** `OPENIDEA_LOCAL_DATA_DIR` is set and wins over everything Settings stores. */
envOverride: boolean,
};
/** What a local definition declares (nvim-treesitter `@local.definition.<kind>`). */
export type LocalKind = "var" | "parameter" | "function" | "type" | "import" | "macro" | "label" |
/** Plain `@local.definition` or a kind without a better mapping. */
"other";
/** A variable / parameter / nested function defined in a function-level scope. */
export type LocalSymbol = {
name: string,
kind: LocalKind,
/** The declaring identifier. */
definition: Range,
/** The scope the definition belongs to (block, function, lambda, loop…). */
scope: Range,
/**
* Every other occurrence that resolves to this symbol (reads, writes and,
* in languages where assignment declares — Python, Ruby, PHP, Bash —
* re-assignments), document order, excluding `definition`.
*/
references: Range[],
/**
* The resolution is unambiguous. `false` when the scope declares the name
* more than once in a language where that is not plain shadowing (JS `var`
* re-declaration, broken Java…): references were split by position and
* callers should confirm before renaming.
*/
certain: boolean,
/** The other declarations of the same name in `scope` (empty when `certain`). */
conflicts: Range[],
};
/** Result of `locals(pos)`. */
export type Locals =
/** No identifier at the position. */
{ status: "noIdentifier" } | { status: "notLocal"; name: string; range: Range; reason: NotLocalReason } | { status: "local"; symbol: LocalSymbol };
/** One looked-up executable. */
export type LocatedTool = {
name: string,
/** Absolute path, `None` when not found. */
path: IpcPath | null,
/** `22.6.0`, `1.85.0-nightly`; only for tools whose version matters. */
version: string | null,
};
/** Executables found for "run this file", and where single files are compiled to. */
export type LocatedTools = {
tools: LocatedTool[],
compileDir: IpcPath,
};
/**
* A range inside a specific file, or inside a virtual document (library
* class contents, decompiled code…) that only a language server can provide.
*/
export type Location = {
/**
* File path; for virtual targets the URI itself (equal to `uri`), which
* the UI opens as a read-only virtual document.
*/
path: IpcPath,
range: Range,
/** Set for non-`file:` targets, e.g. `jdt://contents/…`. */
uri?: string | null,
};
export type LogDetails = {
message: string,
containingBranches: string[],
/** Git's verification code: G/U good, B bad, E error, N unsigned, X/Y expired, R revoked. */
signature: string,
signer: string,
key: string,
fingerprint: string,
};
export type LogLevel = "debug" | "info" | "warn" | "error";
/**
* Per-level colours for console log lines: a line whose level is detected
* (`ERROR`, `WARN`, …) takes the level's colour; ANSI colours the program
* prints itself win over it. Values are CSS colours, usually scheme tokens.
*/
export type LogLevelColors = {
enabled?: boolean,
error?: string,
warn?: string,
info?: string,
debug?: string,
trace?: string,
};
export type LogLocation = {
dir: IpcPath,
/** Current log file, if one was written yet. */
file: IpcPath | null,
};
/** Order of the Git Log (Graph Options › Sort). */
export type LogOrder =
/** `--topo-order`: lines of history are not intermixed. */
"topo" |
/** `--date-order`: commit time, but never a parent before its children. */
"date" | "standard";
export type LogQuery = {
speedSearch?: string | null,
searchFields?: string[],
/** Jump directly to an indexed window containing this commit (50 rows of context). */
seek?: string | null,
retainUntil?: string | null,
branch: string | null,
path: IpcPath | null,
paths?: IpcPath[],
/** File history follows renames; structure filters retain fixed paths. */
follow?: boolean,
author: string | null,
text: string | null,
skip: number,
limit: number,
/**
* A revision range such as `@{u}..HEAD` (commits reachable from the right side but
* not the left). Takes precedence over `branch`.
*/
range?: string | null,
/** Additional ranges unioned with each other and with selected branches. */
ranges?: string[],
/** `text` is a regular expression (Log filter `.*`). */
textRegex?: boolean,
/** `text` matches case-sensitively (Log filter `Cc`). */
textMatchCase?: boolean,
/** More starting revisions next to `branch` (Log Branch filter with several branches). */
branches?: string[],
/** More author needles next to `author`; a commit matches any of them (Log User filter). */
authors?: string[],
authorsExact?: boolean,
order?: LogOrder,
/** Follow only the first parent of merges (`--first-parent`). */
firstParent?: boolean,
/** Leave out merge commits (`--no-merges`); their children link to their parents. */
noMerges?: boolean,
/**
* Committer time bounds (epoch ms; `since` inclusive, `until` exclusive). Parents
* outside the range are rewritten to their nearest shown ancestors (or dropped when
* older), so the graph stays connected.
*/
sinceMs?: number | null,
untilMs?: number | null,
request?: RequestId | null,
summaryOnly?: boolean,
/** Inclusive refresh boundary. Clients join only verified linear prefixes. */
stopAt?: string | null,
};
/** The single-letter logcat priority, in increasing severity. */
export type LogcatLevel = "verbose" | "debug" | "info" | "warn" | "error" | "fatal" |
/** A line logcat prints outside the message format (`--------- beginning of main`). */
"unknown";
/** One [`LogcatLevel`]-tagged line of `adb logcat -v threadtime`. */
export type LogcatLine = {
/** `MM-DD HH:MM:SS.mmm`, as logcat prints it (no year, device time zone). */
time: string,
pid: number,
tid: number,
level: LogcatLevel,
tag: string,
message: string,
};
export type LspRefreshKind = "inlayHints" | "semanticTokens" | "codeLens" |
/** The Dart server published a document's Flutter outline. */
"flutterOutline";
export type MainToolbarSettings = {
left?: string[],
right?: string[],
/** Widgets the user removed. */
hidden?: string[],
};
export type ManifestDependency = {
package: string,
requirement: string,
/** UTF-16 offsets of the string's contents (quotes excluded). */
from: number,
to: number,
};
export type MarkdownCommandDirectory =
/** The project's root folder. */
"project" |
/** The Markdown file's parent folder. */
"file";
export type MarkdownPreviewLayout = "sideBySide" | "stacked";
/** Languages & Frameworks › Markdown. Like IDEA's, it is application-level only. */
export type MarkdownSettings = {
previewLayout?: MarkdownPreviewLayout,
/** Preview (and notebook Markdown cell) font size in px; unset follows the editor font size. */
previewFontSize?: number | null,
/**
* "Detect commands that can be run right from Markdown files": gutter run icons on
* shell code blocks and on command lines in code blocks.
*/
runCommands?: boolean,
/** Where those commands run; unset asks when the project and the file's folder differ. */
commandDirectory?: MarkdownCommandDirectory | null,
};
/** A marketplace entry with what is installed. */
export type MarketPlugin = {
/** Installed version, if any. */
installed: string | null,
/** Whether this IDE can load `entry` (the newest version it can, else the newest). */
compatible: boolean,
/** The publisher's display name, as the index lists it. */
publisherName?: string | null,
} & IndexEntry;
export type Markup = {
/** `markdown` or `plaintext`. */
kind: string,
value: string,
};
export type MavenDependency = {
groupId: string,
artifactId: string,
version: string | null,
/** `jar`, `pom`, `test-jar`… */
type: string,
classifier: string | null,
scope: string,
optional: boolean,
/** Transitive dependencies (only after a sync). */
children: MavenDependency[],
/** Why Maven left this occurrence out of the resolved graph (`dependency:tree -Dverbose`). */
omitted?: Omission | null,
/** The version that won when `omitted` is `Conflict`. */
conflictWith?: string | null,
/** The version requested before `<dependencyManagement>` replaced it. */
managedFrom?: string | null,
};
export type MavenModel = {
/** Pre-order: every aggregator comes before its modules. */
projects: MavenProject[],
/** Profiles declared by any project, first declaration wins. */
profiles: MavenProfile[],
/** When the effective build was last read (Unix ms); `None` = only the static POM parse. */
syncedAt: number | null,
/** Build files changed since that sync. */
stale: boolean,
syncError: string | null,
};
export type MavenPlugin = {
groupId: string,
artifactId: string,
version: string | null,
/** Goal prefix (`clean`, `spring-boot`): goals run as `<prefix>:<goal>`. */
prefix: string,
/** Sorted goal names. */
goals: string[],
};
export type MavenProfile = {
/** Owning project folder when displayed in a workspace. */
projectRoot?: string | null,
id: string,
activeByDefault: boolean,
};
export type MavenProject = {
/** Owning project folder when displayed in a workspace. */
projectRoot?: string | null,
/** Project-relative, `/`-separated (`pom.xml`, `core/pom.xml`). */
pom: string,
/** Project-relative directory; `""` = the project root. */
dir: string,
groupId: string,
artifactId: string,
version: string,
packaging: string,
/** `<name>` (resolved), else the artifactId. */
displayName: string,
/** `groupId:artifactId:version` of the parent POM. */
parent: string | null,
/** `pom` paths of this aggregator's modules. */
modules: string[],
/** Listed as a module of another project here. */
aggregated: boolean,
plugins: MavenPlugin[],
dependencies: MavenDependency[],
/** Profile ids declared in this POM. */
profiles: string[],
/** Java feature version the project compiles for (`maven.compiler.release`, `java.version`…). */
javaVersion: number | null,
/**
* Maven launcher: the nearest `mvnw` (absolute), else `mvn`. Inside the opened
* project the search stops at its root; outside it, the search stops before
* that root so a linked project keeps its own wrapper.
*/
command: string,
/** Options before the goals (`-s`, `-Dmaven.repo.local=`); filled in by the shell from settings. */
options: string[],
/** Environment for runs (`JAVA_HOME` of the matching JDK); filled in by the shell. */
env: { [key in string]: string },
};
/** Build Tools › Maven. */
export type MavenSettings = {
/** JDK home used to run Maven; empty = Project JDK, else the POM's Java version. */
runnerJre?: string,
/** Project-relative root POMs removed from the Maven project model. */
unlinkedProjects?: string[],
/**
* POMs added as independent top-level projects. Inside the opened project the path is
* project-relative (`tools/pom.xml`); outside it, the canonical absolute path. Linking
* does not edit either POM.
*/
linkedProjects?: string[],
/** Maven home (or its `mvn` executable); empty = the project's `mvnw`, else `mvn` on `PATH`. */
home?: string,
/** User `settings.xml` (`-s`); empty = `~/.m2/settings.xml`. */
userSettings?: string,
/** Toolchains file (`-t`); empty = `~/.m2/toolchains.xml`. */
toolchains?: string,
/** Local repository (`-Dmaven.repo.local`); empty = from `settings.xml`. */
localRepository?: string,
/**
* Run Maven through the Maven Daemon (`mvnd`) for faster builds. mvnd embeds
* its own Maven, so `home` and the project's `mvnw` are bypassed when it is on.
*/
daemon?: boolean,
/**
* Maven Daemon home (or its `mvnd` executable); empty = `$MVND_HOME`, else
* `mvnd` on `PATH` / common install dirs. Only used when `daemon` is on.
*/
mvndHome?: string,
/**
* Thread count of Maven builds (`-T`): a number of threads (`4`) or a core
* multiplier (`2C`, `2.5C`); empty = Maven's default (one thread per module).
*/
threads?: string,
/** Active Maven profiles (`-P`), comma-separated; empty leaves profiles to the POM/settings. */
activeProfiles?: string,
/** Delegate IDE build/run actions to Maven: launches build with Maven (`javac`) instead of jdtls (ECJ). */
delegateBuild?: boolean,
/**
* Download `-sources.jar` of dependencies when the Java language server imports the
* project (jdtls `java.maven.downloadSources`). Off: sources are fetched on demand
* from a library class's Download Sources banner.
*/
downloadSources?: boolean,
/**
* Always update snapshots (`-U`): Maven checks remote repositories for newer SNAPSHOT
* dependencies on every sync, build and run, and jdtls on import (`java.maven.updateSnapshots`).
*/
updateSnapshots?: boolean,
};
/** What keeps an idle background project loaded. */
export type McpBackgroundHold =
/** A tool call is in flight. */
{ kind: "request" } |
/** A run it started is alive; `name` is the first one's. */
{ kind: "run"; name: string };
/** A project served without a window, as the IDE lists it. */
export type McpBackgroundProject = McpBackgroundProject_Serialize | McpBackgroundProject_Deserialize;
/** A project served without a window, as the IDE lists it. */
export type McpBackgroundProject_Deserialize = {
root: IpcPath,
/** Seconds since its last tool call began or ended. */
idleSeconds: number,
/**
* Seconds until it is unloaded for being idle. Absent while something keeps it open
* and when idle projects are never unloaded.
*/
unloadsInSeconds?: number | null,
keptOpenBy?: McpBackgroundHold | null,
};
/** A project served without a window, as the IDE lists it. */
export type McpBackgroundProject_Serialize = {
root: IpcPath,
/** Seconds since its last tool call began or ended. */
idleSeconds: number,
/**
* Seconds until it is unloaded for being idle. Absent while something keeps it open
* and when idle projects are never unloaded.
*/
unloadsInSeconds?: number | null,
keptOpenBy?: McpBackgroundHold | null,
};
/** Which folders without an open window the MCP server still serves tools for. */
export type McpBackgroundProjects =
/** Only projects open in a window. */
"off" |
/**
* Also folders the user trusts: trusted projects, recent projects and the repositories inside
* trusted locations.
*/
"trusted" |
/** Only the folders in [`McpServerSettings::background_project_paths`] (and below them). */
"listed";
/** Summary of one server discovered inside an external MCP configuration file. */
export type McpDiscoveredServer = {
name: string,
transport: McpTransport,
enabled: boolean,
command: string | null,
args: string[],
url: string | null,
/** Environment variable names declared on this server (values stay on the host). */
envKeys: string[],
/** HTTP header names declared on this server (values stay on the host). */
headerKeys: string[],
};
/** An external MCP configuration file discovered on disk (user CLI config or workspace file). */
export type McpExternalSource = {
/** Stable source identifier (e.g. `"copilot-cli"`, `"jetbrains-air"`, `"claude-code"`, `"cursor"`, `"workspace-mcp"`, `"vscode-mcp"`). */
id: string,
/** Human-readable source label (e.g. `"GitHub Copilot CLI"`). */
label: string,
/** Absolute path of the discovered configuration file. */
path: IpcPath,
/** Suggested target scope when importing this source into OpenIDEA settings. */
suggestedScope: McpScope,
/** Agent provider ID this external CLI reads natively (`Some("copilot")`, `Some("claude")`, `Some("cursor")`, or `None`). */
nativeProvider: string | null,
/** Servers found inside this external configuration file (values omitted for safety; imported directly on the host). */
servers: McpDiscoveredServer[],
};
/** Selection of one server from an external MCP configuration source to import. */
export type McpImportSelection = {
sourceId: string,
name: string,
};
/** A named environment variable or HTTP header for an MCP server. */
export type McpKeyValue = {
name: string,
value: string,
};
/** Result of testing/probing an MCP server (`initialize` + `tools/list`). */
export type McpProbeResult = {
ok: boolean,
serverName: string | null,
serverVersion: string | null,
protocolVersion: string | null,
tools: McpToolSummary[],
durationMs: number,
error: string | null,
};
/** Where an MCP server configuration is stored (`settings.toml` vs `.openidea/settings.toml`). */
export type McpScope = "user" | "workspace";
/** One configured Model Context Protocol (MCP) server. */
export type McpServer = {
id: string,
name: string,
scope: McpScope,
transport: McpTransport,
enabled: boolean,
command: string | null,
args: string[],
env: McpKeyValue[],
url: string | null,
headers: McpKeyValue[],
/** Agent provider ids this server is enabled for; empty means enabled for all agents. */
agents?: string[],
/** True when this Workspace server was added outside OpenIDEA and has not been approved yet. */
unapproved?: boolean,
};
/** Payload for creating or updating a user or workspace MCP server. */
export type McpServerInput = {
id?: string | null,
name: string,
scope: McpScope,
transport: McpTransport,
enabled?: boolean,
command?: string | null,
args?: string[],
env?: McpKeyValue[],
url?: string | null,
headers?: McpKeyValue[],
/** Agent provider ids this server is enabled for; empty means enabled for all agents. */
agents?: string[],
};
/** Agents › MCP Server: agents use the IDE's built-in tools. */
export type McpServerSettings = McpServerSettings_Serialize | McpServerSettings_Deserialize;
/** Agents › MCP Server: agents use the IDE's built-in tools. */
export type McpServerSettings_Deserialize = {
/** Serve the tools on [`Self::address`] while the IDE runs. */
enabled?: boolean,
/**
* Run the tools that change the project or start processes without asking first
* (IDEA's brave mode). Read from the IDE's own settings only, never a project's.
*/
runWithoutConfirmation?: boolean,
/** Finished agent tabs (`run_command`) the Run tool window shows; older ones are archived. */
agentTabLimit?: number,
/** Archived agent tabs kept; older ones are closed. */
agentArchiveLimit?: number,
/**
* The IP address to listen on: `127.0.0.1` (this computer only, the default), another
* address of this computer, or `0.0.0.0` / `::` for every address.
*/
address?: string,
/**
* Listen on [`Self::port`] in every run, rather than a free port each time, so HTTP clients and
* port forwards keep working after a restart.
*/
fixedPort?: boolean,
/** The port of [`Self::fixed_port`]. */
port?: number,
/**
* Keep the bearer token across runs (in the app data, readable by this user only) rather than
* make a new one each run.
*/
fixedToken?: boolean,
/**
* Serve tools for folders that have no open window (see [`McpBackgroundProjects`]); the
* project loads when an agent first asks for it.
*/
backgroundProjects?: McpBackgroundProjects,
/**
* The folders [`McpBackgroundProjects::Listed`] serves, and the ones `Trusted` serves even
* when untrusted.
*/
backgroundProjectPaths?: string[],
/**
* Minutes a background project may go without a tool call before it is unloaded, at most
* 1440; 0 keeps it until the IDE quits.
*/
backgroundIdleMinutes?: number,
/** Background projects loaded at once, 1 to 32; the least recently used one makes room. */
backgroundProjectLimit?: number,
};
/** Agents › MCP Server: agents use the IDE's built-in tools. */
export type McpServerSettings_Serialize = {
/** Serve the tools on [`Self::address`] while the IDE runs. */
enabled: boolean,
/**
* Run the tools that change the project or start processes without asking first
* (IDEA's brave mode). Read from the IDE's own settings only, never a project's.
*/
runWithoutConfirmation: boolean,
/** Finished agent tabs (`run_command`) the Run tool window shows; older ones are archived. */
agentTabLimit: number,
/** Archived agent tabs kept; older ones are closed. */
agentArchiveLimit: number,
/**
* The IP address to listen on: `127.0.0.1` (this computer only, the default), another
* address of this computer, or `0.0.0.0` / `::` for every address.
*/
address: string,
/**
* Listen on [`Self::port`] in every run, rather than a free port each time, so HTTP clients and
* port forwards keep working after a restart.
*/
fixedPort: boolean,
/** The port of [`Self::fixed_port`]. */
port: number,
/**
* Keep the bearer token across runs (in the app data, readable by this user only) rather than
* make a new one each run.
*/
fixedToken: boolean,
/**
* Serve tools for folders that have no open window (see [`McpBackgroundProjects`]); the
* project loads when an agent first asks for it.
*/
backgroundProjects: McpBackgroundProjects,
/**
* The folders [`McpBackgroundProjects::Listed`] serves, and the ones `Trusted` serves even
* when untrusted.
*/
backgroundProjectPaths: string[],
/**
* Minutes a background project may go without a tool call before it is unloaded, at most
* 1440; 0 keeps it until the IDE quits.
*/
backgroundIdleMinutes: number,
/** Background projects loaded at once, 1 to 32; the least recently used one makes room. */
backgroundProjectLimit: number,
};
/** What Settings › Agents › IDE MCP Server shows. */
export type McpServerStatus = {
running: boolean,
/** Why it isn't running though turned on. */
error: string | null,
/** The address listened on (`0.0.0.0` / `::`: every address). */
address: string | null,
port: number | null,
/**
* Why the fixed port (`mcpServer.port`) isn't the one listened on: it was in use or
* reserved, so a free port was taken for this run.
*/
portUnavailable: string | null,
/** The window's project, which the URL and command below are for. */
project: IpcPath | null,
/** `http://<address>:<port>/mcp?project=<root>`, with loopback for every address. */
url: string | null,
/** Bearer token of `url` (changes with every run unless `mcpServer.fixedToken` is on). */
token: string | null,
/** The stdio bridge: this host's executable and its arguments. */
stdioCommand: string[],
};
/** One tool advertised by an MCP server during `tools/list`. */
export type McpToolSummary = {
name: string,
description: string | null,
};
/** Transport of an MCP server configured in Settings › Agents › MCP Servers. */
export type McpTransport = "stdio" | "http" | "sse";
/**
* What a built-in MCP tool asks the project window for. `AgentRun` runs `command` (a shell
* line) in the Run tool window's agent tab `name`, on pipes, answered once the process
* started or failed to.
*/
export type McpUiRequest = { type: "confirm"; client: string; tool: string; subject: string; project: string; detail: string | null } | { type: "openFile"; path: IpcPath; line: number | null; column: number | null } | { type: "agentRun"; name: string; command: string; cwd: IpcPath; env: { [key in string]: string } };
export type MemoryCategory =
/** The backend and its WebView processes. */
"app" | "languageServer" |
/** Debug adapters, Run processes, terminal shells and other children. */
"process";
/** Localised labels and keymap accelerators, pushed by the frontend. */
export type MenuConfig = {
locale: string,
/** `menu.<id>` → label (ids of submenus, actions and `native.*` roles). */
labels: { [key in string]: string },
/**
* Action id → native accelerator of its first keymap binding, e.g. `Shift+Meta+O`.
* Absent when that binding has no native form (chord, double modifier).
*/
accelerators: { [key in string]: string },
/** [`Entry::Dynamic`] slot → its items, already localised. */
dynamic?: { [key in string]: DynamicItem[] },
/** Ids of the toggle actions currently on. */
checked?: string[],
};
/**
* A menu entry for a menu bar drawn by the frontend (Windows title bar).
* Labels are the English defaults; the frontend localises them like the native menu.
*/
export type MenuNode = MenuNode_Serialize | MenuNode_Deserialize;
/**
* A menu entry for a menu bar drawn by the frontend (Windows title bar).
* Labels are the English defaults; the frontend localises them like the native menu.
*/
export type MenuNode_Deserialize = ({ kind: "submenu"; id: string; label: string;
/** Saved layout selection, unset for ordinary submenus. */
current: boolean | null; children: MenuNode_Deserialize[] }) & { arg?: never; checked?: never; hint?: never } |
/**
* Runs `id` with `arg`. Items with an `arg` (Open Recent) carry their final label.
* `checked` is the state of a frontend-listed toggle (Status Bar Widgets). Spec toggles
* leave it unset: the frontend menu reads their state from the action (`toggled`), the
* source [`MenuConfig::checked`] is built from for the native menu.
*/
({ kind: "action"; id: string; label: string; hint: string | null; arg: string | null; checked: boolean | null }) & { children?: never; current?: never } |
/** A disabled placeholder such as "No Recent Projects". */
({ kind: "placeholder"; id: string; label: string }) & { arg?: never; checked?: never; children?: never; current?: never; hint?: never } | ({ kind: "separator" }) & { arg?: never; checked?: never; children?: never; current?: never; hint?: never; id?: never; label?: never };
/**
* A menu entry for a menu bar drawn by the frontend (Windows title bar).
* Labels are the English defaults; the frontend localises them like the native menu.
*/
export type MenuNode_Serialize = ({ kind: "submenu"; id: string; label: string;
/** Saved layout selection, unset for ordinary submenus. */
current?: boolean | null; children: MenuNode_Serialize[] }) & { arg?: never; checked?: never; hint?: never } |
/**
* Runs `id` with `arg`. Items with an `arg` (Open Recent) carry their final label.
* `checked` is the state of a frontend-listed toggle (Status Bar Widgets). Spec toggles
* leave it unset: the frontend menu reads their state from the action (`toggled`), the
* source [`MenuConfig::checked`] is built from for the native menu.
*/
({ kind: "action"; id: string; label: string; hint: string | null; arg: string | null; checked: boolean | null }) & { children?: never; current?: never } |
/** A disabled placeholder such as "No Recent Projects". */
({ kind: "placeholder"; id: string; label: string }) & { arg?: never; checked?: never; children?: never; current?: never; hint?: never } | ({ kind: "separator" }) & { arg?: never; checked?: never; children?: never; current?: never; hint?: never; id?: never; label?: never };
/** Merge dialog › Modify options (shared by the Pull dialog). */
export type MergeOptions = {
noFf?: boolean,
ffOnly?: boolean,
squash?: boolean,
noCommit?: boolean,
/** `-m`: message of the merge commit (Merge dialog only). */
message?: string | null,
};
/**
* Who stands on each side of the conflicts of the operation in progress (merge editor
* titles, as IDEA labels them).
*/
export type MergeSides = {
/** `merge`, `rebase`, `cherry-pick`, `revert`…; `None` outside an operation. */
operation: string | null,
/**
* Git's "ours" is not the user's work: during a rebase stage 2 holds the commits
* rebased onto and stage 3 the user's commit being replayed. [`MergeVersions`] is
* already swapped; conflict markers in the file are not.
*/
reversed: boolean,
/** The current branch (for a rebase: the branch being rebased). */
branch: string | null,
/**
* Short id of the commit being applied (REBASE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD)
* or merged (MERGE_HEAD).
*/
commit: string | null,
/** The other branch: the one being merged, or the one rebased onto. */
otherBranch: string | null,
};
/** The versions of a conflicted file as the merge editor shows them. */
export type MergeVersions = {
base: string | null,
/** The user's side ("Accept Yours"): git's stage 2, or stage 3 when `sides.reversed`. */
ours: string | null,
theirs: string | null,
sides: MergeSides,
/**
* Three-way merge of the versions above: non-conflicting changes merged, each
* conflict left as a diff3 block (yours / base / theirs). `None` when a side is
* missing (deleted on one side).
*/
merged: string | null,
};
/** What a method body does, for the shapes a check can decide without guessing. */
export type MethodBody =
/** `pass`, `...`, a docstring, or nothing at all. */
{ kind: "empty" } |
/** Exactly one `super().name(args)` call, optionally `return`ed. */
{ kind: "superCall"; returns: boolean; target: string; args: string[] } |
/** Anything else. */
{ kind: "other" };
/** The signature of the method at a position, as Change Signature edits it. */
export type MethodSignature = {
/** The server's handle of the method, passed back unchanged. */
methodIdentifier: string,
/** `public`, `protected`, `private`, or empty for package-private. */
modifier: string,
returnType: string,
methodName: string,
parameters: SignatureParameter[],
exceptions: SignatureException[],
};
/** Per-function totals (a recursive function's samples count once in `total`). */
export type MethodStat = {
frame: number,
selfWeight: number | null,
total: number | null,
};
/** Dependency entry of a module (Project Structure › Modules › Dependencies). */
export type ModuleDependency = {
/** `"library"` (references a `ProjectLibrary` by name or path) or `"module"` (references another module). */
kind?: string,
target?: string,
scope?: DependencyScope,
exported?: boolean,
};
/** Per-module Project Structure overrides (SDK, language level, output paths, dependencies). */
export type ModuleStructureSettings = {
/** Module SDK home override; empty = inherit Project SDK. */
jdk?: string,
/** Module language level override; empty = inherit Project language level. */
languageLevel?: string,
/** Module compiler output directory override; empty = inherit Project compiler output. */
compilerOutput?: string,
/** Module test compiler output directory override; empty = default. */
testCompilerOutput?: string,
/** Additional module dependencies. */
dependencies?: ModuleDependency[],
};
/**
* A named set of files: `file:src//*.ts && !file:*.test.ts` (project-relative path patterns
* joined with `||`, `&&`, `!` and parentheses).
*/
export type NamedScope = {
name?: string,
pattern?: string,
};
/**
* Where the Navigation Bar (the file path breadcrumbs) is shown. Mirrors
* IDEA's `View | Appearance | Navigation Bar` (Top / Status Bar / Don't show).
*/
export type NavigationBarPosition =
/** Above the editor, below the main menu / toolbar. */
"top" |
/**
* In the footer, next to the status bar widgets — the default, matching
* where the bar lived before the three-state choice existed.
*/
"statusBar" |
/** Not shown at all. */
"hidden";
export type NavigationFiles = {
paths: IpcPath[],
indexing: boolean,
extensions: string[],
};
export type NavigationResult = {
range: Range,
targets: Location[],
};
export type NewAgentTask = {
/** Validated by the host; defaults to the window project root. */
projectRoot?: IpcPath | null,
prompt: AgentPrompt,
provider: string,
/** Settings for the new session (model, mode…). */
config: AgentConfigChoice[],
isolation: Isolation,
/** Branch to start the worktree from; the current branch when `None`. */
base: string | null,
/** Per-session MCP server enable/disable overrides (`server_name` -> `enabled`). */
mcpOverrides?: { [key in string]: boolean },
/** Per-session skill modes (`skill name` -> mode). */
skillOverrides?: { [key in string]: AgentSkillMode },
/**
* Creates the task without sending `prompt` (it only names the task): the composer's
* `!` command runs in it first.
*/
idle?: boolean,
};
/** The approvals new agent tasks start with. */
export type NewTaskApprovals =
/** The agent's mode that approves everything without asking, when it has one. */
"bypass" |
/** A mode in which the agent asks before edits and commands. */
"ask";
/** Result of `node_at`: the smallest named node covering a range, with its ancestors. */
export type NodeAt = {
node: SyntaxNode,
/** Parent first, the root last. */
ancestors: SyntaxNode[],
};
export type NodeSettings = {
/** `node` executable; empty = the one on `PATH`. */
interpreter?: string,
/** Run PHP/Composer or Node/package-manager commands in this target; empty = project default, `local` = local. */
runTarget?: string,
/** `npm` | `pnpm` | `yarn`; empty = detect from the lock file / `packageManager`. */
packageManager?: string,
/**
* Runtime for running JavaScript / TypeScript files: `node` | `bun` | `deno`; empty = from the
* project (`deno.json` → Deno, `bun.lock` → Bun, else Node.js).
*/
runtime?: string,
};
/** Why an identifier is not treated as a local. */
export type NotLocalReason =
/** Member position (`obj.name`, `name:` labels, `foo()` method names in Java…). */
"member" |
/**
* Declared at file / class / module level (fields, methods, top-level
* functions, imports): visible beyond the local scope.
*/
"topLevel" |
/**
* No definition in an enclosing local scope: global, import, inherited
* member, or declared in a way the query does not cover.
*/
"unresolved";
export type NotebookCell = {
id: string,
cellType: string,
source: string,
metadata: unknown,
outputs: unknown[],
executionCount: number | null,
attachments: unknown,
};
/** The document the language servers know a code cell by. */
export type NotebookCellDoc = {
cell: string,
doc: DocId,
/** Also the `path` of the cell's diagnostics and of locations in it. */
uri: string,
};
export type NotebookEdit = { type: "setSource"; cell: string; source: string } | { type: "insertCell"; after: string | null; cellType: string } | { type: "deleteCell"; cell: string } | { type: "moveCell"; cell: string; before: string | null } | { type: "setCellType"; cell: string; cellType: string } | { type: "setOutputs"; cell: string; outputs: unknown[]; executionCount: number | null };
export type NotebookOutputEvent = {
id: string,
path: IpcPath,
cell: string,
msgId: string,
kind: string,
content: unknown,
version: number,
dirty: boolean,
changedCells: string[],
};
export type NotebookSnapshot = {
id: string,
path: IpcPath,
version: number,
dirty: boolean,
canUndo: boolean,
canRedo: boolean,
nbformat: number,
nbformatMinor: number,
metadata: unknown,
cells: NotebookCell[],
};
/** A notification button that runs one of the publishing plugin's commands. */
export type NotificationAction = {
label: string,
command: string,
argument: string | null,
};
export type NotificationGroupSettings = {
/** `balloon` | `sticky` | `none` */
display?: string,
/** Also list it in the Notifications tool window. */
log?: boolean,
};
export type NotificationLevel = "info" | "warning" | "error";
/** Notifications page: global switches and the per-group display type. */
export type NotificationSettings = {
balloons?: boolean,
sound?: boolean,
/** Mirror balloon notifications to the OS when no OpenIDEA window is focused. */
systemNotifications?: boolean,
/** Terminal command completions (#3712): `off` | `longRunning` | `all`. */
terminalCompletion?: string,
/** `longRunning`: the run time a finished command must reach, in seconds. */
terminalThresholdSeconds?: number,
/** Group id → display; groups not listed use their default. */
groups?: { [key in string]: NotificationGroupSettings },
};
export type NotifyLevel = "info" | "warning" | "error";
/** Why a dependency occurrence is not part of the resolved graph. */
export type Omission =
/** Another occurrence of the same version is nearer the root. */
"duplicate" |
/** Another version is nearer the root (or declared first) and wins. */
"conflict" |
/** The artifact depends on itself through this path. */
"cycle";
/** How `open_project_window` satisfied the request. */
export type OpenOutcome =
/** Already open in `label`; that window was focused. */
{ kind: "focused"; label: string } |
/** A new window `label` was created and opens the project itself. */
{ kind: "opened"; label: string } |
/** The caller should open the project in its own window. */
{ kind: "current" };
export type OpenProject = {
name: string,
root: string,
/** Open in the calling window. */
current: boolean,
/** Where the project lives when the window is connected to a remote host (`root` is then a path there). */
remote: RemoteTarget | null,
};
/** A node of a document outline (Structure tool window, breadcrumbs). */
export type OutlineItem = {
name: string,
detail: string | null,
kind: SymbolKind,
/** Whole extent of the symbol. */
range: Range,
/** The identifier itself; where navigation lands. */
selection_range: Range,
children: OutlineItem[],
/** Unknown (`None`) for language-server symbols and languages without the notion. */
visibility?: Visibility | null,
};
export type OutputChunk = { kind: "stdout"; text: string } | { kind: "stderr"; text: string } |
/** System message from the IDE (command line echo, exit code). */
{ kind: "system"; text: string };
/** A text file of a package the UI generated, at its `/`-separated path in the package. */
export type PackageFile = {
path: string,
text: string,
};
/** A file of a partial commit: which of its changes against HEAD to commit. */
export type PartialCommitFile = {
path: IpcPath,
/** The hunks to commit, as [`diff_hunks`] of the HEAD and on-disk texts reports them. */
hunks: HunkRange[],
};
/** One file of a patch (Apply Patch preview). */
export type PatchFile = {
/** Path relative to the repository root (after the change). */
path: string,
oldPath: string | null,
kind: ChangeKind,
added: number,
removed: number,
binary: boolean,
/** Applies cleanly to the working tree (otherwise a 3-way merge is attempted). */
applies: boolean,
};
export type PatchSource =
/** Local changes of these files (absolute paths). */
{ from: "changes"; paths: IpcPath[]; reverse: boolean } |
/** Changes made by these commits (oldest first). */
{ from: "commits"; commits: string[]; reverse: boolean };
/** An entry offered when completing a path. */
export type PathCompletion = {
name: string,
dir: boolean,
};
/** A PHP version and where it comes from. */
export type PhpLanguageLevel = {
/** `X.Y.Z`. */
version: string,
source: PhpLevelSource,
};
/**
* The PHP language level of the project `path` belongs to (a workspace member, by path, as
* the language server configuration picks it).
*/
export type PhpLanguageLevels = {
/** The one Intelephense checks against; `None`: its default. */
effective: PhpLanguageLevel | null,
/** The one Auto picks, from `composer.json`. */
auto: PhpLanguageLevel | null,
/**
* The workspace member `path` belongs to: its own settings choose the level, not the
* workspace's. `None`: the opened project.
*/
member: IpcPath | null,
};
export type PhpLevelSource =
/** `languages.php.languageLevel`. */
"settings" |
/** `config.platform.php` of `composer.json`. */
"platform" |
/** The lowest version `require.php` of `composer.json` allows. */
"require";
export type PhpSettings = {
/** `php` CLI executable; empty = the one on `PATH`. */
interpreter?: string,
/** Run PHP/Composer or Node/package-manager commands in this target; empty = project default, `local` = local. */
runTarget?: string,
/**
* PHP version the language server checks the code against (`7.4`); empty = from
* `composer.json` (`config.platform.php`, else the lowest version `require.php` allows).
*/
languageLevel?: string,
/**
* Folders outside the project whose code the language server indexes too (a platform a
* module extends); absolute, `~/`, or relative to the project.
*/
includePaths?: string[],
/**
* Intelephense stub sets loaded on top of its defaults and the `ext-*` entries of
* `composer.json` (`wordpress`).
*/
stubs?: string[],
/**
* PHPStan configuration file for checking saved files; empty = the `phpstan.neon`,
* `phpstan.neon.dist` or `phpstan.dist.neon` PHPStan finds in the project root. Absolute,
* `~/`, or relative to the project.
*/
phpstanConfig?: string,
};
/** A PHP interpreter's version and the Xdebug it loads. */
export type PhpXdebug = {
php: IpcPath,
/** `PHP_VERSION`. */
phpVersion: string,
/** The Xdebug version; `None`: not loaded, so PHP ignores the `xdebug.*` options a debug session sets. */
xdebug: string | null,
};
/** An entry of a plugin's `pick` or `pick-many`. */
export type PickItem = {
key: string,
label: string,
description: string | null,
};
/** Per-command argv prefix and optional replacement working-directory arguments. */
export type PluginCommandOverride = {
name: string,
args: string[],
/** None inherits the target's list; Some([]) suppresses it. */
workdirArgs?: string[] | null,
};
/** A plugin's before-commit check to run (`[[contributes.commitChecks]]`). */
export type PluginCommitCheckRef = {
pluginId: string,
check: string,
};
/** What a plugin's before-commit check found. */
export type PluginCommitCheckResult = {
pluginId: string,
check: string,
/** The check's declared title. */
title: string,
problems: CommitProblem[],
/** The check could not run (the plugin failed, timed out or lacks `vcs.read`). */
error: string | null,
};
/** A plugin's context key for `when` clauses (`value` is JSON text). */
export type PluginContextKey = {
pluginId: string,
key: string,
value: string,
};
/** The focused editor when a plugin command is invoked. */
export type PluginEditor = {
path: string,
language: string,
selections: Range[],
};
/** A route as the UI gets it. */
export type PluginEndpoint = {
/** `None` accepts any method. */
method: string | null,
/** Path parameters in braces: `/photos/{id}`. */
path: string,
framework: string,
/** Display name, e.g. `PhotosController#show`. */
handler: string | null,
/** Where the route is declared. */
location: Location,
};
/** Backend → UI notifications (Tauri event `ide://plugin`). */
export type PluginEvent = PluginEvent_Serialize | PluginEvent_Deserialize;
/** Backend → UI notifications (Tauri event `ide://plugin`). */
export type PluginEvent_Deserialize =
/** Project target registrations or remembered prompt answers changed. */
({ type: "runTargetsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A window-owned operation; an empty request id queues an asynchronous run. */
({ type: "windowRequest"; pluginId: string; requestId: string; request: WindowRequest_Deserialize }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Reply to a content action in this window. */
({ type: "contentTabReply"; pluginId: string; requestId: string; reply: ContentTabReply }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open two texts in this window's diff viewer. */
({ type: "openDiff"; pluginId: string; diff: FileDiff; fileName: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; done?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Plugins, their status or their contributions changed: re-fetch `plugin_list`. */
({ type: "commandsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Complete replacement of one plugin's project-scoped decorations. */
({ type: "decorationsChanged"; pluginId: string; sets: DecorationSet[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Complete replacement of one plugin's console highlight rules (empty: none). */
({ type: "consoleRulesChanged"; pluginId: string; rules: ConsoleRule[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open a file in the invoking window. */
({ type: "editorOpen"; path: IpcPath; selection: Range | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Change selection or scrolling only in this window's already open editor. */
({ type: "editorRanges"; path: IpcPath; ranges: Range[]; reveal: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; reply?: never; request?: never; requestId?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A bounded output channel snapshot, or withdrawal when the plugin stops. */
({ type: "outputChanged"; pluginId: string; channel: string; text: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Reveal a read-only Output tab in the receiving window. */
({ type: "revealOutput"; pluginId: string; channel: string; text: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Execute an action through the receiving window and answer over IPC. */
({ type: "executeCommand"; requestId: string; id: string; arg: string | null; chain: string[] }) & { actions?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Cached document associations were disposed (reload, disable or failure). */
({ type: "documentIndexesChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The routes `plugin_id` reports for the project `root` may have changed:
* ask `plugin_endpoints` again.
*/
({ type: "endpointsChanged"; pluginId: string; root: IpcPath }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The marketplace offers newer versions of installed plugins (announced
* once per set of versions).
*/
({ type: "updatesAvailable"; updates: PluginUpdate[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; url?: never; value?: never; view?: never } | ({ type: "notification"; pluginId: string; level: NotificationLevel; title: string; body: string;
/** Buttons running the plugin's own commands (`ui.notify`). */
actions: NotificationAction[] }) & { arg?: never; args?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A plugin's status bar item was set (`item`) or removed. */
({ type: "statusItemChanged"; pluginId: string; id: string; item: StatusItem_Deserialize | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** An override in the receiving window; removal exposes the global item. */
({ type: "windowStatusItemChanged"; pluginId: string; id: string; item: StatusItem_Deserialize | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A plugin's context key was set (`value`: JSON text) or removed, in the
* emitted window (every window when the client is `None`).
*/
({ type: "contextChanged"; pluginId: string; key: string; value: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; view?: never } |
/** A plugin began a task: show it with the background tasks. */
({ type: "taskStarted"; pluginId: string; taskId: string; title: string; cancellable: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "taskProgress"; pluginId: string; taskId: string; done: number; total: number | null; message: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; title?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "taskEnded"; pluginId: string; taskId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The kinds of workbench events plugins want changed: re-fetch
* `plugin_event_kinds` (the UI reports only those).
*/
({ type: "subscriptionsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A background WebSocket has messages ready for its owning plugin. */
({ type: "websocketReady"; pluginId: string; connection: number }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "themeChanged"; theme: ActiveTheme | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A plugin needs capabilities the user has not granted yet (first use
* after migrating from 0.1): show its consent dialog.
*/
({ type: "consentRequested"; pluginId: string; capabilities: CapabilityInfo[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A view (or the custom editors) of a plugin must be rendered again. */
({ type: "viewChanged"; pluginId: string; view: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/** For the script of a view's `html` body. */
({ type: "viewMessage"; pluginId: string; view: string; message: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/** Open a terminal running `program` (already approved and verified). */
({ type: "openTerminal"; pluginId: string; title: string; program: IpcPath; args: string[]; cwd: IpcPath }) & { actions?: never; arg?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "openLocation"; pluginId: string; path: IpcPath; line: number; column: number }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; log?: never; message?: never; newWindow?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* Open (or focus) the log tab `key` following `log` (`views.open-log-tab`);
* it starts the program with `plugin_log_tab_spawn`.
*/
({ type: "openLogTab"; pluginId: string; key: string; title: string; log: ServiceLog }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; level?: never; line?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* Plugin languages, or the servers they may start, changed: re-fetch
* `languages` (the host re-detects open documents: [`crate::Host::plugin_languages_changed`]).
*/
({ type: "languagesChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Copy `text` to the system clipboard. */
({ type: "copyToClipboard"; pluginId: string; text: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open `url` (`http(s)://`) in the system browser. */
({ type: "openUrl"; pluginId: string; url: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; value?: never; view?: never } |
/** A window command/event requests the normal File > Open flow. */
({ type: "openProject"; pluginId: string; path: string; newWindow: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command waits for the user's answer: show `prompt`, then report it with
* `plugin_answer_prompt(prompt_id, …)`.
*/
({ type: "promptRequested"; pluginId: string; promptId: string; prompt: Prompt }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** The call that asked gave up (cancelled, or its plugin stopped): close the prompt. */
({ type: "promptClosed"; promptId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command of this window's prompting plugin was run from another window and refused
* while the plugin waits for the answer here: bring this window to the front.
*/
({ type: "promptWaiting"; pluginId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Bring the tool window of the plugin's view `view` to the front. */
({ type: "revealView"; pluginId: string; view: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/**
* A command needs the window's Commit view: answer with
* `plugin_answer_commit(request_id, …)`. Closed like a prompt (`PromptClosed`).
*/
({ type: "commitRequested"; pluginId: string; requestId: string; request: CommitRequest }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command the user ran reads the clipboard (`ui.read-clipboard`): answer with
* `plugin_answer_clipboard(request_id, …)`. Closed like a prompt (`PromptClosed`).
*/
({ type: "clipboardRequested"; pluginId: string; requestId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never };
/** Backend → UI notifications (Tauri event `ide://plugin`). */
export type PluginEvent_Serialize =
/** Project target registrations or remembered prompt answers changed. */
({ type: "runTargetsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A window-owned operation; an empty request id queues an asynchronous run. */
({ type: "windowRequest"; pluginId: string; requestId: string; request: WindowRequest_Serialize }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Reply to a content action in this window. */
({ type: "contentTabReply"; pluginId: string; requestId: string; reply: ContentTabReply }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open two texts in this window's diff viewer. */
({ type: "openDiff"; pluginId: string; diff: FileDiff; fileName: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; done?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Plugins, their status or their contributions changed: re-fetch `plugin_list`. */
({ type: "commandsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Complete replacement of one plugin's project-scoped decorations. */
({ type: "decorationsChanged"; pluginId: string; sets: DecorationSet[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Complete replacement of one plugin's console highlight rules (empty: none). */
({ type: "consoleRulesChanged"; pluginId: string; rules: ConsoleRule[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open a file in the invoking window. */
({ type: "editorOpen"; path: IpcPath; selection: Range | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Change selection or scrolling only in this window's already open editor. */
({ type: "editorRanges"; path: IpcPath; ranges: Range[]; reveal: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; reply?: never; request?: never; requestId?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A bounded output channel snapshot, or withdrawal when the plugin stops. */
({ type: "outputChanged"; pluginId: string; channel: string; text: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Reveal a read-only Output tab in the receiving window. */
({ type: "revealOutput"; pluginId: string; channel: string; text: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Execute an action through the receiving window and answer over IPC. */
({ type: "executeCommand"; requestId: string; id: string; arg: string | null; chain: string[] }) & { actions?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Cached document associations were disposed (reload, disable or failure). */
({ type: "documentIndexesChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The routes `plugin_id` reports for the project `root` may have changed:
* ask `plugin_endpoints` again.
*/
({ type: "endpointsChanged"; pluginId: string; root: IpcPath }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The marketplace offers newer versions of installed plugins (announced
* once per set of versions).
*/
({ type: "updatesAvailable"; updates: PluginUpdate[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; url?: never; value?: never; view?: never } | ({ type: "notification"; pluginId: string; level: NotificationLevel; title: string; body: string;
/** Buttons running the plugin's own commands (`ui.notify`). */
actions: NotificationAction[] }) & { arg?: never; args?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A plugin's status bar item was set (`item`) or removed. */
({ type: "statusItemChanged"; pluginId: string; id: string; item: StatusItem_Serialize | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** An override in the receiving window; removal exposes the global item. */
({ type: "windowStatusItemChanged"; pluginId: string; id: string; item: StatusItem_Serialize | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A plugin's context key was set (`value`: JSON text) or removed, in the
* emitted window (every window when the client is `None`).
*/
({ type: "contextChanged"; pluginId: string; key: string; value: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; view?: never } |
/** A plugin began a task: show it with the background tasks. */
({ type: "taskStarted"; pluginId: string; taskId: string; title: string; cancellable: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "taskProgress"; pluginId: string; taskId: string; done: number; total: number | null; message: string | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; title?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "taskEnded"; pluginId: string; taskId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* The kinds of workbench events plugins want changed: re-fetch
* `plugin_event_kinds` (the UI reports only those).
*/
({ type: "subscriptionsChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A background WebSocket has messages ready for its owning plugin. */
({ type: "websocketReady"; pluginId: string; connection: number }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "themeChanged"; theme: ActiveTheme | null }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A plugin needs capabilities the user has not granted yet (first use
* after migrating from 0.1): show its consent dialog.
*/
({ type: "consentRequested"; pluginId: string; capabilities: CapabilityInfo[] }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** A view (or the custom editors) of a plugin must be rendered again. */
({ type: "viewChanged"; pluginId: string; view: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/** For the script of a view's `html` body. */
({ type: "viewMessage"; pluginId: string; view: string; message: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/** Open a terminal running `program` (already approved and verified). */
({ type: "openTerminal"; pluginId: string; title: string; program: IpcPath; args: string[]; cwd: IpcPath }) & { actions?: never; arg?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } | ({ type: "openLocation"; pluginId: string; path: IpcPath; line: number; column: number }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; log?: never; message?: never; newWindow?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* Open (or focus) the log tab `key` following `log` (`views.open-log-tab`);
* it starts the program with `plugin_log_tab_spawn`.
*/
({ type: "openLogTab"; pluginId: string; key: string; title: string; log: ServiceLog }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; level?: never; line?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* Plugin languages, or the servers they may start, changed: re-fetch
* `languages` (the host re-detects open documents: [`crate::Host::plugin_languages_changed`]).
*/
({ type: "languagesChanged" }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Copy `text` to the system clipboard. */
({ type: "copyToClipboard"; pluginId: string; text: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Open `url` (`http(s)://`) in the system browser. */
({ type: "openUrl"; pluginId: string; url: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; value?: never; view?: never } |
/** A window command/event requests the normal File > Open flow. */
({ type: "openProject"; pluginId: string; path: string; newWindow: boolean }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command waits for the user's answer: show `prompt`, then report it with
* `plugin_answer_prompt(prompt_id, …)`.
*/
({ type: "promptRequested"; pluginId: string; promptId: string; prompt: Prompt }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** The call that asked gave up (cancelled, or its plugin stopped): close the prompt. */
({ type: "promptClosed"; promptId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; pluginId?: never; program?: never; prompt?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command of this window's prompting plugin was run from another window and refused
* while the plugin waits for the answer here: bring this window to the front.
*/
({ type: "promptWaiting"; pluginId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/** Bring the tool window of the plugin's view `view` to the front. */
({ type: "revealView"; pluginId: string; view: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; requestId?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never } |
/**
* A command needs the window's Commit view: answer with
* `plugin_answer_commit(request_id, …)`. Closed like a prompt (`PromptClosed`).
*/
({ type: "commitRequested"; pluginId: string; requestId: string; request: CommitRequest }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never } |
/**
* A command the user ran reads the clipboard (`ui.read-clipboard`): answer with
* `plugin_answer_clipboard(request_id, …)`. Closed like a prompt (`PromptClosed`).
*/
({ type: "clipboardRequested"; pluginId: string; requestId: string }) & { actions?: never; arg?: never; args?: never; body?: never; cancellable?: never; capabilities?: never; chain?: never; channel?: never; column?: never; connection?: never; cwd?: never; diff?: never; done?: never; fileName?: never; id?: never; item?: never; key?: never; level?: never; line?: never; log?: never; message?: never; newWindow?: never; path?: never; program?: never; prompt?: never; promptId?: never; ranges?: never; reply?: never; request?: never; reveal?: never; root?: never; rules?: never; selection?: never; sets?: never; taskId?: never; text?: never; theme?: never; title?: never; total?: never; updates?: never; url?: never; value?: never; view?: never };
/** A plugin's own icon (`icon`, `icon-dark` of its manifest): sanitised SVG markup. */
export type PluginIcon = {
light: string,
dark: string | null,
};
export type PluginInfo = {
id: string,
name: string,
version: string,
description: string,
authors: string[],
homepage: string | null,
changeNotes: string | null,
icon: PluginIcon | null,
/** The Java agent this plugin declares, and whether it is still approved. */
javaAgent: PluginJavaAgent | null,
source: PluginSource,
/** Package directory. */
path: IpcPath,
enabled: boolean,
status: PluginStatus,
error: string | null,
hasCode: boolean,
/** Declared capabilities with risk and grant state. */
capabilities: CapabilityInfo[],
/**
* HTTPS hosts the user allowed through `net:ask` ("always allow"),
* none of them declared by the manifest; each can be revoked.
*/
netHosts: string[],
/** What it contributes while live (point + label). */
contributions: ContributionInfo[],
/** `activation` events of the manifest. */
activation: string[],
/** Non-fatal problems (unsupported contribution points). */
warnings: string[],
/** Statistics of this session. */
stats: PluginStats,
/** The marketplace publisher whose signature the package carries (none: unsigned or untrusted). */
publisher: string | null,
/** The version an update replaced, to roll back to. */
previousVersion: string | null,
/** `[[depends]]`, each with how it stands now. */
depends: DependencyInfo[],
/** Plugins that need this one, directly or through others. */
dependents: DependentInfo[],
/** `[[extension-points]]` this plugin declares while it is live. */
extensionPoints: ExtensionPointInfo[],
};
/** The Java agent a plugin contributes, for Settings › Plugins. */
export type PluginJavaAgent = {
/** The jar's file name. */
fileName: string,
/** The optional argument passed after `=`. */
args: string | null,
/** Extra JVM flags from `vmOptions` (API 1.14). */
vmOptions: string[],
/** When `Some("jetbrains")`, those VM options apply only on JetBrains Runtime. */
jdk: string | null,
/** The jar still has the hash recorded when `java.agent` was granted. */
approved: boolean,
};
/**
* Commands of this module the remote server answers.
* Versioned plugin visuals, refreshed after the editor synchronizes its buffer.
*/
export type PluginLanguageVisuals = {
version: number,
injections: Injection[],
colors: ([string, ColorInfo])[],
gutterActions: ([string, GutterAction])[],
hoverActions: ([string, HoverAction])[],
};
export type PluginLocation = {
path: string,
range: Range,
};
/** A line a view's `process` body printed. */
export type PluginOutputLine = {
stderr: boolean,
text: string,
};
/** A plugin-owned argv wrapper for project runs (API 1.4). */
export type PluginRunTarget = {
id: string,
name: string,
program: string,
args: string[],
workdirArgs: string[],
containerRoot: string | null,
commands: PluginCommandOverride[],
};
export type PluginSearchItem = {
id: string,
title: string,
description: string | null,
target: PluginSearchTarget,
};
export type PluginSearchPage = {
items: PluginSearchItem[],
hasMore: boolean,
};
export type PluginSearchTarget = { kind: "location"; value: Location } | { kind: "command"; value: {
id: string,
arg: string | null,
} };
/** A secret a plugin declares, and whether the user stored it. */
export type PluginSecretState = {
name: string,
set: boolean,
};
export type PluginSource =
/** Installed under `<app-data>/plugins/<id>/`. */
"installed" |
/** Loaded from `<project>/.openidea/plugins/<dir>/` while that project is open. */
"dev" |
/** A development plugin linked from any folder (`openidea-plugin link`). */
"linked";
export type PluginStats = {
activations: number,
/** Last activation (instantiate + `activate`), ms. */
activationMs: number | null,
calls: number,
errors: number,
/** Slowest call, ms. */
maxCallMs: number | null,
/** 95th percentile of the recent calls, ms. */
p95CallMs: number | null,
/** Edit-path calls whose result came too late and was dropped. */
slowCalls: number,
/** Traps (panics, budgets, permission violations); each drops the instance. */
crashes: number,
/** Instances reclaimed after being idle. */
reclaims: number,
};
export type PluginStatus =
/** Code instantiated and activated. */
"active" |
/** Has code that has not been needed yet: contributions are live, no Wasm instance. */
"inactive" |
/** No code; contributions only. */
"static" | "disabled" |
/** Waiting for the user to confirm its permissions (project and new plugins). */
"needsConsent" |
/** Failed to load, or failed repeatedly and was stopped for this session (see `error`). */
"failed" |
/**
* A plugin it requires is missing, disabled, the wrong version or cannot run
* (`error` says which); it starts when that is resolved.
*/
"blocked";
/** A plugin's status bar item. */
export type PluginStatusItem = PluginStatusItem_Serialize | PluginStatusItem_Deserialize;
/** A plugin's status bar item. */
export type PluginStatusItem_Deserialize = {
/** Whether this item overrides the global item in the requesting window. */
window: boolean,
pluginId: string,
id: string,
item: StatusItem_Deserialize,
};
/** A plugin's status bar item. */
export type PluginStatusItem_Serialize = {
/** Whether this item overrides the global item in the requesting window. */
window: boolean,
pluginId: string,
id: string,
item: StatusItem_Serialize,
};
/** A test update, carried by the optional test-results export. */
export type PluginTestEvent = {
type: "suiteStarted",
} & TestStart | {
type: "testStarted",
} & TestStart | {
type: "passed",
} & TestPassed | {
type: "failed",
} & TestFailed | {
type: "skipped",
} & TestSkipped | {
type: "output",
} & TestOutput | { type: "other"; kind: string; data: string };
/** A newer version of an installed plugin in the marketplace. */
export type PluginUpdate = {
id: string,
name: string,
version: string,
};
export type PluginsSnapshot = {
plugins: PluginInfo[],
activeTheme: ActiveTheme | null,
/** UI contributions of live plugins, projected by the client. */
ui: UiContribution[],
};
/**
* The completion offered at a caret of a POM: the replaced value span (UTF-16
* offsets) and the suggestions, local ones first.
*/
export type PomCompletion = {
/** UTF-16 offset where the completed text starts: the value's first character. */
from: number,
/**
* UTF-16 offset where the replaced value ends: past the caret when the caret
* sits inside an existing value, which is then replaced whole.
*/
to: number,
/** Which coordinate element the caret is in. */
kind: PomCompletionKind,
/** The suggestions, local repository first. */
options: PomCompletionOption[],
};
/** The coordinate element a POM completion fills. */
export type PomCompletionKind =
/** The dependency's `<groupId>`. */
"groupId" |
/** The dependency's `<artifactId>`. */
"artifactId" |
/** The dependency's `<version>`. */
"version";
/**
* One suggestion: the coordinate as inserted, and an optional note shown in
* the lookup (the owning group of an artifactId, its newest installed version).
*/
export type PomCompletionOption = {
/** The text the completion inserts (`org.example.lib`, `example-lib`, `1.2.0`). */
label: string,
detail: string | null,
};
/** What a go-to-declaration in a POM found, and where. */
export type PomGoto = {
/**
* Absolute path of the file with the declaration: the POM itself, or a parent
* POM of the local repository when the definition is inherited from one.
*/
path: string,
range: Range,
/** What was found. */
kind: PomGotoKind,
/** The declaration as named for the user (`example.version`, `com.example:example-lib`). */
label: string,
};
/** The kind of declaration a POM go-to-declaration found. */
export type PomGotoKind =
/** A `<properties>` entry of the POM or one of its parents. */
"property" |
/** A `<dependencyManagement>` entry providing the dependency's version. */
"managedDependency" |
/** A `<pluginManagement>` entry providing the plugin's version. */
"managedPlugin" |
/** The POM of the artifact itself: a project module's, else the local repository's. */
"artifactPom";
/** A dependency or plugin whose version comes from a management declaration. */
export type PomManagedDeclaration = {
/** 0-based line of the `<dependency>` or `<plugin>` declaration. */
line: number,
/** The interpolated version the management entry provides, when it has one. */
version: string | null,
/** The management entry, possibly in a parent POM or an imported BOM. */
target: PomGoto,
};
/** A 0-based line / UTF-16 column position. */
export type Pos = {
line: number,
col: number,
};
export type PrCheck = {
name: string,
/** Workflow of a check run (GitHub Actions), if any. */
workflow: string | null,
status: CheckStatus,
url: string | null,
};
export type PrCommit = {
oid: string,
headline: string,
body: string,
author: string,
date: string,
};
/** Revisions to diff a pull request's files with, present in the local repository. */
export type PrDiffRevisions = {
/** Merge base of base and head (what GitHub's "Files changed" compares with). */
base: string,
head: string,
/** Changed files with rename information. */
files: ChangedFile[],
/** Worktree root the file paths are relative to. */
root: IpcPath,
};
export type PrFile = {
path: string,
additions: number,
deletions: number,
/** `ADDED`, `MODIFIED`, `DELETED`, `RENAMED`, `COPIED`, `CHANGED`. */
changeType: string,
};
export type PrLabel = {
name: string,
/** Hex colour without `#`, as GitHub stores it. */
color: string,
};
export type PrListQuery = {
state: PrStateFilter,
authorMe: boolean,
reviewRequested: boolean,
assigneeMe: boolean,
/** Free text / GitHub search qualifiers. */
search: string,
limit: number,
};
/** An inline review comment on a diff line. */
export type PrReviewComment = {
id: number,
inReplyTo: number | null,
path: string,
/** 1-based line in the current diff; `None` when the comment is outdated. */
line: number | null,
originalLine: number | null,
/** `LEFT` (base) or `RIGHT` (head). */
side: string,
body: string,
author: string,
createdAt: string,
url: string,
diffHunk: string,
};
export type PrReviewer = {
login: string,
/** `APPROVED`, `CHANGES_REQUESTED`, `COMMENTED`, `DISMISSED`, or `REQUESTED` (no review yet). */
state: string,
};
export type PrState = "open" | "closed" | "merged";
export type PrStateFilter = "open" | "closed" | "merged" | "all";
/** A conversation comment or a submitted review (the timeline). */
export type PrTimelineItem = {
author: string,
body: string,
createdAt: string,
/** `None` for comments; the review state for reviews. */
reviewState: string | null,
url: string | null,
};
/** A request ready to send: variables substituted, includes read. */
export type PreparedRequest = {
name: string | null,
method: string,
url: string,
headers: ([string, string])[],
body: string | null,
};
/** Appearance › Presentation Assistant: shows the name and shortcut of each action the user runs. */
export type PresentationAssistantSettings = {
enabled?: boolean,
/** `small` | `medium` | `large`. */
size?: string,
/** How long each popup stays, in seconds. */
durationSeconds?: number,
/** `top-left`, `top`, `top-right`, `bottom-left`, `bottom` or `bottom-right` of the window. */
position?: string,
/** Also show the shortcut of the other platform's keymap (macOS ⇄ Windows/Linux). */
alternateKeymap?: boolean,
};
export type ProblemSeverity = "info" | "warning" | "error" |
/** The refactoring can't run at all; there is no edit. */
"fatal";
/** Memory of one row of the breakdown. */
export type ProcessMemory = {
category: MemoryCategory,
label: string,
/** Project, run kind or similar. */
detail: string | null,
/** The row's top process (the language server, run or terminal shell). */
pid: number,
/** Number of processes counted in this row. */
processes: number,
bytes: number | null,
/**
* CPU use since the previous measurement, in percent of one core (Activity
* Monitor's "% CPU"); `None` on the first measurement of every process.
*/
cpuPercent: number | null,
};
export type Profile = {
/** `node --cpu-prof`, `py-spy`, `async-profiler`, `perf`. */
profiler: string,
/** `ms` (time-weighted), `samples` (sample or live-object counts) or `bytes` (allocated). */
unit: string,
mode: ProfileMode,
total: number | null,
frames: ProfileFrame[],
/** Depth-first; `nodes[0]` is the root. */
nodes: ProfileNode[],
/** Sorted by self weight, heaviest first. */
methods: MethodStat[],
};
export type ProfileFrame = {
name: string,
file: IpcPath | null,
/** 0-based. */
line: number | null,
kind: ProfileFrameKind,
};
export type ProfileFrameKind =
/** A function; `file` / `line` locate its source. */
"code" |
/** The leaf of an allocation stack: the type that was allocated, not a source line. */
"allocatedType";
/** What a profile measures. */
export type ProfileMode =
/** Sampled CPU time. */
"cpu" |
/** Bytes allocated, by allocation stack. */
"allocations" |
/** Objects still alive when the run stopped, by allocation stack. */
"liveObjects";
/** A call-tree node; node 0 is the synthetic root (`all`). */
export type ProfileNode = {
/** Index into [`Profile::frames`]. */
frame: number,
/** Weight of this node and everything it called. */
total: number | null,
/** Weight sampled in this node itself. */
selfWeight: number | null,
/** Indices into [`Profile::nodes`], heaviest first. */
children: number[],
};
export type ProfilePrepared = ProfilePrepared_Serialize | ProfilePrepared_Deserialize;
export type ProfilePrepared_Deserialize = ({ status: "ready"; profiler: string; launch: RunConfig_Deserialize; spec: ProfileSpec }) & { homepage?: never; install?: never; message?: never; reason?: never; tool?: never } | ({ status: "missingTool"; tool: string; message: string; install: ProfilerInstall | null; homepage: string | null }) & { launch?: never; profiler?: never; reason?: never; spec?: never } | ({ status: "unsupported"; reason: string }) & { homepage?: never; install?: never; launch?: never; message?: never; profiler?: never; spec?: never; tool?: never };
export type ProfilePrepared_Serialize = ({ status: "ready"; profiler: string; launch: RunConfig_Serialize; spec: ProfileSpec }) & { homepage?: never; install?: never; message?: never; reason?: never; tool?: never } | ({ status: "missingTool"; tool: string; message: string; install: ProfilerInstall | null; homepage: string | null }) & { launch?: never; profiler?: never; reason?: never; spec?: never } | ({ status: "unsupported"; reason: string }) & { homepage?: never; install?: never; launch?: never; message?: never; profiler?: never; spec?: never; tool?: never };
/** Where a prepared run's profile will be, and how to read it. */
export type ProfileSpec =
/**
* Every `*.cpuprofile` in `dir` (one per Node.js process). Processes that
* ran no code of `root` (the package manager of an npm script) are left
* out when another one did.
*/
{ kind: "cpuProfiles"; dir: IpcPath; root: IpcPath } |
/**
* Collapsed-stack files with extension `ext` in `dir`; relative frame files resolve
* against `base`. `jvm_root`: map JVM class frames to sources below it. For the
* allocation modes the last frame of a JVM stack is the allocated type.
*/
{ kind: "folded"; profiler: string; dir: IpcPath; ext: string; base: IpcPath; jvmRoot: IpcPath | null; mode: ProfileMode } |
/** `perf script -i <data>` output. */
{ kind: "perf"; perf: string; data: IpcPath; cwd: IpcPath; env: { [key in string]: string } };
/** A command line that installs a missing profiler. */
export type ProfilerInstall = {
command: string,
args: string[],
cwd: IpcPath | null,
};
export type ProjectDiscovery = {
/** Selected projects and folders with no discovered projects retain the direct-add behaviour. */
direct: IpcPath[],
projects: DiscoveredProject[],
truncated: boolean,
};
export type ProjectFileSet =
/** "Project Files": everything not excluded. */
"all" |
/** "Project Production Files": not under a test root and not a test file. */
"production" |
/** "Project Test Files". */
"test";
export type ProjectInfo = ProjectInfo_Serialize | ProjectInfo_Deserialize;
export type ProjectInfo_Deserialize = {
trusted: boolean,
root: IpcPath,
name: string,
displayName?: string,
isGit: boolean,
settings: Settings_Deserialize,
workspace?: Workspace_Deserialize | null,
unity?: UnityProjectInfo | null,
};
export type ProjectInfo_Serialize = {
trusted: boolean,
root: IpcPath,
name: string,
displayName: string,
isGit: boolean,
settings: Settings_Serialize,
workspace?: Workspace_Serialize | null,
unity?: UnityProjectInfo | null,
};
/** An interpreter another project uses: the project root and the SDK itself. */
export type ProjectInterpreter = {
project: IpcPath,
sdk: Sdk,
};
/** A project-level library (Project Structure › Libraries). */
export type ProjectLibrary = {
name?: string,
/** Class archives (`.jar`) or class directories. */
classes?: string[],
/** Source archives (`-sources.jar`, `.zip`) or source directories. */
sources?: string[],
/** Documentation archives (`-javadoc.jar`) or directories. */
javadocs?: string[],
scope?: DependencyScope,
};
export type ProjectRoots = {
/** Effective roots, sorted by path. */
roots: SourceFolder[],
/** Every auto-detected root, including ones the user overrode or unmarked. */
detected: SourceFolder[],
};
export type ProjectStructureSettings = {
/** Project-relative folders, `/`-separated. */
sourceRoots?: string[],
testRoots?: string[],
resourceRoots?: string[],
testResourceRoots?: string[],
/** Excluded from the project tree, search and indexing. */
excluded?: string[],
/** Auto-detected roots (from `pom.xml`, `build.gradle`, `Cargo.toml`, …) the user unmarked. */
unmarked?: string[],
/** Content roots besides the project folder (absolute paths), shown and searched with it. */
contentRoots?: string[],
/** Other projects (absolute paths) this project depends on; indexed and navigable like content roots. */
dependencies?: string[],
/**
* Per-workspace-member dependencies: member root (IPC path) → the roots it depends on.
* A member not listed here (or with an empty list) navigates only into itself.
*/
memberDependencies?: { [key in string]: string[] },
/** "Exclude files": `;`-separated name patterns (`*.log;tmp*`) excluded at any depth. */
excludeFiles?: string,
/** Project compiler output directory (relative to project root or absolute; empty = default). */
compilerOutput?: string,
/** Per-module SDK, language level, output paths and dependency overrides, keyed by module relative path (`"."` for root). */
modules?: { [key in string]: ModuleStructureSettings },
/** Project-level libraries (`JAR`s / class folders / source archives). */
libraries?: ProjectLibrary[],
/** Module framework facets (`web`, `spring`, `jpa`). */
facets?: FacetConfig[],
/** Packaging artifacts (`jar`, `war`, `warExploded`). */
artifacts?: ArtifactConfig[],
};
/**
* What a plugin asks the user (`ui.pick`, `ui.pick-many`, `ui.input`,
* `ui.input-multiline`, `ui.confirm`).
*/
export type Prompt = { kind: "quickPick"; title: string; items: PickItem[]; multiple: boolean } | { kind: "input"; prompt: string; value: string | null; multiline: boolean } | { kind: "confirm"; title: string; message: string } | { kind: "pickDirectory"; title: string; initial: string | null } |
/**
* The host's own question under `net:ask` (never plugin-initiated): the
* plugin reached an HTTPS host its manifest does not list.
*/
{ kind: "netPermission"; host: string; sessionOnly: boolean };
export type ProxyKind = "http" | "socks";
export type ProxyMode =
/** Every connection goes direct. */
"none" |
/** The system's proxy: `HTTP_PROXY` / `HTTPS_PROXY` / `NO_PROXY` of the environment. */
"auto" |
/** The proxy configured here. */
"manual";
export type ProxySettings = {
mode?: ProxyMode,
kind?: ProxyKind,
host?: string,
port?: number,
/** Hosts reached directly, comma-separated; `*` matches any characters (`*.example.com`, `192.168.*`). */
noProxy?: string,
/** Send `login` / `password` to the proxy. */
authenticate?: boolean,
login?: string,
/** Kept in the saved passwords rather than `settings.toml`; filled in when settings are read. */
password?: string,
};
export type PruneTarget = "containers" |
/** Dangling images only. */
"images" |
/** Every image no container uses. */
"allImages" | "volumes" | "networks" |
/** Stopped containers, unused networks, dangling images and build cache. */
"system";
export type PullRequestDetails = {
summary: PullRequestSummary,
body: string,
headOid: string,
baseOid: string,
/** `MERGEABLE`, `CONFLICTING`, `UNKNOWN`. */
mergeable: string,
/** GitHub's merge box state: `CLEAN`, `UNSTABLE`, `HAS_HOOKS`, `BLOCKED`, `BEHIND`, `DIRTY`, `DRAFT`, `UNKNOWN`. */
mergeStateStatus: string,
isCrossRepository: boolean,
mergedAt: string | null,
closedAt: string | null,
checks: PrCheck[],
reviewers: PrReviewer[],
assignees: string[],
commits: PrCommit[],
files: PrFile[],
/** Comments and reviews, oldest first. */
timeline: PrTimelineItem[],
};
export type PullRequestSummary = {
number: number,
title: string,
author: string,
state: PrState,
isDraft: boolean,
headRef: string,
baseRef: string,
createdAt: string,
updatedAt: string,
labels: PrLabel[],
/** `APPROVED`, `CHANGES_REQUESTED`, `REVIEW_REQUIRED`, or `None`. */
reviewDecision: string | null,
url: string,
additions: number,
deletions: number,
};
/** Push dialog › Push tags: every tag, or only annotated tags on the pushed commits. */
export type PushTags = "all" | "currentBranch";
/** A class definition and the methods it declares. */
export type PythonClassFacts = {
name: string,
/** The class name identifier (selection range). */
selection: Range,
/** Base names as written, a qualified name reduced to its last segment. */
bases: string[],
methods: PythonMethodFacts[],
};
/** Python Debugger (debugpy launch options). */
export type PythonDebuggerSettings = {
attachSubprocess?: boolean,
gevent?: boolean,
};
/** One Python module's classes, in source order. */
export type PythonFacts = {
classes: PythonClassFacts[],
};
/** A method definition the inspections can reason about. */
export type PythonMethodFacts = {
name: string,
/** The method name identifier (selection range). */
selection: Range,
/**
* Parameter names in order; `None` for a form whose forwarding cannot be compared
* (`*args`, `**kwargs`, keyword-only, positional-only).
*/
params: string[] | null,
/** Decorated with `abstractmethod` (`abc.abstractmethod` included). */
abstractMethod: boolean,
/** Decorated with `override` from `typing` / `typing_extensions`. */
overrideDecorated: boolean,
body: MethodBody,
};
export type PythonPackage = {
name: string,
version: string,
};
export type PythonRequirements = {
/** The interpreter checked, which installs go to. */
python: IpcPath,
unsatisfied: UnsatisfiedRequirement[],
};
export type PythonSettings = {
/**
* Project interpreter executable; empty = auto-detect (project venv, else `python3`);
* `target:<run-target-id>` = the Python of a Docker or Compose run target.
*/
interpreter?: string,
/** Activate the interpreter's virtualenv in new terminal sessions. */
activateVirtualenv?: boolean,
/**
* Interpreters the user added to Settings › Python › All Interpreters (executable paths).
* Detection contributes the rest; `hidden_interpreters` removes some of them.
*/
interpreters?: string[],
/**
* Interpreters the user removed from that list, as executable paths: detection does
* not list them again.
*/
hiddenInterpreters?: string[],
/** Hide interpreters that belong to another project (a virtualenv inside its folder). */
hideOtherProjectInterpreters?: boolean,
/** Show each interpreter's path under its name on the interpreters page. */
showInterpreterPaths?: boolean,
};
/** Color Scheme › Language Defaults › Rainbow brackets: which delimiters are coloured. */
export type RainbowBracketKinds = {
round?: boolean,
square?: boolean,
curly?: boolean,
/** Type argument / parameter delimiters and markup tags, where the syntax tree marks them. */
angle?: boolean,
};
/**
* `[rainbow-brackets]` of a language definition: node names of its editor (Lezer)
* grammar, so angle brackets are coloured only where the syntax tree says they
* delimit something, never in comparisons or shifts.
*/
export type RainbowBracketNodes = {
/** Nodes spanning `<` … `>` whose delimiters pair up: type argument and parameter lists. */
angle?: string[],
/** Markup tags (`<a>`, `</a>`, `<a/>`); an element's start and end tags pair up. */
tags?: string[],
};
/** Half-open range `[start, end)`. */
export type Range = {
start: Pos,
end: Pos,
};
/** What an interactive rebase does with one commit. */
export type RebaseAction = "pick" |
/** Pick with a new message ([`RebaseEntry::message`]). */
"reword" |
/** Stop after applying, to amend it (Stop to Edit). */
"edit" |
/** Meld into the previous commit, combining the messages. */
"squash" |
/** Meld into the previous commit, keeping the previous message. */
"fixup" | "drop";
/** One line of an interactive rebase plan. */
export type RebaseEntry = {
commit: string,
action: RebaseAction,
/** New message for a reword, or for the result of a squash group (set on its last line). */
message?: string | null,
};
/** Rebase dialog options. */
export type RebaseOptions = {
/** `--onto <newbase>`: replay `upstream..HEAD` onto this revision instead. */
onto?: string | null,
rebaseMerges?: boolean,
keepEmpty?: boolean,
};
export type RecentProject = {
path: IpcPath,
name: string,
openedAtMs: number | null,
/**
* Git branch shown on the welcome screen. Persisted as of last open; [`RecentProjects::list_live`]
* refreshes it from `.git/HEAD` when the list is shown.
*/
branch: string | null,
/**
* The local folder no longer exists (set by [`with_live_branches`] when the list is shown): the
* welcome screen shows the entry as unavailable.
*/
missing?: boolean,
};
/** A named group of recent projects on the welcome screen (New Project Group…, Move to Group). */
export type RecentProjectGroup = {
name: string,
/** Its projects, in the order they were added. */
paths: IpcPath[],
expanded?: boolean,
};
/** One followed redirect: the response and the `Location` it pointed to. */
export type RedirectHop = {
status: number,
statusText: string,
location: string,
};
export type RefactoringProblem = {
severity: ProblemSeverity,
message: string,
};
export type ReferenceAccess = "read" | "write" | "readWrite" | "unknown";
export type ReferenceKind = "getter" | "setter" | "field" | "unknown";
export type References = {
/** Semantic classifications supplied by a language extension. Missing entries are unknown. */
classified?: ClassifiedReference[],
locations: Location[],
incomplete: ReferencesIncomplete | null,
/** The dependencies and the JDK were not searched (asked for without `libraries`). */
librariesSkipped?: boolean,
};
/** Why a references search may have missed usages. */
export type ReferencesIncomplete =
/** A language server was still indexing. */
"indexing" |
/** More project files mention the name than were checked. */
"tooManyFiles" |
/** Files that mention the name were too large or unreadable to check. */
"filesSkipped" |
/** A native query failed; indexed anchors are still available. */
"serverFailed";
export type RegisteredRunTarget = {
/** Opaque selector id, namespaced by the host. */
id: string,
pluginId: string,
pluginName: string,
target: PluginRunTarget,
prompt: boolean,
};
/** A registry agent this machine can run (or has installed). */
export type RegistryAgent = {
id: string,
name: string,
/** The registry's current version. */
version: string,
description: string,
repository: string | null,
website: string | null,
authors: string[],
license: string | null,
/**
* How it installs here; `None` when it no longer can (an installed agent whose
* runtime went away).
*/
distribution: RegistryDistribution | null,
/**
* The release archive comes without a SHA-256, so the download cannot be checked.
* npm and uv packages are checked by those tools.
*/
noChecksum: boolean,
/** The installed version. */
installed: string | null,
/** Whether [`Self::version`] is newer than the installed one. */
update: boolean,
/** An install of it is running (it goes on after the Settings page that started it closes). */
installing: boolean,
};
export type RegistryDistribution =
/** A release archive for this OS and architecture. */
"binary" |
/** An npm package (needs Node.js). */
"npx" |
/** A Python package run by uv. */
"uvx";
export type Remote = {
name: string,
/** Fetch URL. */
url: string,
/** Fetch URL with any `~/.ssh/config` host alias resolved, when different from `url`. */
resolvedUrl?: string | null,
};
/** Manage Remotes edits. */
export type RemoteEdit = { op: "add"; name: string; url: string } | { op: "remove"; name: string } |
/** Renames `name` to `new_name` (when different) and sets its URL. */
{ op: "edit"; name: string; new_name: string; url: string };
/** A remote directory entry. */
export type RemoteEntry = {
name: string,
/** Absolute remote path. */
path: string,
isDir: boolean,
isSymlink: boolean,
size: number,
/** Seconds since the Unix epoch. */
mtime: number | null,
/** `rwxr-xr-x`. */
permissions: string,
};
/** A project folder on an SSH host, in a WSL distribution or in a dev container. */
export type RemoteLaunch = {
target: RemoteTarget,
path: string,
};
export type RemoteOp = { op: "fetch" } | { op: "pull"; rebase: boolean } |
/** Update Project › Reset to the Remote Branch. */
{ op: "resetToUpstream" } | { op: "push"; force_with_lease: boolean; set_upstream: boolean;
/** Push dialog › Push tags. */
tags?: PushTags | null;
/** Plain `--force` (Force push anyway). */
force?: boolean;
/** Push dialog › Run Git hooks unchecked (`--no-verify`). */
no_verify?: boolean } |
/** Deletes a remote branch; `branch` is the remote-tracking name (`origin/feature`). */
{ op: "deleteBranch"; branch: string } |
/**
* Pushes local `branch` (only up to `revision` when set) to its upstream, or to
* remote branch `target`; `remote` overrides the upstream's remote (Push dialog's
* remote picker).
*/
{ op: "pushBranch"; branch: string; revision: string | null; force_with_lease: boolean; target?: string | null; remote?: string | null; force?: boolean;
/** Record the target as upstream (Push dialog › Set upstream). */
set_upstream?: boolean; no_verify?: boolean } |
/** Push Tag › Push to `remote`. */
{ op: "pushTag"; tag: string; remote: string } |
/** Deletes tag `tag` on `remote` (Delete on Remote). */
{ op: "deleteRemoteTag"; tag: string; remote: string } |
/** Pull dialog: `branches` of `remote` (none = the configured merge branch). */
{ op: "pullFrom"; remote: string; branches: string[]; rebase: boolean; options: MergeOptions };
export type RemoteProgress = {
stage: RemoteStage,
fraction: number | null,
};
export type RemoteProject = RemoteProject_Serialize | RemoteProject_Deserialize;
export type RemoteProject_Deserialize = {
target: RemoteTarget,
root: string,
/** `user@host:port` of the SSH configuration; the distribution name for WSL. */
host: string,
serverVersion: string,
os: string,
/** Commands routed to the server (the rest run locally). */
commands: string[],
project: ProjectInfo_Deserialize,
};
export type RemoteProject_Serialize = {
target: RemoteTarget,
root: string,
/** `user@host:port` of the SSH configuration; the distribution name for WSL. */
host: string,
serverVersion: string,
os: string,
/** Commands routed to the server (the rest run locally). */
commands: string[],
project: ProjectInfo_Serialize,
};
export type RemoteSession = {
target: RemoteTarget,
root: string,
host: string,
/** `linux`, `macos` or `windows`: the OS the project's commands run on. */
os: string,
commands: string[],
};
export type RemoteSkillBrowseResult = {
owner: string,
repo: string,
gitRef: string,
treeSha: string,
truncated: boolean,
skills: RemoteSkillCandidate[],
};
export type RemoteSkillCandidate = {
/** Target folder name (`<name>` under `.agents/skills/<name>`). */
folderName: string,
/** Repository-relative directory holding `SKILL.md` (`""` when at repository root). */
subpath: string,
fileCount: number,
totalBytes: number,
};
export type RemoteSkillFile = {
/** Path relative to the skill folder (e.g. `"SKILL.md"`, `"scripts/check.sh"`). */
path: string,
size: number,
executable: boolean,
symlink: boolean,
};
export type RemoteSkillPreview = {
owner: string,
repo: string,
gitRef: string,
treeSha: string,
subpath: string,
skillName: string,
description: string,
skillMarkdown: string,
files: RemoteSkillFile[],
scanWarnings: SkillScanWarning[],
alreadyInstalledUser: boolean,
alreadyInstalledWorkspace: boolean,
};
/** Where [`remote_connect`] is (`fraction`: 0..1 of a download / upload). */
export type RemoteStage = "connecting" |
/** `devcontainer up`: building or starting the container. */
"container" | "checking" | "downloading" | "uploading" | "starting" | "opening";
/** Where a remote project lives and how the server there is reached. */
export type RemoteTarget =
/** The host of SSH configuration `config`. */
{ kind: "ssh"; config: string } |
/** A WSL distribution on this machine. */
{ kind: "wsl"; distro: string } |
/**
* The dev container of local folder `folder`, built and started with the Dev Containers CLI;
* `config` is its `devcontainer.json`, relative to the folder (empty = the default one).
*/
{ kind: "devContainer"; folder: string; config: string };
export type Renamed = {
/** Indexed names always require preview, including a single-file rename. */
preview?: boolean,
edit: WorkspaceEdit,
incomplete: ReferencesIncomplete | null,
};
export type ReplaceEvent =
/** A file was changed (`replacements` > 0) or had nothing left to replace. */
{ type: "file"; path: IpcPath; replacements: number; done: number; total: number } | { type: "failed"; path: IpcPath; message: string; done: number; total: number } | { type: "done"; summary: ReplaceSummary };
/** Before / after text of one file for the Replace preview. */
export type ReplacePreview = {
before: string,
after: string,
edits: TextEdit[],
};
export type ReplaceSummary = {
/** Files actually changed. */
files: number,
replacements: number,
failed: number,
cancelled: boolean,
elapsedMs: number,
};
/** One file to replace in. */
export type ReplaceTarget = {
path: IpcPath,
/**
* Start positions (0-based line, UTF-16 column) of the matches to replace,
* as reported by the search; `None` replaces every match in the file.
* Positions where no match starts any more are skipped.
*/
only?: Pos[] | null,
/**
* Start positions of matches to leave as they are (excluded or already
* replaced usages) when every other match in the file is replaced.
*/
skip?: Pos[] | null,
};
export type RepositoryComparison = {
root: IpcPath,
/** Resolved commit, so opening a diff later uses the same left side as the listing. */
revision: string | null,
files: WorkingTreeChange[],
error: string | null,
/** The requested revision does not resolve to a commit in this repository. */
missingRevision?: boolean,
};
/** A cancellable, streaming backend request issued by the UI. */
export type RequestId = number;
/** A program a generator needs, and whether this machine has it. */
export type Requirement = {
program: string,
min: string | null,
/** The version found; `None` when the program is missing or reports none. */
found: string | null,
satisfied: boolean,
hint: string,
};
/** `git reset` modes offered by Reset Current Branch to Here. */
export type ResetMode = "soft" | "mixed" | "hard" | "keep";
/** A mapping resolved by the backend for the Remote Host browser. */
export type ResolvedMapping = {
local: IpcPath,
deployment: string,
};
export type ReviewEvent = "approve" | "requestChanges" | "comment";
/** A file changed across several commits: its content at `before` ↔ at `after`. */
export type RevisionChange = {
/** Repository-relative path after the change (before it, for a deletion). */
path: string,
kind: ChangeKind,
/** Path at `before`, for a rename. */
oldPath: string | null,
/** Commit holding the old content; `None` when the file was added. */
before: string | null,
/** Commit holding the new content; `None` when the file was deleted. */
after: string | null,
/** Set when the entry is a symbolic link, resolved at `after` (`before`, for a deletion). */
link?: LinkTarget | null,
};
/** How a grant is presented (plan 4.2). */
export type Risk =
/** Listed on the install page, one confirmation. */
"low" |
/** Listed separately with its purpose. */
"medium" |
/** Separate dialog: "equivalent to running arbitrary code on this machine". */
"high";
export type RootKind = "source" | "test" | "resources" | "testResources" | "excluded";
export type RouteSource = {
path: IpcPath,
text: string,
};
export type RubySettings = {
/** Project interpreter executable; empty = auto-detect (`.ruby-version`, mise / asdf, else `ruby` on PATH). */
interpreter?: string,
};
export type RunConfig = RunConfig_Serialize | RunConfig_Deserialize;
export type RunConfig_Deserialize = {
/** Stable id, e.g. `npm:dev`, `cargo:run:app`, or a uuid for user-defined. */
id: string,
name: string,
/** `npm` | `cargo` | `gradle` | `maven` | `go` | `python` | `pytest` | `make` | `shell` … */
kind: string,
command: string,
args: string[],
cwd: IpcPath | null,
env: { [key in string]: string },
/** Detected configs are regenerated; user configs persist in `.openidea/run.toml`. */
detected: boolean,
/** Test runner configs render results in the test tree. */
isTest: boolean,
/** DAP adapter that can debug this config, if any. */
debugAdapter: string | null,
/** "Allow multiple instances": Run on a running config starts another one instead of restarting it. */
allowParallel?: boolean,
} & RunExtras_Deserialize;
export type RunConfig_Serialize = {
/** Stable id, e.g. `npm:dev`, `cargo:run:app`, or a uuid for user-defined. */
id: string,
name: string,
/** `npm` | `cargo` | `gradle` | `maven` | `go` | `python` | `pytest` | `make` | `shell` … */
kind: string,
command: string,
args: string[],
cwd: IpcPath | null,
env: { [key in string]: string },
/** Detected configs are regenerated; user configs persist in `.openidea/run.toml`. */
detected: boolean,
/** Test runner configs render results in the test tree. */
isTest: boolean,
/** DAP adapter that can debug this config, if any. */
debugAdapter: string | null,
/** "Allow multiple instances": Run on a running config starts another one instead of restarting it. */
allowParallel?: boolean,
} & RunExtras_Serialize;
/** RunExited data exchanged with the IDE. */
export type RunExited = {
id: string,
config: string,
status: number | null,
killed: boolean,
};
export type RunExtras = RunExtras_Serialize | RunExtras_Deserialize;
export type RunExtras_Deserialize = {
/**
* Owning module, independent of the working directory; also supplies a JVM application's classpath.
* Empty means the project root.
*/
module?: string | null,
/** Values of the configuration type's own form fields (the command line derives from them). */
params?: { [key in string]: string },
/** Folder in the Run/Debug Configurations tree. */
folder?: string | null,
/** Stored in the workspace (`.openidea/run.local.toml`, not shared) instead of `run.toml`. */
local?: boolean,
/** Off: the process gets only the configured variables. */
includeSystemEnv?: boolean,
/** `.env` files (relative to the project root) loaded before `env`, in order. */
envFiles?: string[],
/** "Redirect input from": the process reads this file as stdin. */
stdinFile?: string | null,
/** "Save console output to file" (overwritten on each run). */
outputFile?: string | null,
beforeLaunch?: BeforeLaunchTask[],
/** Before launch build for JVM launches; unset keeps the project's default (incremental). */
buildPolicy?: BuildPolicy | null,
/** Compound configurations: ids of the configurations started together. */
compound?: string[],
showOnStdout?: boolean,
showOnStderr?: boolean,
/** Overrides Settings › Run › "Show the Run tool window when a process starts". */
openToolWindow?: boolean | null,
focusToolWindow?: boolean,
/**
* "Emulate terminal in output console": the process runs on a pseudo-terminal
* (colours, line editing, full-screen programs); the console renders it as a terminal.
*/
emulateTerminal?: boolean,
/**
* Shell command line run on Stop before the process is signalled (e.g. `docker stop <name>`),
* with the run's working directory and environment.
*/
stopCommand?: string | null,
/** Settings › Run Targets id the process runs on (over SSH); `None` = this machine. */
target?: string | null,
/**
* The test framework a test configuration runs when detection recognised one that the
* command line doesn't name (a `package.json` script running `playwright test`): picks the
* test output parser and how a single test is selected.
*/
testRunner?: string | null,
};
export type RunExtras_Serialize = {
/**
* Owning module, independent of the working directory; also supplies a JVM application's classpath.
* Empty means the project root.
*/
module?: string | null,
/** Values of the configuration type's own form fields (the command line derives from them). */
params?: { [key in string]: string },
/** Folder in the Run/Debug Configurations tree. */
folder?: string | null,
/** Stored in the workspace (`.openidea/run.local.toml`, not shared) instead of `run.toml`. */
local?: boolean,
/** Off: the process gets only the configured variables. */
includeSystemEnv?: boolean,
/** `.env` files (relative to the project root) loaded before `env`, in order. */
envFiles?: string[],
/** "Redirect input from": the process reads this file as stdin. */
stdinFile?: string | null,
/** "Save console output to file" (overwritten on each run). */
outputFile?: string | null,
beforeLaunch?: BeforeLaunchTask[],
/** Before launch build for JVM launches; unset keeps the project's default (incremental). */
buildPolicy?: BuildPolicy | null,
/** Compound configurations: ids of the configurations started together. */
compound?: string[],
showOnStdout?: boolean,
showOnStderr?: boolean,
/** Overrides Settings › Run › "Show the Run tool window when a process starts". */
openToolWindow?: boolean | null,
focusToolWindow?: boolean,
/**
* "Emulate terminal in output console": the process runs on a pseudo-terminal
* (colours, line editing, full-screen programs); the console renders it as a terminal.
*/
emulateTerminal?: boolean,
/**
* Shell command line run on Stop before the process is signalled (e.g. `docker stop <name>`),
* with the run's working directory and environment.
*/
stopCommand?: string | null,
/** Settings › Run Targets id the process runs on (over SSH); `None` = this machine. */
target?: string | null,
/**
* The test framework a test configuration runs when detection recognised one that the
* command line doesn't name (a `package.json` script running `playwright test`): picks the
* test output parser and how a single test is selected.
*/
testRunner?: string | null,
};
/** A process started from a run configuration. */
export type RunId = number;
/** What an import found: configurations to add and entries left out, with the reason. */
export type RunImport = RunImport_Serialize | RunImport_Deserialize;
/** Project files run configurations can be imported from. */
export type RunImportSource =
/** VS Code's `.vscode/launch.json`. */
"vscode" |
/** JetBrains IDEs' `.run/*.run.xml`, `.idea/runConfigurations/*.xml` and `.idea/workspace.xml`. */
"jetbrains";
/** What an import found: configurations to add and entries left out, with the reason. */
export type RunImport_Deserialize = {
source: RunImportSource,
/** The file read, relative to the project root. */
file: string,
imported: ImportedRunConfig_Deserialize[],
skipped: SkippedRunConfig[],
};
/** What an import found: configurations to add and entries left out, with the reason. */
export type RunImport_Serialize = {
source: RunImportSource,
/** The file read, relative to the project root. */
file: string,
imported: ImportedRunConfig_Serialize[],
skipped: SkippedRunConfig[],
};
export type RunInfo = {
id: RunId,
configId: string,
name: string,
pid: number | null,
running: boolean,
/** Runs on a pseudo-terminal: output is raw terminal data, input goes in keystroke by keystroke. */
pty: boolean,
};
/** Run/Debug configuration behaviour. */
export type RunSettings = {
/** Target for configurations without an explicit target. Empty = local. */
defaultTarget?: string,
confirmRerun?: boolean,
/** Ask before closing a Run tab whose process is still running. */
confirmTerminate?: boolean,
showOnStart?: boolean,
/** New Run/Debug tabs start pinned: a later run doesn't take their place once finished. */
pinTabs?: boolean,
/** Grace period between interrupt and kill when stopping a process. */
terminationTimeoutMs?: number,
};
/**
* Build, Execution, Deployment › Run Targets: run configurations on another machine
* or in a container.
*/
export type RunTarget = {
kind?: RunTargetKind,
id?: string,
name?: string,
/** [`SshConfiguration::id`] (SSH). */
sshConfig?: string,
/** Remote folder the project is synchronised to and run from (SSH). */
projectRoot?: string,
/** Upload changed project files before each run (SSH). */
syncBeforeRun?: boolean,
/** Interpreters on the target; empty = the one on the remote `PATH`. */
python?: string,
node?: string,
java?: string,
/**
* Id of a Docker connection of the Services tool window (Docker, Compose);
* empty = the CLI's own daemon.
*/
dockerConnection?: string,
/** Image to run (Docker). */
image?: string,
/** Compose files, relative to the project; empty = the project's default one (Compose). */
composeFiles?: string[],
/** Service to run (Compose). */
service?: string,
/**
* Where the project is in the container; empty = `/workspaces/<folder>` (Docker),
* the service's bind mount of the project (Compose).
*/
containerRoot?: string,
/** Published ports, as `docker run --publish` takes them (`8000:8000`). */
ports?: string[],
/** More options for `docker run` / `docker compose run`, shell-like quoted. */
runOptions?: string,
/** Run as the image's user instead of the project folder's owner (Linux). */
imageUser?: boolean,
};
/** Where a run target runs configurations. */
export type RunTargetKind =
/** Another machine over SSH, the project synchronised to its folder. */
"ssh" |
/** A new container of an image (`docker run --rm`), the project bind-mounted. */
"docker" |
/** A new container of a Compose service (`docker compose run --rm`). */
"compose";
export type RustSettings = {
/** Directory holding `cargo` / `rustc`; empty = `PATH` / rustup default. */
toolchain?: string,
/** Standard library sources (`RUST_SRC_PATH`); empty = from the toolchain. */
stdlib?: string,
/** Run the external linter on save (rust-analyzer `checkOnSave`). */
checkOnSave?: boolean,
/** `check` | `clippy` (rust-analyzer `check.command`). */
checkCommand?: string,
/** Extra arguments for rustfmt (rust-analyzer `rustfmt.extraArgs`), space-separated. */
rustfmtArgs?: string,
};
export type SbtBuild = {
/** Folder of `build.sbt`, relative to the project root (`""` for the root itself). */
dir: string,
/** The launcher: a `sbt` / `sbtx` script in the build folder, else `sbt` on `PATH`. */
command: string,
/** `sbt.version` of `project/build.properties`. */
version: string | null,
/** The root project first, then the declared projects in source order. */
projects: SbtProject[],
};
export type SbtProject = {
/** The project id tasks are scoped with (`core/compile`). */
id: string,
/** Base folder relative to the build folder (`""` for the build's own). */
dir: string,
/** The build's root project: its tasks run unscoped (and aggregate when sbt does). */
root: boolean,
};
/** Progress of `scaffold_create`. */
export type ScaffoldEvent =
/** A new step began. */
{ type: "step"; text: string } |
/** A line of a tool's output. */
{ type: "line"; text: string };
export type Scope = {
name: string,
variablesReference: number,
expensive: boolean,
};
/** The files of a custom scope (`file:src//*.ts`), for the Project view's scope panes. */
export type ScopeFiles = {
paths: IpcPath[],
/** More files than `limit` matched; `paths` holds the first ones. */
truncated: boolean,
};
/** One installed interpreter / toolchain. */
export type Sdk = {
/**
* Executable (`python`, `node`, `pnpm`) or directory (Rust toolchain bin
* dir, GOROOT, TypeScript `lib` dir) that the setting stores.
*/
path: IpcPath,
/** Display name, e.g. `Python 3.12 (.venv)` or `stable-aarch64-apple-darwin`. */
name: string,
version: string | null,
/**
* Where it was found: `venv` | `system` | `pyenv` | `conda` | `uv` | `nvm` |
* `rustup` | `bundled` | `workspace` | `path` …
*/
source: string,
/** Environment / toolchain root (virtualenv dir, rustup toolchain dir, GOROOT). */
home: IpcPath | null,
/** Rust standard library sources, Go default GOPATH. */
extra: IpcPath | null,
};
/** What [`detect`] looks for. */
export type SdkKind = "python" | "node" |
/** `php` CLI executables. */
"php" |
/** npm / pnpm / yarn executables. */
"packageManager" | "rust" | "go" | "typeScript" |
/** JDK homes. */
"jdk" |
/** Maven homes. */
"maven" | "ruby" |
/** Zig toolchain directories. */
"zig";
/**
* IDEA's search context: matches anywhere, only in, or outside comments and
* string literals. Files whose language has no syntax tree contain neither.
*/
export type SearchContext = "any" | "inComments" | "inStringLiterals" | "exceptComments" | "exceptStringLiterals" | "exceptCommentsAndStringLiterals";
export type SearchEvent = { type: "file"; file: FileMatches } | { type: "done"; summary: SearchSummary };
export type SearchQuery = {
pattern: string,
isRegex: boolean,
caseSensitive: boolean,
wholeWord: boolean,
/**
* File masks, e.g. `*.kt`, `src/**\/*.ts`; an entry may also be a
* comma-separated list where `!mask` excludes. Empty = all files.
*/
include: string[],
exclude: string[],
scope: SearchScope,
/** Stop after this many matches overall (0 = 10 000). */
maxMatches: number,
/** Where in the code a match may lie (IDEA's search context filter). */
context?: SearchContext,
/**
* Also search what `.gitignore` / `.ignore` / `info/exclude` leave out (the caller then
* adds none of the project's exclusions either).
*/
includeExcluded?: boolean,
};
export type SearchScope = { kind: "project" } | { kind: "directory"; path: IpcPath } | { kind: "files"; paths: IpcPath[] } |
/**
* IDEA's named scopes over the project's roots ("Project Production Files" …).
* Walks the project like `Project`; the caller passes the matching [`PathFilter`].
*/
{ kind: "fileSet"; set: ProjectFileSet } |
/**
* A custom scope: the project's files matching a [`ScopePattern`]
* (`file:src//*.ts&&!file:*test*`).
*/
{ kind: "pattern"; pattern: string };
export type SearchSummary = {
files: number,
matches: number,
limitHit: boolean,
cancelled: boolean,
elapsedMs: number,
};
/** Decoded semantic tokens (absolute positions) with the server legend applied. */
export type SemanticTokens = {
/** Flattened `[line, col, len, typeIdx, modifierBits]` quintuples (absolute). */
data: number[],
tokenTypes: string[],
tokenModifiers: string[],
};
/** The key that sends a message; the other one starts a new line. */
export type SendKey = "enter" | "modEnter";
/** A running language server instance. */
export type ServerId = number;
export type ServerInfo = {
id: ServerId,
name: string,
root: IpcPath,
languages: LanguageId[],
status: ServerStatus,
/** OS process of the running instance (for memory attribution). */
pid: number | null,
/** What the user sees as the server when another program serves in its place. */
label?: string | null,
};
/**
* A refactoring checked by the server (Change Signature, Move, Extract Interface): problems to show, the edit when
* none is fatal, and the token that confirms going on despite warnings.
*/
export type ServerRefactored = {
problems: RefactoringProblem[],
edit: WorkspaceEdit | null,
confirmation: string | null,
};
export type ServerStatus = "starting" | "ready" | "busy" | "crashed" | "stopped" | "missing" |
/**
* Not started: its configuration can't launch it (e.g. no JDK new enough);
* the message says what to change, and a settings change retries.
*/
"misconfigured";
export type ServiceLog = {
program: string,
args: string[],
toggles: ServiceLogToggle[],
};
/** A switch above the log; when on, `args` are appended and the program restarts. */
export type ServiceLogToggle = {
id: string,
label: string,
args: string[],
};
export type ServicePane = { kind: "message"; value: string } |
/** Read-only text that can be selected and copied. */
{ kind: "text"; value: string } |
/** A program the IDE runs (with the plugin's `process:` grant), followed in a log. */
{ kind: "log"; value: ServiceLog };
/** A tab of the Services pane of a plugin's node (`detail-provider.detail`). */
export type ServiceTab = {
id: string,
label: string,
body: ServicePane,
};
/** Exception filters of one session (see [`DebugManager::exception_filters`]). */
export type SessionExceptionFilters = {
session: DebugSessionId,
adapter: string,
filters: ExceptionFilter[],
/** Set when the session takes exception breakpoints on a chosen class. */
classes: ExceptionClassSupport | null,
};
/** A live session, as listed by [`DebugManager::sessions`]. */
export type SessionInfo = {
id: DebugSessionId,
name: string,
adapter: string,
/** Set for child sessions started by the adapter (`startDebugging`). */
parent: DebugSessionId | null,
};
export type Settings = Settings_Serialize | Settings_Deserialize;
export type SettingsImport = SettingsImport_Serialize | SettingsImport_Deserialize;
export type SettingsImport_Deserialize = {
/** Effective settings of the calling window after the import. */
settings: Settings_Deserialize,
/** IDE state the frontend keeps (written back to its storage). */
storage: { [key in string]: string },
};
export type SettingsImport_Serialize = {
/** Effective settings of the calling window after the import. */
settings: Settings_Serialize,
/** IDE state the frontend keeps (written back to its storage). */
storage: { [key in string]: string },
};
export type SettingsScope = "global" | "project";
export type SettingsWindowInit = SettingsWindowInit_Serialize | SettingsWindowInit_Deserialize;
export type SettingsWindowInit_Deserialize = {
launch: Launch_Deserialize | null,
remote: RemoteSession | null,
project: ProjectInfo_Deserialize | null,
globalSettings: Settings_Deserialize,
updates: boolean,
};
export type SettingsWindowInit_Serialize = {
launch: Launch_Serialize | null,
remote: RemoteSession | null,
project: ProjectInfo_Serialize | null,
globalSettings: Settings_Serialize,
updates: boolean,
};
export type Settings_Deserialize = {
general?: GeneralSettings,
appearance?: AppearanceSettings_Deserialize,
editor?: EditorSettings_Deserialize,
keymap?: string,
files?: FileSettings,
/**
* Per-action keybinding overrides on top of the `keymap` preset: action id →
* bindings (`Meta+Shift+O`, chords space-separated). An empty list unbinds.
*/
keymapOverrides?: { [key in string]: string[] },
/**
* User keymaps (Keymap › Duplicate…): id → name, parent preset and the
* keymap's own overrides. `keymap` may name one of these ids.
*/
customKeymaps?: { [key in string]: CustomKeymap },
notifications?: NotificationSettings,
/** System Settings › HTTP Proxy (global only). */
proxy?: ProxySettings,
/** Interpreters / toolchains per language (Python, Node.js, Rust, Go, TypeScript). */
languages?: LanguagesSettings,
/** Project Structure: source / test / resource / excluded folders (project-relative). */
projectStructure?: ProjectStructureSettings,
/** Version Control (Git, Commit, Confirmation, Issue Navigation). */
vcs?: VcsSettings,
/** Build, Execution, Deployment › Compiler (Build tool window). */
build?: BuildSettings,
/** Build, Execution, Deployment › Console. */
console?: ConsoleSettings,
debugger?: DebuggerSettings,
run?: RunSettings,
/** Tools › Terminal. */
terminal?: TerminalSettings,
actionsOnSave?: ActionsOnSaveSettings,
externalTools?: ExternalTool[],
/** Tools › Diff & Merge › External Diff Tools. */
externalDiff?: ExternalDiffSettings,
/**
* Language servers / debug adapters at a user-chosen location, by the
* command the language definition launches (`elixir-ls`, `codelldb`).
*/
tools?: { [key in string]: ToolSettings },
/**
* Per language server, by name (`rust-analyzer`): launch and protocol
* options on top of the language definition, or a server defined here.
*/
languageServers?: { [key in string]: LanguageServerSettings_Deserialize },
/** Tools › Download sources: a mirror prefix for the release archives the installer fetches. */
toolDownloads?: ToolDownloadSettings,
/** Editor › Inspections profiles. */
inspections?: InspectionSettings,
/** Editor › Natural Languages › Spelling. */
spelling?: SpellingSettings,
/** Tools › SSH Configurations. */
ssh?: SshSettings,
/** Build, Execution, Deployment › Deployment. */
deployment?: DeploymentSettings,
/** Build, Execution, Deployment › Run Targets. */
runTargets?: RunTarget[],
cmake?: CMakeSettings_Deserialize,
/** Settings › Agents. */
agents?: AgentSettings_Deserialize,
/** Agents › MCP Server (global only). */
mcpServer?: McpServerSettings_Deserialize,
/** Tools › Agents: Command Execution Policy. */
agentSecurity?: AgentSecuritySettings,
/** Appearance & Behavior › Scopes: named file sets other settings refer to. */
scopes?: NamedScope[],
/** Appearance & Behavior › File Colors. */
fileColors?: FileColorSettings,
/** Database › Query Execution, Languages & Frameworks › SQL Resolution Scopes. */
database?: DatabaseSettings,
/** Plugin settings (`[contributes.settings]`): plugin id → its values by key. */
plugins?: { [key in string]: { [key in string]: unknown } },
};
export type Settings_Serialize = {
general: GeneralSettings,
appearance: AppearanceSettings_Serialize,
editor: EditorSettings_Serialize,
keymap: string,
files: FileSettings,
/**
* Per-action keybinding overrides on top of the `keymap` preset: action id →
* bindings (`Meta+Shift+O`, chords space-separated). An empty list unbinds.
*/
keymapOverrides: { [key in string]: string[] },
/**
* User keymaps (Keymap › Duplicate…): id → name, parent preset and the
* keymap's own overrides. `keymap` may name one of these ids.
*/
customKeymaps: { [key in string]: CustomKeymap },
notifications: NotificationSettings,
/** System Settings › HTTP Proxy (global only). */
proxy: ProxySettings,
/** Interpreters / toolchains per language (Python, Node.js, Rust, Go, TypeScript). */
languages: LanguagesSettings,
/** Project Structure: source / test / resource / excluded folders (project-relative). */
projectStructure: ProjectStructureSettings,
/** Version Control (Git, Commit, Confirmation, Issue Navigation). */
vcs: VcsSettings,
/** Build, Execution, Deployment › Compiler (Build tool window). */
build: BuildSettings,
/** Build, Execution, Deployment › Console. */
console: ConsoleSettings,
debugger: DebuggerSettings,
run: RunSettings,
/** Tools › Terminal. */
terminal: TerminalSettings,
actionsOnSave: ActionsOnSaveSettings,
externalTools: ExternalTool[],
/** Tools › Diff & Merge › External Diff Tools. */
externalDiff: ExternalDiffSettings,
/**
* Language servers / debug adapters at a user-chosen location, by the
* command the language definition launches (`elixir-ls`, `codelldb`).
*/
tools: { [key in string]: ToolSettings },
/**
* Per language server, by name (`rust-analyzer`): launch and protocol
* options on top of the language definition, or a server defined here.
*/
languageServers: { [key in string]: LanguageServerSettings_Serialize },
/** Tools › Download sources: a mirror prefix for the release archives the installer fetches. */
toolDownloads: ToolDownloadSettings,
/** Editor › Inspections profiles. */
inspections: InspectionSettings,
/** Editor › Natural Languages › Spelling. */
spelling: SpellingSettings,
/** Tools › SSH Configurations. */
ssh: SshSettings,
/** Build, Execution, Deployment › Deployment. */
deployment: DeploymentSettings,
/** Build, Execution, Deployment › Run Targets. */
runTargets: RunTarget[],
cmake: CMakeSettings_Serialize,
/** Settings › Agents. */
agents: AgentSettings_Serialize,
/** Agents › MCP Server (global only). */
mcpServer: McpServerSettings_Serialize,
/** Tools › Agents: Command Execution Policy. */
agentSecurity: AgentSecuritySettings,
/** Appearance & Behavior › Scopes: named file sets other settings refer to. */
scopes: NamedScope[],
/** Appearance & Behavior › File Colors. */
fileColors: FileColorSettings,
/** Database › Query Execution, Languages & Frameworks › SQL Resolution Scopes. */
database: DatabaseSettings,
/** Plugin settings (`[contributes.settings]`): plugin id → its values by key. */
plugins: { [key in string]: { [key in string]: unknown } },
};
export type Severity = "error" | "warning" | "info" | "hint";
export type ShelfDiffFile = {
path: string,
patch: string,
before: string | null,
after: string | null,
};
/** Version Control › Shelf. */
export type ShelfSettings = {
/** Initial state of Unshelve's "Remove successfully applied files from the shelf". */
removeApplied?: boolean,
};
/** A change list on the shelf. */
export type ShelvedChangeList = {
/** Folder name under the shelf directory. */
id: string,
name: string,
timeMs: number | null,
/** Branch checked out when the changes were shelved. */
branch: string | null,
/** Repository owning the patch; absent in legacy shelves. */
repo?: IpcPath | null,
/** Repository-relative paths. */
files: ChangedFile[],
};
export type Signature = {
label: string,
documentation: Markup | null,
/** UTF-16 ranges of each parameter within `label`. */
parameters: ([number, number])[],
};
/** A declared exception (`throws`), with the server's handle of its type. */
export type SignatureException = {
type: string,
typeHandleIdentifier: string,
};
export type SignatureHelp = {
signatures: Signature[],
activeSignature: number,
activeParameter: number,
};
/**
* A parameter in Change Signature: its type, name, the value passed at existing calls when it is
* added, and its index in the current signature (-1 for an added one).
*/
export type SignatureParameter = {
type: string,
name: string,
defaultValue: string,
originalIndex: number,
};
/**
* Where the sizes of instances came from.
*
* Class objects (mirrors) are approximate in every case: HotSpot leaves the fields it injects
* into `java.lang.Class` out of the dump, so their layout size is short by a fixed amount per
* mirror. With a histogram that amount is fitted to its `java.lang.Class` row; otherwise (or when
* the fit is rejected) it comes from a table measured per JDK and reference size, within a few
* bytes per mirror, or is 32 when the JDK is unknown.
*/
export type SizeSource =
/** The JVM's class histogram from the capture. */
"jvm" |
/**
* The smallest distance between neighbouring objects of a type, in a dump the IDE did not
* capture.
*/
"addressGaps" | "layout";
export type SkillScanWarning = {
kind: SkillScanWarningKind,
file: string,
message: string,
};
export type SkillScanWarningKind = "hiddenUnicode" | "outOfRootSymlink" | "executableScript" | "allowedToolsShell";
export type SkipReason =
/** A configuration with this name already exists. */
{ kind: "nameTaken" } |
/** An existing configuration (a detected one, say) runs the same command. */
{ kind: "sameAs"; existing: string } |
/** The configuration type has no equivalent here: a VS Code debugger (`cppdbg`), a JetBrains type (`Application`). */
{ kind: "unsupportedType"; type: string } |
/** A `request` other than `launch` and `attach`. */
{ kind: "unsupportedRequest"; request: string } |
/** An attach other than to a host and port (to a process id, or listening for it). */
{ kind: "unsupportedAttach" } |
/** Uses a variable only known when VS Code starts it (`${file}`, `${input:…}`, `${command:…}`). */
{ kind: "variable"; variable: string } |
/** No program, module or command. */
{ kind: "nothingToRun" } |
/** A JetBrains path variable with no value here (`$MAVEN_REPOSITORY$`, user-defined ones). */
{ kind: "pathVariable"; variable: string } |
/** `$MODULE_DIR$` in a project with several modules: which module's directory is unknown. */
{ kind: "severalModules"; variable: string } |
/** A file the configuration needs isn't in the project (Django's `manage.py`). */
{ kind: "missingFile"; file: string } |
/** A project file that can't be read, or isn't XML; `name` is the file. */
{ kind: "invalidFile"; detail: string } |
/** A compound member that is neither imported nor an existing configuration. */
{ kind: "missingMember"; member: string } |
/** Not an object with a name. */
{ kind: "invalid" };
export type SkippedRunConfig = {
name: string,
reason: SkipReason,
};
/** Editor › General › Smart Keys. */
export type SmartKeysSettings = {
/** Home moves caret to first non-whitespace character. */
smartHome?: boolean,
/** Use "CamelHumps" words. */
camelHumps?: boolean,
pairBrackets?: boolean,
pairQuotes?: boolean,
surroundSelection?: boolean,
tabOutOfPair?: boolean,
/** A `;` typed before the closing `)` of a statement goes to the end of the statement. */
semicolonAtStatementEnd?: boolean,
/** Simultaneous `<tag></tag>` editing: renaming a tag renames its matching tag. */
simultaneousTagEditing?: boolean,
/** Reformat on paste: `none` | `indentBlock` | `indentEachLine`. */
reformatOnPaste?: string,
escapeOnPaste?: boolean,
smartIndent?: boolean,
/** Enter › Insert documentation comment stub: Enter after `/**` closes the comment. */
insertDocStub?: boolean,
/** Backspace › Unindent: `autoindent` (proper indent position) | `nearest` indent position | `none`. */
backspaceUnindent?: string,
};
export type SourceFolder = {
/** Project-relative, `/`-separated; `""` = the project root. */
path: string,
kind: RootKind,
/**
* Build file the root was detected from (`"pom.xml"`, `"app/build.gradle.kts"`);
* `None` for a folder the user marked.
*/
detectedFrom: string | null,
};
/**
* The Typo inspection's options (IDEA's "Process code / literals / comments");
* plain text and Markdown are always checked.
*/
export type SpellScope = {
code?: boolean,
literals?: boolean,
comments?: boolean,
};
/** Editor › Natural Languages › Spelling. */
export type SpellingSettings = {
/** Application-level dictionary: accepted words (IDE settings). */
ideWords?: string[],
/** Project-level dictionary: accepted words (project settings). */
projectWords?: string[],
/** Custom dictionaries: plain word lists or Hunspell `.dic` files. */
customDictionaries?: string[],
};
/** One row of SQL Resolution Scopes. */
export type SqlResolutionScope = {
/** Project-relative file or folder, `/`-separated; empty for the whole project. */
path?: string,
/** Data source id. */
dataSource?: string,
/** Schema unqualified names resolve in; empty for the data source's default. */
schema?: string,
};
export type SqlStatement = {
/**
* UTF-16 offsets of the statement text (whitespace trimmed, `;` excluded except
* after an Oracle PL/SQL block, whose `END;` needs it).
*/
from: number,
to: number,
text: string,
};
/** How an SSH connection authenticates. */
export type SshAuth = "password" |
/** A private key file, optionally protected by a passphrase. */
"keyPair" |
/** `~/.ssh/config` (HostName, User, Port, IdentityFile, ProxyJump) and the SSH agent. */
"openSsh";
/** A named SSH host, shared by terminals, deployment, run targets and data sources. */
export type SshConfiguration = {
id?: string,
name?: string,
/** Host name, or a `Host` alias of `~/.ssh/config` with [`SshAuth::OpenSsh`]. */
host?: string,
port?: number | null,
user?: string,
auth?: SshAuth,
/** Private key for [`SshAuth::KeyPair`]; `~/` is the home directory. */
keyFile?: string,
/** Keep the password / key passphrase in the saved passwords. */
saveSecret?: boolean,
};
/** Tools › SSH Configurations. */
export type SshSettings = {
configs?: SshConfiguration[],
};
export type StackFrame = {
id: number,
name: string,
path: IpcPath | null,
line: number,
column: number,
/** `subtle` frames (library/generated) are collapsed in the UI. */
presentationHint: string | null,
};
export type StartupMetrics = {
/**
* Process start → `main`: exec, code-signature scan (seconds for a freshly
* linked debug binary on macOS) and dynamic loading; `null` when unknown.
*/
processToMainMs: number | null,
/** Process start → backend set-up (Tauri / WebView boot); `null` when unknown. */
processToSetupMs: number | null,
/** Backend set-up (`AppState::new`). */
setupMs: number | null,
/** Process start → first IPC call from the UI. */
firstIpcMs: number | null,
};
export type Stash = {
index: number,
message: string,
timeMs: number | null,
/** The stash commit; its changes are those against `base`. */
id: string,
/** The commit the stash was made on (the stash commit's first parent). */
base: string | null,
};
/** A plugin's status bar item. */
export type StatusItem = StatusItem_Serialize | StatusItem_Deserialize;
/** A plugin's status bar item. */
export type StatusItem_Deserialize = {
text: string,
tooltip: string | null,
/** One of the plugin's commands, run on click. */
command: string | null,
/** Opened on click instead of running `command` when not empty (API 1.14). */
menu?: StatusMenuEntry[],
};
/** A plugin's status bar item. */
export type StatusItem_Serialize = {
text: string,
tooltip: string | null,
/** One of the plugin's commands, run on click. */
command: string | null,
/** Opened on click instead of running `command` when not empty (API 1.14). */
menu?: StatusMenuEntry[],
};
/** An entry of a plugin status bar item's menu (API 1.14, `ui.set-status-item-menu`). */
export type StatusMenuEntry =
/** Runs one of the plugin's commands with `argument`. */
{ kind: "action"; label: string; description: string | null; command: string; argument: string | null } | { kind: "separator" } | { kind: "header"; label: string };
/** A call on the current line that Smart Step Into can enter (`stepInTargets`). */
export type StepInTarget = {
id: number,
label: string,
/** 0-based, when the adapter reports where the call is. */
line: number | null,
column: number | null,
endColumn: number | null,
};
export type StepKind = "over" | "into" | "out";
export type StepSource = {
path: IpcPath,
text: string,
/** A Gherkin `.feature` file; otherwise a script defining steps. */
feature: boolean,
};
export type StreamChainInfo = StreamChainInfo_Serialize | StreamChainInfo_Deserialize;
export type StreamChainInfo_Deserialize = {
/** The `chain_index` [`debug_stream_trace`] takes for the same frame. */
index: number,
range: Range,
text: string,
/**
* Intermediate operations in call order, modifiers included. Empty, like `terminal`, for a
* chain the search rejected.
*/
steps: string[],
terminal: string,
available: boolean,
/** Set exactly when `available` is false. */
reason?: ChainUnavailable | null,
};
export type StreamChainInfo_Serialize = {
/** The `chain_index` [`debug_stream_trace`] takes for the same frame. */
index: number,
range: Range,
text: string,
/**
* Intermediate operations in call order, modifiers included. Empty, like `terminal`, for a
* chain the search rejected.
*/
steps: string[],
terminal: string,
available: boolean,
/** Set exactly when `available` is false. */
reason?: ChainUnavailable | null,
};
export type StreamTraceResult = StreamTraceResult_Serialize | StreamTraceResult_Deserialize;
export type StreamTraceResult_Deserialize = ({ status: "ready"; chain: StreamChainInfo_Deserialize;
/**
* Column titles by recorded step: `steps[0]` is the root call's name (empty for a stream
* held in a local), then each operation that records, modifiers left out.
*/
steps: string[];
/** In recording order. */
records: TraceRecordView[];
/** Parallel to `records`. */
links: Link[]; terminal: TerminalView; banners: TraceBanner[];
/** The stop the values belong to, for `debug_jvm_memory_fields`. */
generation: number }) & { detail?: never; reason?: never } | ({ status: "unavailable"; reason: TraceUnavailable }) & { banners?: never; chain?: never; detail?: never; generation?: never; links?: never; records?: never; steps?: never; terminal?: never } | ({ status: "failed"; detail: string }) & { banners?: never; chain?: never; generation?: never; links?: never; reason?: never; records?: never; steps?: never; terminal?: never } |
/** Recording was stopped, or the operation aborted, before the chain ran: nothing went wrong. */
({ status: "cancelled"; detail: string }) & { banners?: never; chain?: never; generation?: never; links?: never; reason?: never; records?: never; steps?: never; terminal?: never };
export type StreamTraceResult_Serialize = ({ status: "ready"; chain: StreamChainInfo_Serialize;
/**
* Column titles by recorded step: `steps[0]` is the root call's name (empty for a stream
* held in a local), then each operation that records, modifiers left out.
*/
steps: string[];
/** In recording order. */
records: TraceRecordView[];
/** Parallel to `records`. */
links: Link[]; terminal: TerminalView; banners: TraceBanner[];
/** The stop the values belong to, for `debug_jvm_memory_fields`. */
generation: number }) & { detail?: never; reason?: never } | ({ status: "unavailable"; reason: TraceUnavailable }) & { banners?: never; chain?: never; detail?: never; generation?: never; links?: never; records?: never; steps?: never; terminal?: never } | ({ status: "failed"; detail: string }) & { banners?: never; chain?: never; generation?: never; links?: never; reason?: never; records?: never; steps?: never; terminal?: never } |
/** Recording was stopped, or the operation aborted, before the chain ran: nothing went wrong. */
({ status: "cancelled"; detail: string }) & { banners?: never; chain?: never; generation?: never; links?: never; reason?: never; records?: never; steps?: never; terminal?: never };
export type StructuralEvent = { type: "file"; file: StructuralFile } | { type: "done"; summary: StructuralSummary };
/** All matches in one file; streamed as files complete. */
export type StructuralFile = {
path: IpcPath,
relPath: string,
matches: StructuralMatch[],
};
export type StructuralLanguage = {
id: LanguageId,
name: string,
};
export type StructuralMatch = {
range: Range,
/** The matched code (capped). */
text: string,
/** The first line of the match, for result rows. */
lineText: string,
replacement: string | null,
};
export type StructuralQuery = {
pattern: string,
/** Only files of this language are searched. */
language: LanguageId,
/** Replacement template; matches then carry their replacement text. */
replacement: string | null,
/** Stop after this many matches (0 = 5 000). */
maxMatches: number,
};
/** Structural ranges around a position (selection, move / complete statement). */
export type StructuralRanges = {
/** Extend Selection chain, innermost first (shrink = walk it backwards). */
selection: Range[],
/** Innermost statement (child of a block / statement list) at the position. */
statement: SyntaxNode | null,
prevStatement: SyntaxNode | null,
nextStatement: SyntaxNode | null,
/** The block / statement list containing `statement`. */
block: SyntaxNode | null,
/** Innermost declaration that is a direct member of a class body or of the file. */
declaration: SyntaxNode | null,
prevDeclaration: SyntaxNode | null,
nextDeclaration: SyntaxNode | null,
};
export type StructuralSummary = {
files: number,
matches: number,
limitHit: boolean,
cancelled: boolean,
elapsedMs: number,
};
/** What the structure service can do for a language. */
export type StructureSupport = {
/** A tree-sitter grammar is bundled: every query but `locals` works. */
tree: boolean,
/** A `locals.scm` query is bundled. */
locals: boolean,
};
export type SymbolFilter = "all" |
/** Go to Class (⌘O): classes, interfaces, structs, enums, traits, type aliases. */
"types";
/** Symbol kinds, a stable subset of LSP `SymbolKind`. */
export type SymbolKind = "file" | "module" | "namespace" | "package" | "class" | "interface" | "struct" | "enum" | "enumMember" | "trait" | "function" | "method" | "constructor" | "field" | "property" | "variable" | "constant" | "typeParameter" | "typeAlias" | "macro" | "event" | "operator" | "key" |
/** A Flutter widget built in the code (Flutter outline only). */
"widget" | "unknown";
export type SymbolMatch = {
name: string,
kind: SymbolKind,
container: string | null,
path: IpcPath,
relPath: string,
range: Range,
score: number,
/** Matched char indices within `name`. */
indices: number[],
};
export type SyncAction = "upload" | "download" | "deleteRemote" | "deleteLocal";
/** One file of Sync with Deployed. */
export type SyncEntry = {
/** Project-relative, `/`-separated. */
path: string,
remotePath: string,
local: FileStamp | null,
remote: FileStamp | null,
status: SyncStatus,
};
export type SyncProgress = {
message: string,
/** 0..1, or `None` when indeterminate. */
fraction: number | null,
};
export type SyncStatus = "localOnly" | "remoteOnly" | "localNewer" | "remoteNewer" |
/** Same time, different size. */
"different" | "same";
export type SyncStep = {
/** Project-relative, `/`-separated. */
path: string,
action: SyncAction,
};
/** Counters for diagnostics (`app_metrics`). */
export type SyntaxCacheStats = {
/** Documents tracked (open and observed). */
documents: number,
/** Documents with a cached tree. */
trees: number,
/** Total text size of the documents with a cached tree. */
treeTextBytes: number,
/** Queries answered from an up-to-date tree. */
hits: number,
/** Queries that re-parsed incrementally from an edited tree. */
incrementalParses: number,
/** Queries that parsed from scratch. */
fullParses: number,
};
export type SyntaxError = {
kind: SyntaxErrorKind,
range: Range,
/** For `missing`: the expected node kind or token text, e.g. `;`, `)`, `identifier`. */
expected: string | null,
/** Short human message: ``missing `;` ``, ``unexpected `foo` ``. */
message: string,
};
export type SyntaxErrorKind =
/** Text the parser could not fit into the grammar (`ERROR` node). */
"unexpected" |
/** A token / node the parser had to assume (e.g. a missing `;`); empty range. */
"missing";
export type SyntaxErrors = {
/** In document order. */
errors: SyntaxError[],
/** More errors exist than were returned (see `MAX_SYNTAX_ERRORS`). */
truncated: boolean,
};
/** Highlight classes sent to the UI, which maps each onto a Lezer tag. */
export type SyntaxHighlightKind = "keyword" | "string" | "stringSpecial" | "escape" | "regexp" | "atom" | "number" | "constant" | "comment" | "docComment" | "function" | "functionCall" | "builtin" | "type" | "namespace" | "variable" | "selfVariable" | "property" | "attribute" | "macro" | "label" | "tag" | "operator" | "punctuation" | "parameter" |
/** A shell command name (`pgrep`, a script's own function). */
"command";
/** Highlighted ranges of a whole document, packed like LSP semantic tokens. */
export type SyntaxHighlights = {
/** Legend: `data` kind `i` is `kinds[i]`. */
kinds: SyntaxHighlightKind[],
/** `[from, to, kind]` triples: sorted, non-overlapping UTF-16 offsets. */
data: number[],
};
/** One tree-sitter node. */
export type SyntaxNode = {
/** Grammar node kind, e.g. `method_invocation`, `identifier`, `;`. */
kind: string,
range: Range,
/** Field name of this node in its parent (`name`, `body`, `condition`…). */
field: string | null,
/** Named node (anonymous tokens such as `;` or `(` are not named). */
named: boolean,
/** The node is an `ERROR` node. */
error: boolean,
/** The parser inserted the node to recover (e.g. a missing `;`); its range is empty. */
missing: boolean,
/** The node or a descendant is an error / missing node. */
hasError: boolean,
};
/** A sortable table's order: the column and the direction. */
export type TableSort = {
column: number,
descending: boolean,
};
/** A long-running background task shown in the status bar. */
export type TaskId = number;
/** TerminalExited data exchanged with the IDE. */
export type TerminalExited = {
id: string,
key: string,
status: number | null,
closed: boolean,
};
/** An integrated terminal session. */
export type TerminalId = number;
export type TerminalInfo = {
id: TerminalId,
title: string,
pid: number | null,
};
export type TerminalOptions = {
cwd: IpcPath,
/** Defaults to the user's login shell (passwd entry, then `$SHELL`; PowerShell or `COMSPEC` on Windows). */
shell: string | null,
args: string[],
env: { [key in string]: string },
cols: number,
rows: number,
/** Make zsh / bash / fish report their working directory (OSC 7) at every prompt. */
shellIntegration?: boolean,
};
/** Tools › Terminal. */
export type TerminalSettings = {
/** Empty = project root; relative paths resolve against it. */
startDirectory?: string,
env?: { [key in string]: string },
/** Shell command line; empty = the login shell. */
shellPath?: string,
tabName?: string,
/**
* Title a program sets (OSC 0/2) as the tab's name: `running` (while a command runs),
* `always`, or `off`.
*/
appTitleAsTabName?: string,
audibleBell?: boolean,
closeOnExit?: boolean,
mouseReporting?: boolean,
copyOnSelection?: boolean,
pasteOnMiddleClick?: boolean,
overrideIdeShortcuts?: boolean,
shellIntegration?: boolean,
highlightHyperlinks?: boolean,
highlightSelection?: boolean,
optionAsMeta?: boolean,
/** Escape moves focus to the editor instead of reaching the shell. */
escapeToEditor?: boolean,
/** `block` | `underline` | `bar`. */
cursorShape?: string,
cursorBlink?: boolean,
/** Cap PTY→xterm paint rate: `unlimited` | `60` | `30` | `15` | `10`. */
maxFps?: string,
useEditorFont?: boolean,
fontFamily?: string,
fontSize?: number | null,
/** Multiple of the cell height. */
lineHeight?: number | null,
/** Font tried for glyphs the main font lacks; empty = none. */
fallbackFontFamily?: string,
/** Multiple of the cell width. */
columnWidth?: number | null,
};
export type TerminalView = { kind: "value"; value: JvmValue } | { kind: "void" } | { kind: "threw"; exception: JvmValue };
export type TestCaseReport = {
/** Fully qualified class (`com.acme.OrderTest`, nested: `com.acme.OrderTest$Nested`). */
className: string,
/** Method name without `()`. */
name: string,
status: TestCaseStatus,
durationMs: number | null,
/** Failure / error / skip message. */
message: string | null,
/** Failure / error stack trace. */
output: string | null,
/** What the test printed (`<system-out>`, `<system-err>`). */
stdout: string | null,
};
export type TestCaseStatus = "passed" | "failed" | "skipped";
/** Incremental test tree data. */
export type TestFailed = {
id: string,
durationMs: number | null,
message: string,
expected: string | null,
actual: string | null,
location: PluginLocation | null,
};
/** Incremental test tree data. */
export type TestOutput = {
id: string,
text: string,
};
/** Incremental test tree data. */
export type TestPassed = {
id: string,
durationMs: number | null,
};
/** Incremental test tree data. */
export type TestSkipped = {
id: string,
reason: string | null,
};
/** Incremental test tree data. */
export type TestStart = {
id: string,
parent: string | null,
name: string,
location: PluginLocation | null,
};
/** Editor › Color Scheme override of one text attribute. */
export type TextAttributesOverride = TextAttributesOverride_Serialize | TextAttributesOverride_Deserialize;
/** Editor › Color Scheme override of one text attribute. */
export type TextAttributesOverride_Deserialize = {
foreground?: string | null,
background?: string | null,
bold?: boolean | null,
italic?: boolean | null,
/** `underline` | `wave` | `strikeout` | `none`. */
effect?: string | null,
effectColor?: string | null,
/** IDEA's `ERROR_STRIPE_COLOR`: the diff overview-lane marker of a change type. */
errorStripeColor?: string | null,
};
/** Editor › Color Scheme override of one text attribute. */
export type TextAttributesOverride_Serialize = {
foreground?: string | null,
background?: string | null,
bold?: boolean | null,
italic?: boolean | null,
/** `underline` | `wave` | `strikeout` | `none`. */
effect?: string | null,
effectColor?: string | null,
/** IDEA's `ERROR_STRIPE_COLOR`: the diff overview-lane marker of a change type. */
errorStripeColor?: string | null,
};
/**
* Replace the text in `[from, to)` (UTF-16 offsets into the document *before*
* the change set is applied) with `insert`.
*/
export type TextChange = {
from: number,
to: number,
insert: string,
};
/** An edit expressed in line/column coordinates (LSP `TextEdit`). */
export type TextEdit = {
range: Range,
new_text: string,
};
/** `{"id", "name", "kind", "tokens": {"--bg-app": "#002b36", ...}}`. */
export type ThemeDef = {
id: string,
name: string,
kind: ThemeKind,
tokens: { [key in string]: string },
};
export type ThemeKind = "dark" | "light";
/** How the agent's reasoning shows. */
export type ThinkingDisplay =
/** Open while it streams, folded once it ends. */
"auto" | "expanded" | "collapsed";
export type ThreadInfo = {
id: number,
name: string,
};
export type TomcatHome = TomcatHome_Serialize | TomcatHome_Deserialize;
export type TomcatHome_Deserialize = {
version: string,
libraries?: string[],
tomee?: boolean,
httpPort?: number | null,
httpsPort?: number | null,
ajpPort?: number | null,
shutdownPort?: number | null,
};
export type TomcatHome_Serialize = {
version: string,
libraries: string[],
tomee: boolean,
httpPort?: number | null,
httpsPort?: number | null,
ajpPort?: number | null,
shutdownPort?: number | null,
};
export type TomcatInstallation = TomcatInstallation_Serialize | TomcatInstallation_Deserialize;
export type TomcatInstallation_Deserialize = {
path: string,
version: string,
libraries?: string[],
name?: string | null,
base?: string | null,
tomee?: boolean,
};
export type TomcatInstallation_Serialize = {
path: string,
version: string,
libraries: string[],
name?: string | null,
base?: string | null,
tomee: boolean,
};
/** How tool calls between messages show. */
export type ToolCallDisplay =
/** A run of calls is one line saying what they did ("Read 4 files · Edited 2 files"). */
"grouped" |
/** Each call on its own line. */
"each";
/**
* Tools › Download sources: a mirror the installer tries when `github.com` is slow or
* unreachable.
*
* The mirror is a proxy prefix: the official URL is appended to it unchanged
* (`https://mirror.example/https://github.com/o/r/releases/download/…`), which is what the
* public GitHub proxies speak. Only `github.com` downloads are affected — those proxies
* hard-code that host, so Eclipse JDT LS and Open VSX keep their official addresses. Empty by
* default, so every download stays on its official host until the user opts in.
*/
export type ToolDownloadSettings = {
/**
* Proxy prefix prepended to `https://github.com/…` archive addresses only; empty keeps
* every download on its official host.
*/
githubMirror?: string,
};
/** UI-facing state of one tool. */
export type ToolInfo = {
/** Server / adapter name from `languages/*.toml`. */
name: string,
displayName: string,
kind: ToolKind,
/** The executable the IDE launches. */
command: string,
/** Names of the languages using this tool. */
languages: string[],
status: ToolStatus,
path: IpcPath | null,
version: string | null,
/** How it gets installed, e.g. `npm`, `GitHub release`; `None` when not installable. */
installMethod: string | null,
canInstall: boolean,
/** Why install is impossible right now (missing npm, no build for this platform, …). */
unavailableReason: string | null,
canUninstall: boolean,
/** Manual install instructions from the language definition. */
installHint: string | null,
homepage: string | null,
/** Why the executable chosen in settings cannot be used (status is then `Missing`). */
customError: string | null,
/** A language server's arguments from its language definition. */
defaultArgs: string[],
/** A language server's `initializationOptions` from its language definition, as JSON text. */
defaultInitializationOptions: string | null,
/**
* The interchangeable servers this one belongs to, in preference order: a
* server and the `fallback` ones after it. Empty when it has none.
*/
alternatives: string[],
/**
* A language server used for part of what its languages need (`features` in its
* definition: pylsp-rope's refactorings next to basedpyright). Not offered for install
* when missing; the Language Servers page lists it.
*/
companion: boolean,
};
export type ToolKind = "languageServer" | "debugger" |
/** Loaded into another tool's process, e.g. a jdtls agent. */
"plugin" | "formatter" |
/** A command the IDE itself runs, e.g. the Dev Containers CLI. */
"cli";
export type ToolSettings = {
/** Executable to launch instead of the managed / `PATH` one; empty = auto-detect. */
path?: string,
};
export type ToolStatus =
/** Installed by the IDE (managed tools dir or a toolchain component it manages). */
"installed" |
/** Found on the system `PATH`. */
"onPath" |
/** The executable chosen in settings. */
"custom" | "missing";
/** A newer version of a tool the IDE installed, as its install source offers it now. */
export type ToolUpdate = {
name: string,
/** The installed version. */
current: string,
/** The version installing the tool again would get. */
latest: string,
};
/** Something the user must know to read the trace correctly. */
export type TraceBanner = { kind: "truncated"; dropped: number } |
/** `count()` on a sized source skips the pipeline, so nothing was recorded. */
{ kind: "countFromSize" } | { kind: "sortedPassThrough"; step: number } | { kind: "sequentialized" } | { kind: "breakpointsSkipped"; count: number } |
/** Breakpoint stops of the chain's thread while it ran, resumed without being shown. */
{ kind: "breakpointsResumed"; count: number } | { kind: "threw" };
export type TracePhase = "arming" | "running" |
/** The terminal operation runs on, keeping no more records. */
"recordingStopped" | "aborting" |
/** The terminal operation finished: stepping out of it and reading the records. */
"collecting";
export type TraceProgress = {
phase: TracePhase,
records: number,
dropped: number,
/** Since the program started running the chain, as the bundle measures it. */
elapsedMs: number,
};
export type TraceRecordView = {
step: number,
value: JvmValue,
};
export type TraceUnavailable =
/** Not a java-debug session, or no JDT LS bundle behind it. */
{ kind: "noBackend" } | { kind: "notSuspended" } | { kind: "notAtChainStart"; detail: string } |
/** A trace already runs in this session or its JVM. */
{ kind: "busy" } |
/** java-debug has no debug session for the JVM. */
{ kind: "noSession" } | { kind: "unsupported"; detail: string };
export type TransferError = {
path: string,
message: string,
};
export type TransferReport = {
files: number,
/** Files left alone: excluded, or outside every mapping. */
skipped: number,
errors: TransferError[],
};
export type TrustDecisions = {
projects: string[],
locations: string[],
restricted: string[],
};
export type TrustStatus = {
root: IpcPath,
trusted: boolean,
decided: boolean,
};
export type TypeScriptSettings = {
/**
* `bundled` (the server's own TypeScript), `workspace` (`node_modules/typescript`),
* or a path to a TypeScript `lib` directory.
*/
version?: string,
/**
* tsserver heap limit in MB. `0` = automatic: 8192 when vtsls hosts the Vue
* plugin (hybrid mode; a Vue project's program alone needs ~3 GiB, and the
* vtsls default 3072 dies in a GC death spiral), else unset (vtsls default).
*/
tsserverMaxMemory?: number,
};
/** A misspelt word. */
export type Typo = {
/** UTF-16 range of the word. */
range: Range,
word: string,
context: TypoContext,
};
/**
* What a typo is part of: correcting one in `Code` (a declared name) must
* rename the symbol; the others may replace the word in place.
*/
export type TypoContext = "code" | "literal" | "comment" | "prose";
/** One projected declaration. */
export type UiContribution = {
pluginId: string,
/** Extension point id (`commands`, `iconThemes`, …). */
point: string,
/** Stable within (plugin, point): the client keys its registrations on it. */
key: string,
/** The validated declaration, shaped by the point. */
decl: unknown,
};
/** What [`FileMoves::undo`] did. */
export type UndoOutcome = {
/** Moves reverted (each `from` is the original location again). */
moves: FileMove[],
/** Edited files changed since the refactoring, so their edits were kept. */
conflicts: IpcPath[],
};
export type UnityProjectInfo = {
editorVersion: string | null,
/** File names relative to the Unity root, in stable order. */
solutions: string[],
projects: string[],
};
/** A requirement the project's interpreter does not satisfy. */
export type UnsatisfiedRequirement = {
dependency: ManifestDependency,
/** The installed version that misses the specifier; `None` when not installed. */
installed: string | null,
};
export type UpdateCheck = {
enabled: boolean,
update: UpdateInfo | null,
};
export type UpdateInfo = {
version: string,
currentVersion: string,
notes: string | null,
date: string | null,
};
/** Progress of [`app_install_update`], streamed to the UI's background task. */
export type UpdateProgress =
/** Bytes received so far; `total` when the server sends a length. */
{ type: "downloading"; downloaded: number | null; total: number | null } |
/** Download done; the new version is being written over this one. */
{ type: "installing" };
export type UpdateSource = "github" | "cnb";
export type UpdateStatus = {
/** Unix milliseconds of the last successful check in this process. */
lastChecked: number | null,
checking: boolean,
};
export type Variable = Variable_Serialize | Variable_Deserialize;
export type Variable_Deserialize = {
name: string,
value: string,
typeName: string | null,
/** > 0 when expandable. */
variablesReference: number,
evaluateName: string | null,
/**
* `value` is not computed yet (DAP `presentationHint.lazy`): the single variable that
* `variables` returns for `variables_reference` holds the value and its children.
*/
lazy?: boolean,
};
export type Variable_Serialize = {
name: string,
value: string,
typeName: string | null,
/** > 0 when expandable. */
variablesReference: number,
evaluateName: string | null,
/**
* `value` is not computed yet (DAP `presentationHint.lazy`): the single variable that
* `variables` returns for `variables_reference` holds the value and its children.
*/
lazy?: boolean,
};
/** Version Control › Confirmation. */
export type VcsConfirmationSettings = {
/** `ask` | `silently` | `never`. */
onCreate?: string,
onDelete?: string,
/** Update Project opens its options dialog first. */
showUpdateOptions?: boolean,
confirmDropCommits?: boolean,
/** After a patch is saved: `ask` | `no` | `reveal` (show it in the file manager). */
onPatchCreated?: string,
};
/**
* Directory Mappings on top of repository detection. Paths are relative to the project
* root (`.` for the root itself) or absolute outside it.
*/
export type VcsMappings = {
/** Detected repositories the IDE leaves alone: no Git or Commit integration, files stay. */
excluded?: string[],
/** Repository roots detection does not reach (outside the project, or deeper). */
added?: string[],
};
/** A repository of the project (IDEA's VCS root). */
export type VcsRoot = {
/** Worktree root. */
root: IpcPath,
/** Root representing all mapped worktrees of the same Git repository in branch lists. */
branchRoot: IpcPath,
/** Merge / rebase / cherry-pick / revert in progress. */
operation: string | null,
/** Current branch; `None` when HEAD is detached (or unreadable). */
head: string | null,
/** HEAD commit; `None` before the first commit. */
headCommit: string | null,
};
/** Version Control (main page) and its sub-pages. */
export type VcsSettings = {
/** Colour folders that contain changed files (project tree, tabs). */
showDirtyDirectories?: boolean,
/** Diffs the user opens show in an editor tab; off, in a separate window. */
diffAsEditorTab?: boolean,
/** Stop file history (Show History) after `history_limit` commits. */
limitHistory?: boolean,
historyLimit?: number,
git?: GitSettings,
commit?: CommitSettings,
confirmation?: VcsConfirmationSettings,
shelf?: ShelfSettings,
/** Issue Navigation: commit-message patterns turned into links. */
issueNavigation?: IssueLink[],
/** Directory Mappings: repository roots added to or excluded from the detected ones. */
mappings?: VcsMappings,
};
/** The tool that creates a new Python environment in "Add Python Interpreter". */
export type VenvTool =
/** `base -m venv <location>`. */
"venv" |
/** `uv venv <location> --python <base>` (uv must be on PATH). */
"uv" |
/** `poetry env use <base>` in the project, then `poetry env info --path`. */
"poetry" |
/** `conda create -n <name> -y` for a bare name, else `-p <location>` (conda must be on PATH). */
"conda";
/** What a view or custom editor shows. */
export type View = {
toolbar: ViewButton[],
body: ViewBody,
status: string | null,
};
export type ViewBody = { kind: "message"; value: string } | { kind: "tree"; value: ViewTreeItem[] } | { kind: "list"; value: ViewListItem[] } | { kind: "form"; value: ViewField[] } | { kind: "table"; value: ViewTable } | { kind: "html"; value: string };
export type ViewButton = {
id: string,
label: string,
icon: string | null,
enabled: boolean,
};
/** A user action in a view. */
export type ViewEvent = { kind: "button"; id: string } | { kind: "activate"; key: string } | { kind: "select"; key: string } | { kind: "expand"; key: string } | { kind: "collapse"; key: string } | { kind: "field"; key: string; value: string } | { kind: "cell"; row: number; column: number; value: string } | { kind: "insertRow"; before: number } | { kind: "deleteRows"; rows: number[] } | { kind: "message"; text: string } | { kind: "sort"; column: number; descending: boolean } | { kind: "tableSelect"; row: number } | { kind: "tableActivate"; row: number };
export type ViewField = {
key: string,
label: string,
value: FieldValue,
};
export type ViewListItem = {
key: string,
label: string,
icon: string | null,
detail: string | null,
};
export type ViewTable = {
columns: string[],
totalRows: number,
firstRow: number,
rows: string[][],
editable: boolean,
/** The plugin opted its headers in to click-to-sort (a `table` body through `other`). */
sortable: boolean,
/** The sort the plugin orders by (none: no arrow yet). */
sort: TableSort | null,
};
export type ViewTreeItem = {
key: string,
parent: string | null,
label: string,
icon: string | null,
detail: string | null,
expandable: boolean,
expanded: boolean,
};
/** The table rows the UI shows. */
export type Viewport = {
firstRow: number,
rows: number,
};
/**
* Read-only contents a language server provides for a non-`file:` URI
* (library class source or decompiled code from `jdt://`, …).
*/
export type VirtualDocument = {
uri: string,
text: string,
languageId: LanguageId,
/** Tab title, e.g. `SpringApplication.class` (decompiled) or `SpringApplication.java`. */
title: string,
/** Origin shown in the tooltip / banner, e.g. the jar path. */
description: string | null,
/** Generated Java from a decompiler, rather than real source or a disassembler stub. */
decompiled: boolean,
/**
* Charset the content was decoded with (a WHATWG label, e.g. `gbk`);
* `utf-8` for text the server decoded itself.
*/
encoding: string,
hasBom: boolean,
/**
* "Reload with Encoding" can re-decode the origin's bytes (archive
* entries, JDT sources with an editable attachment encoding); false for
* server-generated content such as decompiled code.
*/
canReloadEncoding: boolean,
};
/** Declared (or conventional) visibility of an outline symbol. */
export type Visibility = "public" | "protected" |
/** Package / module / assembly scope (Java default, `internal`, `pub(crate)`, Go unexported). */
"package" | "private";
export type WebArtifact = {
id: string,
name: string,
module: string,
tool: string,
};
/**
* A web reference no language server resolves and where it points: `class="card"` →
* `.card` selectors, `id` → `#id` selectors, `href="#top"` → the element, `var(--x)` →
* `--x:` declarations.
*/
export type WebGoto = {
reference: WebReference,
targets: Location[],
};
/** The page of a web view, for the client to load in its frame. */
export type WebPage = {
/**
* `<plugin id>/<revision>/<entry>` under the `openidea-plugin` scheme. The
* revision changes with the installed package, so a cached file is never
* stale; relative URLs in the page resolve to the package's files.
*/
path: string,
};
/** A web frame's API 1.3 PTY request. The frame never supplies an executable path or cwd. */
export type WebPtyCommand = {
program: string,
args: string[],
env: { [key in string]: string },
cols: number,
rows: number,
};
export type WebReference = {
kind: WebReferenceKind,
/** Without sigil: `card`, `main`, `--accent`. */
name: string,
range: Range,
};
export type WebReferenceKind =
/** A class in a `class` / `className` attribute: `.name` selectors. */
"class" |
/** An `id` attribute value: `#name` selectors. */
"id" |
/** `href="#name"`: the element with that id in the same document. */
"anchor" |
/** `var(--name)`: the custom property's declarations. */
"cssVariable";
export type WebsocketReady = {
pluginId: string,
connection: number,
};
export type WhileRunning = "queue" | "steer";
/** A caption button of a frameless window's title bar. */
export type WindowButton = "minimize" | "maximize" | "close";
/** Which caption buttons the title bar shows on each side, in order from left to right. */
export type WindowButtonLayout = {
left: WindowButton[],
right: WindowButton[],
};
/** A request that the invoking window acknowledges through plugin_answer_command. */
export type WindowRequest = WindowRequest_Serialize | WindowRequest_Deserialize;
/** A request that the invoking window acknowledges through plugin_answer_command. */
export type WindowRequest_Deserialize =
/** Connect and introspect using the normal Database action in this window. */
({ kind: "databaseConnect"; id: string }) & { args?: never; config?: never; cwd?: never; debug?: never; env?: never; key?: never; operation?: never; program?: never; tab?: never; title?: never } |
/** Open and acknowledge validation by the shared content editor. */
({ kind: "contentTab"; tab: ContentTab }) & { args?: never; config?: never; cwd?: never; debug?: never; env?: never; id?: never; key?: never; operation?: never; program?: never; title?: never } | ({ kind: "run"; operation: string; config: RunConfig_Deserialize; debug: boolean }) & { args?: never; cwd?: never; env?: never; id?: never; key?: never; program?: never; tab?: never; title?: never } | ({ kind: "terminal"; operation: string; key: string; title: string; program: IpcPath; args: string[]; env: { [key in string]: string }; cwd: IpcPath }) & { config?: never; debug?: never; id?: never; tab?: never };
/** A request that the invoking window acknowledges through plugin_answer_command. */
export type WindowRequest_Serialize =
/** Connect and introspect using the normal Database action in this window. */
({ kind: "databaseConnect"; id: string }) & { args?: never; config?: never; cwd?: never; debug?: never; env?: never; key?: never; operation?: never; program?: never; tab?: never; title?: never } |
/** Open and acknowledge validation by the shared content editor. */
({ kind: "contentTab"; tab: ContentTab }) & { args?: never; config?: never; cwd?: never; debug?: never; env?: never; id?: never; key?: never; operation?: never; program?: never; title?: never } | ({ kind: "run"; operation: string; config: RunConfig_Serialize; debug: boolean }) & { args?: never; cwd?: never; env?: never; id?: never; key?: never; program?: never; tab?: never; title?: never } | ({ kind: "terminal"; operation: string; key: string; title: string; program: IpcPath; args: string[]; env: { [key in string]: string }; cwd: IpcPath }) & { config?: never; debug?: never; id?: never; tab?: never };
export type WindowTab = {
label: string,
name: string,
root: IpcPath | null,
current: boolean,
};
/** A workbench event delivered to plugins. */
export type WorkbenchEvent = { kind: "documentChanged"; value: DocumentChanged } | { kind: "websocketReady"; value: WebsocketReady } | { kind: "runExited"; value: RunExited } | { kind: "terminalExited"; value: TerminalExited } | { kind: "contentTabAction"; value: ContentTabAction } | { kind: "fileClosed"; value: string } | { kind: "settingsChanged"; value: string[] } |
/** Ids of extension points the receiving plugin declares whose contributions changed. */
{ kind: "extensionsChanged"; value: string[] } | { kind: "inputModeChanged"; value: InputMode } | { kind: "fileOpened"; value: string } | { kind: "fileSaved"; value: string } | { kind: "filesChanged"; value: FilesChanged } | { kind: "editorFocused"; value: string | null } | { kind: "caretMoved"; value: CaretMoved } | { kind: "actionPerformed"; value: ActionPerformed } | { kind: "vcsChanged"; value: string } |
/** Problems of the window's files changed; plugins re-read `problems`. */
{ kind: "problemsChanged" } | { kind: "scheduled" };
export type WorkingTreeChange = {
path: string,
kind: ChangeKind,
oldPath: string | null,
added: number,
removed: number,
};
export type Workspace = Workspace_Serialize | Workspace_Deserialize;
/** Edits to many files, applied atomically from the user's point of view. */
export type WorkspaceEdit = {
files: FileEdit[],
/** Content fingerprints captured before presenting an edit for confirmation. */
preconditions?: WorkspaceEditPrecondition[],
};
export type WorkspaceEditPrecondition = {
path: IpcPath,
hash: string,
};
/** A project attached to the window's project, with its own Project Structure. */
export type WorkspaceMember = {
root: IpcPath,
/** Its project settings' Project Structure (not merged with the user settings). */
structure: ProjectStructureSettings,
/** Roots detected from its build files. */
detected: SourceFolder[],
};
export type WorkspaceSymbol = {
name: string,
kind: SymbolKind,
container: string | null,
location: Location,
};
export type Workspace_Deserialize = {
version: number,
name: string,
projects: string[],
};
export type Workspace_Serialize = {
version: number,
name: string,
projects: string[],
};
export type Worktree = {
path: IpcPath,
/** Checked-out commit; `None` for a bare main repository. */
head: string | null,
/** Short branch name; `None` when HEAD is detached. */
branch: string | null,
/** The main working tree (cannot be removed). */
main: boolean,
locked: boolean,
prunable: boolean,
};
export type ZigSettings = {
/** Directory holding the `zig` executable; empty = the one on `PATH`. */
zig?: string,
};
/* Tauri Specta runtime */
async function typedError<T, E>(result: Promise<T>): Promise<{ status: "ok"; data: T } | { status: "error"; error: E }> {
try {
return { status: "ok", data: await result };
} catch (e) {
if (e instanceof Error) throw e;
return { status: "error", error: e as any };
}
}