The LatteAI Conversation
Every project has a conversation with LatteAI. Ask about the project, or say what you want changed. LatteAI reads the files it needs and shows you every change it makes.
- Opening the conversation
- Asking
- Asking for changes
- Plan First
- Project Notes
- What LatteAI can and cannot do
Opening the conversation
Choose Edit ⟩ LatteAI ⟩ Show Conversation (control command H) or click the LatteAI button at the end of the project window's toolbar. The conversation opens as a tab named LatteAI among the project's tabs. Choose the command again to return to the tab you came from.
A project has one conversation, and Espresso keeps it between launches. Click New Conversation under the message field to clear it and start another; the project's files stay as they are.
The conversation belongs to a project, so it is not available for a document opened in a window by itself.
Asking
Type in the field and press enter. Press shift enter to start a new line in your message, and escape to stop LatteAI while it is working.
What was in front when you opened the conversation is attached to your message: the file, the lines you had selected, or, coming from a preview, the element you picked with Xray. Click the "x" on an attachment to leave it out.
There are shorter ways to ask about something in particular:
- Right click in the editor and choose Ask LatteAI About Selection… or Ask LatteAI About This File…
- With an element picked in Xray, choose Ask LatteAI About This Element…
- In the Commands panel, type a question. When no command matches, the panel offers Ask LatteAI: followed by your words.
As LatteAI works it lists what it is doing, such as the files it reads and the searches it makes. When it has finished, these steps fold away under one line, which you can click to see them again.
LatteAI reads the project's files as they are saved, so documents with unsaved changes are saved before it starts. Espresso asks first, until you tell it to always save without asking.
If Espresso is in the background when LatteAI finishes, or when it has a question for you, its Dock icon bounces and a notification tells you. Your Mac is kept awake while LatteAI is working.
Asking for changes
To change files, LatteAI needs the LatteAI Agent model. Without it, the conversation is marked Answers Only: LatteAI answers questions about the project and shows any code it suggests for you to copy.
With LatteAI Agent, say what you want, for example "add a contact page and link it from the menu". LatteAI makes the changes in the project's files, and the Changes pane opens beside the conversation with:
- each file that was changed, with the number of lines added and removed. Select a file to see its changes line by line, or double click to open it.
- Before and After pictures of the page, where a page changed. Click one to see it larger.
The files are changed as LatteAI works, so your preview shows the result. For each file, click Keep to accept its changes or Undo to put the file back as it was. Undoing a file that LatteAI created moves it to the Trash. A line in the conversation has Keep and Undo for all of the files at once.
To go further back, click Go Back to Here under an earlier message. Every change LatteAI has made since that message is undone, the conversation from there on is removed, and the message is put back in the field for you to reword.
LatteAI may ask you a question rather than guess at something only you know, such as a phone number. Your next message is the answer.
Plan First
Click Plan First before sending a message to have LatteAI say what it would change before it changes anything. It reads the project and answers with a plan. If you are happy with it, click Carry Out Plan. Otherwise say what should be different.
Project Notes
Click Project Notes under the message field to write down what LatteAI should keep to in this project, whatever you ask of it: "indent with tabs", "prices are in Australian dollars", "never change the files in /vendor".
The notes are a document in the project, #.Espresso/LatteAI Notes.md. LatteAI is given everything in it that is outside an HTML comment, at the start of every request.
What LatteAI can and cannot do
In a conversation LatteAI can:
- list, read and search the project's files
- edit, create, move and rename files in the project
- look at a page as the preview renders it, in the light or the dark appearance, including the errors it logs and the styles its elements end up with
- ask you a question
LatteAI cannot reach outside the project's folder, use the internet or run commands, and it does not delete files. It never publishes: it prepares the files, and you publish them.
LatteAI checks the files it changes for mistakes such as tags left open, links that lead nowhere and script that will not run, and corrects what it finds before it finishes. It can still be wrong. Read its changes before you keep them, and look at the page.
A single message is worked on for at most twenty minutes. If LatteAI stops before it has finished, send another message to carry on.