Work with files
This guide shows you how to open, edit, and download the files in a chat's folder, how to see their earlier versions and what changed, and how to add your own.
Every chat has a folder. The assistant saves its work there, and the Files panel, on the right side of the window beside the chat, shows what's in it. Chats in a project share the project's folder.
What you can do with a file or folder is in its ⋯ menu. Point to the file in the panel to see ⋯ next to it. On a touch screen, it's always there.
Show the Files panel
The Files panel appears on its own once the chat's folder has something in it, and so does a Files button at the top of the chat.
-
To hide the panel, select Files. The chat takes its width. Select Files again to show it. The panel stays hidden or shown in your other chats, and the next time you open Knowledge Worker Agent.
-
On a narrow screen, select Files to open the files over the chat. Select Close files (✕) to go back to the chat.
Spot what changed
A green dot marks files and folders that are new or changed since you last looked:
-
A file's dot clears when you open the file.
-
A folder's dot means something inside it changed. Open the folder to see which items changed. The folder's dot clears once you've opened them.
A dot on the Files button at the top of the chat means files are new or changed, and the button's name says how many. It counts while the panel is hidden too.
The list refreshes while the assistant works. To refresh it yourself, select Refresh.
Open a file
Select the file. It opens in place of the list. To open a file that a response names, select its name in the chat. For more information, see Open a file that a response names.
-
Markdown, HTML, and CSV files open formatted. Select ‹ › Code to see the source, and ◉ Preview to go back.
-
PDF files and images open in the viewer.
-
PowerPoint, Word, and Excel files open as a PDF preview. The first time, you're asked to install LibreOffice, which makes the preview. For more information, see PowerPoint, Word, and Excel files.
-
Text and code files open in an editor.
If a file can't be shown, you see "Can't preview this file". Select ⬇ Download instead to open it in another app. For every file type, see File previews.
To go back to the list, select Back to files.
An open file updates when the assistant changes it, unless you have unsaved changes.
Edit and save a file
-
Open the file. For a Markdown, HTML, or CSV file, select ‹ › Code.
-
Make your changes. A dot next to the file name means you have unsaved changes.
-
Select Save.
The panel shows "File saved". If you open another file or close this one before you save, you're asked whether to discard your changes.
An HTML preview shows the saved file. Save your changes to see them in the preview.
See earlier versions and what changed
Knowledge Worker Agent keeps earlier versions of the text files in a chat's folder: Markdown, CSV, and code files up to 1 MB. A file gets a new version:
-
When the assistant changes it. However many times the assistant writes the file while answering one message, that's one version.
-
When you save it in the panel or upload it. Saves less than 10 minutes apart make one version.
-
When it changes outside Knowledge Worker Agent, for example in VS Code. That version is kept the next time you send a message or open the file.
When a file has more than one version, the open file shows which version it is, when it was made and by whom, and how many lines changed since the version before, for example Since v1: 3 lines added, 2 removed or changed.
-
Highlight changes marks what was added or changed since the version before. In formatted Markdown and in the code view, it marks the words that changed, with a bar beside their paragraph, list item, table row, or line. A paragraph or line that's new, mostly rewritten, or only formatted differently is marked whole. In a CSV table, it marks the changed rows. Turn it off to read without the marks.
-
Show deletions shows what was removed since the version before, struck through where it was: words within a line or paragraph, and whole lines, paragraphs, list items, and table rows. It's off until you turn it on, and then it stays on for the other files you open. It works while Highlight changes is on, and not in CSV tables. Removed text isn't part of the file: it isn't saved, and it's left out when you copy from the preview.
-
To see an earlier version, select the version button next to the file's actions, for example v3, and select a version. It opens as it was, and you can't edit it. To download it, select Download. The download's name includes its version, for example
report-v1.md. -
To go back, select Go to latest.
The 50 newest versions of each file are kept. Versions follow a file you rename or move in the panel. They're deleted with the file, or with the chat when its folder is deleted.
Read a file at a larger size
-
To use the whole window, select Full screen. To exit, select Exit full screen, or press Esc.
-
To read the file in its own browser window, select Open in a separate window. To go straight there from the list, select ⋯ next to the file, and then Open in new window.
While the separate window is open, selecting a file in the panel opens it in that window. You can then read the file and chat at the same time, each at full size. Unsaved changes don't move to the new window, so save them first, or you're asked whether to discard them.
Download a file or folder
In the list, select ⋯ next to the file, and then select Download. For a folder, select Download as .zip.
From an open file, select Download. When you're looking at an earlier version, that version downloads.
Copy a file's text
To put a text file's contents on your clipboard without opening it, select ⋯ next to the file, and then select Copy contents. Knowledge Worker Agent says so once the text is on the clipboard, or says it couldn't copy it. Copy contents is there for text files, such as Markdown, CSV, and code.
Add files
-
To upload files into the folder you're viewing, select Upload file. An upload stops if a file with the same name is already there, and the panel names the file.
-
To create a folder, select New folder, and enter its name.
To give files to the assistant with your next message, attach them instead. For more information, see Attach files.
Rename, copy, move, or delete a file
In the list, select ⋯ next to the file or folder:
-
To rename it, select Rename. Type the new name, and press Enter. To cancel, press Esc.
-
To copy a file, select Duplicate. The copy appears next to it, named with
_copy, for examplenotes_copy.md. -
To delete it, select Delete, and confirm. A folder is deleted with everything in it. You can't undo this.
To move a file, drag it onto a folder. Drop it on another file to move it into that file's folder, or anywhere else in the panel to move it to the top level. A file is never overwritten: if the folder already has a file with that name, the file isn't moved. Folders can't be dragged.
A shared file stays shared when you rename or move it. For what deleting it does, see Rename, move, or delete a shared file.
Share a file
To share a file with people in your project, select ⋯ next to it, and then select Share. Shared files show a shared mark, a small person icon, next to their name. For more information, see Share a file.