Move CanvasTopBar and its private helpers (MenuLabel, CompactAgentStatus,
Shortcut) out of project.tsx into canvas-top-bar.tsx. The component already took
all data via explicit props, so the move is mechanical with no behavior change.
Drop the imports (DOCS_URL, UserStatusActions, Dropdown, several icons) that
were only used by the top bar.
project.tsx is now ~3080 lines, down from 3536 at the start of the refactor.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the module-scope presentational subcomponents out of project.tsx:
- canvas-refresh-shell.tsx: CanvasRefreshShell (pre-load placeholder).
- canvas-create-menus.tsx: ConnectionCreateMenu, ConnectionCreateOption,
NodeCreateMenu, plus the PendingConnectionCreate type they define.
They already communicated via explicit props, so the move is mechanical. No
behavior change; project.tsx imports them back and drops now-unused icon and
node-registry imports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the ~30 module-scope pure functions out of the 3.5k-line project.tsx into
three focused lib modules, with identical names and signatures. No behavior
change; project.tsx imports them back.
- canvas-node-factory.ts: createCanvasNode, *Metadata builders, referenceUrl,
applyNodeConfigPatch.
- canvas-node-geometry.ts: nodeBounds, group drop/snap, connection anchors,
normalizeConnection, hidden-batch checks.
- canvas-generation-helpers.ts: generation config/inputs, reference hydration,
retry-source lookup, angle prompt builders, misc pure helpers.
project.tsx drops from 3536 to ~3230 lines. Also removes imports that were only
used by the moved helpers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Run user-authored async scripts per model with flat locals (prompt,
images, messages, params, model, baseUrl, apiKey, http, request, poll,
sleep, signal, onDelta); empty script falls back to system default.
- Wire image/video/audio/text request entrypoints through the plugin
runtime, keeping default handlers unchanged.
- Split-panel script editor: variable/return docs on the left, CodeMirror
JS editor on the right; title shows capability - model.
- Provide OpenAI and Gemini template buttons per capability; text template
uses the /responses API; image template branches text2img vs img2img.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>