oficina / slides Public

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>
Paul Campbell pushed by paul@keymail.dev 6822b40fc2b4af678944d869bf9b488cedb48286 parent 5d5546c
13 files changed, +1,162 −18
  • fixtures/assist-panel.mjs +132 −0
  • fixtures/assist.mjs +123 −0
  • fixtures/assist.test.mjs +267 −0
  • fixtures/editor-entry.js +35 −2
  • internal/slides/assist_test.go +9 −0
  • internal/slides/credits/assets.json +1 −1
  • internal/slides/editor.go +50 −0
  • internal/slides/icons/icons.go +1 −0
  • internal/slides/locales/en.toml +29 −0
  • internal/slides/static/editor.css +149 −0
  • internal/slides/static/{editor.dbe1616ac10c8b57.js => editor.ddb6729e1bfd4970.js} +15 −15
  • internal/slides/templates/editor.html +53 −0
  • internal/slidestest/assist_test.go +298 −0
fixtures/assist-panel.mjs

Loading diff…

fixtures/assist.mjs

Loading diff…

fixtures/assist.test.mjs

Loading diff…

fixtures/editor-entry.js

Loading diff…

internal/slides/assist_test.go

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/editor.go

Loading diff…

internal/slides/icons/icons.go

Loading diff…

internal/slides/locales/en.toml

Loading diff…

internal/slides/static/editor.css

Loading diff…

internal/slides/static/{editor.dbe1616ac10c8b57.js => editor.ddb6729e1bfd4970.js}

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slidestest/assist_test.go

Loading diff…