Skip to content

🤖 Open-source, local-first alternative to Grok Bot, OpenAI dots and Claude Duet. Your own AI bots on any model: GPT, Claude, Gemini, Grok, DeepSeek, Kimi, GLM and 70+ more through one Modelflare key. Reach them in the app, WeChat or Feishu; they remember you, work in the background, run commands and use your computer. Pay per use.

Guide and site: image generation runs right away, asks only when costly

Marla70f9ee27ff83
diff --git a/docs/development.md b/docs/development.md
index 7e835e9..2735cbe 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -122,7 +122,7 @@ docker exec amb cat /data/ui-token # 打开 http://<主机>:3600/?token=<令
- 语言:简体中文 / English,设置 → 常规 → 语言(引导页右上角、命令面板里也能切),默认跟随系统(系统语言不是中文也不是英文时用英文)。偏好存在 config.json 的 `ui.lang`,托盘菜单、服务端报错和状态文字、机器人发到微信 / 飞书的系统消息(`/help`、审批提示等)都跟着它;命令行 / Docker 下"跟随系统"看 `AMB_LANG`,再看 `LC_ALL` / `LANG`,都没有时用简体中文。日志、发给模型的提示词和用户自己起的机器人名不翻译。
- 界面文案在 `ui/locales/<语言>/<命名空间>.js`,代码里写 `t("命名空间.键", { 参数 })`(`ui/lib/i18n.js`);服务端在 `src/i18n/messages/<命名空间>.ts`,键有类型检查。每个界面请求带 `x-amb-lang`,服务端在这个请求里用同一种语言回话。
- 新增文案两种语言都要写;`node scripts/i18n-check.mjs [文件…]` 检查界面代码里有没有漏掉的中文、用到的键在不在、中英词典是否对齐(`npm test` 里的 `test/i18n.unit.test.ts` 也会查)。确需留在代码里的中文(字体名、匹配中文输入的正则)在那一行写 `// i18n-ignore`。
-- 上手清单(新手引导):对话空状态里是 6 步清单——打招呼、换模型、接到微信、让它动手、让它记住你、生成一张图。最后一步在引导里只放预置演示,不管账户有没有图片 / 视频模型都一样:同样先确认、再生成、出图,但不发给机器人、不调用模型、不扣费,图是客户端自带的 `ui/assets/guide-demo.svg`。目的是教会怎么操作,不替用户花钱;之后真的让它画图、收到图片也会算完成这一步。点「发送这句」直接试,点「带我去」或侧栏左下角的清单入口,会有一张引导卡片指着要点的地方(那里亮一圈)。做完自动打勾:对话里有了回复、换了模型、收到文件 / 图片、渠道连上、记忆写入;进度存在 config.json 的 `ui.guide`(接口 `/amb/api/guide`),老用户已经做过的步骤会自动算完成。清单可以收起到左下角或「不再显示」,设置 → 常规 → 上手清单 可以重新开始。
+- 上手清单(新手引导):对话空状态里是 6 步清单——打招呼、换模型、接到微信、让它动手、让它记住你、生成一张图。最后一步在引导里只放预置演示,不管账户有没有图片 / 视频模型都一样:和真的默认流程一样直接生成、图片显示在对话里,但不发给机器人、不调用模型、不扣费,图是客户端自带的 `ui/assets/guide-demo.svg`。目的是教会怎么操作,不替用户花钱;之后真的让它画图、收到图片也会算完成这一步。点「发送这句」直接试,点「带我去」或侧栏左下角的清单入口,会有一张引导卡片指着要点的地方(那里亮一圈)。做完自动打勾:对话里有了回复、换了模型、收到文件 / 图片、渠道连上、记忆写入;进度存在 config.json 的 `ui.guide`(接口 `/amb/api/guide`),老用户已经做过的步骤会自动算完成。清单可以收起到左下角或「不再显示」,设置 → 常规 → 上手清单 可以重新开始。
- 视觉:中性色与组件改编自 magpie 的界面(MIT),强调色为 Modelflare 荧光黄绿 `#d7ff00`。设计系统说明见 `ui/design/README.md`。
## 人设与提示词
diff --git a/docs/development_en.md b/docs/development_en.md
index 3101659..f33eb3a 100644
--- a/docs/development_en.md
+++ b/docs/development_en.md
@@ -122,7 +122,7 @@ Inside the container the console listens on 0.0.0.0, so token access is enforced
- Language: 简体中文 / English, in Settings → General → Language (also at the top-right of the onboarding screen and in the command palette). It follows the system by default (English when the system language is neither Chinese nor English). The preference is stored in `ui.lang` in config.json; the tray menu, server error and status messages, and system messages bots send to WeChat / Feishu (`/help`, approval prompts, …) all follow it. On the command line / Docker, "System" means `AMB_LANG`, then `LC_ALL` / `LANG`, falling back to Simplified Chinese. Logs, prompts sent to the model and bot names users chose are not translated.
- UI strings live in `ui/locales/<lang>/<namespace>.js` and are used as `t("namespace.key", { params })` (`ui/lib/i18n.js`); server strings live in `src/i18n/messages/<namespace>.ts` with type-checked keys. Every UI request carries `x-amb-lang`, and the server answers that request in the same language.
- Add every new string in both languages. `node scripts/i18n-check.mjs [files…]` reports Chinese left in UI code, keys that don't exist, and zh / en dictionaries that are out of sync (`test/i18n.unit.test.ts` in `npm test` checks the same). Chinese that must stay in code (font names, regexes matching Chinese input) gets a `// i18n-ignore` on that line.
-- Onboarding checklist: the empty chat state shows a six-step checklist — say hello, switch models, connect WeChat, let it do something, let it remember you, generate an image. The last step only plays a built-in demo inside the guide, whether or not the account has image / video models: it still confirms, generates and shows the image, but nothing is sent to the bot, no model is called and nothing is charged; the image is the bundled `ui/assets/guide-demo.svg`. The point is to teach the flow without spending the user's money; actually asking it to draw, or receiving an image later, also completes the step. "Send this" tries it directly; "Show me" or the checklist entry at the bottom-left of the sidebar shows a guide card pointing at the right control (highlighted with a ring). Steps tick themselves off: a reply in the chat, a model switch, a received file / image, a connected channel, a memory write. Progress is stored in `ui.guide` in config.json (API `/amb/api/guide`), and steps that existing users have already done count as complete. The checklist can be collapsed to the bottom-left or hidden for good, and Settings → General → Onboarding checklist starts it over.
+- Onboarding checklist: the empty chat state shows a six-step checklist — say hello, switch models, connect WeChat, let it do something, let it remember you, generate an image. The last step only plays a built-in demo inside the guide, whether or not the account has image / video models: like the real default flow it generates right away and shows the image in the chat, but nothing is sent to the bot, no model is called and nothing is charged; the image is the bundled `ui/assets/guide-demo.svg`. The point is to teach the flow without spending the user's money; actually asking it to draw, or receiving an image later, also completes the step. "Send this" tries it directly; "Show me" or the checklist entry at the bottom-left of the sidebar shows a guide card pointing at the right control (highlighted with a ring). Steps tick themselves off: a reply in the chat, a model switch, a received file / image, a connected channel, a memory write. Progress is stored in `ui.guide` in config.json (API `/amb/api/guide`), and steps that existing users have already done count as complete. The checklist can be collapsed to the bottom-left or hidden for good, and Settings → General → Onboarding checklist starts it over.
- Visuals: neutrals and components are adapted from magpie's UI (MIT); the accent is Modelflare's fluorescent yellow-green `#d7ff00`. The design system is described in `ui/design/README.md`.
## Persona and prompts
diff --git a/site/src/i18n/en.ts b/site/src/i18n/en.ts
index f4b381d..a4e59b9 100644
--- a/site/src/i18n/en.ts
+++ b/site/src/i18n/en.ts
@@ -276,7 +276,7 @@ export const en: Dict = {
more: {
h3: "And there's more.",
items: [
- { title: "Images and video", body: "Before each run it shows you the model and the prompt, and you can switch models on the spot." },
+ { title: "Images and video", body: "Just ask and it generates. It checks the model with you only when a run would cost over $0.5." },
{ title: "Three permission levels", body: "Read-only, workspace or full access, set per bot. Even with full access, recursive deletes ask first." },
{ title: "Slash commands", body: "/model, /reset and more work in the app and in WeChat and Feishu chats." },
{ title: "Spending at a glance", body: "Balance, low-balance alerts and daily usage live in the app, and each bot can get its own spending cap." },
diff --git a/site/src/i18n/zh.ts b/site/src/i18n/zh.ts
index f821d21..cb4f2a0 100644
--- a/site/src/i18n/zh.ts
+++ b/site/src/i18n/zh.ts
@@ -278,7 +278,7 @@ export const zh = {
more: {
h3: "还有这些。",
items: [
- { title: "生成图片和视频", body: "每次生成前先给你看模型和提示词,也能当场换模型。" },
+ { title: "生成图片和视频", body: "说一句就生成,预计花费超过 $0.5 时才先问你用哪个模型。" },
{ title: "三档权限", body: "只读、工作区、完全权限,按机器人分别设;完全权限下递归删除照样先问你。" },
{ title: "斜杠命令", body: "/model、/reset 这些命令,在 App 和微信、飞书里都能用。" },
{ title: "花多少,一目了然", body: "余额、低余额提醒、每日用量都在 App 里;还能给每个机器人设花费上限。" },
diff --git a/ui/components/guide.js b/ui/components/guide.js
index e24a37f..1f9937e 100644
--- a/ui/components/guide.js
+++ b/ui/components/guide.js
@@ -1,7 +1,8 @@
// 新手引导的界面:对话空状态里的「上手清单」卡、侧栏左下角的清单入口、指着要点的地方的引导卡片、全部完成时的彩带。
// 状态与文案在 lib/guide.js;样式在 css/guide.css。
import { useEffect, useLayoutEffect, useRef, useState } from "preact/hooks";
-import { html, Badge, Icon, IconButton, Menu } from "./ui.js";
+import { html, Icon, IconButton, Menu } from "./ui.js";
+import { ActivityLine } from "./activity.js";
import { BotAvatar } from "./avatar.js";
import { useStore } from "../lib/store.js";
import { ms, reducedMotion } from "../design/motion.js";
@@ -286,59 +287,36 @@ export function CoachMark({ bot, view, infoOpen }) {
}
/**
- * 生图的预置演示:和真的一样先问你用哪个模型(同一种提问卡片)→ 生成中 → 出图;
- * 不发给机器人、不调用模型、不扣费,图是客户端自带的示例(assets/guide-demo.svg)。看完就算做完了这一步。
+ * 生图的预置演示:和真的默认流程一样,说一句就直接生成:工作状态行(正在生成)→ 图片交付在对话里(同一种缩略图)。
+ * 不发给机器人、不调用模型、不扣费,图是客户端自带的示例(assets/guide-demo.svg),下面一行说明这一点。看完就算做完了这一步。
+ * 自带的图不在会话的文件里,桌面版没法交给系统程序打开:点开是在原地放大。
*/
-export function MediaDemo({ prompt }) {
+export function MediaDemo({ onLoad }) {
const g = useStore(guide);
- const [stage, setStage] = useState("ask"); // ask → gen → done;或 cancel
- const [pct, setPct] = useState(0);
+ const [done, setDone] = useState(false);
+ const [big, setBig] = useState(false);
+ // 生成用时是模拟的,不是动画:文字微光扫一遍的时长(关闭动画时也不变)
useEffect(() => {
- if (stage !== "gen") return;
- let k = 0;
- const timer = setInterval(() => {
- k += 1;
- setPct(Math.min(100, k * 12));
- if (k >= 9) {
- clearInterval(timer);
- setStage("done");
- markDone("media");
- }
- }, ms("--dur-slow", 360));
- return () => clearInterval(timer);
- }, [stage]);
- const asking = stage === "ask";
- const picked = stage === "gen" || stage === "done";
- const text = (prompt || "").replace(/[。.]$/, ""); // i18n-ignore:去掉句末的中英文句号
- const detail = t("guide.demo.detail", { prompt: text });
+ const timer = setTimeout(() => {
+ setDone(true);
+ markDone("media");
+ }, ms("--dur-sheen", 2400));
+ return () => clearTimeout(timer);
+ }, []);
+ // 放大 / 缩小后,本来跟着底部的对话再贴一次底
+ useEffect(() => {
+ if (done) onLoad?.();
+ }, [big]);
return html`<div class="guide-demo">
- <div class=${`card${asking ? "" : " done"}`}>
- <div class="meta"><span class="t-label">${t("guide.demo.label")}</span></div>
- <div class="q-block">
- <div class="q">${t("guide.demo.question")}</div>
- <div class="q-detail">${detail}</div>
- </div>
- <div class="opts" role="radiogroup" aria-label=${t("guide.demo.pickModel")}>
- <button type="button" class=${`opt${picked ? " picked" : ""}`} role="radio" aria-checked=${picked} disabled=${!asking} onClick=${() => setStage("gen")}>
- <span class="letter">A</span><span>${t("guide.demo.sampleModel")}<span class="desc">${t("guide.demo.sampleDesc")}</span></span>
+ <${ActivityLine} label=${done ? t("guide.demo.label") : t("guide.demo.generating")} phase=${done ? "done" : "gen"} live=${!done} />
+ ${done && html`<div class="msg-files anim-rise-in">
+ <button type="button" class=${`msg-img${big ? " big" : ""}`} aria-expanded=${big} title=${big ? t("guide.demo.zoomOut") : t("guide.demo.zoomIn")} onClick=${() => setBig((v) => !v)}>
+ <img src="/amb/static/assets/guide-demo.svg" alt=${t("guide.demo.alt")} onLoad=${onLoad} />
</button>
- <button type="button" class=${`opt${stage === "cancel" ? " picked" : ""}`} role="radio" aria-checked=${stage === "cancel"} disabled=${!asking} onClick=${() => setStage("cancel")}>
- <span class="letter">B</span><span>${t("common.cancel")}<span class="desc">${t("guide.demo.cancelDesc")}</span></span>
- </button>
- </div>
- ${!asking && html`<div class="meta"><${Badge} s=${stage === "cancel" ? "cancelled" : "answered"} /></div>`}
- </div>
- ${picked && html`<figure class="guide-demo-figure anim-rise-in">
- <div class="guide-demo-img">
- ${stage === "gen"
- ? html`<span class="skel"></span><span class="guide-demo-bar" aria-hidden="true"><i style=${{ width: `${pct}%` }}></i></span>`
- : html`<img src="/amb/static/assets/guide-demo.svg" alt=${t("guide.demo.alt")} />`}
</div>
- <figcaption class="t-meta" role="status">
- ${stage === "gen" ? t("guide.demo.generating") : t("guide.demo.caption")}
- ${stage === "done" && !g.media && html` <a href=${MF_CONSOLE} target="_blank" rel="noopener noreferrer">${t("guide.demo.enable")}</a>`}
- </figcaption>
- </figure>`}
- ${stage === "cancel" && html`<p class="t-meta">${t("guide.demo.cancelled")} <button type="button" class="text" onClick=${() => setStage("ask")}>${t("guide.demo.again")}</button></p>`}
+ <p class="guide-demo-note t-meta">
+ ${t("guide.demo.caption")}
+ ${!g.media && html` <a href=${MF_CONSOLE} target="_blank" rel="noopener noreferrer">${t("guide.demo.enable")}</a>`}
+ </p>`}
</div>`;
}
diff --git a/ui/css/guide.css b/ui/css/guide.css
index 6aab185..24ea828 100644
--- a/ui/css/guide.css
+++ b/ui/css/guide.css
@@ -111,15 +111,11 @@ button.guide-step > .ic { color: var(--muted); }
.row.guide-spot { outline-offset: calc(-1 * var(--space-0-5)); animation: none; }
.composer.guide-spot { --composer-edge: var(--accent); --composer-edge-w: 1.5px; --composer-shadow: var(--ring), var(--shadow-md); --composer-tint: var(--accent-wash); }
-/* —— 生图的预置演示(MediaDemo):提问卡片用对话里的 .card,下面是生成中 → 出图 —— */
-.guide-demo { display: grid; gap: var(--space-3); justify-items: start; }
-.guide-demo-figure { margin: 0; display: grid; gap: var(--space-1-5); }
-.guide-demo-img { position: relative; width: min(320px, 100%); aspect-ratio: 1; border-radius: var(--r-well); overflow: hidden; background: var(--well); }
-.guide-demo-img .skel { position: absolute; inset: 0; height: auto; border-radius: 0; }
-.guide-demo-img img { display: block; width: 100%; height: 100%; object-fit: cover; animation: guide-reveal calc(var(--dur-slower) * 2) var(--ease-out) both; }
-@keyframes guide-reveal { from { opacity: 0; filter: blur(calc(16px * var(--motion))); transform: scale(calc(1 + .04 * var(--motion))); } }
-.guide-demo-bar { position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-5); height: 4px; border-radius: 2px; background: var(--pill-hover); overflow: hidden; }
-.guide-demo-bar i { display: block; height: 100%; background: var(--primary); transition: width var(--t-moderate); }
+/* —— 生图的预置演示(MediaDemo):和真的回复同一套样子(工作状态行、chat.css 的 .msg-files / .msg-img),
+ 下面一行说明是自带的示例图;点开在原地放大(限高,放大后仍在一屏里) —— */
+.guide-demo-note { margin-top: var(--space-1-5); }
+.guide-demo .msg-img.big { cursor: zoom-out; }
+.guide-demo .msg-img.big img { max-width: 100%; max-height: 60vh; }
/* —— 全部完成的彩带(颜色由 JS 取机器人眼睛色的 token) —— */
.guide-confetti { position: fixed; inset: 0; z-index: var(--z-toast); pointer-events: none; overflow: hidden; }
diff --git a/ui/lib/guide.js b/ui/lib/guide.js
index 0072731..bd9806f 100644
--- a/ui/lib/guide.js
+++ b/ui/lib/guide.js
@@ -114,7 +114,7 @@ export function hideGuide() {
export const fillComposer = (text) => fill.set({ text, at: Date.now() });
-/** 放一遍生图的预置演示:流程和真的一样(先确认 → 生成中 → 出图),图是客户端自带的示例,不调用模型、不扣费 */
+/** 放一遍生图的预置演示:流程和真的一样(直接生成 → 图片显示在对话里),图是客户端自带的示例,不调用模型、不扣费 */
export function runMediaDemo() {
demo.set({ text: stepText(STEPS.find((s) => s.id === "media"), "try"), at: Date.now() });
}
diff --git a/ui/locales/en/guide.js b/ui/locales/en/guide.js
index 6dde44d..40cf021 100644
--- a/ui/locales/en/guide.js
+++ b/ui/locales/en/guide.js
@@ -26,19 +26,13 @@ export default {
stopHere: "Done for now",
next: "Next: {title}",
demo: {
- detail: "Prompt: {prompt}\nSize 1024×1024 · 1 image\nThis is a built-in demo: no model is called and nothing is charged.",
- label: "Generate image · Demo",
- question: "Generate this image with “Sample image model”?",
- pickModel: "Choose a model",
- sampleModel: "Sample image model",
- sampleDesc: "The default, free in this demo",
- cancelDesc: "Don't generate this time",
+ label: "Demo",
+ generating: "Generating the sample image",
alt: "Sample image: a little blue robot wearing headphones, flat illustration style",
- generating: "Generating (demo)…",
+ zoomIn: "View full size",
+ zoomOut: "Shrink",
caption: "This sample image comes with the app; no model was called.",
enable: "Enable image models ↗",
- cancelled: "Cancelled: nothing was generated or charged.",
- again: "Try again",
},
steps: {
hello: {
@@ -85,11 +79,11 @@ export default {
},
media: {
title: "Generate an image",
- desc: "It can make images and videos. Before each one, it asks which model to use and shows an estimated price. Nothing is charged until you confirm.",
- how: ["Describe the image you want", "Pick a model on the confirmation card in the chat and confirm", "If you don't answer within 10 minutes, nothing is generated"],
+ desc: "It can make images and videos. Just ask and it gets to work, checking with you first only when the cost is high.",
+ how: ["Describe the image you want", "Finished images show up right in the chat; click one to see it full size", "If it would cost more than $0.5, it asks which model to use first"],
try: "Draw a little blue robot wearing headphones, flat illustration style.",
- demoNote: "Watch the demo to see how it works: same flow as the real thing, but no model is called and nothing is charged.",
- doneText: "That was a demo. To make a real one, just ask. It'll check which model to use and show an estimated price first, and you only pay once you confirm.",
+ demoNote: "The demo runs just like the real thing, but no model is called and nothing is charged.",
+ doneText: "That was a demo. To make a real one, just ask.",
noModelText: "That was a demo. Your account doesn't have an image model yet. Once you enable one, the same request gets you a real image.",
},
},
diff --git a/ui/locales/zh-CN/guide.js b/ui/locales/zh-CN/guide.js
index b37d4e6..78da220 100644
--- a/ui/locales/zh-CN/guide.js
+++ b/ui/locales/zh-CN/guide.js
@@ -30,19 +30,13 @@ export default {
stopHere: "先到这里",
next: "下一步:{title}",
demo: {
- detail: "提示词:{prompt}\n尺寸 1024×1024 · 1 张\n这是预置演示:不调用模型,也不扣费。",
- label: "生成图片 · 预置演示",
- question: "这次用「示例图片模型」生成图片吗?",
- pickModel: "选择模型",
- sampleModel: "示例图片模型",
- sampleDesc: "默认选它,演示不扣费",
- cancelDesc: "这次不生成",
+ label: "预置演示",
+ generating: "正在生成示例图",
alt: "示例图:戴着耳机的蓝色小机器人,扁平插画风",
- generating: "正在生成(演示)…",
+ zoomIn: "看大图",
+ zoomOut: "缩小",
caption: "示例图是客户端自带的,没有调用模型。",
enable: "开通图片模型 ↗",
- cancelled: "已取消:没有生成,也没有扣费。",
- again: "再来一次",
},
/**
* 各步骤(id 与 src/guide.ts 的 GUIDE_STEPS 一致):title、desc、how(几条怎么做)、try(可以一键发出的示例,没有就不给按钮)、
@@ -85,11 +79,11 @@ export default {
},
media: {
title: "生成一张图",
- desc: "它可以画图、做视频。每次生成前都会先问你用哪个模型,并给出参考价,你确认了才会花钱。",
- how: ["描述你想要的画面", "在对话里的确认卡片上选模型、确认", "10 分钟内没回答就不生成"],
+ desc: "它可以画图、做视频。说一句就生成,花费较高时才先问你。",
+ how: ["描述你想要的画面", "画好的图直接显示在对话里,点开看大图", "预计花费超过 $0.5 时,会先问你用哪个模型"],
try: "画一只戴着耳机的蓝色小机器人,扁平插画风。",
- demoNote: "看一遍演示就知道怎么操作:流程和真的一样,但不调用模型、不扣费。",
- doneText: "刚才是演示。想真的画,直接跟它说一句;生成前它会先问你用哪个模型、标出参考价,你确认了才花钱。",
+ demoNote: "演示的流程和真的一样,只是不调用模型、不扣费。",
+ doneText: "刚才是演示。想真的画,直接跟它说一句。",
noModelText: "刚才是演示。你的账户暂时还没有可用的图片模型,开通后同样一句话它就会真的画给你。",
},
},
diff --git a/ui/screens/chat.js b/ui/screens/chat.js
index faa5478..fae132f 100644
--- a/ui/screens/chat.js
+++ b/ui/screens/chat.js
@@ -252,11 +252,11 @@ export function ChatScreen({ bot, models, modelsError, reloadModels, defaultMode
const demoReq = useStore(demo);
const { sendKey } = useStore(prefs);
const born = useRef(Date.now());
- // 生图的预置演示:只在本地对话流里放一遍(你的那句话 + 演示卡片),不发给机器人,刷新后就没了
+ // 生图的预置演示:只在本地对话流里放一遍(你的那句话 + 演示的回复),不发给机器人,刷新后就没了
useEffect(() => {
if (!demoReq || demoReq.at < born.current) return;
stick.current = true;
- setItems((l) => [...(l || []), { kind: "msg", id: uid(), role: "user", text: demoReq.text, at: Date.now(), enter: true }, { kind: "media-demo", id: uid(), text: demoReq.text, enter: true }]);
+ setItems((l) => [...(l || []), { kind: "msg", id: uid(), role: "user", text: demoReq.text, at: Date.now(), enter: true }, { kind: "media-demo", id: uid(), enter: true }]);
}, [demoReq && demoReq.at]);
useEffect(() => {
if (justDone && justDone.at > born.current) setCue({ kind: "done", at: justDone.at });
@@ -690,7 +690,7 @@ export function ChatScreen({ bot, models, modelsError, reloadModels, defaultMode
} else if (it.kind === "prompt") {
out.push(html`<div class=${cls} key=${it.id}><${PromptCard} requestId=${it.requestId} fallback=${it.prompt} /></div>`);
} else if (it.kind === "media-demo") {
- out.push(html`<div class=${cls} key=${it.id}><${MediaDemo} prompt=${it.text} /></div>`);
+ out.push(html`<div class=${cls} key=${it.id}><${MediaDemo} onLoad=${onMedia} /></div>`);
} else if (it.kind === "error") {
out.push(html`<div class=${cls} key=${it.id}>
${(it.activity?.length || it.steps) && html`<${WorkLine} workedMs=${it.workedMs} steps=${it.activity} count=${it.steps} load=${it.mid ? loadActivity(it.mid) : undefined} />`}