diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-08-25 16:15:18 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-08-25 16:15:18 -0700 |
| commit | 7f880d4edda3291cdff27a2033efe3ad1cbfb835 (patch) | |
| tree | be61292fabf966cd30fd1d4939e15019b1320d27 | |
| parent | f9bed5815c77a500c7b5006368e750f1d4c0af43 (diff) | |
Issue #6184: Include the script id when it can be determined. Mark it as optional in the doc.
| -rw-r--r-- | doc/external-editor-json-rpc.md | 9 | ||||
| -rw-r--r-- | indra/newview/llscripteditorws.cpp | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/external-editor-json-rpc.md b/doc/external-editor-json-rpc.md index 8b69c80fff..f2bebd0f48 100644 --- a/doc/external-editor-json-rpc.md +++ b/doc/external-editor-json-rpc.md @@ -779,7 +779,7 @@ Debug message notification sent by the viewer during script execution. ```typescript interface RuntimeDebug { - script_id: string; // Not currently sent — see note below + script_id?: string; // Present when the viewer can resolve a script subscription id object_id: string; prim_id: string; item_id: string; @@ -809,7 +809,7 @@ Runtime error notification sent by the viewer when a script encounters an error ```typescript interface RuntimeError { - script_id: string; // Not currently sent — see note below + script_id?: string; // Present when the viewer can resolve a script subscription id object_id: string; prim_id: string; item_id: string; @@ -852,8 +852,9 @@ interface ItemRef { - `name`: Script name as it appears in the prim's inventory. - `language`: The script's source language. Independent of the compile target; the VM is not carried in runtime messages. -**Note on `script_id`:** this field is part of the contract but is **not currently sent** by the -viewer for either `runtime.debug` or `runtime.error`. Implementation is tracked separately. +**Note on `script_id`:** this field is optional. It is included when the viewer can resolve the +originating script inventory item and construct a subscription id from `prim_id` + `item_id`. +When that resolution is not possible, the field is omitted. **Delivery:** `runtime.debug` and `runtime.error` are broadcast to all connections. An event is emitted when the originating object is published or its script is subscribed. diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index 01f0e60a49..9d309af912 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -2082,6 +2082,10 @@ void LLScriptEditorWSServer::sendRuntimeEvent( } LLSD message; + if (!script_id.empty()) + { + message["script_id"] = script_id; + } message["object_id"] = event.mRootID; message["prim_id"] = event.mPrimID; message["item_id"] = event.mItemID; |
