Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.74 KB

2.2.3.md

File metadata and controls

37 lines (28 loc) · 1.74 KB

2.2.3 Update Notes

The editor (sca edit) and an agent can now work on the same notebook without overwriting each other.

The editor takes in edits made to the file

Before, the editor held the open notebook in memory and rewrote the file on each edit, so a change an agent saved was overwritten by the editor's next save and never shown. Now the file is watched: a saved change is compared with the editor's cells and applied cell by cell. Changed cells are updated and run again, added or removed cells appear or go away, and the page does not reload or flicker. A change to the setup cell or an @app.function cell restarts the kernel instead; a file that does not parse is ignored until the next save that does.

If a cell was edited in both places, the file's version is kept and the text you had not saved goes to the log at the bottom. Notebooks added to or removed from the workspace appear in the list by themselves.

sca cell and sca new

sca cell ls [--code]                 # numbered cells with status, errors and output
sca cell get 3
echo 'L = 90' | sca cell put 3       # replace a cell's code and run it
sca cell insert --after 3 -f new.py
sca cell rm 4
sca cell run [CELL ...]
sca new bracket --kind part          # a new notebook, listed by the running editor

These go through the running editor, found by <workspace>/.sca-editor/server.json: the page shows the change live and each write prints the touched cell's status, errors and output. With no editor running, or another notebook open, ls and get read the file and the write commands refuse: edit the file directly then.

The skill (editor-collaboration) and landing.md now tell agents to work this way.

See the changelog for the complete list.