Commit Graph

4 Commits

Author SHA1 Message Date
NiJingzhe 3dad39999f feat(editor): local modules in the workspace, module view, reload on change
The workspace lists the local modules notebooks import (sca ls reports them
too) and opens one in a module view: autosaved source plus its dataclass
fields (and commented constants) as controls written into the file. A change,
from the editor or on disk, reloads the module in the kernel and reruns the
notebook; used notebooks are rerun from their files. Number boxes keep the
typed text until it is committed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 16:30:27 +08:00
NiJingzhe b0909b29ba feat(editor): selection as ql code, agent snapshot, grid and axes, new look
Picking in the viewport writes a selection cell (ql selectors from the picked
geometry, selected_<kind>[_<i>] and selected_item) and saves a snapshot
(.sca-editor/snapshot.json + viewport.png, sca snapshot) for coding agents.
The viewport gets a ground grid and an axis gizmo in a CAD (Z up) frame.
Cells fold to their step name, run everything above, autosave, and are
deleted with a trash button; the inspector shows a JSON tree; the chrome is
black and white with square 2px rules. Opening a notebook clears the model at
once. ql.vertices() now resolves through solids and faces.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 06:53:48 +08:00
NiJingzhe 21cd56802c fix(runtime): leave cells outside the notebook to marimo; add commit_value
The editor kernel runs scratch cells the notebook does not contain; the
executor raised KeyError on them. params.commit_value writes a parameter's
value into the cell source, keeping the rest of the line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 05:55:50 +08:00
NiJingzhe 932f7cb364 feat(runtime): notebook parameters, feature headers and workspace scan
Parameters are the top-level literals or scad.var of a '# ---- params ----'
cell, with an optional trailing '# ui: slider(min, max, ...)' comment for the
control. The editor kernel applies values an editor saved (params.json in the
notebook state dir) as the defining cell finishes; headless runs take only
explicit overrides. live_package/publish_live project the product from a
running marimo kernel. sca ls / sca params report workspaces and notebooks
from the files alone, with no change to existing examples.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 05:35:43 +08:00