Never use simple browser on desktop (#303312)

* Never use simple browser on desktop

* Update extensions/simple-browser/package.nls.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kyle Cutler
2026-03-19 14:56:56 -07:00
committed by GitHub
parent caef4ed7e4
commit b4018e320b
3 changed files with 9 additions and 15 deletions

View File

@@ -42,6 +42,14 @@
"category": "Simple Browser"
}
],
"menus": {
"commandPalette": [
{
"command": "simpleBrowser.show",
"when": "isWeb"
}
]
},
"configuration": [
{
"title": "Simple Browser",
@@ -51,12 +59,6 @@
"default": true,
"title": "Focus Lock Indicator Enabled",
"description": "%configuration.focusLockIndicator.enabled.description%"
},
"simpleBrowser.useIntegratedBrowser": {
"type": "boolean",
"default": true,
"markdownDescription": "%configuration.useIntegratedBrowser.description%",
"scope": "application"
}
}
}

View File

@@ -1,6 +1,5 @@
{
"displayName": "Simple Browser",
"description": "A very basic built-in webview for displaying web content.",
"configuration.focusLockIndicator.enabled.description": "Enable/disable the floating indicator that shows when focused in the simple browser.",
"configuration.useIntegratedBrowser.description": "When enabled, the `simpleBrowser.show` command will open URLs in the integrated browser instead of the Simple Browser webview. **Note:** This setting is only available on desktop."
"configuration.focusLockIndicator.enabled.description": "Enable/disable the floating indicator that shows when focused in the simple browser."
}

View File

@@ -15,7 +15,6 @@ declare class URL {
const openApiCommand = 'simpleBrowser.api.open';
const showCommand = 'simpleBrowser.show';
const integratedBrowserCommand = 'workbench.action.browser.open';
const useIntegratedBrowserSetting = 'simpleBrowser.useIntegratedBrowser';
const enabledHosts = new Set<string>([
'localhost',
@@ -37,12 +36,6 @@ const openerId = 'simpleBrowser.open';
* Checks if the integrated browser should be used instead of the simple browser
*/
async function shouldUseIntegratedBrowser(): Promise<boolean> {
const config = vscode.workspace.getConfiguration();
if (!config.get<boolean>(useIntegratedBrowserSetting, true)) {
return false;
}
// Verify that the integrated browser command is available
const commands = await vscode.commands.getCommands(true);
return commands.includes(integratedBrowserCommand);
}