Skip to content

feat(cad): stream python_cad progress from build123d runner - #46

Merged
alanshen27 merged 2 commits into
mainfrom
devin/1785976045-python-cad-stream
Aug 6, 2026
Merged

feat(cad): stream python_cad progress from build123d runner#46
alanshen27 merged 2 commits into
mainfrom
devin/1785976045-python-cad-stream

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

python_cad can now stream progress notes while the build123d / OCCT runner executes, instead of showing a single "running build123d" line. Also gives the four unlabeled tools proper display names in the copilot sidebar.

  • runBuild123d accepts an onProgress(note) callback and scans stdout/stderr for BUILD123D_PROGRESS: markers, so notes emitted by the Python script or by the runner's driver are forwarded as they are printed.
  • The build123d driver emits built-in phase markers (loading build123d, executing model, computing bounding box, exporting mesh) and runs with PYTHONUNBUFFERED=1 so markers flush immediately.
  • The python_cad tool wires the callback to progress(toolCallId, "execute", ...), so the CAD progress panel shows live notes.
  • The tool's script description tells the LLM it can print('BUILD123D_PROGRESS: <note>') to surface its own progress.
  • TOOL_META now covers python_cad ("Modeling in Python CAD"), patch_cad_script ("Patching KCL"), define_part_models ("Defining simulation models"), and check_integration ("Running fit check") — previously these fell back to raw underscored names.

Example script the LLM can generate:

from build123d import *
print("BUILD123D_PROGRESS: sketching base plate")
result = Box(10, 20, 5)

Tests

  • Unit coverage for extractProgressNote.
  • Live runBuild123d tests verify built-in markers and user-defined BUILD123D_PROGRESS markers are received.

Link to Devin session: https://app.devin.ai/sessions/d846e91524fc43aca04de9649aeb2300
Requested by: @alanshen27

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@alanshen27 alanshen27 self-assigned this Aug 6, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

…ine_part_models, check_integration

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@alanshen27
alanshen27 merged commit 1823add into main Aug 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant