Add the Assistant to the editor's header
An Assistant toggle beside the Inspector's (lit while open) opens a manual popover: what to ask, This slide or The whole deck, the model (SLIDES_AI_MODELS, named without its vendor), Ask with the busy rule's spinner, then the model's summary, a line from the catalog and Undo this change. The answer is applied through commit(), so it is one undo step, font-gated, saved through the queue and live to collaborators; commit takes an onError so a batch this tab's deck refuses (a slide a colleague just removed) is said, not applied. Undo takes back that step only while nothing came after it. Every word is a catalog key, errors in plain words, one polite live region, 24px targets, a bottom sheet on a phone. Nothing of it exists with SLIDES_AI off. fixtures/assist.mjs (request, answer, apply, undo) and assist-panel.mjs (the DOM) with node tests; slidestest drives the route against a fake OpenAI-compatible server, including a deck whose text tells the model to delete every slide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 files changed,
+1,162
−18
fixtures/assist-panel.mjs+132 −0fixtures/assist.mjs+123 −0fixtures/assist.test.mjs+267 −0fixtures/editor-entry.js+35 −2internal/slides/assist_test.go+9 −0internal/slides/credits/assets.json+1 −1internal/slides/editor.go+50 −0internal/slides/icons/icons.go+1 −0internal/slides/locales/en.toml+29 −0internal/slides/static/editor.css+149 −0internal/slides/static/{editor.dbe1616ac10c8b57.js => editor.ddb6729e1bfd4970.js}+15 −15internal/slides/templates/editor.html+53 −0internal/slidestest/assist_test.go+298 −0
Intent
fixtures/assist-panel.mjsLoading diff…
fixtures/assist.mjsLoading diff…
fixtures/assist.test.mjsLoading diff…
fixtures/editor-entry.jsLoading diff…
internal/slides/assist_test.goLoading diff…
internal/slides/credits/assets.jsonLoading diff…
internal/slides/editor.goLoading diff…
internal/slides/icons/icons.goLoading diff…
internal/slides/locales/en.tomlLoading diff…
internal/slides/static/editor.cssLoading diff…
internal/slides/static/{editor.dbe1616ac10c8b57.js => editor.ddb6729e1bfd4970.js}Loading diff…
internal/slides/templates/editor.htmlLoading diff…
internal/slidestest/assist_test.goLoading diff…