Repository navigation
add_component!: the keyword code, the constructor call for export_script - #18
Merged
Merged
Conversation
…cript An object built in code (by a script, a tool or an agent) can now be added with its constructor call: `add_component!(gui, obj; code = "...")` records it with the pose of `obj` when it is added, as the catalog does with its `origin`. export_script then writes the call and the moves since it was added instead of a comment "construct it here"; export_changes lists it with its constructor as well. Also for sources. The page "Edit" and copying stay for parts of the catalog, whose entry and parameters are known. - tests: "objects added with their code" in TestLiveExportScript.jl - skill files updated: API.md; AGENTS.md: gap of P1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Conflict in test/TestLiveExportScript.jl: both sides added a testset at
the same place ("objects added with their code" here, "labels that the
script takes otherwise" on main). Both are kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xport - `code` that is empty, does not parse or has several statements throws an ArgumentError and nothing is added: export_script writes it as `name = code`, so the script would not run. - The docstring says that `code` must run on its own in the script (no variables of the session) and that an object moved before it was added with `code` is exported in a wrong pose, which is not checked. - The docs page "Adding and removing components", the limits in the skill and the docstrings of export_script and export_changes name the objects added with `code` besides those of the catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An object built in code (by a script, a tool or an agent) can now be added with its constructor call:
add_component!(gui, obj; code = "...")records it with the pose ofobjwhen it is added, as the catalog does with itsorigin. export_script then writes the call and the moves since it was added instead of a comment "construct it here"; export_changes lists it with its constructor as well. Also for sources.The page "Edit" and copying stay for parts of the catalog, whose entry and parameters are known.