4 Commits
Author SHA1 Message Date
Nariman Jelveh 2f98ae58d1 Keep keyboard focus in the Publish card when it redraws
The card redraws its markup when a publish starts and when it finishes.
That replaced the focused Publish button, so focus dropped to the page: a
keyboard user who pressed Enter on Publish was left with nothing focused,
and their next Tab started from the top of the page.

When focus was in the card, a redraw now gives it back: to the address
field if that had it, else the button, or the site's link once it's live.
While the button is disabled for the publish, the card itself holds focus
(no focus ring, like the Publish popover). Focus anywhere else is left
alone.

The test DOM now moves focus to <body> when the focused element is
removed, as browsers do.
2026-11-03 12:08:46 -07:00
jelveh 3553dd16bd Publish from chat (#147)
When the user asks the AI to publish, it calls the new OfferPublish tool,
which puts a Publish card in the chat. The user publishes with one click;
the AI can never make a site public on its own.

The card draws the project's publish state, like the toolbar button:
an address field and Publish before the first publish, Publish changes when
the live site is behind, and Live with the link once it's up to date. Its
button waits while a turn runs, and errors show inline beside the field.

doPublish is split: publishProject(ui) holds the whole publish (guards, busy
state, release, hosting, records, analytics), and the popover and the card
each pass their own render/start/success/fail hooks. The popover's behavior
is unchanged. A publish from the card is tracked with source: 'chat'.
2026-11-03 11:06:05 -07:00
Reynaldi Chernando 1ca50e7a6b github integration (#117)
* github integration

* fixes
2026-10-23 22:24:38 +07:00
Nariman Jelveh 70b08abb8f add image, video and audio generation
Port GenerateImage, GenerateVideo and GenerateSpeech from ../ai, with
their chat cards (js/media.js): pending card with a timer, image grid for
several versions, full-screen image viewer, Download / Open, and replay
of past generations when a chat is reopened.

- generated files live in a per-chat .media/<chatId> folder beside the
  project, so version snapshots and restores never touch them; deleting
  a chat removes it, duplicating a chat copies it
- save_to_project puts a file into the site (counts as a project change);
  copy and ViewImage can read from the chat's media folder
- system prompt: custom imagery for sites (max 4 images per turn), video
  only on explicit request, speech only (no music or sound effects)
- Plausible events: Image/Video/Audio Generated and ... Generation Failed,
  one per request, with the request's options and a failure reason;
  prompts and file names are never sent
- tests: generated-media (incl. analytics) plus ai's card, lightbox and
  read-URL tests; path-scoping and load-media-urls updated
2026-10-19 20:47:27 -07:00