The files panel
A column with the project's folder, where you look, rename, move to the Trash and drag files into a prompt.
Each project has a files panel: a tree of the project's folder, in a column of its own beside the projects, much like the explorer of a code editor. You can look at what a session made, open a preview, rename, move or delete a file, and hand files to a prompt by dragging them, without leaving the studio. It works for a project on another computer of your studio too, over the same line the sessions use.
It is not a code editor. Previews are read only, and you edit a file in your own editor, opened with Open in code editor in the project's header.
Open and close it
- On a project's card, click the folder sign, Files. The column opens between the projects and the conversation.
- Click the same sign again to close it. Clicking the sign of another project switches the column to that project.
The column has its own close and fold buttons, and you can drag its edge to make it wider. The studio remembers which project it showed, its width and whether it was folded. When the window is too narrow for every column, it folds itself to a strip and comes back when you widen the window. More on columns in Columns, folding and where the studio reopens.
What the tree shows
Folders come first, files after, each with a sign of its kind. Names that start with a dot are shown. A folder is read when you open it, so a big project opens quickly.
- Git's state is written beside each file in colour: M modified, U untracked, A added, D deleted, R renamed, and conflicts. Ignored files are grey. The studio only reads git, never stages, commits or checks anything out.
- Heavy generated folders such as
node_modules,target,distorbuildstay closed until you open them yourself. Git's own folder is shown closed and cannot be browsed. - The box Find files by name filters the tree. It skips those heavy folders, and shows at most 300 matches; a note says when there are more.
The tree refreshes every six seconds while it is open and the window is in front, and stops while you rename or confirm something. Refresh reads it at once, and Collapse all closes every folder.
Work with files
Right-click a file or a folder for its menu: New file, New folder, Rename (or F2), Cut, Copy, Paste, Duplicate, Copy path, Copy relative path, Show in folder and Move to Trash. Select several with Ctrl (Cmd on a Mac) or a range with Shift, and drag files onto a folder to move them.
The studio never overwrites a file: a name that is taken is refused. Move to Trash asks first and lists what it will move. It uses the Recycle Bin on Windows and the Trash on a Mac, never a delete that cannot be undone. Nothing outside the project's folder can be touched from here, and links that point elsewhere are shown but not opened.
Previews
Double-click a file, or press Enter, to open its preview. Text and code come with line numbers, Markdown is drawn with a switch to its source, CSV and spreadsheets are shown as tables, Word files and PDFs as their text, and pictures, sound and video as themselves. A big file shows its first part. The preview is the same window that opens from a file a session names; Links and files an answer names lists what it shows and its limits.
Hand files to a session
- New session with this opens the project's New session form with the files already attached. Nothing starts until you send the prompt.
- Add to the current prompt attaches them to the prompt box of the open session.
- Or drag them from the tree onto a prompt box.
The session gets the path of the file in the project, not a copy, and a folder can be handed over the same way. A prompt of another project or another computer refuses them.
Small tips
Drag files from the panel into a prompt
Select files in the tree and drag them onto the prompt box. The session gets their paths in the project, and a folder works the same way.
Copy a file's path relative to the project
Right-click a file and choose Copy relative path to get the path from the project's folder, ready for a prompt or a command.
Questions
Can I edit a file in the files panel?
No. Previews are read only. Open the project in your own editor with Open in code editor, or ask a session to change it.
Can a file be deleted for good from the files panel?
No. Move to Trash asks first and uses the Recycle Bin or the Trash, so anything moved there can be brought back.