AI chat

The chat panel lives in the AI tab of the editor’s right column, alongside SEO and Comments. It appears whenever ai.enabled is true in cms.yaml. It’s a conversation with the model about the entry you have open, and, unlike a chat window in another tab, it can act on what it says: change the frontmatter, rewrite a paragraph, search your other posts, generate an image.

The panel#

The header shows a status dot and the active provider and model, in the form gemini · gemini-3.5-flash. Green means a provider is ready, pulsing yellow means it’s thinking and grey means there’s no key yet, with an Open settings link that takes you to the key form. The cog on the right opens the same AI Settings modal.

Type in the box at the bottom and press Enter to send; Shift+Enter adds a line break. Ctrl+Shift+A (Cmd+Shift+A on a Mac) jumps to the panel from the visual editor; see Providers if you want to change that binding.

What the model knows#

The chat panel knows which entry you have open. Every message goes out with a system prompt containing the entry’s title, description and focus keyword, its full body, the section’s field definitions with their current values, the shortcodes available to it (each with its syntax and whether it’s paired) and a summary of every section on the site. If you’ve set ai.brandVoice, that’s in there too. So “rewrite the second paragraph” or “add a tag for Hugo” works without pasting anything in.

Replies render as Markdown, and maths in $...$ or $$...$$ renders with KaTeX.

One thing to be aware of: because the model’s reply may contain tool calls, ordinary messages come back in one go rather than streaming word by word. The SEO quick actions below do stream. Either way the red Stop button cancels a request in flight.

Tools#

The model has 14 tools. Anything that changes your content asks first; anything that only reads just runs.

Tool Does Asks first?
update_frontmatter Sets one or more frontmatter fields on the open entry Yes
update_body Replaces, appends to or prepends to the whole body Yes
edit_body Applies a batch of find-and-replace edits to the body Yes, per edit
insert_shortcode Appends or prepends a shortcode to the body, written with the same serialiser the editor uses, so it’s valid Hugo Yes
create_entry Creates a new entry (as a draft) in a section Yes
create_translation Translates the entry into another language and opens it unsaved for you to review Yes
generate_image Generates an image and uploads it to the media folder Yes
trigger_publish Opens the publish dialog; you still confirm there Yes
run_seo_analysis Runs the SEO rules and returns the score No
search_content Searches entries by text, frontmatter filters or date range No
read_entry Reads another entry’s frontmatter and body No
toggle_preview Shows or hides the preview pane No
show_diff Lists changes the sync service hasn’t pushed yet No
improve_text Runs one of the inline actions on a piece of text and returns the result No

generate_image is only offered when the current provider can generate images. The model can chain up to ten tool calls in one turn, for example searching for posts and then reading two of them before answering.

Tool calls show up as cards in the conversation, with a result card underneath once they’ve run. Edits made by update_frontmatter, update_body, edit_body and insert_shortcode land in the editor like any other change: nothing is committed until you save. create_translation opens its result unsaved, too. create_entry writes a new file to the repository straight away and generate_image uploads straight away, which is why they ask before they do it.

Confirming edits#

When a tool needs approval, a Confirmation required card appears with a one-line description (“Update fields: title, tags”) and Approve and Deny buttons. Denying tells the model you said no, and it carries on from there.

edit_body gets a better card. Each proposed replacement is shown as a red/green diff with its own Accept and Reject buttons, and there’s Accept all and Reject all at the bottom. Accept three of five and only those three are applied. This is the tool the model is told to prefer for small fixes, so it’s the one you’ll see most.

Message actions#

Every reply has a Copy button underneath it for the raw Markdown. The last reply also has a Retry button, which throws it away and sends your previous message again. Hover over one of your own messages and a pencil appears: edit the text and Save & Submit resends it, discarding everything after it in the conversation.

Quick actions#

Above the input box, if the features are enabled, there are chips for the things people ask for most:

  • Build Page opens the page builder.
  • SEO Title asks for five title options of 50 to 60 characters. SEO Description asks for three meta descriptions of 150 to 160 characters. Both come back as a list with an Apply button beside each option that writes it into the frontmatter.
  • SEO Keywords suggests a primary keyword, five secondary keywords and five long-tail phrases. This one is just text; set the focus keyword yourself in the SEO panel.

If you’ve set a focus keyword, the SEO prompts ask the model to work it in.

Annotating the preview#

There’s a speech-bubble button in the preview pane header labelled Annotate preview for AI feedback. Turn it on, click elements in the preview to leave comments on them (“too long”, “make this a list”), and submit. Emet switches to the AI tab and sends a message titled “Review N annotations” with your comments, the matching Markdown lines and a few lines of context around each, so the model can go and fix them with edit_body.

History#

Each entry has its own conversation. Switch entries and you switch chats; come back and it’s where you left it. Histories live in your browser’s localStorage, capped at the last 50 messages per entry and the 20 most recently used entries. Clear chat under the input wipes the current one.

Limitations#

  • The chat only works on the entry that’s open. It can read and create other entries through tools, but it can’t edit them.
  • Conversations are per browser. They don’t follow you to another machine, and neither do your API keys.
  • There’s no features.chat toggle that works. The tab is there whenever ai.enabled is.