Support `CustomEditorInput` and correct `viewColumn` in Tabs API (`vscode.window.tabGroups`)
#17,793 opened on Jul 17, 2026
Repository metrics
- Stars
- (18,676 stars)
- PR merge metrics
- (Avg merge 15d 4h) (75 merged PRs in 30d)
Description
Feature Description:
The TabsMainImpl implementation of the VS Code Tabs API (packages/plugin-ext/src/main/browser/tabs/tabs-main.ts) currently has two gaps compared to the upstream VS Code API:
-
viewColumnis hard-coded to0.createTabGroupDto()always returnsviewColumn: 0for every tab group, regardless of which editor column/tab bar it belongs to. This breaks any extension that relies ontabGroup.viewColumnto distinguish between multiple open editor groups (e.g. split editors). -
Custom editors are reported as
UnknownInput.evaluateTabDtoInput()does not recognizeCustomEditorWidget(used for webview-based custom editors registered viavscode.window.registerCustomEditorProvider). As a result,vscode.Tab.inputfor such tabs resolves toundefinedinstead of aTabInputCustominstance, making it impossible for extensions to identify custom editor tabs through the Tabs API.
Proposed change
- Compute
viewColumnfrom the position of the tab'sTabBarwithinapplicationShell.mainAreaTabBarsinstead of hard-coding0. - In
evaluateTabDtoInput(), add a branch that detectswidget instanceof CustomEditorWidgetand returns aTabInputKind.CustomEditorInputDTO with the widget'sviewTypeandresourceURI, mirroring howTextInput,NotebookInput, and other kinds are already handled.
Additional context
This aligns Theia's Tabs API implementation more closely with VS Code's behavior, where Tab.input for a custom editor tab is a TabInputCustom object exposing viewType and uri, and TabGroup.viewColumn reflects the actual editor column.
I'd be happy to contribute a PR.