Support for sub-agents#8574
Conversation
The output of each EditorFunction is concatenated into the orchestrator's
"run_edit_agent" output, so every extra word is paid for twice. Tighten
the wording across success/failure messages and warnings, and rework the
property-listing helper used by `create_or_replace_object` and
`add_behavior` to drop redundant tags and collapse empty properties.
Highlights:
- New `formatPropertiesList` helper: omits `(boolean)` (the value implies
it), groups empty-valued properties at the end of the listing
("Empty: font (resource)"), and abbreviates known measurement units to
their short symbol when shorter ("Pixel" -> "px", "DegreeAngle" ->
"deg") via a new `getShortMeasurementUnit`.
- `add_or_edit_variable` now reports the new value, truncated to 200
chars with a "[...truncated - N more characters]" tag.
- Tightened phrasing in `makeMultipleChangesOutput`, `verifyPropertyChange`
and most launcher messages (no more "Successfully done the changes.",
"It was ignored and not changed.", verbose object-not-found messages,
etc.).
- Updated affected inline snapshots and added focused tests for the new
variable truncation and property-listing format.
…ray tests The orchestrator agent does not see the function call's arguments, so "Added variable X" alone does not tell it which X (global? scene? on which object?). Encode the scope inline: Added global variable "score" (Number) = 42 Added scene "TestScene" variable "lives" (Number) = 3 Added scene "TestScene" object "Player" variable "health" (Number) = 100 Added global object "GlobalEnemy" variable "speed" (Number) = 50 Also add tests for nested structure and array paths (and an array inside a structure / structure inside an array), plus a JSON-object value that produces a Structure variable.
…tance message The orchestrator agent cannot see the function call's arguments, so the existing "Created N new instance(s) of object X using <brush> brush at X,Y on layer Z." line had to grow when explicit attributes were set. Append the explicitly-specified attributes between parentheses (only when provided), e.g.: Created 2 new instances of object "Player" using point brush at 50, 60 on layer "base" (size 64x64, rotation 45°, opacity 128, z-order 5). For the 3D variant: size and rotation (3-component) are surfaced.
- create_or_replace_object: encode the final scope (scene "X" vs global)
in the create-from-scratch / create-from-asset-store / replace
messages so the orchestrator can tell where the object actually
landed without seeing the call args.
- change_object_property (rename branch): add a regression test
proving that when the requested name "Foo" collides, the message
correctly reports the FINAL name "Foo2" (not "Foo"). The launch
path already used `newName`; this test locks the behavior in.
- change_scene_properties_layers_effects_groups: echo the new final
values on every per-property line ("Set scene background color to
#ff0080.", "Set game resolution width to 1920.", ...) so the
orchestrator can verify what was applied.
Existing snapshots updated where the scope text changed (replace
path).
… and null when unknown
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f664d7f291
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (partialAiRequest.status !== 'working') { | ||
| // Status changed — do a full fetch immediately. | ||
| subAgentLastFullFetchTimeRef.current[subAgentId] = now; | ||
| const aiRequest = await retryIfFailed({ times: 2 }, () => |
There was a problem hiding this comment.
Avoid full-fetching finished sub-agents every poll tick
In the partial-poll path, any status other than working triggers an immediate full fetch on every interval tick. If the sub-agent is already ready/error but the parent has not yet received the matching function_call_output, removeSubAgentIfDone keeps it active and this code repeatedly does full requests (about every 1.4s), which can continue indefinitely and create unnecessary API load.
Useful? React with 👍 / 👎.
No description provided.