Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Files and the editor

You can browse your project, read and edit files, and check diffs on the canvas, next to the agents that change them. This page shows the file tree, the file node and its diff views.

Figure: A file tree, left, and a file opened from it, right. The letters show each file’s git status.

Add a file tree

A file tree lists the files of the canvas’s project folder. On a layer, it lists that layer’s folder.

  1. Right-click an empty spot on the canvas.
  2. Choose New file tree here.

You can also press Ctrl+K (Cmd+K on a Mac) and choose New file tree.

In the tree:

  • Click a folder to open or close it. Folders come first.
  • Double-click a file to open it in a file node beside the tree.
  • Click ↻ at the top right to read the folder again.

The tree leaves out what your .gitignore ignores, and the .git folder. It shows at most 5000 entries.

Git badges

A letter next to a file shows its git status:

BadgeMeaning
MModified
AAdded
DDeleted
RRenamed
??New, not tracked by git yet
UUnmerged: a merge conflict waits in it

A folder shows M when something inside it changed.

Read a file

A file node shows one file of the project. Its strip, at the top, has six buttons:

ButtonWhat it does
TextShows the file’s text, with line numbers.
DiffShows the changes not staged yet, in colour.
StagedShows the changes staged for the next commit.
StageStages the file (git add).
UnstageTakes the file out of the next commit.
ReloadReads the file from disk again.

The button for the view you see is highlighted. A file node reads its file again every few seconds while it is on screen. So you see your agents’ changes as they make them.

Figure: The Diff view. Added lines are green, removed lines red.

When a view is empty, the node says so: No unstaged changes. or Nothing staged.

Tip

Use Diff, Stage and Staged to build a commit file by file. Then commit from a terminal. To commit everything in a layer at once, see Review your agents’ work.

Edit a file

  1. Click into the file’s text. Or select the file node and press Enter.
  2. Type. A caret and selection work as in any editor.
  3. Press Ctrl+S (Cmd+S on a Mac) to save.

Leaving the file also saves it: press Esc, or click somewhere else. Closing the canvas saves too.

While you edit, the strip says Unsaved until you save, then Saving….

The editor keeps the file’s own line breaks and indent style. Useful keys:

KeysAction
Ctrl+ZUndo
Ctrl+Shift+Z or Ctrl+YRedo
Tab, Shift+TabIndent or outdent the selected lines
Ctrl+Left, Ctrl+RightMove by word
Ctrl+ASelect all

On a Mac, use Cmd where the table says Ctrl.

When an agent changes the file you edit

While you have nothing unsaved, your agents’ changes to the file show up by themselves.

If an agent changes the file while you have unsaved edits, the strip says Changed on disk. Cuewire then refuses to save, so the agent’s work is never overwritten without you seeing it.

Figure: Changed on disk. Your edits are still on screen, but saving is refused.

To go on:

  1. Copy anything from your edits that you want to keep.
  2. Click Reload. The agent’s version replaces your edits.
  3. Paste your changes back in, and save.

Warning

Reload drops your unsaved edits. Copy what you want to keep first.

What a file node can open

  • Text files up to 1 MiB, in UTF-8.
  • Files inside the project folder only. A symbolic link is refused: open its target instead.

On a remote project, files and diffs come from the host. There, files and diffs larger than 512 KiB are not opened. See Remote projects.

What’s next