Expand description
In-app scratch scripts. Source is saved only on request and never on a model.
Structs§
Constants§
- WINDOW_
ID - The window’s egui id — one name for the panel, the tests and the host.
Statics§
- HIT_
KEYS - The hit keys this window publishes under
__brepJavascriptHit(seeautomation::hit_keys);panel:clipis the key every scrolling pane publishes for its visible region, soclick_widgetcan wheel a row into view.
Traits§
- Script
Host - Where Run sends a program when the app has a script runner: the app’s
own server’s code mode (
crate::mcp::EditorHost), the same realm, limits and generatedbrep.<group>.<tool>functions an agent’srun_scriptgets. Without one (the web build, a bare test harness) Run uses the plugin runner’s editor action.
Functions§
- program
- An editor script as a program for the
ScriptHost. A module (a line startingimportorexport) runs as written. Anything else is a classic editor body: it runs withcad.document(the history snapshot withaddFeature(type, params, persistentData),updateFeature(id, params)(a merge, asfeature_set_paramsmerges) anddeleteFeature(id)),cad.selection,cad.brep(every app tool) andui.notify; the document commands apply in order after it returns, and a returned value prints asResult:. The body mayawait.