// @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 = { appInfo: () => __TAURI_INVOKE("app_info"), /** Devices `adb` knows about, online ones first. */ androidDevices: () => typedError(__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) => typedError(__TAURI_INVOKE("android_logcat", { request, serial, clear, onLines })), recentProjects: () => __TAURI_INVOKE("recent_projects"), removeRecentProject: (path: string) => typedError(__TAURI_INVOKE("remove_recent_project", { path })), /** The welcome screen's project groups. */ recentProjectGroups: () => __TAURI_INVOKE("recent_project_groups"), /** * Replaces the project groups; returns them as saved (names trimmed and unique, each * project in one group, only recent projects). */ setRecentProjectGroups: (groups: RecentProjectGroup[]) => typedError(__TAURI_INVOKE("set_recent_project_groups", { groups })), openProject: (path: string) => typedError(__TAURI_INVOKE("open_project", { path })), projectTrustStatus: (path: string) => typedError(__TAURI_INVOKE("project_trust_status", { path })), projectTrustList: () => typedError(__TAURI_INVOKE("project_trust_list")), projectTrustSet: (path: string, trusted: boolean, folder: boolean) => typedError(__TAURI_INVOKE("project_trust_set", { path, trusted, folder })), projectTrustAddLocation: (path: string) => typedError(__TAURI_INVOKE("project_trust_add_location", { path })), projectTrustRemoveLocation: (path: string) => typedError(__TAURI_INVOKE("project_trust_remove_location", { path })), workspaceCreate: (path: string, name: string, projects: string[]) => typedError(__TAURI_INVOKE("workspace_create", { path, name, projects })), workspaceAttach: (path: string) => typedError(__TAURI_INVOKE("workspace_attach", { path })), workspaceUpdate: (name: string, projects: string[]) => typedError(__TAURI_INVOKE("workspace_update", { name, projects })), windowGroupCurrent: () => typedError(__TAURI_INVOKE("window_group_current")), windowGroupMerge: () => typedError(__TAURI_INVOKE("window_group_merge")), windowGroupSelect: (label: string) => typedError(__TAURI_INVOKE("window_group_select", { label })), windowGroupDetach: () => typedError(__TAURI_INVOKE("window_group_detach")), windowGroupClose: (label: string) => typedError(__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(__TAURI_INVOKE("window_group_close_tabs", { keep, labels })), /** This window kept its project open (unsaved-changes prompt cancelled); stops a batch close. */ windowGroupCancelClose: () => __TAURI_INVOKE("window_group_cancel_close"), /** * This window closes next (its prompts passed): a fullscreen group's host first hands its Space * to the tab that takes over. */ windowGroupBeforeClose: () => typedError(__TAURI_INVOKE("window_group_before_close")), windowGroupReorder: (labels: string[]) => typedError(__TAURI_INVOKE("window_group_reorder", { labels })), windowGroupRestore: () => typedError(__TAURI_INVOKE("window_group_restore")), /** * 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(__TAURI_INVOKE("light_edit_open", { path })), /** The project open in this window (a settings window: its parent's), if any. */ projectCurrent: () => __TAURI_INVOKE<{ trusted: boolean, root: IpcPath, name: string, isGit: boolean, settings: Settings_Serialize, workspace?: Workspace_Serialize | null, unity?: UnityProjectInfo | null, } | null>("project_current"), closeProject: () => __TAURI_INVOKE("close_project"), languages: () => __TAURI_INVOKE("languages"), /** Effective settings for the window's project, or global settings without one. */ settingsGet: () => __TAURI_INVOKE("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_get_global"), /** * `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(__TAURI_INVOKE("settings_set", { scope, key, value })), /** * 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(__TAURI_INVOKE("settings_export", { path, storage })), /** Import Settings…: replaces the global settings with the file's; every window re-reads them. */ settingsImport: (path: string) => typedError(__TAURI_INVOKE("settings_import", { path })), /** Import Settings… with a JetBrains `settings.zip`: reads it; the frontend maps and applies it. */ settingsReadJetbrains: (path: string) => typedError(__TAURI_INVOKE("settings_read_jetbrains", { path })), /** * 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(__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(__TAURI_INVOKE("project_roots")), cancelRequest: (id: RequestId) => __TAURI_INVOKE("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("cancel_task", { id }), /** Routes frontend logs into the backend `tracing` pipeline. */ logFrontend: (level: LogLevel, message: string) => __TAURI_INVOKE("log_frontend", { level, message }), /** Streams the project's agent events to this window; returns every task. */ agentSubscribe: (onEvent: Channel) => typedError(__TAURI_INVOKE("agent_subscribe", { onEvent })), agentProviders: () => typedError(__TAURI_INVOKE("agent_providers")), /** * 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(__TAURI_INVOKE("agent_set_command", { id, command })), /** * 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(__TAURI_INVOKE("agent_set_env", { id, env })), /** * 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(__TAURI_INVOKE("agent_registry_list", { request })), /** * 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) => typedError(__TAURI_INVOKE("agent_registry_install", { id, request, onEvent })), /** Removes a registry agent: its agent file and installed files. */ agentRegistryRemove: (id: string) => typedError(__TAURI_INVOKE("agent_registry_remove", { id })), /** * 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(__TAURI_INVOKE("agent_commands", { provider, task })), /** Entries of `task`'s conversation, or of its subagent `subagent`'s. */ agentEntries: (task: string, subagent: string | null) => typedError(__TAURI_INVOKE("agent_entries", { task, subagent })), agentCreate: (request: NewAgentTask) => typedError(__TAURI_INVOKE("agent_create", { request })), /** 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(__TAURI_INVOKE("agent_prompt", { task, prompt, now })), /** Drops a queued message and returns it (to edit it). */ agentUnqueue: (task: string, queued: string) => typedError(__TAURI_INVOKE("agent_unqueue", { task, queued })), /** Sends a queued message now, interrupting the current turn. */ agentSendQueuedNow: (task: string, queued: string) => typedError(__TAURI_INVOKE("agent_send_queued_now", { task, queued })), /** Changes a session setting (model, mode, thinking effort…). */ agentSetConfig: (task: string, option: string, value: string) => typedError(__TAURI_INVOKE("agent_set_config", { task, option, value })), /** 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(__TAURI_INVOKE("agent_fork", { task, turns })), /** 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 })), /** * 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(__TAURI_INVOKE("agent_probe", { provider, refresh })), /** Stops the task's current turn, or with `subagent` only that subagent's work. */ agentCancel: (task: string, subagent: string | null) => typedError(__TAURI_INVOKE("agent_cancel", { task, subagent })), /** Stops one of the task's background tasks. */ agentStopBackground: (task: string, background: string) => typedError(__TAURI_INVOKE("agent_stop_background", { task, background })), /** Answers a permission request; `option: null` cancels it. */ agentRespond: (task: string, permission: number, option: string | null) => typedError(__TAURI_INVOKE("agent_respond", { task, permission, option })), agentArchive: (task: string) => typedError(__TAURI_INVOKE("agent_archive", { task })), agentUnarchive: (task: string) => typedError(__TAURI_INVOKE("agent_unarchive", { task })), agentRename: (task: string, title: string) => typedError(__TAURI_INVOKE("agent_rename", { task, title })), agentDelete: (task: string, removeWorktree: boolean) => typedError(__TAURI_INVOKE("agent_delete", { task, removeWorktree })), agentChanges: (task: string) => typedError(__TAURI_INVOKE("agent_changes", { task })), /** Content of `path` when the task started (left side of its diff). */ agentBaseText: (task: string, path: IpcPath) => typedError(__TAURI_INVOKE("agent_base_text", { task, path })), notebookOpen: (path: string) => typedError(__TAURI_INVOKE("notebook_open", { path })), notebookGet: (id: string) => typedError(__TAURI_INVOKE("notebook_get", { id })), notebookEdit: (id: string, version: number, edit: NotebookEdit) => typedError(__TAURI_INVOKE("notebook_edit", { id, version, edit })), notebookSave: (id: string) => typedError(__TAURI_INVOKE("notebook_save", { id })), notebookReload: (id: string) => typedError(__TAURI_INVOKE("notebook_reload", { id })), notebookUndo: (id: string) => typedError(__TAURI_INVOKE("notebook_undo", { id })), notebookRedo: (id: string) => typedError(__TAURI_INVOKE("notebook_redo", { id })), notebookClose: (id: string) => typedError(__TAURI_INVOKE("notebook_close", { id })), notebookExecute: (id: string, cells: string[], python: string | null, request: RequestId, onOutput: Channel) => typedError(__TAURI_INVOKE("notebook_execute", { id, cells, python, request, onOutput })), notebookInterrupt: (id: string) => typedError(__TAURI_INVOKE("notebook_interrupt", { id })), notebookRestart: (id: string) => typedError(__TAURI_INVOKE("notebook_restart", { id })), fsReadDir: (path: string) => typedError(__TAURI_INVOKE("fs_read_dir", { path })), fsEntryKind: (path: string) => typedError(__TAURI_INVOKE("fs_entry_kind", { path })), /** Size and text/binary classification, from the file's head only. */ fsProbe: (path: string) => typedError(__TAURI_INVOKE("fs_probe", { path })), /** Up to `len` bytes from `offset` (capped per call), base64-encoded. */ fsReadRange: (path: string, offset: number, len: number) => typedError(__TAURI_INVOKE("fs_read_range", { path, offset, len })), /** An image file as a `data:` URL. */ fsReadImage: (path: string) => typedError(__TAURI_INVOKE("fs_read_image", { 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(__TAURI_INVOKE("fs_create_file", { path })), fsCreateFileBytes: (path: string, data: number[]) => typedError(__TAURI_INVOKE("fs_create_file_bytes", { path, data })), fsCreateDir: (path: string) => typedError(__TAURI_INVOKE("fs_create_dir", { path })), fsRename: (from: string, to: string) => typedError(__TAURI_INVOKE("fs_rename", { from, to })), /** * 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(__TAURI_INVOKE("fs_set_writable", { path, writable })), /** Moving to the trash can take a while (large trees): kept off the main thread. */ fsDelete: (path: string) => typedError(__TAURI_INVOKE("fs_delete", { path })), fsCopy: (from: string, to: string) => typedError(__TAURI_INVOKE("fs_copy", { from, to })), fsCopyMerge: (sourceRoot: string, destinationRoot: string, path: string, overwrite: boolean) => typedError(__TAURI_INVOKE("fs_copy_merge", { sourceRoot, destinationRoot, path, overwrite })), fsCompareDirectories: (left: string, right: string, request: RequestId, onProgress: Channel) => typedError(__TAURI_INVOKE("fs_compare_directories", { left, right, request, onProgress })), /** * 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(__TAURI_INVOKE("fs_read_text", { path })), /** Absolute paths on the clipboard, empty when it holds no file list. */ clipboardFileList: () => typedError(__TAURI_INVOKE("clipboard_file_list")), /** Whether the clipboard holds files: cheap, for the Paste item's enabled state. */ clipboardHasFiles: () => __TAURI_INVOKE("clipboard_has_files"), /** * 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(__TAURI_INVOKE("clipboard_set_file_list", { paths })), /** * 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(__TAURI_INVOKE("system_font_families", { refresh })), /** * 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(__TAURI_INVOKE("doc_open", { path })), /** * 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(__TAURI_INVOKE("doc_open_virtual", { uri })), docClose: (doc: DocId) => typedError(__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(__TAURI_INVOKE("doc_edit", { doc, baseVersion, changes })), docSave: (doc: DocId) => typedError(__TAURI_INVOKE("doc_save", { doc })), docSaveAll: () => typedError(__TAURI_INVOKE("doc_save_all")), docSyncFromDisk: () => typedError(__TAURI_INVOKE("doc_sync_from_disk")), docSnapshot: (doc: DocId) => typedError(__TAURI_INVOKE("doc_snapshot", { doc })), /** * The CodeMirror mode `path` gets when opened (`DocumentInfo::ui_mode`), * without opening it: previews of closed files. */ docUiMode: (path: string) => typedError(__TAURI_INVOKE("doc_ui_mode", { path })), /** "Reload with Encoding" (`reload`) or "Convert to Encoding"; returns the new encoding label. */ docSetEncoding: (doc: DocId, encoding: string, reload: boolean) => typedError(__TAURI_INVOKE("doc_set_encoding", { doc, encoding, reload })), docSetLineEnding: (doc: DocId, lineEnding: LineEnding) => typedError(__TAURI_INVOKE("doc_set_line_ending", { doc, lineEnding })), /** * Structure view: LSP document symbols when available (with tree-sitter * visibility), 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(__TAURI_INVOKE("doc_outline", { doc })), docFolding: (doc: DocId) => typedError(__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(__TAURI_INVOKE("doc_highlights", { doc })), /** * Extend Selection (⌥↑): syntax ranges around `offset`, innermost first. * Large documents fall back to word / line / document ranges. */ docSelectionRanges: (doc: DocId, offset: number) => typedError(__TAURI_INVOKE("doc_selection_ranges", { doc, offset })), jvmFilePresentations: (paths: string[]) => typedError(__TAURI_INVOKE("jvm_file_presentations", { paths })), /** * What the structure service supports for a language (`tree`: every query, * `locals`: scope analysis). */ syntaxSupport: (language: LanguageId) => typedError(__TAURI_INVOKE("syntax_support", { language })), /** 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 })), /** * 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(__TAURI_INVOKE("syntax_expression_at", { doc, range, request })), /** `ERROR` / `MISSING` nodes (e.g. a missing `;`) in document order. */ syntaxErrors: (doc: DocId, request: number | null) => typedError(__TAURI_INVOKE("syntax_errors", { doc, 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(__TAURI_INVOKE("syntax_locals", { doc, pos, request })), /** Identifier tokens spelled `name` in a document, excluding comments and strings. */ syntaxIdentifiers: (doc: DocId, name: string, request: number | null) => typedError(__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(__TAURI_INVOKE("syntax_identifiers_in_files", { paths, name, 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(__TAURI_INVOKE("syntax_structural_ranges", { doc, pos, request })), historyList: (path: string) => typedError(__TAURI_INVOKE("history_list", { path })), historyContent: (id: string) => typedError(__TAURI_INVOKE("history_content", { id })), /** Show History on a folder: snapshots of the files under it (deleted ones included) and labels. */ historyListDir: (path: string) => typedError(__TAURI_INVOKE("history_list_dir", { path })), /** Local History › Put Label…: a named point in the history of every file. */ historyPutLabel: (label: string) => typedError(__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(__TAURI_INVOKE("history_restore", { path, id })), /** `workspace/willRenameFiles` on every interested server (before the move). Cancellable. */ refactorFileMoveEdits: (request: RequestId, moves: FileMove[]) => typedError(__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(__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(__TAURI_INVOKE("refactor_move_files", { moves, edit, label })), /** Undoes a file move: moves back and reverts the reference updates. */ refactorUndoFileMove: (id: number) => typedError(__TAURI_INVOKE("refactor_undo_file_move", { id })), /** Whether the file move `id` can still be undone. */ refactorCanUndoFileMove: (id: number) => typedError(__TAURI_INVOKE("refactor_can_undo_file_move", { id })), /** 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(__TAURI_INVOKE("caches_schedule_invalidation", { options })), /** Quits through every window's unsaved-changes check, then starts again. */ appRestart: () => __TAURI_INVOKE("app_restart"), indexStatus: () => typedError(__TAURI_INVOKE("index_status")), indexFileExtensions: () => typedError(__TAURI_INVOKE("index_file_extensions")), /** Spring Web mapping sources for the request-path index of Search Everywhere. */ springRouteSources: () => typedError(__TAURI_INVOKE("spring_route_sources")), findFiles: (query: string, limit: number) => typedError(__TAURI_INVOKE("find_files", { query, limit })), /** Folders holding indexed files, for `@` references. */ findDirs: (query: string, limit: number) => typedError(__TAURI_INVOKE("find_dirs", { query, limit })), findSymbols: (query: string, filter: SymbolFilter, limit: number) => typedError(__TAURI_INVOKE("find_symbols", { query, filter, limit })), markRecent: (path: string) => typedError(__TAURI_INVOKE("mark_recent", { path })), /** Recently opened files, most recent first (⌘E). */ recentFiles: () => typedError(__TAURI_INVOKE("recent_files")), removeRecent: (path: string) => typedError(__TAURI_INVOKE("remove_recent", { path })), /** 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 })), /** The existing file or directory a path written in `from` names (`href`, `url()`, a string literal). */ fsResolveReference: (from: IpcPath, value: string) => typedError(__TAURI_INVOKE("fs_resolve_reference", { from, value })), /** Files and folders that continue `prefix`, a path being typed in `from`. */ pathCompletions: (from: IpcPath, prefix: string) => typedError(__TAURI_INVOKE("path_completions", { from, prefix })), /** Paths in an HTML document or stylesheet that name no existing file. */ webUnresolvedReferences: (doc: DocId) => typedError(__TAURI_INVOKE("web_unresolved_references", { doc })), dependencyVersions: (doc: DocId, offset: number | null, request: RequestId) => typedError(__TAURI_INVOKE("dependency_versions", { doc, offset, request })), /** * 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(__TAURI_INVOKE("spell_check", { doc, scope, request })), /** Replacements for a misspelt `word`, best first (Typo › Change to…). */ spellSuggest: (word: string) => typedError(__TAURI_INVOKE("spell_suggest", { word })), /** * Find in Files. Results stream through `on_event`; ends with `Done`. * Cancel with `cancel_request(request)`. */ searchStart: (request: RequestId, query: SearchQuery, onEvent: Channel) => typedError(__TAURI_INVOKE("search_start", { request, query, onEvent })), /** * 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; files that were not * open are opened transiently, saved and closed. */ replaceInFiles: (request: RequestId, query: SearchQuery, replacement: string, preserveCase: boolean, targets: ReplaceTarget[], onEvent: Channel) => typedError(__TAURI_INVOKE("replace_in_files", { request, query, replacement, preserveCase, targets, 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(__TAURI_INVOKE("replace_preview", { query, replacement, preserveCase, path, only })), /** Validates a query (e.g. regex syntax) while the user types. */ searchValidate: (query: SearchQuery) => typedError(__TAURI_INVOKE("search_validate", { query })), lspCompletion: (request: RequestId, doc: DocId, pos: Pos, trigger: string | null) => typedError(__TAURI_INVOKE("lsp_completion", { request, doc, pos, trigger })), /** Inline (ghost text) suggestions at `pos`; `automatic` when triggered by typing. */ lspInlineCompletion: (request: RequestId, doc: DocId, pos: Pos, automatic: boolean) => typedError(__TAURI_INVOKE("lsp_inline_completion", { request, doc, pos, automatic })), lspResolveCompletion: (doc: DocId, item: CompletionItem) => typedError(__TAURI_INVOKE("lsp_resolve_completion", { doc, item })), lspHover: (request: RequestId, doc: DocId, pos: Pos) => typedError<{ contents: Markup, range: Range | null, } | null, IdeError>(__TAURI_INVOKE("lsp_hover", { request, doc, pos })), lspSignatureHelp: (doc: DocId, pos: Pos) => typedError<{ signatures: Signature[], activeSignature: number, activeParameter: number, } | null, IdeError>(__TAURI_INVOKE("lsp_signature_help", { doc, pos })), lspGoto: (doc: DocId, pos: Pos, kind: GotoKind) => typedError(__TAURI_INVOKE("lsp_goto", { doc, pos, kind })), /** * 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(__TAURI_INVOKE("lsp_implementations", { request, doc, positions })), /** * 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) => typedError(__TAURI_INVOKE("lsp_goto_implementation", { request, doc, pos, onPartial })), /** * Contents of a read-only language-server document, including JDT library * classes and disk class files. Cached per project. */ lspVirtualDocument: (uri: string) => typedError(__TAURI_INVOKE("lsp_virtual_document", { uri })), lspResolveClassFile: (path: string) => typedError(__TAURI_INVOKE("lsp_resolve_class_file", { path })), /** * 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) => typedError(__TAURI_INVOKE("lsp_references", { request, doc, pos, includeDeclaration, projectWide, libraries, onPartial })), lspDocumentHighlights: (doc: DocId, pos: Pos) => typedError(__TAURI_INVOKE("lsp_document_highlights", { doc, pos })), lspWorkspaceSymbols: (request: RequestId, query: string) => typedError(__TAURI_INVOKE("lsp_workspace_symbols", { request, query })), lspCodeActions: (doc: DocId, range: Range, only: string[]) => typedError(__TAURI_INVOKE("lsp_code_actions", { doc, range, only })), /** Cancellable code actions with the kinds the servers advertise (Refactor This, refactoring availability). */ lspCodeActionQuery: (request: RequestId, doc: DocId, range: Range, only: string[]) => typedError(__TAURI_INVOKE("lsp_code_action_query", { request, doc, range, only })), /** Resolves a code action's edit without applying it (intention preview). */ lspResolveCodeAction: (doc: DocId, action: CodeAction) => typedError(__TAURI_INVOKE("lsp_resolve_code_action", { doc, action })), /** Resolves (if needed), applies the edit, then runs the command of a code action. */ lspApplyCodeAction: (doc: DocId, action: CodeAction) => typedError(__TAURI_INVOKE("lsp_apply_code_action", { doc, action })), lspPrepareRename: (doc: DocId, pos: Pos) => typedError<{ start: Pos, end: Pos, } | null, IdeError>(__TAURI_INVOKE("lsp_prepare_rename", { doc, pos })), /** Computes the rename edit without applying it, so the UI can preview conflicts. */ lspRename: (request: RequestId, doc: DocId, pos: Pos, newName: string) => typedError(__TAURI_INVOKE("lsp_rename", { request, doc, pos, newName })), /** 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(__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(__TAURI_INVOKE("lsp_hierarchy_refactor", { request, doc, pos, kind, target, choices })), lspFormat: (doc: DocId, range: { start: Pos, end: Pos, } | null, options: FormatOptions) => typedError(__TAURI_INVOKE("lsp_format", { doc, range, options })), lspInlayHints: (doc: DocId, range: Range) => typedError(__TAURI_INVOKE("lsp_inlay_hints", { doc, range })), 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 })), lspCodeLens: (doc: DocId) => typedError(__TAURI_INVOKE("lsp_code_lens", { doc })), /** Links in a document (`href`s, Markdown links, `#include`s…) from its language servers. */ lspDocumentLinks: (doc: DocId) => typedError(__TAURI_INVOKE("lsp_document_links", { doc })), lspCallHierarchy: (request: RequestId, doc: DocId, pos: Pos, direction: HierarchyDirection) => typedError(__TAURI_INVOKE("lsp_call_hierarchy", { request, doc, pos, direction })), lspTypeHierarchy: (doc: DocId, pos: Pos, direction: HierarchyDirection) => typedError(__TAURI_INVOKE("lsp_type_hierarchy", { doc, pos, direction })), lspServers: () => typedError(__TAURI_INVOKE("lsp_servers")), /** Re-emits the language servers' current diagnostics (the UI loaded after they arrived). */ lspResendDiagnostics: () => typedError(__TAURI_INVOKE("lsp_resend_diagnostics")), lspRestart: (server: ServerId) => typedError(__TAURI_INVOKE("lsp_restart", { server })), /** Applies a (previewed) workspace edit, e.g. after rename confirmation. */ applyWorkspaceEdit: (edit: WorkspaceEdit) => typedError(__TAURI_INVOKE("apply_workspace_edit", { edit })), prepareWorkspaceEdit: (edit: WorkspaceEdit) => typedError(__TAURI_INVOKE("prepare_workspace_edit", { edit })), undoWorkspaceEdit: (id: number) => typedError(__TAURI_INVOKE("undo_workspace_edit", { id })), redoWorkspaceEdit: (id: number) => typedError(__TAURI_INVOKE("redo_workspace_edit", { id })), /** * 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(__TAURI_INVOKE("lsp_execute_command", { doc, command })), 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 })), lspExecuteCodeAction: (request: RequestId, doc: DocId, action: CodeAction, answers: FormAnswer[]) => typedError(__TAURI_INVOKE("lsp_execute_code_action", { request, doc, action, answers })), /** Changes of every repository of the project. */ vcsStatus: () => typedError(__TAURI_INVOKE("vcs_status")), /** The project's repositories, the primary one first. */ vcsRoots: () => typedError(__TAURI_INVOKE("vcs_roots")), vcsBranchInfo: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_branch_info", { repo })), /** Gutter change markers for a file, computed against its current (unsaved) text. */ vcsLineHunks: (path: string) => typedError(__TAURI_INVOKE("vcs_line_hunks", { path })), vcsFileAt: (path: string, rev: string | null) => typedError(__TAURI_INVOKE("vcs_file_at", { path, rev })), vcsBlame: (path: string, text: string | null, revision: string | null) => typedError(__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(__TAURI_INVOKE("vcs_block_history", { request, path, text, lines })), vcsLog: (repo: string | null, query: LogQuery) => typedError(__TAURI_INVOKE("vcs_log", { repo, query })), vcsLogRefs: (repo: string | null) => typedError<{ [key in string]: string }, IdeError>(__TAURI_INVOKE("vcs_log_refs", { repo })), vcsLogUsers: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_log_users", { repo })), vcsOpenExternalLog: (path: string) => typedError(__TAURI_INVOKE("vcs_open_external_log", { path })), vcsLogDetails: (repo: string | null, revision: string) => typedError(__TAURI_INVOKE("vcs_log_details", { repo, revision })), vcsLogDetailsBatch: (repo: string | null, revisions: string[], request: RequestId) => typedError(__TAURI_INVOKE("vcs_log_details_batch", { repo, revisions, request })), vcsRevisionChildren: (repo: string | null, revision: string, directory: string) => typedError(__TAURI_INVOKE("vcs_revision_children", { repo, revision, directory })), vcsRevisionFiles: (repo: string | null, revision: string) => typedError(__TAURI_INVOKE("vcs_revision_files", { repo, revision })), vcsCommitFiles: (repo: string | null, commit: string) => typedError(__TAURI_INVOKE("vcs_commit_files", { repo, commit })), /** Combined changes of several commits, `commits` oldest first. */ vcsCommitsChanges: (repo: string | null, commits: string[]) => typedError(__TAURI_INVOKE("vcs_commits_changes", { repo, commits })), vcsBranches: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_branches", { repo })), vcsStashes: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_stashes", { repo })), vcsStage: (paths: string[]) => typedError(__TAURI_INVOKE("vcs_stage", { paths })), vcsAddToIgnore: (paths: string[], destination: IgnoreDestination) => typedError(__TAURI_INVOKE("vcs_add_to_ignore", { paths, destination })), vcsUnstage: (paths: string[]) => typedError(__TAURI_INVOKE("vcs_unstage", { paths })), vcsStagePatch: (patch: string) => typedError(__TAURI_INVOKE("vcs_stage_patch", { patch })), vcsDiscard: (paths: string[]) => typedError(__TAURI_INVOKE("vcs_discard", { paths })), vcsCommit: (repo: string | null, message: string, options: CommitOptions) => typedError(__TAURI_INVOKE("vcs_commit", { repo, message, options })), 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, } | null) => typedError(__TAURI_INVOKE("vcs_checkout", { repo, branch, create, options })), vcsDeleteBranch: (repo: string | null, branch: string) => typedError(__TAURI_INVOKE("vcs_delete_branch", { repo, branch })), /** "Restore" of the branch-deleted notification. */ vcsRestoreBranch: (repo: string | null, deleted: DeletedBranch) => typedError(__TAURI_INVOKE("vcs_restore_branch", { repo, deleted })), /** Tag › Delete: the result is what "Restore" needs. */ vcsDeleteTag: (repo: string | null, name: string) => typedError(__TAURI_INVOKE("vcs_delete_tag", { repo, name })), /** "Restore" of the tag-deleted notification. */ vcsRestoreTag: (repo: string | null, deleted: DeletedTag) => typedError(__TAURI_INVOKE("vcs_restore_tag", { repo, deleted })), /** 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(__TAURI_INVOKE("vcs_create_branch", { repo, name, start, checkout, overwrite })), /** * 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(__TAURI_INVOKE("vcs_undo_commit", { repo, commit })), /** * Edit Commit Message: rewrites the commit and its descendants without touching the * working tree. */ vcsReword: (repo: string | null, commit: string, message: string) => typedError(__TAURI_INVOKE("vcs_reword", { repo, commit, message })), /** Undo of a history rewrite (Edit Commit Message, Drop, Squash). */ vcsRestoreHead: (repo: string | null, before: string, after: string) => typedError(__TAURI_INVOKE("vcs_restore_head", { repo, before, after })), vcsRenameBranch: (repo: string | null, from: string, to: string) => typedError(__TAURI_INVOKE("vcs_rename_branch", { repo, from, to })), vcsMerge: (repo: string | null, branch: string) => typedError(__TAURI_INVOKE("vcs_merge", { repo, branch })), vcsRebase: (repo: string | null, onto: string) => typedError(__TAURI_INVOKE("vcs_rebase", { repo, onto })), vcsStashPush: (repo: string | null, message: string | null, includeUntracked: boolean, keepIndex: boolean) => typedError(__TAURI_INVOKE("vcs_stash_push", { repo, message, includeUntracked, keepIndex })), vcsStashApply: (repo: string | null, index: number, pop: boolean, reinstateIndex: boolean, branch: string | null) => typedError(__TAURI_INVOKE("vcs_stash_apply", { repo, index, pop, reinstateIndex, branch })), vcsStashDrop: (repo: string | null, index: number) => typedError(__TAURI_INVOKE("vcs_stash_drop", { repo, index })), /** Network operation; progress lines stream through `on_output`. Cancellable. */ vcsRemote: (repo: string | null, request: RequestId, op: RemoteOp, onOutput: Channel) => typedError(__TAURI_INVOKE("vcs_remote", { repo, request, op, onOutput })), /** The user's side is `ours` (sides swapped during a rebase, as in IDEA). */ vcsConflictVersions: (path: string) => typedError(__TAURI_INVOKE("vcs_conflict_versions", { path })), vcsDiffText: (path: string, staged: boolean) => typedError(__TAURI_INVOKE("vcs_diff_text", { path, staged })), /** Line hunks between two arbitrary texts (diff viewer, commit dialog). */ vcsDiffHunks: (oldText: string, newText: string) => __TAURI_INVOKE("vcs_diff_hunks", { oldText, newText }), /** * 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(__TAURI_INVOKE("vcs_stage_hunks", { path, hunks })), /** Clones a repository (Get from VCS). Works without an open project. */ vcsClone: (request: RequestId, url: string, dest: string, depth: number | null, onOutput: Channel) => typedError(__TAURI_INVOKE("vcs_clone", { request, url, dest, depth, onOutput })), /** `git init` in `dir` (File › New Project… "Create Git repository"). */ vcsInit: (dir: string) => typedError(__TAURI_INVOKE("vcs_init", { dir })), /** * Settings › Git › Test: runs `git --version` on `path`, or on the auto-detected * executable when `path` is empty. */ vcsGitVersion: (path: string) => typedError(__TAURI_INVOKE("vcs_git_version", { path })), /** The auto-detected git executable (shown as the field's placeholder). */ vcsDetectedGit: () => __TAURI_INVOKE("vcs_detected_git"), /** `git config --get ` in the project repository; `None` when unset. */ vcsConfigGet: (repo: string | null, key: string) => typedError(__TAURI_INVOKE("vcs_config_get", { repo, key })), /** * 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) => typedError(__TAURI_INVOKE("vcs_operation", { repo, request, op, onOutput })), vcsCreateTag: (repo: string | null, name: string, commit: string, message: string | null, force: boolean) => typedError(__TAURI_INVOKE("vcs_create_tag", { repo, name, commit, message, force })), vcsTags: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_tags", { repo })), /** Merge dialog: merges `branches` into the current branch. */ vcsMergeWith: (repo: string | null, branches: string[], options: MergeOptions) => typedError(__TAURI_INVOKE("vcs_merge_with", { repo, branches, options })), /** Rebase dialog: rebases the current branch onto `upstream` (or `--onto`). */ vcsRebaseWith: (repo: string | null, upstream: string, options: RebaseOptions) => typedError(__TAURI_INVOKE("vcs_rebase_with", { repo, upstream, options })), vcsRemotes: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_remotes", { repo })), vcsEditRemote: (repo: string | null, edit: RemoteEdit) => typedError(__TAURI_INVOKE("vcs_edit_remote", { repo, edit })), vcsWorktrees: (repo: string | null) => typedError(__TAURI_INVOKE("vcs_worktrees", { repo })), vcsAddWorktree: (repo: string | null, path: string, commitish: string, newBranch: string | null) => typedError(__TAURI_INVOKE("vcs_add_worktree", { repo, path, commitish, newBranch })), vcsRemoveWorktree: (repo: string | null, path: string, force: boolean) => typedError(__TAURI_INVOKE("vcs_remove_worktree", { repo, path, force })), /** Compare with Local: tracked files that differ between `rev` and the working tree. */ vcsDiffWithWorktree: (repo: string | null, rev: string) => typedError(__TAURI_INVOKE("vcs_diff_with_worktree", { repo, rev })), vcsCompareScope: (paths: string[]) => typedError(__TAURI_INVOKE("vcs_compare_scope", { paths })), vcsComparePaths: (paths: string[], revision: string, repositories: string[] | null, request: RequestId) => typedError(__TAURI_INVOKE("vcs_compare_paths", { paths, revision, repositories, request })), /** Files that differ between two revisions (the "N files updated" of Update Project). */ vcsDiffRevisions: (repo: string | null, from: string, to: string) => typedError(__TAURI_INVOKE("vcs_diff_revisions", { repo, from, to })), /** * 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(__TAURI_INVOKE("vcs_diff_numstat", { repo, from, to, paths })), /** Whether the repository has the executable Git hook `name` (Push dialog › Run Git hooks). */ vcsHasHook: (repo: string | null, name: string) => typedError(__TAURI_INVOKE("vcs_has_hook", { repo, name })), /** The best common ancestor of `a` and `b` (`git merge-base`), if any. */ vcsMergeBase: (repo: string | null, a: string, b: string) => typedError(__TAURI_INVOKE("vcs_merge_base", { repo, a, b })), vcsCreatePatch: (repo: string | null, source: PatchSource) => typedError(__TAURI_INVOKE("vcs_create_patch", { repo, source })), vcsPatchPreview: (repo: string | null, patch: string) => typedError(__TAURI_INVOKE("vcs_patch_preview", { repo, patch })), vcsApplyPatch: (repo: string | null, patch: string) => typedError(__TAURI_INVOKE("vcs_apply_patch", { repo, patch })), /** Shelve Changes: saves the changes of `paths` as a patch on the shelf and reverts them. */ vcsShelve: (name: string, paths: string[]) => typedError(__TAURI_INVOKE("vcs_shelve", { name, paths })), vcsShelves: () => typedError(__TAURI_INVOKE("vcs_shelves")), /** * 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(__TAURI_INVOKE("vcs_unshelve", { id, remove, path })), vcsShelfDelete: (id: string, path: string | null) => typedError(__TAURI_INVOKE("vcs_shelf_delete", { id, path })), vcsShelfRename: (id: string, name: string) => typedError(__TAURI_INVOKE("vcs_shelf_rename", { id, name })), vcsShelfPatch: (id: string, path: string | null) => typedError(__TAURI_INVOKE("vcs_shelf_patch", { id, path })), vcsShelfDiff: (id: string) => typedError(__TAURI_INVOKE("vcs_shelf_diff", { id })), vcsShelfImport: (repo: string | null, name: string, patch: string) => typedError(__TAURI_INVOKE("vcs_shelf_import", { repo, name, patch })), vcsChangelistsLoad: () => typedError(__TAURI_INVOKE("vcs_changelists_load")), vcsChangelistsSave: (changelists: ChangelistState) => typedError(__TAURI_INVOKE("vcs_changelists_save", { changelists })), /** Create Patch › Save to file. */ vcsWritePatch: (path: string, patch: string) => typedError(__TAURI_INVOKE("vcs_write_patch", { path, patch })), /** * 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) => typedError(__TAURI_INVOKE("term_spawn", { options, onOutput })), termStoreImage: (id: TerminalId, data: number[], mime: string) => typedError(__TAURI_INVOKE("term_store_image", { id, data, mime })), termWrite: (id: TerminalId, data: string) => typedError(__TAURI_INVOKE("term_write", { id, data })), termResize: (id: TerminalId, cols: number, rows: number) => typedError(__TAURI_INVOKE("term_resize", { id, cols, rows })), termKill: (id: TerminalId) => typedError(__TAURI_INVOKE("term_kill", { id })), /** * 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(__TAURI_INVOKE("term_is_busy", { id })), /** Shell used when Settings › Terminal › Shell path is empty. */ termDefaultShell: () => __TAURI_INVOKE("term_default_shell"), /** Installed shells for the Terminal's "New Predefined Session" menu. */ termAvailableShells: () => __TAURI_INVOKE("term_available_shells"), /** Detected configs followed by user-defined ones (user ids win on conflict). */ runConfigs: () => typedError(__TAURI_INVOKE("run_configs")), runDotnetResolve: (config: RunConfig_Deserialize, debug: boolean) => typedError(__TAURI_INVOKE("run_dotnet_resolve", { config, debug })), runSaveConfigs: (configs: RunConfig_Deserialize[], removedDetectedIds: string[] | null) => typedError(__TAURI_INVOKE("run_save_configs", { configs, removedDetectedIds })), /** Temporary configurations as they are kept between sessions: without what settings derived. */ runWithoutDerived: (configs: RunConfig_Deserialize[]) => typedError(__TAURI_INVOKE("run_without_derived", { configs })), /** Kept temporary configurations with the current settings applied. */ runApplySettings: (configs: RunConfig_Deserialize[]) => typedError(__TAURI_INVOKE("run_apply_settings", { configs })), /** Configuration templates: per-type defaults applied to new configurations. */ runTemplates: () => typedError(__TAURI_INVOKE("run_templates")), runSaveTemplates: (templates: RunConfig_Deserialize[]) => typedError(__TAURI_INVOKE("run_save_templates", { templates })), /** Project files run configurations can be imported from (`.vscode/launch.json`). */ runImportSources: () => typedError(__TAURI_INVOKE("run_import_sources")), /** Configurations read from `source`, not saved; names already in `existing` are skipped. */ runImportConfigs: (source: RunImportSource, existing: RunConfig_Deserialize[]) => typedError(__TAURI_INVOKE("run_import_configs", { source, existing })), /** The environment runs inherit when "Include system environment variables" is on. */ runSystemEnv: () => __TAURI_INVOKE<{ [key in string]: string }>("run_system_env"), runStart: (config: RunConfig_Deserialize, onOutput: Channel) => typedError(__TAURI_INVOKE("run_start", { config, onOutput })), runStop: (id: RunId) => typedError(__TAURI_INVOKE("run_stop", { id })), runStdin: (id: RunId, data: string) => typedError(__TAURI_INVOKE("run_stdin", { id, data })), runList: () => __TAURI_INVOKE("run_list"), runCloseStdin: (id: RunId) => typedError(__TAURI_INVOKE("run_close_stdin", { id })), /** Terminal size of a run started with "Emulate terminal in output console". */ runResize: (id: RunId, cols: number, rows: number) => typedError(__TAURI_INVOKE("run_resize", { id, cols, rows })), /** Writes the Gradle init script adding `jvm_args` to the JVMs the build forks; returns its path. */ runGradleJvmArgsScript: (jvmArgs: string[]) => typedError(__TAURI_INVOKE("run_gradle_jvm_args_script", { jvmArgs })), /** Writes one of the IDE's Gradle init scripts where the build runs; returns its path. */ runGradleInitScript: (name: string, text: string) => typedError(__TAURI_INVOKE("run_gradle_init_script", { name, text })), runTomcatHome: (home: string) => typedError(__TAURI_INVOKE("run_tomcat_home", { home })), runTomcatInstallations: () => typedError(__TAURI_INVOKE("run_tomcat_installations")), runTomcatArtifacts: () => typedError(__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 })), runApplicationBuild: (config: RunConfig_Deserialize, module: string) => typedError(__TAURI_INVOKE("run_application_build", { config, module })), runApplicationPublish: (config: RunConfig_Deserialize, classPaths: string[], mainClass: string) => typedError(__TAURI_INVOKE("run_application_publish", { config, classPaths, mainClass })), runTomcatSync: (config: RunConfig_Deserialize, module: string, classPaths: string[], resourcesOnly: boolean) => typedError(__TAURI_INVOKE("run_tomcat_sync", { config, module, classPaths, resourcesOnly })), runTomcatUpdate: (config: RunConfig_Deserialize, mode: string) => typedError(__TAURI_INVOKE("run_tomcat_update", { config, mode })), /** * 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(__TAURI_INVOKE("run_test_reports", { module, sinceMs })), /** Maven and Gradle projects of the window's project, from the build files plus the last sync. */ buildModel: () => typedError(__TAURI_INVOKE("build_model")), gradleLinkProjects: (paths: string[]) => typedError(__TAURI_INVOKE("gradle_link_projects", { paths })), gradleUnlinkProjects: (paths: string[]) => typedError(__TAURI_INVOKE("gradle_unlink_projects", { paths })), /** * 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) => typedError(__TAURI_INVOKE("build_sync", { tool, request, offline, profiles, buildDir, onProgress })), /** 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(__TAURI_INVOKE("gradle_dependencies", { gradlePath, configuration, offline, request, buildDir })), /** * The `.toml` of a version catalog the build imports as `group:artifact:version`, once a * build has downloaded it. */ gradlePublishedCatalog: (coordinates: string) => typedError(__TAURI_INVOKE("gradle_published_catalog", { coordinates })), /** Where the direct dependency `dependency` of the Maven module `pom` is declared. */ mavenDependencyDeclaration: (pom: string, dependency: ArtifactKey) => typedError(__TAURI_INVOKE("maven_dependency_declaration", { pom, dependency })), /** * Adds an `` 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(__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, or the `` / `` * entry providing the dependency's / plugin's version, along the parent chain. */ 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 })), /** * 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) => typedError(__TAURI_INVOKE("build_run", { kind, file, cmake, request, clear, onEvent })), /** * Cancellable with `cancel_request(request)`. * Builds the workspace (when `build`), 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, build: boolean, request: RequestId) => typedError(__TAURI_INVOKE("java_resolve_launch", { module, test, build, request })), /** Port of java-debug's DAP server inside the jdtls serving `module` (started on demand). */ javaDebugServer: (module: string) => typedError(__TAURI_INVOKE("java_debug_server", { module })), /** Incremental build of the jdtls workspace serving `module` (e.g. before HotSwap). */ javaBuildWorkspace: (module: string) => typedError(__TAURI_INVOKE("java_build_workspace", { module })), /** Starts a session owned by this window: its events (and those of child sessions) go here only. */ debugStart: (config: LaunchConfig) => typedError(__TAURI_INVOKE("debug_start", { config })), debugSetBreakpoints: (path: string, breakpoints: Breakpoint[]) => typedError(__TAURI_INVOKE("debug_set_breakpoints", { path, breakpoints })), debugThreads: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_threads", { session })), debugStackTrace: (session: DebugSessionId, threadId: number) => typedError(__TAURI_INVOKE("debug_stack_trace", { session, threadId })), debugScopes: (session: DebugSessionId, frameId: number) => typedError(__TAURI_INVOKE("debug_scopes", { session, frameId })), debugVariables: (session: DebugSessionId, reference: number) => typedError(__TAURI_INVOKE("debug_variables", { session, reference })), debugEvaluate: (session: DebugSessionId, frameId: number | null, expression: string) => typedError(__TAURI_INVOKE("debug_evaluate", { session, frameId, expression })), /** 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(__TAURI_INVOKE("debug_completions", { session, frameId, text, line, column })), debugResume: (session: DebugSessionId, threadId: number) => typedError(__TAURI_INVOKE("debug_resume", { session, threadId })), debugPause: (session: DebugSessionId, threadId: number) => typedError(__TAURI_INVOKE("debug_pause", { session, threadId })), /** Types `text` into the session's program (a `runInTerminal` program). */ debugSendInput: (session: DebugSessionId, text: string) => typedError(__TAURI_INVOKE("debug_send_input", { session, text })), debugHotReload: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_hot_reload", { session })), debugHotRestart: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_hot_restart", { session })), debugStep: (session: DebugSessionId, threadId: number, kind: StepKind) => typedError(__TAURI_INVOKE("debug_step", { session, threadId, kind })), debugRunTo: (session: DebugSessionId, threadId: number, path: string, line: number, force: boolean) => typedError(__TAURI_INVOKE("debug_run_to", { session, threadId, path, line, force })), debugStop: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_stop", { session })), /** Evaluate with an explicit DAP context: `repl`, `watch`, `hover` or `clipboard`. */ debugEvaluateIn: (session: DebugSessionId, frameId: number | null, expression: string, context: string | null) => typedError(__TAURI_INVOKE("debug_evaluate_in", { session, frameId, expression, context })), /** Last known verification states of a file's breakpoints (refetch on `breakpointsChanged`). */ debugBreakpointStates: (path: string) => typedError(__TAURI_INVOKE("debug_breakpoint_states", { path })), /** This window's live sessions, including adapter-started child sessions. */ debugSessions: () => typedError(__TAURI_INVOKE("debug_sessions")), /** Status of every known language server / debug adapter and the languages using it. */ toolsList: () => typedError(__TAURI_INVOKE("tools_list")), /** * Installs (or reinstalls) a tool into `/tools`, streaming output through * `on_event`. Cancel with `cancel_request(request)`. */ toolsInstall: (name: string, request: RequestId, onEvent: Channel) => typedError(__TAURI_INVOKE("tools_install", { name, request, onEvent })), /** Removes a tool the IDE installed. */ toolsUninstall: (name: string) => typedError(__TAURI_INVOKE("tools_uninstall", { name })), /** JDK distributions Download JDK offers. */ jdkDownloadVendors: () => __TAURI_INVOKE("jdk_download_vendors"), /** Java versions `vendor` publishes; cancellable with `cancel_request(request)`. */ jdkDownloadReleases: (vendor: string, request: RequestId) => typedError(__TAURI_INVOKE("jdk_download_releases", { vendor, request })), /** Where Download JDK puts JDKs unless told otherwise. */ jdkDownloadLocation: () => typedError(__TAURI_INVOKE("jdk_download_location")), /** * 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) => typedError(__TAURI_INVOKE("jdk_download", { vendor, version, location, request, onEvent })), /** Installed interpreters / toolchains of `kind`; project-local ones first. */ sdkDetect: (kind: SdkKind) => typedError(__TAURI_INVOKE("sdk_detect", { kind })), /** 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 })), /** The interpreter the project uses: the configured one, else its virtualenv. */ sdkPythonEffective: (near: string | null) => typedError(__TAURI_INVOKE("sdk_python_effective", { near })), /** The PHP interpreter chosen in Settings › Languages & Frameworks › PHP; `None`: the `php` on `PATH`. */ sdkPhpEffective: () => typedError(__TAURI_INVOKE("sdk_php_effective")), /** * 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(__TAURI_INVOKE("sdk_php_xdebug", { php, cwd })), /** The PHP language level of the project `path` belongs to: the effective one and Auto's. */ sdkPhpLanguageLevel: (path: string) => typedError(__TAURI_INVOKE("sdk_php_language_level", { path })), /** 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 })), /** * 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) => typedError(__TAURI_INVOKE("sdk_project_libraries", { request, onGroups })), /** Looks up `names` (bare command names): `node_modules/.bin` above `near`, then the search path. */ sdkLocateTools: (names: string[], near: string | null) => typedError(__TAURI_INVOKE("sdk_locate_tools", { names, near })), /** 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) => typedError(__TAURI_INVOKE("sdk_python_create_venv", { tool, base, location, request, onOutput })), sdkPythonPackages: (python: string, request: RequestId) => typedError(__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) => typedError(__TAURI_INVOKE("sdk_python_pip", { python, requirement, uninstall, upgrade, request, onOutput })), /** * 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(__TAURI_INVOKE("window_open_project", { path, newWindow, files })), /** * 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(__TAURI_INVOKE("window_open_files", { files })), /** * 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(__TAURI_INVOKE("window_open_file_in_new_window", { project, file })), /** * [`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(__TAURI_INVOKE("window_open_remote", { target, path, newWindow })), /** Opens an empty (welcome) window; returns its label. */ windowNew: () => typedError(__TAURI_INVOKE("window_new")), /** * 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(__TAURI_INVOKE("window_open_settings", { page, newProjects, background })), /** * 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(__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(__TAURI_INVOKE("window_open_deployment", { server, paths, background })), /** Focuses the next / previous window (⌘` / ⇧⌘`). */ windowCycle: (forward: boolean) => __TAURI_INVOKE("window_cycle", { forward }), windowToggleFullscreen: () => typedError(__TAURI_INVOKE("window_toggle_fullscreen")), /** * 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(__TAURI_INVOKE("window_flash_taskbar", { flash })), /** Height of the web title bar in native logical pixels (CSS height × IDE zoom). */ windowSetTitlebarHeight: (height: number | null) => typedError(__TAURI_INVOKE("window_set_titlebar_height", { height })), /** * Whether this window fills the screen: in native full screen, or (macOS) shown in its window * group's full-screen Space. */ windowIsFullscreen: () => __TAURI_INVOKE("window_is_fullscreen"), /** * 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(__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 `). */ positions?: FilePosition[], /** Comparison windows: the revisions to compare (boxed: most launches have none). */ comparison?: ComparisonLaunch | null, /** `openidea diff a.txt b.txt`: the two files to open in the diff viewer (boxed: most launches have none). */ diff?: DiffFilesLaunch | null, /** Deployment windows: the server and local selection to compare. */ deployment?: DeploymentLaunch | null, } | null>("window_take_launch"), windowCloseContext: () => __TAURI_INVOKE("window_close_context"), /** Projects open in project windows, in window order (title bar project widget). */ windowOpenProjects: () => typedError(__TAURI_INVOKE("window_open_projects")), /** Quits: closes every window, each of which runs its own unsaved-changes check. */ appQuit: () => __TAURI_INVOKE("app_quit"), /** A window vetoed the quit (user cancelled its unsaved-changes prompt). */ appCancelQuit: () => __TAURI_INVOKE("app_cancel_quit"), /** * Sets the menu's labels / shortcut text and updates the menu when the visible * items changed. Shortcuts for actions that are not on the menu must not call * `set_menu`, which redraws the macOS menu bar. */ menuConfigure: (config: MenuConfig) => __TAURI_INVOKE("menu_configure", { config }), /** * 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("menu_refresh"), /** The menu bar for a title bar drawn by the frontend (Windows). */ menuModel: () => __TAURI_INVOKE("menu_model"), /** * Action ids the focused window cannot run now: their native menu items are * disabled in place (no rebuild). */ menuSetDisabled: (ids: string[]) => __TAURI_INVOKE("menu_set_disabled", { ids }), appLogLocation: () => typedError(__TAURI_INVOKE("app_log_location")), appBuildInfo: () => __TAURI_INVOKE("app_build_info"), appCheckUpdate: (source: UpdateSource) => typedError(__TAURI_INVOKE("app_check_update", { source })), /** * The background check made once per process when the first window starts; * later calls (other windows) and debug builds get `None`. Failures are logged, * not reported: the user didn't ask for this check. */ appStartupUpdateCheck: (source: UpdateSource) => __TAURI_INVOKE<{ version: string, currentVersion: string, notes: string | null, date: string | null, } | null>("app_startup_update_check", { source }), /** * 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) => typedError(__TAURI_INVOKE("app_install_update", { source, request, onProgress })), debugExceptionFilters: () => typedError(__TAURI_INVOKE("debug_exception_filters")), debugSetExceptionBreakpoints: (choices: { [key in string]: boolean }) => typedError(__TAURI_INVOKE("debug_set_exception_breakpoints", { choices })), debugSetVariable: (session: DebugSessionId, container: number, name: string, evaluateName: string | null, frameId: number | null, value: string) => typedError(__TAURI_INVOKE("debug_set_variable", { session, container, name, evaluateName, frameId, value })), /** Force Step Over: step over with every breakpoint suspended until the step ends. */ debugForceStepOver: (session: DebugSessionId, threadId: number) => typedError(__TAURI_INVOKE("debug_force_step_over", { session, threadId })), /** Smart Step Into: the calls on the current line of `frame_id`. */ debugStepInTargets: (session: DebugSessionId, frameId: number) => typedError(__TAURI_INVOKE("debug_step_in_targets", { session, frameId })), debugStepInTarget: (session: DebugSessionId, threadId: number, targetId: number) => typedError(__TAURI_INVOKE("debug_step_in_target", { session, threadId, targetId })), /** Reset Frame (Drop Frame). */ debugRestartFrame: (session: DebugSessionId, frameId: number) => typedError(__TAURI_INVOKE("debug_restart_frame", { session, frameId })), debugCapabilities: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_capabilities", { session })), /** Method breakpoints (all files); states aligned with `breakpoints`. */ debugSetFunctionBreakpoints: (breakpoints: FunctionBreakpoint[]) => typedError(__TAURI_INVOKE("debug_set_function_breakpoints", { breakpoints })), /** Field watchpoints; states aligned with `breakpoints`. */ debugSetDataBreakpoints: (breakpoints: DataBreakpoint[]) => typedError(__TAURI_INVOKE("debug_set_data_breakpoints", { breakpoints })), debugDataBreakpointInfo: (session: DebugSessionId, container: number, name: string, frameId: number | null) => typedError(__TAURI_INVOKE("debug_data_breakpoint_info", { session, container, name, frameId })), /** Attach to Process: the user's processes a debugger can attach to. */ debugAttachableProcesses: () => typedError(__TAURI_INVOKE("debug_attachable_processes")), /** * 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(__TAURI_INVOKE("debug_listen_for_jvm", { request, host, port })), /** HotSwap (Reload Changed Classes) in a java-debug session. */ debugRedefineClasses: (session: DebugSessionId) => typedError(__TAURI_INVOKE("debug_redefine_classes", { session })), /** * 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(__TAURI_INVOKE("coverage_prepare", { config })), /** Reads the report a coverage run left behind. */ coverageCollect: (report: CoverageReportSpec) => typedError(__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(__TAURI_INVOKE("coverage_import", { path })), /** The browsers installed on this machine. */ webBrowsers: () => typedError(__TAURI_INVOKE("web_browsers")), /** The built-in server's URL for `path` (started on first use). */ webUrl: (path: IpcPath) => typedError(__TAURI_INVOKE("web_url", { path })), /** Opens `url` in `browser` (an id from `web_browsers`), or the default browser. */ webOpen: (url: string, browser: string | null) => typedError(__TAURI_INVOKE("web_open", { url, browser })), /** How to run `config` under a sampling profiler, or which profiler is missing. */ profilerPrepare: (config: RunConfig_Deserialize) => typedError(__TAURI_INVOKE("profiler_prepare", { config })), /** Reads the profile a profiled run left behind. */ profilerCollect: (spec: ProfileSpec) => typedError(__TAURI_INVOKE("profiler_collect", { spec })), /** Routes this window's plugin events to `on_event` (replaces an earlier subscription). */ pluginSubscribe: (onEvent: Channel) => __TAURI_INVOKE("plugin_subscribe", { onEvent }), /** * Installed and linked plugins plus the project plugins of this window's * project (`/.openidea/plugins/*`, rescanned on every call), with * the UI contributions to project. */ pluginList: () => typedError(__TAURI_INVOKE("plugin_list")), pluginSetEnabled: (id: string, enabled: boolean) => typedError(__TAURI_INVOKE("plugin_set_enabled", { id, enabled })), /** Validates the package in `path` for the install page (nothing is copied). */ pluginPreviewInstall: (path: string) => typedError(__TAURI_INVOKE("plugin_preview_install", { path })), /** * 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(__TAURI_INVOKE("plugin_install_dir", { path, consent })), /** Confirms a plugin waiting for consent (project plugins, new capabilities). */ pluginGrant: (id: string, consent: Consent) => typedError(__TAURI_INVOKE("plugin_grant", { id, consent })), /** Grants or revokes one declared capability. */ pluginSetCapability: (id: string, capability: string, granted: boolean) => typedError(__TAURI_INVOKE("plugin_set_capability", { id, capability, granted })), /** Links a development plugin folder (`openidea-plugin link` does the same from a terminal). */ pluginLink: (path: string) => typedError(__TAURI_INVOKE("plugin_link", { path })), pluginUnlink: (id: string) => typedError(__TAURI_INVOKE("plugin_unlink", { id })), /** 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 })), /** The UI language (BCP 47) that plugin code reads with `ui.locale()`. */ pluginSetUiLocale: (tag: string) => typedError(__TAURI_INVOKE("plugin_set_ui_locale", { tag })), /** An activation event from the UI: `kind` is `language`, `file` (project-relative path) or `view`. */ pluginActivationEvent: (kind: string, value: string) => typedError(__TAURI_INVOKE("plugin_activation_event", { kind, value })), /** * Plugin packages available locally for installation: `/plugins` * when bundled, plus the repository's official plugins in debug builds. */ pluginCatalog: () => typedError(__TAURI_INVOKE("plugin_catalog")), pluginUninstall: (id: string) => typedError(__TAURI_INVOKE("plugin_uninstall", { id })), /** Re-reads a plugin from disk (after rebuilding a dev plugin). */ pluginReload: (id: string) => typedError(__TAURI_INVOKE("plugin_reload", { 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) => typedError(__TAURI_INVOKE("plugin_run_command", { pluginId, commandId, arg, editor, paths, settingsScope })), /** Workbench events from this window (only the kinds of `plugin_event_kinds`). */ pluginPostEvents: (events: WorkbenchEvent[]) => __TAURI_INVOKE("plugin_post_events", { events }), /** Kinds of workbench events plugins want (re-fetch on `subscriptionsChanged`). */ pluginEventKinds: () => __TAURI_INVOKE("plugin_event_kinds"), /** Every plugin status bar item (later changes arrive as `statusItemChanged`). */ pluginStatusItems: () => __TAURI_INVOKE("plugin_status_items"), /** Plugin context keys in effect for this window (later changes arrive as `contextChanged`). */ pluginContextKeys: () => __TAURI_INVOKE("plugin_context_keys"), /** Cancels a plugin task (`taskStarted` with `cancellable`). */ pluginCancelTask: (taskId: string) => __TAURI_INVOKE("plugin_cancel_task", { taskId }), /** * 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("plugin_answer_prompt", { promptId, answer }), /** * A window's answer to a plugin's `commitRequested`; false when the call no * longer waits. */ pluginAnswerCommit: (requestId: string, answer: CommitAnswer) => __TAURI_INVOKE("plugin_answer_commit", { requestId, answer }), /** * Runs plugins' before-commit checks on what `selection` commits, until * `request` is cancelled. */ pluginCommitChecks: (selection: CommitSelection, checks: PluginCommitCheckRef[], request: RequestId) => typedError(__TAURI_INVOKE("plugin_commit_checks", { selection, checks, request })), /** * 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(__TAURI_INVOKE("plugin_view_render", { pluginId, view, viewport, doc, editor })), /** 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(__TAURI_INVOKE("plugin_view_event", { pluginId, view, event, doc, editor })), /** The Services pane of node `key` of a plugin's `location = "services"` view. */ pluginServiceDetail: (pluginId: string, view: string, key: string) => typedError(__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) => typedError(__TAURI_INVOKE("plugin_service_log", { request, pluginId, view, key, tab, on, onLine })), /** The page of a plugin's web view or custom editor (`web = …`). */ pluginWebPage: (pluginId: string, view: string) => typedError(__TAURI_INVOKE("plugin_web_page", { pluginId, view })), pluginWebPtySpawn: (pluginId: string, view: string, command: WebPtyCommand, onOutput: Channel) => typedError(__TAURI_INVOKE("plugin_web_pty_spawn", { pluginId, view, command, onOutput })), /** * 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(__TAURI_INVOKE("plugin_web_save_file", { path, base64 })), /** * Reads the file the user picked in an open dialog for a web view * (`openidea.openFile`), on this machine; base64. */ pluginWebReadFile: (path: string) => typedError(__TAURI_INVOKE("plugin_web_read_file", { path })), /** Gutter markers of plugin `line-markers` providers for an open document. */ pluginLineMarkers: (doc: DocId) => typedError(__TAURI_INVOKE("plugin_line_markers", { doc })), pluginNavigationFiles: () => typedError(__TAURI_INVOKE("plugin_navigation_files")), pluginNavigationInvalidate: (paths: string[] | null) => typedError(__TAURI_INVOKE("plugin_navigation_invalidate", { paths })), pluginNavigationIndex: (paths: string[], request: RequestId) => typedError(__TAURI_INVOKE("plugin_navigation_index", { paths, request })), pluginNavigationGoto: (doc: DocId, pos: Pos) => typedError<{ range: Range, targets: Location[], } | null, IdeError>(__TAURI_INVOKE("plugin_navigation_goto", { doc, pos })), pluginNavigationMarkers: (paths: string[]) => typedError(__TAURI_INVOKE("plugin_navigation_markers", { paths })), pluginEndpoints: (pluginId: string) => typedError(__TAURI_INVOKE("plugin_endpoints", { pluginId })), /** The marketplace's plugins: read again when `refresh` or when none was read yet, else the last index read. */ pluginMarket: (refresh: boolean) => typedError(__TAURI_INVOKE("plugin_market", { refresh })), pluginMarketUrl: () => __TAURI_INVOKE("plugin_market_url"), /** Sets the marketplace index URL (an `https://…/index.json` or a local path; `None` for the default). */ pluginSetMarketUrl: (url: string | null) => __TAURI_INVOKE("plugin_set_market_url", { url }), /** Downloads and checks a marketplace plugin; returns the folder for the install page. */ pluginMarketDownload: (id: string) => typedError(__TAURI_INVOKE("plugin_market_download", { id })), /** Unpacks a package file (`.oiplugin` or `.zip`); returns the folder for the install page. */ pluginUnpackPackage: (path: string) => typedError(__TAURI_INVOKE("plugin_unpack_package", { path })), /** Reads an IntelliJ theme plugin (`.jar`, Marketplace `.zip`, plugin folder) or `.theme.json` to import. */ pluginReadIntellijTheme: (path: string) => typedError(__TAURI_INVOKE("plugin_read_intellij_theme", { path })), /** Theme plugins installed in the JetBrains IDEs of this user, the ones in use first. */ pluginInstalledIntellijThemes: () => typedError(__TAURI_INVOKE("plugin_installed_intellij_themes")), /** Writes a package the UI generated (an imported theme); returns the folder for the install page. */ pluginStagePackage: (name: string, files: PackageFile[]) => typedError(__TAURI_INVOKE("plugin_stage_package", { name, files })), /** Goes back to the version the last update of `id` replaced. */ pluginRollBack: (id: string) => typedError(__TAURI_INVOKE("plugin_roll_back", { id })), pluginSecrets: (pluginId: string) => typedError(__TAURI_INVOKE("plugin_secrets", { pluginId })), /** 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(__TAURI_INVOKE("plugin_set_secret", { pluginId, name, value })), /** The UI reports the focused editor's file (`editor-focused` events). */ pluginSetActiveFile: (path: string | null) => __TAURI_INVOKE("plugin_set_active_file", { path }), /** 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(__TAURI_INVOKE("plugin_set_theme_frame", { color })), /** * 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(__TAURI_INVOKE("app_metrics")), /** * "Clear caches": drops syntax trees and EditorConfig files of the window's * project, shrinks the in-memory index and compacts its on-disk cache. */ clearCaches: () => typedError(__TAURI_INVOKE("clear_caches")), /** * 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) => typedError(__TAURI_INVOKE("inspect_code", { request, scope, onEvent })), /** Locate Duplicates over the files of `scope`. */ analysisLocateDuplicates: (request: RequestId, scope: SearchScope, options: DuplicateOptions) => typedError(__TAURI_INVOKE("analysis_locate_duplicates", { request, scope, options })), /** Languages Search Structurally supports (those with a bundled grammar). */ structuralLanguages: () => typedError(__TAURI_INVOKE("structural_languages")), /** Checks a structural search template (and language) while the user types. */ structuralValidate: (query: StructuralQuery) => typedError(__TAURI_INVOKE("structural_validate", { query })), /** * 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) => typedError(__TAURI_INVOKE("structural_search", { request, scope, query, onEvent })), /** Availability plus containers, images, volumes and networks. */ dockerSnapshot: (endpoint: DockerEndpoint) => typedError(__TAURI_INVOKE("docker_snapshot", { endpoint })), dockerContainerOp: (endpoint: DockerEndpoint, ids: string[], op: ContainerOp) => typedError(__TAURI_INVOKE("docker_container_op", { endpoint, ids, op })), dockerRemove: (endpoint: DockerEndpoint, object: DockerObject, ids: string[], force: boolean) => typedError(__TAURI_INVOKE("docker_remove", { endpoint, object, ids, force })), /** Pretty-printed `docker inspect` JSON. */ dockerInspect: (endpoint: DockerEndpoint, object: DockerObject, id: string) => typedError(__TAURI_INVOKE("docker_inspect", { endpoint, object, id })), /** Streams a container's log lines until it stops or the request is cancelled. */ dockerLogs: (request: RequestId, endpoint: DockerEndpoint, id: string, tail: number, follow: boolean, timestamps: boolean, onLine: Channel) => typedError(__TAURI_INVOKE("docker_logs", { request, endpoint, id, tail, follow, timestamps, onLine })), /** Follows `docker events` until the daemon goes away or the request is cancelled. */ dockerEvents: (request: RequestId, endpoint: DockerEndpoint, onEvent: Channel) => typedError(__TAURI_INVOKE("docker_events", { request, endpoint, onEvent })), /** `docker pull`, logging in first when a saved registry with a password serves the image. */ dockerPull: (request: RequestId, endpoint: DockerEndpoint, reference: string, onOutput: Channel) => typedError(__TAURI_INVOKE("docker_pull", { request, endpoint, reference, onOutput })), dockerPrune: (request: RequestId, endpoint: DockerEndpoint, target: PruneTarget, onOutput: Channel) => typedError(__TAURI_INVOKE("docker_prune", { request, endpoint, target, onOutput })), /** `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) => typedError(__TAURI_INVOKE("docker_compose_op", { request, endpoint, project, files, workingDir, op, onOutput })), /** Docker connections and registries (app-wide). */ dockerSettings: () => typedError(__TAURI_INVOKE("docker_settings")), dockerSaveSettings: (settings: DockerSettings) => typedError(__TAURI_INVOKE("docker_save_settings", { settings })), /** Saves (`None`: forgets) a registry's password. */ dockerSetRegistryPassword: (id: string, password: string | null) => typedError(__TAURI_INVOKE("docker_set_registry_password", { id, password })), /** Test login to `registry` (`password`, else the saved one) through `endpoint`'s daemon. */ dockerRegistryLogin: (endpoint: DockerEndpoint, registry: DockerRegistry, password: string | null) => typedError(__TAURI_INVOKE("docker_registry_login", { endpoint, registry, password })), /** * 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 })), /** The repositories of the account gh is signed in to ("Get from Version Control" › GitHub); needs no project. */ ghAccountRepos: () => typedError(__TAURI_INVOKE("gh_account_repos")), ghAvailability: (repo: string | null) => typedError(__TAURI_INVOKE("gh_availability", { repo })), /** A GitHub GraphQL / REST call through `gh api`; returns the response body. */ ghApi: (repo: string | null, request: GhApiRequest) => typedError(__TAURI_INVOKE("gh_api", { repo, request })), ghPrList: (repo: string | null, query: PrListQuery) => typedError(__TAURI_INVOKE("gh_pr_list", { repo, query })), ghPrView: (repo: string | null, number: number) => typedError(__TAURI_INVOKE("gh_pr_view", { repo, number })), ghPrReviewComments: (repo: string | null, number: number) => typedError(__TAURI_INVOKE("gh_pr_review_comments", { repo, number })), ghPrCheckout: (repo: string | null, request: RequestId, number: number, onOutput: Channel) => typedError(__TAURI_INVOKE("gh_pr_checkout", { repo, request, number, onOutput })), /** 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) => typedError(__TAURI_INVOKE("gh_pr_create", { repo, request, pr, onOutput })), ghPrReview: (repo: string | null, number: number, event: ReviewEvent, body: string) => typedError(__TAURI_INVOKE("gh_pr_review", { repo, number, event, body })), ghPrComment: (repo: string | null, number: number, body: string) => typedError(__TAURI_INVOKE("gh_pr_comment", { repo, number, body })), /** 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) => typedError(__TAURI_INVOKE("gh_pr_prepare_diff", { repo, request, number, headOid, baseOid, baseRef, nameWithOwner, onOutput })), /** The requests of an `.http` file (gutter run icons, Run All). */ httpRequests: (text: string) => __TAURI_INVOKE("http_requests", { text }), /** Environment names from the `http-client(.private).env.json` files that apply to `path`. */ httpEnvironments: (path: string | null) => typedError(__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(__TAURI_INVOKE("http_execute", { request, path, text, index, env })), httpHistory: () => typedError(__TAURI_INVOKE("http_history")), httpHistoryGet: (id: string) => typedError(__TAURI_INVOKE("http_history_get", { id })), httpHistoryClear: () => typedError(__TAURI_INVOKE("http_history_clear")), /** * 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(__TAURI_INVOKE("proxy_check_connection", { proxy, url })), dbSources: () => typedError(__TAURI_INVOKE("db_sources")), dbSaveSources: (sources: DataSource[]) => typedError(__TAURI_INVOKE("db_save_sources", { sources })), dbSetPassword: (id: string, password: string | null, save: boolean) => typedError(__TAURI_INVOKE("db_set_password", { id, password, save })), dbSetSshSecret: (id: string, secret: string | null, save: boolean) => typedError(__TAURI_INVOKE("db_set_ssh_secret", { id, secret, save })), dbTrustSshHost: (id: string) => typedError(__TAURI_INVOKE("db_trust_ssh_host", { id })), /** Test Connection: connects with `config` as edited (not necessarily saved). */ sshTest: (config: SshConfiguration, secret: string | null) => typedError(__TAURI_INVOKE("ssh_test", { config, secret })), /** * 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(__TAURI_INVOKE("wsl_distros")), /** * The WSL project a `\\wsl.localhost\\…` 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 }), /** Remembers the password / passphrase of configuration `id` (`None` forgets it). */ sshSetSecret: (id: string, secret: string | null, save: boolean) => __TAURI_INVOKE("ssh_set_secret", { id, secret, save }), /** Whether connecting with configuration `id` needs a password first. */ sshNeedsSecret: (id: string) => typedError(__TAURI_INVOKE("ssh_needs_secret", { id })), /** Trusts the host key that failed the last connection of configuration `id`. */ sshTrustHost: (id: string) => typedError(__TAURI_INVOKE("ssh_trust_host", { id })), /** Ids of the configurations with an open connection. */ sshConnected: () => __TAURI_INVOKE("ssh_connected"), sshDisconnect: (id: string) => __TAURI_INVOKE("ssh_disconnect", { id }), /** Answers an `IdeEvent::Askpass` prompt (`None`: cancelled); every window drops it. */ sshAskpassAnswer: (id: number, answer: string | null, remember: boolean) => __TAURI_INVOKE("ssh_askpass_answer", { id, answer, remember }), /** Settings › Git › Saved credentials: `scheme://host` of every saved entry. */ gitCredentials: () => __TAURI_INVOKE("git_credentials"), /** Forgets the credential of `key` (a `git_credentials` entry). */ gitCredentialForget: (key: string) => __TAURI_INVOKE("git_credential_forget", { key }), /** * Tools › Start SSH Session: the system `ssh` command line for configuration `id` * (run in a terminal tab, so prompts and host-key questions are answered there). */ sshTerminalCommand: (id: string) => typedError(__TAURI_INVOKE("ssh_terminal_command", { id })), deployCoverage: (paths: IpcPath[]) => typedError(__TAURI_INVOKE("deploy_coverage", { paths })), deployUpload: (paths: IpcPath[], server: string | null, request: RequestId) => typedError(__TAURI_INVOKE("deploy_upload", { paths, server, request })), deployDownload: (paths: IpcPath[], server: string | null, request: RequestId) => typedError(__TAURI_INVOKE("deploy_download", { paths, server, request })), deployDeleteRemote: (paths: IpcPath[], server: string | null) => typedError(__TAURI_INVOKE("deploy_delete_remote", { paths, server })), deployCompare: (path: IpcPath, server: string | null, request: RequestId) => typedError(__TAURI_INVOKE("deploy_compare", { path, server, request })), deploySync: (steps: SyncStep[], server: string | null, request: RequestId) => typedError(__TAURI_INVOKE("deploy_sync", { steps, 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(__TAURI_INVOKE("deploy_server_root", { server })), remoteList: (connection: FsConnection, path: string) => typedError(__TAURI_INVOKE("remote_list", { connection, path })), deployTestConnection: (connection: FsConnection, path: string) => typedError(__TAURI_INVOKE("deploy_test_connection", { connection, path })), remoteOpen: (connection: FsConnection, path: string) => typedError(__TAURI_INVOKE("remote_open", { connection, path })), remoteOf: (path: IpcPath) => __TAURI_INVOKE<[FsConnection, string] | null>("remote_of", { path }), remoteDelete: (connection: FsConnection, path: string) => typedError(__TAURI_INVOKE("remote_delete", { connection, path })), remoteMkdir: (connection: FsConnection, path: string) => typedError(__TAURI_INVOKE("remote_mkdir", { connection, path })), remoteRename: (connection: FsConnection, from: string, to: string) => typedError(__TAURI_INVOKE("remote_rename", { connection, from, to })), /** Browse before connecting, using the desktop's SSH configuration even in a remote window. */ remoteBootstrapList: (ssh: string, path: string) => typedError(__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) => typedError(__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"), remoteDisconnect: () => __TAURI_INVOKE("remote_disconnect"), /** The remote ports this window forwards to this machine. */ remoteForwardedPorts: () => __TAURI_INVOKE("remote_forwarded_ports"), /** * Forwards `localhost:` 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(__TAURI_INVOKE("remote_forward_port", { remotePort })), /** Stops forwarding `remote_port`. */ remoteStopForwarding: (remotePort: number) => typedError(__TAURI_INVOKE("remote_stop_forwarding", { remotePort })), /** * 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) => typedError(__TAURI_INVOKE("remote_invoke", { cmd, args, onChannel })), /** A client OS file belongs to this machine even when its destination is remote. */ remoteImportLocal: (from: string, to: string, request: RequestId) => typedError(__TAURI_INVOKE("remote_import_local", { from, to, request })), /** * 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(__TAURI_INVOKE("env_reload")), dbTest: (source: DataSource, password: string | null, sshSecret: string | null) => typedError(__TAURI_INVOKE("db_test", { source, password, sshSecret })), dbConnected: () => typedError(__TAURI_INVOKE("db_connected")), dbConnect: (id: string) => typedError(__TAURI_INVOKE("db_connect", { id })), dbDisconnect: (id: string) => typedError(__TAURI_INVOKE("db_disconnect", { id })), dbDatabases: (id: string) => typedError(__TAURI_INVOKE("db_databases", { id })), dbSchemas: (id: string) => typedError(__TAURI_INVOKE("db_schemas", { id })), dbTables: (id: string, schema: string) => typedError(__TAURI_INVOKE("db_tables", { id, schema })), dbTableDetails: (id: string, schema: string, table: string) => typedError(__TAURI_INVOKE("db_table_details", { id, schema, table })), dbDdl: (id: string, schema: string, table: string) => typedError(__TAURI_INVOKE("db_ddl", { id, schema, table })), dbSchemaObjects: (id: string, schema: string) => typedError(__TAURI_INVOKE("db_schema_objects", { id, schema })), dbObjectDdl: (id: string, schema: string, kind: DbObjectKind, name: string) => typedError(__TAURI_INVOKE("db_object_ddl", { id, schema, kind, name })), dbExplain: (request: RequestId, id: string, statement: string, schema: string | null) => typedError(__TAURI_INVOKE("db_explain", { request, id, statement, schema })), dbHistory: (id: string) => typedError(__TAURI_INVOKE("db_history", { id })), dbRemoveHistory: (id: string, texts: string[] | null) => typedError(__TAURI_INVOKE("db_remove_history", { id, texts })), dbCompletion: (id: string) => typedError(__TAURI_INVOKE("db_completion", { id })), /** * 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(__TAURI_INVOKE("db_export_file", { path, text })), dbSetManualCommit: (id: string, manual: boolean) => typedError(__TAURI_INVOKE("db_set_manual_commit", { id, manual })), dbFinishTransaction: (id: string, commit: boolean) => typedError(__TAURI_INVOKE("db_finish_transaction", { id, commit })), dbStatements: (id: string, text: string, from: number, to: number) => typedError(__TAURI_INVOKE("db_statements", { id, text, from, to })), dbExecute: (request: RequestId, id: string, statements: SqlStatement[], skip: number, maxRows: number, schema: string | null) => typedError(__TAURI_INVOKE("db_execute", { request, id, statements, skip, maxRows, schema })), dbTablePage: (request: RequestId, id: string, schema: string, table: string, filter: string | null, sort: DbSortKey[], offset: number, limit: number) => typedError(__TAURI_INVOKE("db_table_page", { request, id, schema, table, filter, sort, offset, limit })), dbApplyEdits: (id: string, schema: string, table: string, edits: DbRowEdit[]) => typedError(__TAURI_INVOKE("db_apply_edits", { id, schema, table, edits })), dbConsolePath: (id: string) => typedError(__TAURI_INVOKE("db_console_path", { id })), }; /* Types */ 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, }; /** 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, }; /** A file the task changed, relative to [`AgentTask::base_commit`]. */ export type AgentChange = { path: IpcPath, relPath: string, kind: ChangeKind, added: number, removed: number, }; export type AgentCommand = { /** Without the leading `/`. */ name: string, description: string, /** What to type after the command, when it takes input. */ hint: string | null, }; /** Why the executable cannot be changed in built-in agent settings. */ export type AgentCommandReadOnlyReason = "packageRunner" | "registry" | "customAgent"; /** 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, values: AgentConfigValue[], via: AgentConfigVia, }; /** One value of a select-type session setting. */ export type AgentConfigValue = { value: string, name: string, description: string | 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 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 } | { type: "thought"; text: string } | { 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[] } | { 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; 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[]; /** 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 = /** A task was created or its metadata changed. */ { type: "task"; task: AgentTask } | { type: "removed"; id: string } | /** The task's conversation was cut to its first `length` entries (turns rolled back). */ { type: "truncated"; task: string; length: number } | /** Entry `index` of `task` (of its subagent `subagent`) was added or replaced. */ { type: "entry"; task: string; subagent: string | null; index: number; entry: AgentEntry } | /** An agent reported the usage limits of its account (shared by every task of `provider`). */ { type: "limits"; provider: string; limits: AgentLimit[] } | /** The installed or configured agent providers changed. */ { type: "providers" }; 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, }; 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, /** 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, }; /** What the meters in an agent task's header show. */ export type AgentSettings = { /** 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, }; /** Where an agent comes from. */ export type AgentSource = { kind: "builtin" } | /** Defined by the user in `/agents/.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 = { /** 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[], }; 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, configDir: IpcPath, /** Linux on a Wayland display: GTK draws the frameless windows' shadow and resize edges. */ wayland: boolean, }; 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 = { /** * A built-in theme id (`light`, `dark`, `dark-hc`, …), `system` (legacy * "Sync with OS"), or a plugin's theme: `plugin:/`. */ 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 (`/`); 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, fullPathInTitle?: boolean, projectColorsInToolbar?: boolean, dndWithAltOnly?: boolean, menuIcons?: boolean, /** `hamburger` | `merged`: main menu presentation in the frameless title bar. */ mainMenuStyle?: string, /** `subpixel` | `greyscale` | `none` */ ideAntialiasing?: string, editorAntialiasing?: string, showToolWindowBars?: boolean, showToolWindowNames?: boolean, showToolWindowBadges?: boolean, widescreenToolWindows?: boolean, /** * 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, }; 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[], }; /** 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 = "java" | "node" | "python" | "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"; /** 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, }; /** 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[], }; export type BuildResult = { system: BuildSystem, title: string, success: boolean, errors: number, warnings: number, durationMs: number | null, messages: BuildMessage[], }; export type BuildSystem = "maven" | "gradle" | "cargo" | "go" | "typescript" | "cmake"; 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-. */ 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 = { 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, }; /** * 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 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, }; 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, }; /** * 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. */ { kind: "untrackedFiles"; files: string[] } | /** 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[] }; 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 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, /** 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, }; export type Command = { title: string, command: string, arguments: 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 `; `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, /** 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 (`/`); the rest run. */ disabledPluginChecks?: string[], }; 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, 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, 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, /** e.g. return type, shown right-aligned. */ 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 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, }; /** 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[], }; export type ContainerOp = "start" | "stop" | "restart" | "pause" | "unpause" | "kill"; /** 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 `). */ { 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, }; /** 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 = { id?: string, name?: string, driver?: DbDriver, 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, properties?: DbProperty[], /** * Stored app-wide and listed in every project. Implied by the file it is read from, * so not written to it. */ global?: boolean, }; /** 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 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 (via Oracle Instant Client). */ "oracle"; /** `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 = { allDatabases?: boolean, databases?: string[], allSchemas?: boolean, schemas?: string[], /** `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, }; /** Schema objects other than tables and columns (Go to DDL, Drop). */ export type DbObjectKind = "function" | "procedure" | "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, /** Oracle: directory of the Oracle Instant Client (empty: `ORACLE_HOME` / system search path). */ instantClient?: string, }; /** 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 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's routines and sequences (the tree's `routines` / `sequences` folders). */ export type DbSchemaObjects = { routines: DbRoutineInfo[], sequences: DbSequenceInfo[], }; export type DbSequenceInfo = { name: string, dataType: string, }; export type DbSortKey = { column: string, descending: boolean, }; /** 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 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"; /** 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, }; /** 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 }; /** 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, 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, 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, python?: PythonDebuggerSettings, }; /** 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, }; /** 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, }; /** Dependency scope for a module dependency or project library (IDEA's Modules › Dependencies). */ export type DependencyScope = "compile" | "test" | "runtime" | "provided"; export type DependencyUpdate = { latest: string, replacement: string, }; export type DependencyVersions = { dependency: ManifestDependency, versions: string[], update: DependencyUpdate | null, }; /** 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[], }; /** 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, /** 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 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" | "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, }; export type DirectoryCompareEntry = { path: string, status: DirectoryCompareStatus, leftKind: EntryKind | null, rightKind: EntryKind | null, leftLink?: string | null, rightLink?: string | null, }; 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 = { /** Snapshots of files under the folder and labels, newest first. */ entries: HistoryEntry[], /** Files with history that no longer exist on disk. */ deleted: IpcPath[], }; /** 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[], }; /** 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 }; /** 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, /** `` for dangling images. */ repository: string, tag: string, size: string, createdSince: 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, }; export type DockerObject = "container" | "image" | "volume" | "network"; /** 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, }; /** What the UI needs to show an opened document. */ export type DocumentInfo = { id: DocId, path: IpcPath, text: string, version: number, language: LanguageId, encoding: string, lineEnding: LineEnding, readOnly: boolean, dirty: 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, }; /** * 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, }; 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, }; /** 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, methodSeparators?: boolean, /** Sub-options of `editor.showWhitespace`. */ whitespaceLeading?: boolean, whitespaceInner?: boolean, whitespaceTrailing?: boolean, indentGuides?: boolean, /** Right margin and visual guides from Code Style. */ hardWrapGuides?: boolean, intentionBulb?: 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, 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, }; 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, /** Color Scheme › Language Defaults › Rainbow brackets: `()`, `[]`, `{}` coloured by depth. */ rainbowBrackets?: boolean, ligatures?: 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, /** Color Scheme › Language Defaults › Rainbow brackets: `()`, `[]`, `{}` coloured by depth. */ rainbowBrackets: boolean, ligatures: 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:`). */ export type EventKind = "file-opened" | "file-saved" | "files-changed" | "editor-focused" | "action-performed" | "vcs-changed" | "scheduled"; /** 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, }; /** 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, }; /** A formatter that runs outside the language servers, with its own settings group. */ export type ExternalFormatter = "prettier" | "oxfmt" | "ruff"; /** An external formatter (Prettier, oxfmt, Ruff) and the languages it formats. */ export type ExternalFormatterSettings = { /** Empty path: project node_modules (Prettier/oxfmt), 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, }; /** 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, }; /** 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 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 FileCoverage = { path: IpcPath, /** Sorted by line. */ lines: LineCoverage[], linesTotal: number, linesCovered: number, branchesTotal: number, branchesCovered: number, }; 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:`. 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: NavigationResult[], }; 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, }; /** 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 }, }; 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[], }; export type FoldKind = "region" | "comment" | "imports"; export type FoldRange = { start_line: number, end_line: number, kind: FoldKind, }; /** Editor › General › Code Folding. */ export type FoldingSettings = { showOutline?: boolean, 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, }; /** A port of the remote host reachable on this machine at `localhost:local_port`. */ export type ForwardedPort = { remotePort: number, localPort: number, }; /** 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 } | { kind: "local" }; /** * 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, /** 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, }; /** 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, /** 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, /** 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, }; 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, 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[], /** * 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, }; /** HEAD before and after a history rewrite, for its Undo. */ export type HeadChange = { before: string, after: 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[], }; 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 = { /** 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"; /** 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, }; /** 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, /** 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 window membership or selection changed. */ { type: "windowGroupsChanged" } | /** A window entered or left full screen, itself or as a member of a full-screen window group. */ { type: "windowFullscreenChanged" } | { type: "projectTrustChanged"; root: IpcPath; trusted: boolean } | /** Files or directories changed on disk (after debouncing, ignore rules applied). */ { type: "fsChanged"; created: IpcPath[]; modified: IpcPath[]; removed: 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 } | /** A complete workspace edit can be undone as one operation. */ { type: "workspaceEditApplied"; id: number; paths: IpcPath[] } | /** * 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; 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 } | { 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 } | /** * 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, }; export type IndexStatus = { indexing: boolean, files: number, symbols: number, }; 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: usages above declarations. */ codeVisionUsages?: boolean, /** Code vision: last author of a declaration (VCS blame) beside its usages. */ codeVisionAuthor?: boolean, }; 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[], }; 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:` / `project:`. */ 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, }; /** 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 ``, or the theme's for a loose file. */ name: string, pluginId: string | null, version: string | null, vendor: string | null, themes: IntellijThemeFile[], }; /** 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, /** 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 File › Manage IDE Settings › Export Settings… 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 `colors/*.icls` and the `options/*.xml` files OpenIDEA reads. */ files: { [key in string]: string }, }; export type JvmFilePresentation = { path: string, presentation: JvmPresentation, }; export type JvmPresentation = { kind: JvmTypeKind | null, springBoot: boolean, runnable: boolean, }; export type JvmTypeKind = "class" | "abstractClass" | "interface" | "enum" | "record" | "annotation" | "exception" | "object"; /** Editor › Code Style › › Tabs and Indents (unset fields inherit). */ export type LanguageCodeStyle = LanguageCodeStyle_Serialize | LanguageCodeStyle_Deserialize; /** Editor › Code Style › › 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, }; /** Editor › Code Style › › 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, }; /** 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, ``). */ positions?: FilePosition[], /** Comparison windows: the revisions to compare (boxed: most launches have none). */ comparison?: ComparisonLaunch | null, /** `openidea diff a.txt b.txt`: the two files to open in the diff viewer (boxed: most launches have none). */ diff?: DiffFilesLaunch | null, /** Deployment windows: the server and local selection to compare. */ deployment?: DeploymentLaunch | null, }; 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": ` 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, }; /** 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`. */ 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 (`!`). */ 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 match for very long lines. */ 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, }; /** What a local definition declares (nvim-treesitter `@local.definition.`). */ 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"; 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"; 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, }; /** Languages & Frameworks › Markdown. Like IDEA's, it is application-level only. */ export type MarkdownSettings = { /** Preview (and notebook Markdown cell) font size in px; unset follows the editor font size. */ previewFontSize?: number | 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, } & 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 `` 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: string, /** Sorted goal names. */ goals: string[], }; export type MavenProfile = { id: string, activeByDefault: boolean, }; export type MavenProject = { /** 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, /** `` (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` up to the project root (absolute), else `mvn`. */ 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[], /** Project-relative POMs outside the root reactor added as independent top-level projects. */ 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, /** 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, }; export type MemoryCategory = /** The backend and its WebView processes. */ "app" | "languageServer" | /** Debug adapters, Run processes, terminal shells and other children. */ "process"; /** Localised labels and displayed shortcuts, pushed by the frontend. */ export type MenuConfig = { locale: string, /** `menu.` → label (ids of submenus, actions and `native.*` roles). */ labels: { [key in string]: string }, /** Action id → display shortcut from the JS keymap, e.g. `⇧⌘O`. */ shortcuts: { [key in string]: string }, /** [`Entry::Dynamic`] slot → its items, already localised. */ dynamic?: { [key in string]: DynamicItem[] }, }; /** * 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 = { kind: "submenu"; id: string; label: string; children: MenuNode[] } | /** Runs `id` with `arg`. Items with an `arg` (Open Recent) carry their final label. */ { kind: "action"; id: string; label: string; hint: string | null; arg: string | null } | /** A disabled placeholder such as "No Recent Projects". */ { kind: "placeholder"; id: string; label: string } | { kind: "separator" }; /** 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, }; /** 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[], }; 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, }; /** 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, /** `npm` | `pnpm` | `yarn`; empty = detect from the lock file / `packageManager`. */ packageManager?: 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, }; 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, /** 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, }; /** 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, /** * 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, }; /** 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 = /** Plugins, their status or their contributions changed: re-fetch `plugin_list`. */ { type: "commandsChanged" } | /** Cached document associations were disposed (reload, disable or failure). */ { type: "documentIndexesChanged" } | /** * The routes `plugin_id` reports for the project `root` may have changed: * ask `plugin_endpoints` again. */ { type: "endpointsChanged"; pluginId: string; root: IpcPath } | /** * The marketplace offers newer versions of installed plugins (announced * once per set of versions). */ { type: "updatesAvailable"; updates: PluginUpdate[] } | { type: "notification"; pluginId: string; level: NotificationLevel; title: string; body: string; /** Buttons running the plugin's own commands (`ui.notify`). */ actions: NotificationAction[] } | /** A plugin's status bar item was set (`item`) or removed. */ { type: "statusItemChanged"; pluginId: string; id: string; item: StatusItem | null } | /** * 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 } | /** A plugin began a task: show it with the background tasks. */ { type: "taskStarted"; pluginId: string; taskId: string; title: string; cancellable: boolean } | { type: "taskProgress"; pluginId: string; taskId: string; done: number; total: number | null; message: string | null } | { type: "taskEnded"; pluginId: string; taskId: string } | /** * The kinds of workbench events plugins want changed: re-fetch * `plugin_event_kinds` (the UI reports only those). */ { type: "subscriptionsChanged" } | { type: "themeChanged"; theme: ActiveTheme | null } | /** * 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[] } | /** A view (or the custom editors) of a plugin must be rendered again. */ { type: "viewChanged"; pluginId: string; view: string } | /** For the script of a view's `html` body. */ { type: "viewMessage"; pluginId: string; view: string; message: string } | /** Open a terminal running `program` (already approved and verified). */ { type: "openTerminal"; pluginId: string; title: string; program: IpcPath; args: string[]; cwd: IpcPath } | { type: "openLocation"; pluginId: string; path: IpcPath; line: number; column: number } | /** * 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" } | /** Copy `text` to the system clipboard. */ { type: "copyToClipboard"; pluginId: string; text: string } | /** Open `url` (`http(s)://`) in the system browser. */ { type: "openUrl"; pluginId: string; url: string } | /** A window command/event requests the normal File > Open flow. */ { type: "openProject"; pluginId: string; path: string; newWindow: boolean } | /** * 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 } | /** The call that asked gave up (cancelled, or its plugin stopped): close the prompt. */ { type: "promptClosed"; promptId: string } | /** Bring the tool window of the plugin's view `view` to the front. */ { type: "revealView"; pluginId: string; view: string } | /** * 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 }; /** 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, source: PluginSource, /** Package directory. */ path: IpcPath, enabled: boolean, status: PluginStatus, error: string | null, hasCode: boolean, /** Declared capabilities with risk and grant state. */ capabilities: CapabilityInfo[], /** 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, }; /** A line a view's `process` body printed. */ export type PluginOutputLine = { stderr: boolean, text: string, }; /** A secret a plugin declares, and whether the user stored it. */ export type PluginSecretState = { name: string, set: boolean, }; export type PluginSource = /** Installed under `/plugins//`. */ "installed" | /** Loaded from `/.openidea/plugins//` 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's status bar item. */ export type PluginStatusItem = { pluginId: string, id: string, item: StatusItem, }; /** 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[], }; /** 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 `` entry of the POM or one of its parents. */ "property" | /** A `` entry providing the dependency's version. */ "managedDependency" | /** A `` entry providing the plugin's version. */ "managedPlugin"; /** 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, }; 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, /** Number of processes counted in this row. */ processes: number, bytes: number | null, }; export type Profile = { /** `node --cpu-prof`, `py-spy`, `async-profiler`, `perf`. */ profiler: string, /** `ms` (time-weighted) or `samples`. */ unit: string, 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, }; /** 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. */ { kind: "folded"; profiler: string; dir: IpcPath; ext: string; base: IpcPath; jvmRoot: IpcPath | null } | /** `perf script -i ` 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 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, isGit: boolean, settings: Settings_Deserialize, workspace?: Workspace_Deserialize | null, unity?: UnityProjectInfo | null, }; export type ProjectInfo_Serialize = { trusted: boolean, root: IpcPath, name: string, isGit: boolean, settings: Settings_Serialize, workspace?: Workspace_Serialize | null, unity?: UnityProjectInfo | null, }; /** 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[], /** "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 }; 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"; /** Python Debugger (debugpy launch options). */ export type PythonDebuggerSettings = { attachSubprocess?: boolean, gevent?: boolean, }; export type PythonPackage = { name: string, version: string, }; export type PythonSettings = { /** Project interpreter executable; empty = auto-detect (project venv, else `python3`). */ interpreter?: string, /** Activate the interpreter's virtualenv in new terminal sessions. */ activateVirtualenv?: boolean, }; /** 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 `: replay `upstream..HEAD` onto this revision instead. */ onto?: string | null, rebaseMerges?: boolean, keepEmpty?: boolean, }; export type RecentProject = { path: IpcPath, name: string, openedAtMs: number | null, /** Current git branch when last opened, shown on the welcome screen. */ branch: string | null, }; /** 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, }; 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"; /** 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, }; /** 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 } | /** Fast-forwards local `branch` (not checked out) to its upstream. */ { op: "updateBranch"; branch: 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 the server answers (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 the server answers (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[], }; /** 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, }; 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; /** `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, }; /** 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; 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[], /** 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 `), * 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, }; 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[], /** 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 `), * 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, }; /** 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 = { confirmRerun?: boolean, /** Ask before closing a Run tab whose process is still running. */ confirmTerminate?: boolean, showOnStart?: 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/` (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 Scope = { name: string, variablesReference: number, expensive: 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"; /** * 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, }; 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[], }; /** 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, }; 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[], }; /** 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 Settings_Deserialize = { general?: GeneralSettings, appearance?: AppearanceSettings, 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 › Console. */ console?: ConsoleSettings, debugger?: DebuggerSettings, run?: RunSettings, /** Tools › Terminal. */ terminal?: TerminalSettings, actionsOnSave?: ActionsOnSaveSettings, externalTools?: ExternalTool[], /** * 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 }, /** 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, /** Tools › Agents › Chat. */ agents?: AgentSettings, /** 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, 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 › Console. */ console: ConsoleSettings, debugger: DebuggerSettings, run: RunSettings, /** Tools › Terminal. */ terminal: TerminalSettings, actionsOnSave: ActionsOnSaveSettings, externalTools: ExternalTool[], /** * 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 }, /** 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, /** Tools › Agents › Chat. */ agents: AgentSettings, /** 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])[], }; export type SignatureHelp = { signatures: Signature[], activeSignature: number, activeParameter: number, }; export type SkipReason = /** A configuration with this name already exists. */ { kind: "nameTaken" } | /** 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, /** 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[], }; 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 SshTerminalCommand = { shell: string, args: string[], title: string, }; 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, }; /** A plugin's status bar item. */ export type StatusItem = { text: string, tooltip: string | null, /** One of the plugin's commands, run on click. */ command: string | null, }; /** 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 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" | "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"; /** 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; /** 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, audibleBell?: boolean, closeOnExit?: boolean, mouseReporting?: boolean, copyOnSelection?: boolean, pasteOnMiddleClick?: boolean, overrideIdeShortcuts?: boolean, shellIntegration?: boolean, highlightHyperlinks?: boolean, optionAsMeta?: boolean, /** Escape moves focus to the editor instead of reaching the shell. */ escapeToEditor?: boolean, /** `block` | `underline` | `bar`. */ cursorShape?: string, cursorBlink?: boolean, 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 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 stack trace and captured output. */ output: string | null, }; export type TestCaseStatus = "passed" | "failed" | "skipped"; /** 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, }; /** 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, }; /** * 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"; 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, }; /** 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[], }; 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"; 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, }; /** 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[], }; export type UpdateCheck = { /** False when no update endpoint is configured (no request was made). */ 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" }; /** Where updates are downloaded from (System Settings › Updates). */ export type UpdateSource = /** The GitHub releases named in tauri.conf.json. */ "github" | /** The CNB mirror of the same releases, for networks where GitHub is slow. */ "cnb"; export type Variable = { name: string, value: string, typeName: string | null, /** > 0 when expandable. */ variablesReference: number, evaluateName: string | null, }; /** 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, }; /** A repository of the project (IDEA's VCS root). */ export type VcsRoot = { /** Worktree root. */ root: 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, /** 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[], }; /** The tool that creates a new Python environment in "Add Python Interpreter". */ export type VenvTool = /** `base -m venv `. */ "venv" | /** `uv venv --python ` (uv must be on PATH). */ "uv" | /** `poetry env use ` in the project, then `poetry env info --path`. */ "poetry" | /** `conda create -p -y` (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, }; /** 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 = { /** * `//` 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 WindowTab = { label: string, name: string, root: IpcPath | null, current: boolean, }; /** A workbench event delivered to plugins. */ export type WorkbenchEvent = { kind: "fileOpened"; value: string } | { kind: "fileSaved"; value: string } | { kind: "filesChanged"; value: FilesChanged } | { kind: "editorFocused"; value: string | null } | { kind: "actionPerformed"; value: ActionPerformed } | { kind: "vcsChanged"; value: string } | { 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, }; 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, }; /* Tauri Specta runtime */ async function typedError(result: Promise): 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 }; } }