Make the “Explore in IDE” launch target configurable instead of hard-coding
MdONeil Resident
### Problem
When the user activates
Explore in IDE
(or any other tight-integration launch path), the viewer always constructs and opens this URI:vscode://lindenlab.sl-vscode-plugin/connect?port=…[&object=…][&script=…]
This is hard-coded in:
- indra/newview/llscripteditorws.cpp
-
LLScriptEditorWSServer::buildVSCodeURI()
-
LLScriptEditorWSServer::launchVSCode()
There is currently no way for a user (or another external editor) to change which application is launched. Every time the modern WebSocket path is started via the UI, VS Code is forced to open even if the user is using a different editor that already implements the JSON-RPC protocol documented in
doc/external-editor-json-rpc.md
.This is especially annoying for developers who keep another compliant editor running and only want the viewer’s WebSocket server to start / publish an object.
### Proposed change
- Rename the preference checkbox
Current label contains “VS Code”. Change it to something neutral, e.g.
“Code Tight Integration”
(or “Tight Editor Integration”).- Add an optional text fieldunder the same “Script Development” section, visible when tight integration is enabled:
- Setting name suggestion:
ExternalWebsocketSyncLaunchURI
(or ExternalEditorLaunchURI
)- Default value:
vscode://lindenlab.sl-vscode-plugin/connect
- The field should accept any URI scheme that the OS can open (or a full executable path + arguments if that is preferred).
- The viewer should append the existing query parameters (
?port=…
, &object=…
, &script=…
) to whatever base the user supplies, exactly as buildVSCodeURI
does today.- Update the launch path
Replace the hard-coded string in
buildVSCodeURI()
/ launchVSCode()
with a read of the new setting. Keep the current default so existing VS Code users are unaffected.
- Documentation
Update the “VS Code Launch URI” section in
doc/external-editor-json-rpc.md
to describe the configurable base URI and the parameters that are still appended by the viewer.### Benefits
- Any external editor that understands the documented JSON-RPC protocol can be launched directly from “Explore in IDE”.
- Users who already have their preferred editor running can leave the field empty or point it at a no-op / custom handler so that only the WebSocket server is started.
- The official VS Code plugin remains the zero-configuration default.
- Removes the product-name-specific wording from the preferences UI.
### Related code / history
- Introduced in the tight-integration work (see PR #5834 and the VS Code launch helpers added in llscripteditorws.cpp).
- Settings already present:
ExternalWebsocketSyncEnable
, ExternalWebsocketSyncTightIntegration
, ExternalWebsocketSyncPort
.Log In
MdONeil Resident
That pretty mush copy-paste ready for the viewer GitHub issue section; I'm only following protocol to post here first. You are going to get this requested often in the future anyway.