Skip to content

Latest commit

 

History

History
179 lines (157 loc) · 240 KB

workbench-coverage.md

File metadata and controls

179 lines (157 loc) · 240 KB

Workbench coverage

CodeBridge runs the real VS Code extension host and stands in for the workbench: extensions call MainThread* services expecting an editor on the other end, and the plugin answers. Anything it does not answer is a hole an extension can fall into, regardless of how good language support is.

This page lists which services are answered and which are not. Counts come from the pinned runtime (VSCodium 1.143.17183) rather than the checked-in id table, because VsCodeInstallation.rpcIdTable extracts ids from the actual bundle and only falls back to the bundled table.

87 services. 38 implemented, partial or stubbed. 49 not answered. The unanswered count includes MainThreadExtensionService, whose activation timings are logged but which is otherwise unanswered.

Answered today

Service How
MainThreadLanguageFeatures Provider registrations recorded; the providers listed under language features are called back
MainThreadTextEditors CodeBridgeTextEditors. The host knows one editor per mirrored document, so an editor id is a file. $tryShowTextDocument answers at once for a document the host already holds, without touching the editors. Any other file is opened by the frontend through CodeBridgeApi.openRequests, since in split mode an editor the backend opens is not one the user sees and closing it again read as the file being closed; the answer waits until the host has been told about the new editor, since showTextDocument fails in the host otherwise. That is the first step of every rust-analyzer assist, which then edits through that editor. A document is withdrawn from the host only when no client has the file open (isFileOpenWithRemotes). $tryApplyEdits and $tryInsertSnippet go through the same staleness check as a workspace edit, as the user's client. A snippet's stops are walked in the editor showing the file as one inline live template (CodeBridgeSnippetTemplates): in number order, a stop written twice or inserted at several ranges typed into every copy, choices offered, ending on $0 with its value selected, and on every $0 when there are several. Its lines are indented to the line it goes into unless it asks to keep its whitespace; selections and reveal are applied to the showing editor. Decorations are drawn, as described under gaps; editor options are acknowledged only
MainThreadBulkEdits $tryApplyWorkspaceEdit applied by CodeBridgeWorkspaceEdits: text edits in order, with file creation, rename and delete between them, as one undoable command. An edit whose version or text no longer matches the host's copy is refused as a whole before anything changes. Answered asynchronously, because the edit is applied on the editor thread and a code action's command -- which is usually what sends it -- may have been started from there. Snippet edits to the file in the active editor are walked there the same way, as VS Code hands them to that editor's snippet controller; in any other file they are text
MainThreadDiagnostics $changeMany stored and drawn by CodeBridgeDiagnosticsAnnotator
MainThreadDebugService Full DAP session through ExtensionHostDebugAdapters, several at once. $startDebugging starts a temporary run configuration, with Run for noDebug and Debug otherwise, and answers whether it started. It also starts a compound by name. A child session (parentSessionID) gets an unkept configuration, its parent in the session DTO, and is stopped with its parent. $customDebugAdapterRequest is sent on the adapter's connection beside IntelliJ's own requests, numbered out of the client's range, and its response kept from the client; events VS Code's client does not handle itself reach the extension as $acceptDebugSessionCustomEvent; $stopDebugging stops one session or all of them. The IDE's VS Code line breakpoints are the host's vscode.debug.breakpoints (HostedBreakpoints), each under an id kept with the breakpoint so it outlives restarts, and $getDebugProtocolBreakpoint answers with what the adapter reported for one, read off the setBreakpoints replies as they pass (DapBreakpoints). Extensions' debug/callstack/context menu entries -- CodeLLDB's Exclude Caller -- are in the frames list's right-click menu, run on the right-clicked frame as VS Code describes it
MainThreadQuickOpen Asked by the backend and drawn by the frontend, as messages are. showQuickPick and createQuickPick become a list popup at the caret of the editor in front of the user, or centred in the window without one, typed into to filter the extension's items (label, description and detail); a picker with canPickMany is a modal dialog with a filter field instead. Either is shown once a busy picker has its items; one left empty says there is nothing to choose from; showInputBox and createInputBox an input dialog, asked again with the extension's message while validateInput returns an error. Item buttons, a changing item list under an open picker, and an accept that leaves the picker open are not drawn
MainThreadCommands Registration/discovery, command activation and contributed-command callbacks. setContext keys are kept for when clauses (HostedContextKeys), and the tree views' own commands are done by HostedTreeViews. The workbench's own commands are done by CodeBridgeWorkbenchCommands: editor.action.showReferences, _workbench.open, the settings commands, _workbench.diff and _workbench.changes (IntelliJ's diff viewer), workbench.action.moveEditorToNewWindow, and vscode.execute…Provider for document symbols, definitions, type definitions, implementations, references, hovers and workspace symbols -- from the extensions that claim the file, else, for document symbols, definitions and references, from IntelliJ's own structure and resolution. git.publish, of VS Code's built-in Git extension, opens IntelliJ's Push dialog. Other unsupported built-in UI commands, vscode.moveViews and _executeCodeActionProvider among them, retain the logged no-value fallback
MainThreadTreeViews HostedTreeViews. The views enabled extensions contribute are read from their manifests, so they are drawn before any host runs: one IntelliJ tool window per view container, a tab per view. Placed by what the container is: the tree views of VS Code's Explorer are nodes of the Project view instead, beside External Libraries (ExplorerViews), its Source Control views below the Project view (left, split), its Testing views beside the Run window (bottom, split), an extension's own side-bar container on the right and a panel container at the bottom. A view whose when clause does not hold is not shown; clauses read the extensions' setContext keys, config.* from the running host's settings, and isWindows/isMac/isLinux. Showing a view wakes its extension (onView:), starting the host if it has to; items are fetched a level at a time through $getChildren and drawn with their codicon or image icon, or a resource's file icon. Selecting an item runs its command (asking resolveTreeItem first when it has none); $refresh, $reveal, $setTitle and $setMessage are followed, and visibility, expansion and selection reported back. view/title and view/item/context menus become toolbar buttons and a right-click menu, offered by their when clauses (view, viewItem, context keys) and greyed by enablement; only an entry on offer can be run. An empty view shows its viewsWelcome content, links clickable. <view>.focus, workbench.view.extension.<container> and workbench.actions.treeView.<view>.collapseAll work. Views in VS Code's Run and Debug container are tabs of the debug sessions of their extension's debugger instead -- CodeLLDB's Modules and Excluded Callers -- made on the backend through the run configuration's additional tabs, which the platform carries to a split-mode client. An item's inline entries with an icon are buttons at the right of its row while it is hovered or selected, acting on the selection when the item is in it; entries without an icon stay in the right-click menu. Submenus (contributes.submenus) are popup groups in either menu, and in the call stack's, offered by their own entries' clauses and left out with none. Checkboxes are drawn before the icon and ticked by clicking them or with Space, sent as $changeCheckboxState; unless the view manages them itself, the fetched items under one follow it and each item above is ticked when all under it are. A view's badge is counted in its tab title. An item whose resourceUri is a file stands for that file to the IDE's actions (Copy Path, Open In, Select In), and Select In > Extension View finds the file open in the editor through the items whose files are it or folders holding it, fetching only that path -- the way to library sources such as rust-analyzer's dependencies, which lie outside the project and so have no Project view node. It is offered once the view has fetched an item that is the file or a folder holding it, and selects the deepest folder holding the file when the file itself is not listed. An Explorer view in the Project view is fetched a level at a time as its nodes open, showing "Loading..." until the level is here; items keep the extension's order, an item's command runs on double-click or F4 (one without opens its file), its view/item/context entries and the view's view/title ones are the Project view's context menu, and its welcome content and message are lines under the view's node. $reveal is followed by fetching each level down to the item, and Select Opened File (and Always Select Opened File) then reaches the item through the path the extension revealed for the file's resource, jdt: library classes included -- Java Projects reveals the active editor's class on every editor change. Dependencies are not indexed: as in VS Code, rust-analyzer's crate sources are reached through its own view and workspace symbols. Tooltips and messages a MarkdownString gives are rendered as hovers are, command links reduced to their labels. Drag and drop and codicons in Markdown are not drawn. Webview views ("type": "webview") are tabs of the same tool windows, drawn by MainThreadWebviewViews
MainThreadWebviews, MainThreadWebviewPanels, MainThreadWebviewViews HostedWebviews keeps each webview's HTML, options and title; the optional webview module draws it in the IDE's browser (the Web Browser (JCEF) plugin) on the frontend. A panel is an editor tab, a webview view a tab of its container's tool window, resolved ($resolveWebviewView) the first time it is on screen, which wakes its extension (onView:). The page is served at an address under vscode-cdn.net, as are the files asWebviewUri names, so a policy written against webview.cspSource admits them; both are answered by request interception, never the network, and files only from under the webview's localResourceRoots (by default the workspace and the extension's directory), read by the backend. The frontend keeps the files pages read, up to 64 MB, and the backend sends one again only when it changed, so a page loaded again -- draw.io's reads 17 MB of scripts -- is not sent them twice. acquireVsCodeApi comes from a script put ahead of the page's own content security policy: postMessage both ways, ArrayBuffers included, and getState/setState, kept across the reloads a new html causes. Pages read the IDE's theme as VS Code's --vscode-* variables and vscode-dark/vscode-light body class, updated when it changes: the colors pages commonly read from the IDE colors that play the same part, and every other color and size VS Code registers, or an extension contributes, worked out from those by its defaults, as VS Code does for a theme that does not set it. The build reads those defaults from the pinned VSCodium's workbench (GenerateVsCodeTheme in buildSrc). Web links open in the browser; command: links run when enableCommandUris allows that command. Visibility and the panel in front are reported; $reveal and $show bring a webview forward; a view's title, description and badge are its tab's. A page is kept while its tab is open, as with retainContextWhenHidden. Without the browser plugin, a webview view says why it is empty. A page's ArrayBuffers reach an extension that asks for them so (serializeBuffersForPostMessage, from engine 1.57) as buffers, sent beside the call's JSON as the host's SerializableObjectWithBuffers. A panel opens in the editor group its view column names: the one in front, the one beside it -- split off when there is none -- or the group of that index, and reports the group it is in; $reveal brings it forward where it is, since IntelliJ does not move an open editor between groups. Its iconPath is its tab's icon, for the theme in use. With enableFindWidget, Ctrl/Cmd+F opens a find bar above the page, highlighting every match. A panel whose view type has a serializer (registerWebviewPanelSerializer) outlives its host: when the host stops, and with the project, whose workspace file keeps its title, options, icon, place and the state its page saved. It comes back as a dormant tab, and once that is on screen its extension is woken (onWebviewPanel:) and asked to fill it again ($deserializeWebviewPanel), the page starting from its saved state; should that fail, the tab says why and it is tried again when next shown. Panels without a serializer go with their host, as in VS Code
MainThreadDiaglogs HostedDialogs (the id is VS Code's spelling). showOpenDialog is IntelliJ's file chooser, for files, folders or both, one or several; showSaveDialog its save dialog, starting at the file or folder defaultUri names, or the project. Opened on the backend as the client (CodeBridgeTextEditors.asClient): the chooser is a per-client service, so a split-mode client draws it while browsing the backend's files, which are the ones the extension can read. IntelliJ's chooser takes one extension filter, so the first of the extension's is used -- the one VS Code selects -- and * is every file. openLabel/saveLabel are not shown. Cancelling answers undefined
MainThreadDecorations HostedDecorations, drawn in the Project view by CodeBridgeDecorationsNodeDecorator: the name in the decoration's colour, its badge beside it, its tooltip on hover. The IDE asks a node decorator synchronously, which an extension cannot answer, so a node is drawn with what is known, files not yet asked about are asked in a batch ($provideDecorations), and the view is redrawn once an answer decorates anything. $onDidChange forgets the resources it names, or everything, and they are asked about again when drawn. Every provider is asked; badges and tooltips are joined, the first colour kept. A folder takes the colour of a file under it whose decoration propagates, with a dot. Colours are theme colour ids: one an extension contributes has the defaults it declares, gitDecoration.* are the IDE's matching file status colours, and a few other VS Code ids have VS Code's defaults (ThemeColors). Codicon badges, editor tabs and other trees are not decorated
MainThreadSecretState HostedSecrets: context.secrets in the IDE's password safe, whatever the user chose for it -- the keychain on macOS and Linux, KeePass on Windows. One entry per secret, under a service named after the extension, and one listing its keys, since a credential store cannot be enumerated and secrets.keys() must be answered. Answered off the workbench thread, as the safe may block or ask for KeePass's master password. A change is announced to every project's host, the writer's included
MainThreadAuthentication HostedAuthentication, one per host. Providers an extension registers are recorded; $ensureProvider wakes the extensions that contribute one (onAuthenticationRequest:) and waits five seconds for it to register. $getSession follows VS Code's doGetSession: a session the extension may use -- its preferred account, or the one account of a single-account provider -- is answered silently; createIfNone and forceNewSession ask for consent in a modal, choose between accounts in another when there are several, and sign in; otherwise nothing is answered and, unless silent, a notification offers to allow an account or to sign in, which tells the extension its sessions changed once done. Which extensions may use which account, and each one's preferred account, are kept globally in authentication.json (AuthenticationAccess). $getAccounts, $removeSession and $sendDidChangeSessions are followed. A challenge is answered with its fallback scopes. Not supported: VS Code's built-in GitHub and Microsoft providers, which are not loaded into the host; an Accounts menu to sign out or revoke access; trustedExtensionAuthAccess; the host's own OAuth client for servers it discovers (MCP), which is refused
MainThreadClipboard HostedClient: env.clipboard text on the client's clipboard (CodeBridgeClientRequests), which in split mode is the user's and the backend's is not -- GitLens checks there for a link the user chose to copy. On the editor thread under any modality, so a device code is copied while a modal question shows it
MainThreadUrls HostedUrls, one per host. $createAppUri -- env.asExternalUri for the editor's own scheme -- answers a link carrying the host's token: under vscodium: itself when the client's machine hands that scheme to CodeBridge's launcher (CodeBridgeSchemeHandler registers it on Windows and Linux when nothing else has; AppLinkLauncher), since some sign-in pages -- gitkraken.dev -- offer to return only to a scheme they know; otherwise on the client's built-in web server, which in split mode the browser can reach and the backend's it cannot. The client keeps its port registered over RPC while it is connected; its CodeBridgeAppLinks passes an opened link to the backend, which calls $handleExternalUri, activating the extension (onUri) when it has no handler yet. A link without a known token goes to the client's focused project after the user allows it. Not tried against a remote backend
MainThreadStorage Persistent global/workspace mementos and storage paths, atomic state replacement and global change notifications across projects
MainThreadWindow $getInitialState; $openUri has the client open web and mail links in its browser (HostedClient, CodeBridgeClientRequests) and answers whether it did, once it did -- asking first, with Open, Copy or Cancel, for a site the user has not trusted, as VS Code does. A page naming a port on the backend's machine -- a sign-in's loopback server -- is opened by the platform instead, which forwards the port to a split-mode client and answers before the user has. $asExternalUri answers the URI it was given, as VS Code desktop does for a local host. Other schemes are not opened
MainThreadErrors Logged
MainThreadMessageService $showMessage drawn by the frontend: a balloon, with a button per item, or a dialog for a modal message. The reply is the chosen item's handle, or none when dismissed; messages wait on the backend until answered, so a late or reconnecting client still sees them. Failed status bar actions and settings an extension changed are reported the same way
MainThreadChatSkills $getTools answers [], because the host iterates the result. The handler also accepts the name MainThreadLanguageModelTools; the pinned runtime's identifier for the service is MainThreadChatSkills (see the protocol reference)
MainThreadOutputService Channels registered, tailed from the log files the host writes, and drawn in a tool window
MainThreadProgress One IntelliJ background task per handle; cancelling it cancels the extension's token
MainThreadStatusBar Items kept on the backend and drawn by one frontend status bar widget: every codicon in an item's text is drawn, in order, before its label; codicons become the IDE's own icon where there is a close match and a default icon otherwise, and an icon an extension contributes (contributes.icons, GitLens's $(gitlens-*)) is drawn from its icon font, as it is in tree views and menus (~spin is the spinner), warning/error backgrounds become the matching icon, and a click runs the item's command. Hovering shows the tooltip as VS Code does, its Markdown rendered as hovers are ($(icons) too, where the string supportThemeIcons), in a popup the mouse can move into: command links the extension trusted (rust-analyzer's restart and open logs, GitLens's Connect to GitHub) run when clicked there, and any other is just its label
MainThreadConsole $logExtensionHostMessage rendered and written to the IDE log at the severity the console method implies. console.error lands as a warning: LOG.error files an IDE error report, and an extension's failure is not the IDE's
MainThreadTelemetry $publicLog* recorded at debug by event name and dropped. Nothing reaches a network, and the properties are discarded rather than logged, because that is where extensions put paths and identifiers
MainThreadLogger Logger registrations, deregistrations and $log batches. The host's node logger service writes every file: logger itself with spdlog, so $log carries only the rest and the registration is what says which extension owns which file. An extension's own (non-hidden) log is also shown as a tab in the CodeBridge Output tool window, followed by polling its file while the tab is showing, since the host sends no $update for it
MainThreadDocuments HostedDocuments. $tryOpenDocument -- workspace.openTextDocument, and the first step of window.showTextDocument(uri) -- puts a file no editor has open into the host as a document with no editor and no tab, and answers only once the host holds it, since the host looks it up by the answer and fails the call otherwise. Opened as the language an enabled extension contributes for its name, or plaintext, and activating the extensions that language wakes. The IntelliJ document is held with it, so edits and reloads from disk reach the host as an open file's do. Released three minutes after the extension last asked, at most 50 at once, as VS Code does; opened in an editor meanwhile it gains an editor, and closing that editor withdraws only the editor while the extension still holds it. $tryCreateDocument makes an untitled:Untitled-N buffer, stood in for in IntelliJ by a LightVirtualFile -- named with an extension the language contributes, or typed by IntelliJ's own language of that id, so it is highlighted -- which showTextDocument, workspace edits and typing all reach by that URI. It is discarded when its editor closes. $trySaveDocument saves a file; an untitled buffer is saved where the user picks in a save dialog, after which the host holds the file in its place and an editor showing the buffer shows the file. Documents carry the encoding IntelliJ reads them in, as VS Code's ids (windows1252, shiftjis), and a change of it is sent with $acceptEncodingChanged. An encoding an extension asks for -- which the host asks for again even of a document it holds, when its encoding differs -- is applied as IntelliJ's own Reload in another encoding, so IntelliJ remembers it for the file; a document with unsaved changes is refused, as VS Code refuses it, and so is one whose BOM or own declaration fixes its charset
MainThreadFileSystem Local file reads/writes (binary RPC), stat, directory listing, mkdir, copy, rename and deletion. Custom providers' registrations are recorded, and their files read only to show them (MainThreadDocumentContentProviders), not served as a workspace file system
MainThreadDocumentContentProviders HostedContentProviders: the URI schemes extensions provide text for (registerTextDocumentContentProvider), and the schemes of their file system providers. A document under one -- followed from a link, a definition or vscode.open, or one side of vscode.diff -- is asked of its provider ($provideTextDocumentContent, or the provider's $readFile) and shown in a read-only editor named after the last segment of its path. Opening the same URI again asks again and shows the same editor, so a stale page is refreshed rather than duplicated
MainThreadWorkspace findFiles and $checkExists, with glob patterns, configured exclusions, relative roots, result limits and cancellation
MainThreadFileSystemEventService Native workspace and explicit watchers, recursive registration, filters, exclusions and unwatch
MainThreadTask HostedTasks. executeTask for process and shell tasks: each becomes a temporary run configuration (CodeBridgeTaskRunConfiguration with a TaskSource.Extension, which keeps our own TaskCommand rather than the DTO; reused for the same task) and runs as one, and every run, from the extension or the run widget, is reported to the host as started, with the process id, and as ended, with the exit code. A task without an execution is resolved by its type's provider first. A custom execution gets a terminal of its own, which the extension's pseudoterminal is attached to, and ends when that closes. fetchTasks lists nothing
MainThreadTerminalService HostedTerminals. A shell the user is meant to see opens as a tab of the Terminal tool window, made by the frontend (CodeBridge.terminal.frontend, loaded only with the Terminal plugin) through CodeBridgeApi.terminalRequests. It takes the extension's shell, arguments, directory and environment, or the user's own shell when none is named; sendText types into it, show brings it forward, and its shell exiting or the user closing it is reported back. There is no process id for those. Everything else is a Run tool window tab whose console is a terminal emulator (TerminalExecutionConsole): extension Pseudoterminals, whose output is drawn and which receive what is typed; hidden terminals; shells whose environment must replace or remove variables; and every shell when the Terminal plugin is absent. A new terminal is added without bringing its tool window forward, until show(). Its tab has no process handler, so the run widget's Stop does not count it as a run; a custom-execution task's does. Titles, dimensions, links, profiles, shell integration and environment collections are not modelled
MainThreadTesting HostedTesting mirrors each TestController's tree from its diffs and asks the host to discover more ($expandTest): every controller's first level, then whatever leads to a file whose gutter is drawn, that file all the way down. CodeBridge.testrunner.backend (loaded with the Test Runner plugin) draws it: Run and Debug in the gutter on the line each test starts, with how it ended last time, and a VS Code tests run configuration whose console is the IDE's test runner -- the tree, durations, output per test, failures with their stacks and an expected/actual diff, navigation, Stop, Rerun and Rerun Failed. A run uses the controller's default Run or Debug profile; one the extension starts itself, or asks for with vscode.tests.runTests, gets a tab of its own. A run ends when its tasks have and the profile's handler returned, not on the reply alone, since a host request times out after 90 seconds. Not supported: a test explorer listing tests without opening their files, profile choice and tags, continuous runs, coverage, related code, follow-ups
MainThreadNotebook, NotebookDocumentsShape, NotebookEditorsShape, NotebookKernels HostedNotebooks, in CodeBridge.notebook.backend: the notebooks open in an editor or for an extension, read and written by the extension's serializer (VS Code's built-in ipynb runs in the host for .ipynb files), mirrored into the host with each cell's text document, and run by the kernel selected for each. The frontend draws them (CodeBridge.notebook.frontend), and outlines their markdown headings and code cells in the Structure view in one process (NotebookStructure; not in split mode, see platform limitations); covered by SplitModeNotebookTest
MainThreadConfiguration Extension defaults and saved workspace settings, with live configuration notifications. update/remove for the workspace, the folder or no target edit .vscode/settings.json in place -- one key changed, comments and formatting kept -- reload before replying, and tell the user what changed. User, user-local and application writes edit the user settings file, CodeBridge's own settings.json in the IDE config directory, copied from VS Code's the first time it is needed and reloaded when it changes; keys no extension declares are refused
MainThreadCustomEditors HostedCustomEditors, drawn by CustomEditor in the optional webview module. A file one of the enabled extensions' contributes.customEditors claims by default opens in it, in place of its other editors (HIDE_OTHER_EDITORS); one claimed with \"priority\": \"option\" is offered in the Open With submenu of the editor tab menu and the Project view's, which lists the file's editors as VS Code's picker does, the text editor among them. As VS Code's editor picker, a switcher beside the tabs names the editor a tab shows, reopens it in another or as text, and writes Set Default to workbench.editorAssociations in the user settings; that setting, user and workspace, picks a file's editor, the longest matching pattern first. In a split-mode client the backend picks a project file's editors, so the client opens a tab standing for the file in its place, as for a notebook. Opening one wakes its extension (onCustomEditor:) and waits ten seconds for its provider; a text editor provider's file is held in the host for as long as an editor shows it, and a custom editor provider is asked to make its document ($createCustomDocument), shared by the file's editors. The workbench makes the page's webview, which the extension fills in $resolveCustomEditor as it fills a panel, and is told when it is on screen and when it closes. Save, undo and redo come from the page's Ctrl/Cmd+S, Z, Shift+Z and Y, undo and redo only once the page has not handled them itself and not in one of its fields: a custom document's edits ($onDidEdit) are undone by the extension ($undo, $redo), whose history, save point and unsaved changes are kept as VS Code keeps them and shown as the tab's modified mark; a text document's changes are undone as a step per command. Save All saves custom documents too, and closing a document's last editor saves its changes first. A provider without supportsMultipleEditorsPerDocument shows a file in one editor at a time

See core workbench services for the scope and validation of these additions.

Gaps in answered services

Service Gap
MainThreadConfiguration Remote user settings and settings profiles
MainThreadWorkspace Text search, save requests and proxy resolution; extensions cannot change the folders themselves (updateWorkspaceFolders)
MainThreadFileSystemEventService Recovery after native event overflow. File operations are offered to onWill*Files and reported to onDid*Files (CodeBridgeFileParticipants) only when made by an IDE command or an extension's edit, as in VS Code: files a build or git writes are not
MainThreadDocuments Only file: and untitled: resources open; any other scheme is MainThreadDocumentContentProviders' to serve. Showing an untitled buffer in a split-mode client is covered by SplitModeUntitledTest
MainThreadTextEditors Editor options, and showing or hiding an editor in a column. Snippet variables ($TM_FILENAME, $CLIPBOARD) become nothing or their default, a snippet inserted while a template runs is text rather than merged into it, and walking stops has not been tried in a split-mode client. Decorations are drawn (CodeBridgeEditorDecorations): styles as highlighters, overview-ruler marks and gutter icons, before/after text as inlays in the IDE's hint colours (see platform limitations), hover messages in Quick Documentation; margins, opacity and other CSS without an editor equivalent are not, and a split-mode client paints them, covered by SplitModeWorkbenchTest
MainThreadBulkEdits Snippet edits share MainThreadTextEditors' gaps, notebook cell edits are skipped, and there is no refactoring preview
MainThreadLogger Log level changes are not pushed back to the host
MainThreadWebviewPanels, MainThreadWebviews Panels are frontend-only editor tabs in a split-mode client, and pages use the client's own browser; covered by SplitModeViewsTest
Notebooks Untitled notebooks, cell status bar items, selections and revealed ranges, variables and kernel source actions. In cells, only completion, hover, definitions and problems: no signature help, code actions, references, formatting or snippet stops, and none of the IDE's own completion settings or documentation popup apply (see platform limitations). Outputs are text, streams, errors, images, markdown, JSON and HTML; anything else shows its plain text. HTML with scripts and SVG need the Web Browser (JCEF) plugin (CodeBridge.notebook.webview.frontend), and each output is a page of its own, so an output that relies on a script another output loaded -- Bokeh after output_notebook(), Plotly's notebook_connected renderer -- is not drawn. In a split-mode client the notebook is a frontend-only tab standing for its file; see platform limitations
MainThreadCustomEditors Save As, hot-exit backups ($backup), revert, untitled documents, diff editors and moving an editor (moveCustomTextEditor); a custom document's unsaved changes go with an extension host that stops.

Not answered

Service What it provides
MainThreadExtensionService Activation bookkeeping and inter-extension dependency activation. Only the activation timings and failures the host reports are read: both are logged. As in VS Code's release build, a failure is marked on the VS Code Extensions page with its reason, and notified only when a dependency is missing
MainThreadComments Inline comment threads
MainThreadTerminalShellIntegration Commands and their output, as shell integration reports them
MainThreadSCM Source control providers
MainThreadSearch Search participation
NotebookRenderers Notebook renderers, which draw outputs in a webview
MainThreadTimeline, MainThreadQuickDiff, MainThreadDocumentDiff Timeline and diff integration
MainThreadInteractive Interactive windows
MainThreadLanguages Language configuration and setTextDocumentLanguage
MainThreadEditorInsets, MainThreadEditorTabs Inset widgets, and acting on tabs. The tab model is sent -- see below -- so extensions can read window.tabGroups; closing or moving a tab is not supported

Environment and platform services: MainThreadUriOpeners, MainThreadTunnelService, MainThreadManagedSockets, MainThreadBrowserTunnelProxy, MainThreadTheming, MainThreadLabelService, MainThreadPower, MainThreadDownloadService, MainThreadShare, MainThreadLocalizationShape, MainThreadProfileContentHandlers, MainThreadMeteredConnection, MainThreadDataChannels, MainThreadBrowsers, MainThreadSpeechProvider, MainThreadGitExtension.

Chat and AI services, tied to VS Code's own assistant: MainThreadLanguageModels, MainThreadEmbeddings, MainThreadChatAgents2, MainThreadCodeMapper, MainThreadAiRelatedInformation, MainThreadAiEmbeddingVector, MainThreadAiSettingsSearch, MainThreadChatStatus, MainThreadChatQuota, MainThreadChatInputNotification, MainThreadChatSessions, MainThreadChatOutputRenderer, MainThreadChatContext, MainThreadChatDebug, MainThreadAgentEditorComments, MainThreadMcpShape. ChatSkills' $getTools is answered with [] only because the host iterates the result and raises TypeError: n is not iterable otherwise.

The other direction: language features

Answering MainThreadLanguageFeatures records that an extension has a provider. Drawing it means calling back with $provide* and translating the result into an IntelliJ feature -- a separate piece of work per feature, and the reason this is not a single number.

The runtime exposes 78 $register*Provider methods, 65 once chat and AI are set aside. Twenty-eight are drawn -- semantic tokens and formatting each count two, whole-document and range -- and diagnostics arrive without one:

Feature State
Diagnostics Drawn. Pushed, not requested, so no provider call is involved
Hover Drawn by CodeBridgeHoverTargetProvider as Quick Documentation. The markdown is rendered as GitHub-flavoured HTML (HoverMarkdown), fenced code highlighted in the language the fence names where the IDE or an installed extension knows it. A command: link the extension marked as trusted runs its command when clicked (CodeBridgeHoverLinkHandler)
EvaluatableExpression What a debugger hover evaluates while paused: where a provider claims the file it alone decides, as in VS Code; otherwise the platform's DAP client guesses the expression
Definition Drawn by CodeBridgeSymbolReferenceProvider as Go To Declaration. The reference carries its own source range, so it works in a file whose PSI is a single plain-text leaf; every provider is asked and the union offered
TypeDefinition Drawn as Go To Type Declaration by CodeBridgeSymbolTypeProvider, from the symbols Go To Declaration resolves, so only where a definition is also known. Asked once at the caret however many definitions there are
Implementation Drawn as Go To Implementation, as the platform's own LSP client draws it: while that action runs, CodeBridgeImplementationDeclarationSearcher offers the word at the caret as declared there, and CodeBridgeImplementationSearch answers definitionsScopedSearch for it. Not keyed by language, and only during that action, so Go To Declaration never finds the caret itself. With no answer it says "No implementations found"
Reference Drawn as Find Usages of a symbol Go To Declaration resolves: CodeBridgeSymbolSearchTargetFactory offers a search target where the definition was asked from, and CodeBridgeReferenceSearcher asks every claiming provider with includeDeclaration and joins the answers. Files outside the project, such as a dependency's sources, count as library files for the search scope. A symbol the definition provider has no answer for has no target
DocumentHighlight Drawn by CodeBridgeHighlightUsagesHandlerFactory as read and write usages under the caret
Completion Drawn by CodeBridgeCompletionContributor, in VS Code's order (sortText, then label). A snippet with tab stops is inserted as a live template, so Tab walks its stops, choices offered, and ends on $0, a caret on each when it is written more than once; one without stops is inserted as text with a caret where each $0 was, as VS Code puts a cursor on every one (rust-analyzer's pd, eprintln!("$0 = {:?}", $0);). An item's command runs once it is inserted. A breakpoint condition completes as the code where the breakpoint stops does, or from the paused debugger. The selected item's documentation (CodeBridgeCompletionDocumentation) shows its detail as code, then its documentation, asking the provider to resolve the item first ($resolveCompletionItem) when it resolves items, as rust-analyzer does for all of them. Its list is held for that until the provider answers another lookup, or for a minute, since the backend is not told when a split-mode lookup closes. Covered in a split-mode client by SplitModeExtensionTest. Snippets extensions contribute (contributes.snippets) are offered beside the rest by CodeBridgeSnippetCompletion, in any file whose VS Code language id they are for, with or without a running host: matched by prefix, ranked by editor.snippetSuggestions, and inserted the same way, their variables ($TM_FILENAME_BASE, $CLIPBOARD, the date) filled in and transformed. In a TextMate file, TextMate's own copy of each is left out of the list. There is no Insert Snippet picker, and a transform on a tab stop is dropped
SignatureHelp Drawn by CodeBridgeSignatureHelpHandler as Parameter Info, in a file whose language has no Parameter Info of its own. It opens when a trigger character the provider names is typed (CodeBridgeSignatureHelpTypedHandler) or on Parameter Info's own shortcut, and asks again on the provider's retrigger characters and as the caret moves, closing when the provider answers with nothing. Providers are asked in turn and the first with a signature is shown. The active parameter is bold, with its documentation beneath; the signature's own documentation is left out
SemanticTokens Drawn by CodeBridgeSemanticHighlights as range highlighters on the document, not by an annotator, so an answer is on screen without restarting the daemon (which waits for the auto-reparse delay and then runs every pass). Whole-document with a range fallback, asked only of providers whose selector claims the file. The reply is binary rather than JSON, and its coordinates are 0-based -- the only payload here that is either. Requested when a document opens, 20ms after an edit, or when a provider announces a change, never from a highlighting pass. Held tokens and the drawn highlighters move with each edit until the next answer. Deltas are requested against the previous answer, whose result id is held until it is replaced or the document closes
CodeAction Drawn as intentions. Intentions are registered by class, so twenty slots (CodeBridgeCodeAction0..19) each take the action at their index in the answer for the caret or selection, which is asked for once per position and released when replaced. Preferred fixes rank first. Disabled actions are hidden. An action with no edit is resolved when chosen; its edit is applied first and its command run afterwards, without waiting, since the command usually calls back with workspace.applyEdit. No preview is offered, since producing one would run the extension
DocumentFormatting, RangeFormatting Drawn by CodeBridgeFormattingService as Reformat Code, for selections too. The only provider whose document selector is read: offering to format a file takes it from the IDE's own formatter. It waits for the host to hold the text being formatted, since edits are offsets into the host's copy. A whole-document formatter asked about a selection has its edits outside the selection dropped. The platform suppresses asynchronous formatters for untrusted files
Rename Drawn by CodeBridgeRenamerFactory as Rename, from an editor, in a file a rename provider claims. As VS Code does, the providers that implement prepareRename are asked in turn what is to be renamed until one names it; a refusal with no location named is shown at the caret instead of a rename, and without one the word at the caret stands in. The new name is typed in place over a template, as IntelliJ's own rename is, with the occurrences the document highlight provider names in the file following along. Finishing the template puts the typing back and asks the providers for the edit, from the one that named the location on, passing over those that refuse; Escape or leaving the template only puts it back. The edit goes through CodeBridgeWorkspaceEdits, as a code action's does, so it is refused if the text changed meanwhile, and the whole rename -- typing included -- is one undo. A name the extension gives as text other than what the document holds there, or a read-only document, is asked for in a dialog instead. Where the IDE has a rename of its own at the caret the platform offers both
InlayHints Drawn by CodeBridgeInlayHintsProvider as declarative inlay hints, which reach a split-mode frontend and are switched off from the IDE's own settings, per kind (types, parameter names, other). Offered for every language through a provider factory, and collected only for files a provider's selector claims. Every claiming provider is asked about the whole document at once, as VS Code asks every provider, and the answers are joined. A list is released as soon as it is read, unless its hints carry a command or its provider resolves hints: the host deletes a command along with its list, and resolves a hint from it, so that one is kept until its hints are replaced or their file closes. An answer that differs from what is drawn only in those ids keeps the drawn hints and their list, and costs no redraw. Asked for when a document opens, 100ms after an edit, or when a provider announces a change -- never from the highlighting pass, which only reads what is held. Held hints move with each edit until the next answer, and an answer that changes them restarts highlighting for the file, with the inlay pass told to collect again, since an answer changes no PSI. A label split into parts is drawn as one text. Tooltips are shown as plain text. Ctrl+clicking a label part (CodeBridgeInlayHintClickHandler) opens the place it leads to, or runs its command when it leads nowhere -- Ctrl, because that is the click the platform hands an inlay, as Ctrl+click on a hint goes to its place in VS Code too; a plain click runs nothing. A part of a split label from a provider that resolves hints is clickable before anything says where it leads: VS Code's client lets a server leave a part's place, command and tooltip out until inlayHint/resolve, and rust-analyzer does, so its parts carry nothing until then. VS Code resolves on hover, which the backend does not hear about, so the click resolves the hint ($resolveInlayHint) and then does what the part does; one that turns out to lead nowhere does nothing. Tooltips are not resolved
CodeLens Drawn by CodeBridgeCodeLensProvider as code vision above the line a lens starts on, and switched off from the IDE's own Code Vision settings. Code vision rather than declarative inlays above the line, because an inlay's handler only hears a Ctrl+click and a lens is clicked plainly; it is also what IntelliJ's own LSP client draws lenses as, and it reaches a split-mode frontend. Every claiming provider is asked at once and the answers are joined, several lenses on one line drawn side by side, up to eight. Each is drawn by one of a fixed set of code vision providers, the nth lens on a line by the nth, chained after one another: a split-mode frontend stands in for a backend provider with one that draws a single entry per line, whatever the provider says. A lens offered without a command is resolved ($resolveCodeLens) straight away: VS Code resolves the lenses scrolled into view, which the backend does not hear about. One that still has no command is not drawn; one whose command names no command is drawn as text that does nothing. $(icon) in a title is left out. Clicking a lens runs its command. Every list with a lens shown is kept, since the host deletes a lens's command with its list, and released once its lenses are replaced or their file closes; an answer that reads the same as what is drawn goes back instead, and costs no redraw. Asked for when a document opens, 250ms after an edit, or when a provider announces a change; held lenses move with each edit until the next answer, and one whose first line was edited away is dropped
NavigateType Drawn by CodeBridgeWorkspaceClassContributor and CodeBridgeWorkspaceSymbolsContributor as Go to Class and Go to Symbol. VS Code has one search, Go to Symbol in Workspace; its answer is split by kind, Go to Class taking Class, Enum, Interface and Struct and Go to Symbol taking everything, and Search Everywhere shows a symbol both offer once. What the user typed is the query, asked of every provider at once and joined; the platform asks for names and then for each name's symbols, and one query answers all of it, so a server is asked once per pattern. A new pattern cancels the previous query at the host. An empty pattern asks nothing. Symbols outside the project count as library files, as for references. A list is released once read, unless its provider resolves symbols: then it is held until the next query, and a chosen symbol is resolved ($resolveWorkspaceSymbol) before it is opened, as VS Code does, since a language client gives a symbol its server listed without a range the start of the file
DocumentSymbol Drawn from one outline, the first claiming provider's to answer with anything, asked for when a document opens or a provider appears, and otherwise by what draws it, for the text as it stands (as IntelliJ's LSP client asks): breadcrumbs and sticky lines (CodeBridgeBreadcrumbsCollector), and the Structure view and File Structure popup (CodeBridgeStructureViewBuilderProvider) -- the symbols nested, with their detail and kind's icon, sortable by name, following the caret and going to a symbol's name. Both answer only for a file whose language has no structure of its own; the structure provider is registered without a file type, which the platform asks once nothing for the type answers, and a split-mode client asks the backend for it. A file no editor has open has no outline yet
FoldingRange Drawn by CodeBridgeFoldingBuilder as the editor's fold regions, for a file whose language folds nothing itself -- registered for every language, as IntelliJ's own LSP client registers its folding. Every claiming provider is asked at once and the answers joined, as VS Code's folding model joins them: a range that crosses one already taken is left out, and past 5,000 (VS Code's default editor.foldingMaximumRegions) the rest are. A range keeps its first line shown and folds from the end of it to the end of its last line, drawn as .... Ranges of the imports kind start folded when the IDE's Collapse imports setting says so, and region ranges when its custom folding regions setting does -- in a newly opened file whose answer is already held, since the IDE applies those only on the first folding pass. Asked for when a document opens, 250ms after an edit, or when a provider announces a change under its event handle; an answer of nothing on open is asked about once more. Held ranges move with each edit until the next answer, and an answer that changes them has the file's editors fold afresh, since the folding pass keeps its regions until the PSI changes and an answer changes none
CallHierarchy Drawn as Navigate > Call Hierarchy by CodeBridgeCallHierarchyProvider, registered for every language and last, as the platform's own LSP client registers its own, so a language the IDE knows keeps its own hierarchy. It is offered wherever a provider claims the file, and asks nothing until the tree is built: then $prepareCallHierarchy at the caret, the first provider to name something answering, and the first item it names is the visible root, as in VS Code. Callers (shown first, as in VS Code) are $provideCallHierarchyIncomingCalls and lead to the first call, with the number of calls when there are more than one; callees are $provideCallHierarchyOutgoingCalls and lead to the callee. Nodes are in the extension's order unless sorted alphabetically, with their detail and kind's icon, struck through when deprecated; Base on This prepares afresh at the node. There is no scope: the extension searches where it searches. The host sessions a browser prepared are released ($releaseCallHierarchy) when it closes. Not tried in a split-mode client
TypeHierarchy Drawn as Navigate > Type Hierarchy by CodeBridgeTypeHierarchyProvider, as call hierarchies are: $prepareTypeHierarchy, then $provideTypeHierarchySupertypes and $provideTypeHierarchySubtypes, subtypes shown first as in VS Code, released with $releaseTypeHierarchy. Only the supertype and subtype views: VS Code has no whole class hierarchy. Not tried in a split-mode client
SelectionRange Drawn by CodeBridgeSelectionRangeHandler as Extend Selection, beside the IDE's own word and line ranges: the smallest range around the selection wins, whichever offered it. Every claiming provider is asked about the caret and the chains joined, as VS Code joins them. Only the leaf at the caret is claimed, so a press asks once rather than once for each element the platform climbs through. Covered in a split-mode client by SplitModeLanguageFeaturesTest
DocumentLink Followed with Ctrl+click and underlined while Ctrl is held over one (CodeBridgeDocumentLinkReferenceProvider, an implicit reference ahead of definitions, as the platform's own LSP client offers links), with the link's tooltip, or where it leads, as the hint. Asked for by Ctrl+hover and Ctrl+click for the text as it stands, rather than as the document changes, and held until the text does; a resolving provider's list is released when its links are replaced or their file closes. Following a link runs its command:, or opens it as vscode.open does -- a file at the line its fragment names, a web page in the browser, a document an extension provides -- resolving it first ($resolveDocumentLink) when the provider left that until it is followed, as VS Code does. Links are not drawn until Ctrl is held: VS Code underlines them only then too. Covered in a split-mode client by SplitModeLanguageFeaturesTest
OnTypeFormatting Drawn by CodeBridgeOnTypeFormattingTypedHandler and, for Enter ("\n"), CodeBridgeOnTypeFormattingEnterHandler, with editor.formatOnType on for the file's language -- off by default, as in VS Code, and declared in the settings files so it completes there. As VS Code picks the formatter, only the first provider that claims the file is asked, and only about its own trigger characters. Asked off the editor thread once the host holds the keystroke, and applied as an edit of its own, which Undo takes back before the typing; dropped if the document changed meanwhile, as VS Code drops it. Covered in a split-mode client by SplitModeLanguageFeaturesTest
LinkedEditingRange Drawn by CodeBridgeLinkedEditing, with editor.linkedEditing on for the file's language -- off by default, as in VS Code. Asked as the caret settles in an editor, the first provider with an answer deciding, and held as range markers that grow with typing at their edges. An edit inside one range is copied to the others, changing only what differs, before the command that made it finishes, so it is undone with the typing. An edit outside the ranges, or text the provider's word pattern does not match, ends the session until the caret settles again. The ranges are painted in VS Code's default editor.linkedEditingBackground while they are edited together, as highlighters on the document, which a split-mode client draws too. Covered in a split-mode client by SplitModeLanguageFeaturesTest
DocumentColor Drawn by CodeBridgeDocumentColors as VS Code's swatch -- a bordered box in the colour, before its text -- through CodeBridgeEditorDecorations as a decoration type of CodeBridge's own, which is how a split-mode client paints it in that colour (see platform limitations). Every claiming provider is asked and the answers joined. Asked for when a document opens, 250ms after an edit, or when a provider appears or goes; an answer is drawn only if the text is still what was asked about. Clicking a swatch, which shows the hand cursor, opens IntelliJ's colour picker where it is painted, the frontend; each colour chosen is written as the first way the extension offers ($provideColorPresentations), as VS Code's picker writes it -- asked for afresh against the text as it stands, since the previous pick replaced it -- and the picks one drag makes are one undo step. Covered in a split-mode client by SplitModeLanguageFeaturesTest
InlineCompletions Drawn by CodeBridgeInlineCompletionProvider as the IDE's own ghost text, accepted with Tab and cycled between as its own suggestions are; a split-mode client asks the backend's provider itself. Every claiming provider is asked at once, after the debounce the extension named or VS Code's 50ms, and with editor.inlineSuggest.enabled not off. An item shows only what it adds after the caret: the text before the caret in its range must start it, and the text after must be kept in it, in order -- typed over, as the bracket an editor closed -- otherwise it is not offered. A snippet is shown as its plain text. An accepted item's command runs once its text has arrived, and the host's list is freed when the suggestion is hidden. A bracket the editor closes after a typed one ends the session the typed one started, so the provider is asked again once it is in -- as its own call, the only kind a split-mode backend passes to the client, which starts every session there; covered by SplitModeInlineCompletionTest. The proposed API's shown, partial-accept and rejection callbacks are not made
Declaration, InlineValues, PasteEdit, DocumentOnDropEdit, MultiDocumentHighlight, NewSymbolNames Not drawn

Two things that constrain all of it

Results arrive in VS Code's editor shapes, not LSP's: 1-based startLineNumber and startColumn, MarkdownString with &nbsp;-escaped plaintext, revived URIs. Each feature needs its own translation, and the wire shapes are internal and undocumented -- read off the bundle, like the rpcIds. Semantic tokens are the exception that proves it: the workbench passes that payload through untouched, so it arrives in LSP's own 0-based, delta-encoded form, packed into a VSBuffer.

Editors and tabs are workbench state, not a feature. The host is told which documents are open, which editors show them (addedEditors, newActiveEditor) and what the tab model looks like (ExtHostEditorTabs.$acceptEditorTabModel). None of that draws anything by itself, and all of it is load-bearing: extensions ask what is visible, not what is open. A language client's pull-diagnostics feature builds its set of resources from window.tabGroups and checks it before requesting textDocument/diagnostic, so with no tab model it answers every workspace/diagnostic/refresh the server sends and pulls nothing. A server whose live analysis is pull-based -- rust-analyzer's is -- then appears to produce no diagnostics at all while typing, and only the results it pushes of its own accord (cargo check, on save) ever arrive. Reporting editors is not sufficient on its own; that feature reads tabs.

Diagnostics are filed by collection, not just by resource. $changeMany names an owner, and one extension routinely keeps several -- a client that both receives pushed diagnostics and pulls them has two, reporting about the same file independently. A push replaces what that owner said before, never what another owner said, so merging them is what stops a clean cargo check erasing live analysis the moment it lands.

IntelliJ's own problems go the other way. An extension that presents diagnostics rather than producing them -- Error Lens -- reads languages.getDiagnostics, and in a Java file no extension reports anything. CodeBridgeIdeProblems sends what the daemon found, weak warnings and up, for each file the host has in an editor, after every finished pass, over ExtHostDiagnostics.$acceptMarkersChange: the host files it in a mirror collection with no way back, so nothing returns on $changeMany. Problems CodeBridgeDiagnosticsAnnotator drew are left out, since the extension that pushed them has them already. A file's problems are withdrawn when its editor closes.

Ids are extracted from the running bundle, so a runtime upgrade does not silently misroute calls. It can still remove or rename a service, which would surface as a missing entry rather than a wrong one.