Merge dev to main for v0.5.12 - #34
Merged
Merged
Conversation
Add a make_3d_model tool that builds a model out of parts (box, sphere, cylinder, cone, torus, plane, lathe, extrude, or a raw mesh), each with a position, rotation, scale, colour, and PBR material, and saves it as a binary glTF (.glb) written in pure Python. The result reports the model's overall size and flags one that floats off the ground; a model with vision also gets a headless render of it, drawn by the same viewer the user sees. send_3d_model shows an existing .glb, .stl, or .obj. In the web UI, models open in the side panel in a three.js viewer with orbit controls, studio lighting, soft shadows, a grid, and buttons to reset the view, stop the spin, and toggle wireframe. three.js 0.186.1 ships with Flash under flash/web/three, like KaTeX, and loads only the first time a model is opened. In the terminal, models open in the system's default 3D viewer.
The agent had no way to make letters, so asked for the Minecraft logo it stood a plain box in for each one. Add a text shape: words in a blocky 5x7 pixel font (A-Z, 0-9, common punctuation, lines split by \n), one block per pixel with the faces between touching blocks left out, sized by the height of a capital. The tool's description now says to use it for any logo, sign or title, never a box per letter, and to colour parts like the real thing. The viewer now starts in front of the model (glTF's +Z) rather than 45 degrees off to one side, which squashed anything with a front, text most of all, and it fits wide models without clipping their ends. It also uses Khronos PBR Neutral tone mapping and a softer environment, so a face turned to the viewer shows about the colour it was given: a #9c9c9c grey rendered as 216 and now renders as 160.
A reply with no tool call ends the turn, so a model that looked at its
3D render, saw the grass block hiding the logo, and wrote "I'll move
the logo text forward" left the model broken, with no way to act on
what it had just noticed. The same happens after a failing test or a
bad screenshot.
When a reply ends by announcing its next step without the tool call
that takes it, Flash now keeps the reply on screen and in the history,
tells the model to do it (or say in one line why not), and carries on
the turn, at most twice a turn so a model that only ever promises is
let go. Only the last two sentences count, and offers, questions, and
waiting on a sub-agent or the user ("I'll report back", "let me know")
are not promises. The nudge is a system message, so like the wrap-up
nudge it is not kept once the turn ends. Both the terminal and the web
UI do this.
make_3d_model's preview note also now says to fix anything wrong in
the picture by calling the tool again before writing the reply.
The prompt disagreed with itself about where files go: charts went to the scratch directory (gone when Flash exits), documents to the working directory, and Downloads was only a fallback for when that directory was too broad. Replace the scratch section with one rule, three places: - scratch: test scripts, check scripts, the scripts that draw charts or build documents, samples, drafts, and anything downloaded on the way - Downloads: a finished thing the user asked for (a picture, chart, PDF, document, page, 3D model, or a script to keep), with a clear name, never overwriting a file of theirs - the project: changes to the codebase, including tests the user asked to add to its suite A place the user names always wins. The agent finds the Downloads folder itself with a shell command, once, rather than guessing, since Windows often moves it and Linux names it in the user's language. The chart, document, and make_3d_model instructions now follow the same rule.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
|
Python's HTTP server binds with SO_REUSEADDR. On Linux and macOS that only lets a restart take back a port its closed connections still hold, but on Windows it lets a second server bind a port another is already listening on, and the two then split its connections: a second `flash --web` would quietly share port 7433 with the first instead of saying the port is taken. Which bind wins is not fixed, so test_a_port_in_use_says_so failed on Windows only some of the time. Leave SO_REUSEADDR off on Windows, where a plain bind already refuses a port in use and still reuses one straight after a LAN switch closes it.
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.
Hotfix release v0.5.12.
make_3d_model, saved as a.glbthat opens in Blender and every game engine;send_3d_modelshows an existing.glb,.stlor.objflash --webon Windows quietly sharing a port already in use instead of saying so