Public: anyone can read this; the crew can change it.

An empty talk conversation offers three starter prompts that each send in one tap #13339

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/13317-an-empty-talk-conversation-offers-three → main 11 commits fork 6 threads · 6 unresolved

  • Merged. scout/13317-an-empty-talk-conversation-offers-three was merged into main as 458b2b2.

Review

Sign in to review this change.
8 files changed +111 −48
docs/features/README.md +1
@@ -99,6 +99,7 @@ Read with the guide page [Tell the crew](../guide-tell-the-crew.md).
9999 - [Tell the crew from the terminal's screen: key M](tell-from-here.md)
100100 - [A write the restart cut short, in a conversation](talk-resume-writes.md)
101101 - [Actions that answer at once](act-now.md)
102 - [Starter prompts in an empty conversation](talk-starters.md)
102103 - [A thread folds its settled history](thread-fold.md)
103104 - [An agent says what it does; a repo's team is three lists](crew-roles.md)
104105 - [An assigned ask can be settled where it stands](ask-settles.md)
docs/features/talk-starters.md added +11
@@ -0,0 +1,11 @@
1 # Starter prompts in an empty conversation (#13317)
2
3 An empty `/talk` conversation offers three prompts, each a one-tap send: "What is waiting for me?", "What shipped this week?" and "Start something new". The list is `STARTER_PROMPTS` in `src/actions/talk.ts`.
4
5 - Each is a `form[data-starter]` that posts its words to the same handler as the composer (`talkSend`), so the same-origin check, the rate limit and the account checks apply unchanged.
6 - With script, `talk_client.ts` puts the words in the composer and submits it, so the reply streams in place. Without script the form posts and redirects back to the conversation; reload to see the answer, as with the composer.
7 - They show only while the conversation has no turns and is not paged.
8
9 ## In the terminal
10
11 The Conversations screen (`src/tui/screens/talk_chats.ts`, palette entry "Conversations") offers the same `STARTER_PROMPTS` in a conversation with nothing said yet, numbered 1 to 3. Pressing a number sends that prompt through the same `talk()` call that `s` uses, in that conversation. The header shows the result or the refusal; `r` reloads to see the answer. Once a turn exists the list goes away and the numbers send nothing.
outdated

Both doors: the terminal gets no starters. Add a src/tui/ screen offering the same STARTER_PROMPTS on an empty conversation (with a test), and describe it here, instead of declaring the gap deliberate.

src/actions/talk.ts +3
@@ -18,6 +18,9 @@ import { err, ok, type Result } from "../kernel/result.ts";
1818 /** Messages a person may send in a minute. */
1919 export const TALK_PER_MINUTE = 12;
2020
21 /** What an empty conversation offers to send in one tap: plain text, the one list. */
22 export const STARTER_PROMPTS = ["What is waiting for me?", "What shipped this week?", "Start something new"] as const;
23
2124 export type TalkRefusal = SayRefusal | RedoRefusal | "off" | "rate_limited";
2225
2326 /** What each refusal says, with its status. */
src/tui/screens/talk_chats.ts +24 −3
@@ -5,9 +5,11 @@
55 * `a` flips between the live list and the archived one; Enter opens one,
66 * to read it and, with `s`, say something in it through `talk()`. `d` reads the conversation
77 * as the Markdown file /talk/:id/download serves (`conversationMarkdown`, its owner's alone).
8 * An empty conversation lists the page's starter prompts (#13317), numbered: 1, 2 or 3
9 * sends that one through the same `talk()`.
810 */
911
10 import { TALK_WORDS, talk } from "../../actions/talk.ts";
12 import { STARTER_PROMPTS, TALK_WORDS, talk } from "../../actions/talk.ts";
1113 import {
1214 archiveConversation,
1315 createConversation,
@@ -112,7 +114,11 @@ function chatScreen(f: Session, ctx: Ctx, chat: Conversation, hit?: string): Scr
112114 const lines = (): { text: string; style: ReturnType<typeof style> }[][] => {
113115 const c = ctx.theme.c;
114116 if (pane) return paneLines().flatMap((l) => wrap(l, Math.max(10, width - 2))).map((l) => [{ text: l, style: style(c.fg, c.bg) }]);
115 if (turns.length === 0) return [[{ text: "Nothing said yet; s says something.", style: style(c.mutedFg, c.bg) }]];
117 if (turns.length === 0)
118 return [
119 [{ text: "Nothing said yet; s says something, or a number sends one of these:", style: style(c.mutedFg, c.bg) }],
120 ...STARTER_PROMPTS.map((p, i) => [{ text: ` ${String(i + 1)} ${p}`, style: style(c.fg, c.bg) }]),
121 ];
116122 let n = 0;
117123 return turns.flatMap((t) => {
118124 if (t.id === around) mark = n;
@@ -130,7 +136,15 @@ function chatScreen(f: Session, ctx: Ctx, chat: Conversation, hit?: string): Scr
130136 get title() {
131137 return chat.title === "" ? "Untitled conversation" : chat.title;
132138 },
133 keys: [binding(["j", "k"], "scroll"), binding(["s"], "say"), binding(["r"], "reload"), binding(["p"], "pane"), binding(["d"], "download"), binding(["esc"], "back")],
139 keys: [
140 binding(["j", "k"], "scroll"),
141 binding(["s"], "say"),
142 binding(["1", "2", "3"], "starter"),
143 binding(["r"], "reload"),
144 binding(["p"], "pane"),
145 binding(["d"], "download"),
146 binding(["esc"], "back"),
147 ],
134148 render(area, s) {
135149 const c = ctx.theme.c;
136150 width = area.w;
@@ -169,6 +183,13 @@ function chatScreen(f: Session, ctx: Ctx, chat: Conversation, hit?: string): Scr
169183 ctx.invalidate();
170184 return true;
171185 }
186 const starter = turns.length === 0 && !pane && around === undefined ? STARTER_PROMPTS[Number(e.key) - 1] : undefined;
187 if (starter !== undefined && /^[1-9]$/.test(e.key)) {

Non-blocking: the success branch (Sent ...) has no test, only the refusal. Stub the agent as talk-page.test does and assert one person turn is stored.

188 const said = talk(f.app, user, starter, [], "inject", chat.id);
189 note = said.ok ? `Sent "${starter}"; r reloads to see the answer.` : TALK_WORDS[said.error][1];
190 ctx.invalidate();
191 return true;
192 }
172193 if (e.key === "d") {
173194 ctx.push(downloadScreen(f, ctx, chat));
174195 return true;
src/web/pages/talk.ts +5 −12
@@ -17,7 +17,7 @@
1717 import { blockedFlash } from "../blocked.ts";
1818 import { noTalkAccountBlocked } from "../../actions/blocked_words.ts";
1919 import type { Database } from "bun:sqlite";
20 import { cancelTalk, queuedTalk, TALK_WORDS, talk, talkAgain } from "../../actions/talk.ts";
20 import { cancelTalk, queuedTalk, STARTER_PROMPTS, TALK_WORDS, talk, talkAgain } from "../../actions/talk.ts";
2121 import { REFUSED, sayNo, sayYes, UNDO_REFUSED, undoReceipt, waitingConfirms } from "../../actions/conversation_confirms.ts";
2222 import { filesOfTurns, type ConversationFile } from "../../core/conversation_files.ts";
2323 import {
@@ -171,12 +171,6 @@ const stepCard = (id: string, step: Step, at: string, set = ""): Html =>
171171 const workHtml = (work: Work): Html =>
172172 html`<p class="talk-steps small muted">${work.steps.charAt(0).toUpperCase() + work.steps.slice(1)}</p>${work.links.length === 0 ? null : html`<p class="talk-links small">${work.links.map((l) => html`<a href="${l.href}">${l.label}</a>`)}</p>`}`;
173173
174 /**
175 * What an empty chat offers to start with; each is a link that fills the composer (`?q=`), so it
176 * works without the script.
177 */
178 const SUGGESTIONS = ["What needs my attention?", "What did the crew do today?", "Show me my apps"] as const;
179
180174 /** Ask again as a form, so it works without the script; the script only enhances it. */
181175 const againForm = (base: string, how: "regenerate" | "retry", label: string, words: string): Html =>
182176 html`<form method="post" action="${base}/again/${how}" data-again="${how}">${btn(label, { icon: "sync", label: words })}</form>`;
@@ -333,7 +327,7 @@ function chats(ctx: Ctx, conversation: Conversation, showArchived: boolean, type
333327 </div>`;
334328 }
335329
336 async function talkPage(ctx: Ctx, conversation: Conversation, before0: string | undefined, prefill: string, latest: boolean, edit: boolean): Promise<Response> {
330 async function talkPage(ctx: Ctx, conversation: Conversation, before0: string | undefined, latest: boolean, edit: boolean): Promise<Response> {
337331 const user = ctx.auth.user!;
338332 let before = before0;
339333 const here = latest ? HERE : urlOf(conversation);
@@ -387,7 +381,7 @@ async function talkPage(ctx: Ctx, conversation: Conversation, before0: string |
387381 <ol class="talk-log" role="log" data-last="${last}" aria-label="Conversation with the forge">
388382 ${turns.length === 0
outdated

Principle 1/accessibility: this form is not intercepted by talk_client.ts, so a tap does a full-page POST and the answer needs a reload. Add a data-starter submit handler that sends through the composer. Also a form inside a span is invalid HTML; use a div.

389383 ? html`<li class="muted talk-turn">Ask the forge anything, or tell it what to change. It acts as you, with your permissions, and asks before anything hard to undo.
390 <span class="talk-suggest">${SUGGESTIONS.map((q) => html`<a class="btn" href="${here}?q=${encodeURIComponent(q)}" data-suggest="${q}">${q}</a>`)}</span></li>`
384 <div class="talk-suggest">${STARTER_PROMPTS.map((q) => html`<form method="post" action="${here}" data-starter><input type="hidden" name="text" value="${q}" />${btn(q)}</form>`)}</div></li>`
391385 : turns.map((t) => turnHtml(t, waiting, costs.get(t.id), acts.get(t.id), works.get(t.id), sent.get(t.id), expired, undone))}
392386 ${!paged && running ? queuedTalk(ctx.app, user, conversation.id).map(queuedHtml) : null}
393387 </ol>
@@ -399,7 +393,7 @@ async function talkPage(ctx: Ctx, conversation: Conversation, before0: string |
399393 <p class="talk-status small muted" role="status">${running ? "The forge is answering…" : ""}</p>
400394 <div class="talk-chips" data-chips role="group" aria-label="Attached files"></div>
401395 ${editing === undefined && aboutText(ctx.app.db, ctx.url.searchParams.get("about"), ctx.auth.user) !== null ? html`<input type="hidden" name="about" value="${ctx.url.searchParams.get("about")}" />` : null}
402 <textarea class="input" name="text" rows="1" maxlength="${WORDS_MAX}" required placeholder="Talk to the forge" aria-label="Talk to the forge" aria-keyshortcuts="/">${editing === undefined ? prefill : editing.text}</textarea>
396 <textarea class="input" name="text" rows="1" maxlength="${WORDS_MAX}" required placeholder="Talk to the forge" aria-label="Talk to the forge" aria-keyshortcuts="/">${editing === undefined ? "" : editing.text}</textarea>
403397 <div class="bar">
404398 <span class="muted small" data-compose-hint></span>
405399 <label class="btn talk-attach" data-attach hidden>Attach<input type="file" multiple hidden data-pick /></label>
@@ -432,11 +426,10 @@ export function talkView(ctx: Ctx): Response | Promise<Response> {
432426 if (ctx.auth.user === undefined) return signInFirst(ctx);
433427 notePhase(ctx.request, "session", takeSessionTime(ctx.request));
434428 const before = ctx.url.searchParams.get("before");
435 const q = ctx.url.searchParams.get("q");
436429 const conversation = conversationOf(ctx, ctx.auth.user);
437430 if (conversation === undefined) return notFoundPage(ctx);
438431 return timePhase(ctx.request, "render", () =>
outdated

Dead path: nothing links to ?q= any more. Remove the prefill and its test.

439 talkPage(ctx, conversation, before !== null && TURN_ID.test(before) && before !== "" ? before : undefined, q !== null && SUGGESTIONS.some((s) => s === q) ? q : "", ctx.params["id"] === undefined, ctx.url.searchParams.get("edit") === "1" && before === null),
432 talkPage(ctx, conversation, before !== null && TURN_ID.test(before) && before !== "" ? before : undefined, ctx.params["id"] === undefined, ctx.url.searchParams.get("edit") === "1" && before === null),
440433 );
441434 }
442435
src/web/pages/talk_client.ts +6 −3
@@ -114,7 +114,7 @@ if (root) {
114114 });
115115 // Links drawn as buttons answer Space as well as Enter.
116116 root.addEventListener("keydown", (e) => {
117 const l = e.key === " " && e.target.closest && e.target.closest("a.btn[data-suggest], a[data-act]");
117 const l = e.key === " " && e.target.closest && e.target.closest("a[data-act]");
118118 if (l) { e.preventDefault(); l.click(); }
119119 });
120120 const nearEnd = () => window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 120;
@@ -139,8 +139,6 @@ if (root) {
139139 return b;
140140 };
141141 root.addEventListener("click", async (e) => {
142 const s = e.target.closest("[data-suggest]");
143 if (s) { e.preventDefault(); box.value = s.dataset.suggest; grow(); box.focus(); return; }
144142 const a = e.target.closest("[data-act]");
145143 if (a) {
146144 e.preventDefault();
@@ -348,6 +346,11 @@ if (root) {
348346 }
349347 };
350348 form.addEventListener("submit", send);
349 // A starter sends through the composer, so its answer streams here.
350 log.addEventListener("submit", (e) => {
351 const f = e.target.closest("form[data-starter]");
352 if (f) { e.preventDefault(); box.value = f.elements.text.value; form.requestSubmit(); }
353 });
351354 box.addEventListener("keydown", (e) => {
352355 if (e.key === "Escape" && editing) { editing = false; box.value = ""; grow(); say(""); return; }
353356 if (e.key === "Enter" && !e.shiftKey && !e.isComposing) { e.preventDefault(); form.requestSubmit(); }
test/talk-page.test.ts +41 −30
@@ -19,7 +19,7 @@ import { clock, STREAMS_MAX } from "../src/web/pages/talk.ts";
1919 import { addSubscription, setGrants } from "../src/core/subscriptions.ts";
2020 import { serveTalk } from "../src/tui/ssh-talk.ts";
2121 import { aboutContext, aboutLine, parseAbout } from "../src/core/talk_about.ts";
22 import { talk as talkTo } from "../src/actions/talk.ts";
22 import { STARTER_PROMPTS, talk as talkTo } from "../src/actions/talk.ts";
2323 import { configureConversation } from "../src/crew/conversation.ts";
2424 import { appendTurn, createConversation, listTurns, openConversation } from "../src/core/conversations.ts";
2525 import { HELD_TTL_MS, hold, waitingFor } from "../src/core/fence.ts";
@@ -148,13 +148,13 @@ describe("the page", () => {
148148 if (!carol.ok) throw new Error(carol.error);
149149 promote(app.db, carol.value);
150150 const empty = await (await get("/talk", carol.value)).text();
151 expect(empty).toContain('href="/talk?q=What%20needs%20my%20attention%3F"');
152 expect(empty).not.toMatch(/<button[^>]*(data-suggest|data-copy|data-jump)/);
151 expect(empty).toContain('name="text" value="What is waiting for me?"');
152 expect(empty).not.toMatch(/<button[^>]*(data-copy|data-jump)/);
153153 say(carol.value, "person", "hi");
154154 say(carol.value, "agent", "hello");
155155 say(carol.value, "tool", "list_issues {\"repo\":\"x\"}");
156156 const page = await (await get("/talk", carol.value)).text();
157 expect(page).not.toContain("data-suggest=");
157 expect(page).not.toContain("data-starter");
158158 expect(page).toContain("You · <time");
159159 expect(page).toContain("Forge · <time");
160160 expect(page).not.toContain("data-copy");
@@ -163,15 +163,6 @@ describe("the page", () => {
163163 expect(page).not.toMatch(/<details open/);
164164 });
165165
166 test("a suggestion link prefills the composer without the script, and only with a known suggestion", async () => {
167 const q = "What needs my attention?";
168 const page = await (await get(`/talk?q=${encodeURIComponent(q)}`, alice)).text();
169 expect(page).toMatch(/<textarea[^>]*>What needs my attention\?<\/textarea>/);
170 const other = await (await get(`/talk?q=${encodeURIComponent("<script>x</script>")}`, alice)).text();
171 expect(other).not.toContain("<script>x</script>");
172 expect(other).not.toMatch(/<textarea[^>]*>[^<]/);
173 });
174
175166 test("markdown in a reply: highlighted code, a table and a link render; every <script> is escaped", async () => {
176167 const eve = await createUser(app.db, { origin: "seed", trusted: true, username: "eve", email: "[email protected]", password: "a-good-passphrase" });
177168 if (!eve.ok) throw new Error(eve.error);
@@ -263,16 +254,16 @@ describe("the page", () => {
263254 expect(talkJs).toContain('e.key === " "');
264255 });
265256
266 test("Confirm, Cancel, Regenerate and Retry are buttons in a post form; the suggestions are links; none is a div or span", async () => {
257 test("Confirm, Cancel, Regenerate and Retry are buttons in a post form; the starters are forms of buttons in a div; none is a span", async () => {
267258 const { Window: W } = await import("happy-dom");
268259 const parse = (html: string) => { const d = new W().document; d.body.innerHTML = html; return d; };
269260 // an empty chat: the suggestions the page itself draws
270261 const empty = await createUser(app.db, { origin: "seed", trusted: true, username: "emptyone", email: "[email protected]", password: "a-good-passphrase" });
271262 if (!empty.ok) throw new Error(empty.error);
272263 const doc0 = parse(await (await get("/talk", empty.value)).text());
273 const chips = [...doc0.querySelectorAll("[data-suggest]")];
264 const chips = [...doc0.querySelectorAll("form[data-starter]")];
274265 expect(chips.length).toBe(3);
275 for (const c of chips) { expect(c.tagName).toBe("A"); expect(c.getAttribute("href")).toMatch(/^\/talk\?q=/); }
266 for (const c of chips) { expect(c.getAttribute("method")).toBe("post"); expect(c.querySelector("button")).not.toBeNull(); expect(c.parentElement?.tagName).toBe("DIV"); }
276267 // a reply, then a waiting confirm
277268 const who = await createUser(app.db, { origin: "seed", trusted: true, username: "confirmer", email: "[email protected]", password: "a-good-passphrase" });
278269 if (!who.ok) throw new Error(who.error);
@@ -492,6 +483,18 @@ describe("the page", () => {
492483 expect(t.bodies.at(-1)!.files).toEqual([]);
493484 });
494485
486 test("tapping a starter sends its prompt through the composer and follows the answer, with no page load", async () => {
487 const t = await boot();
488 t.doc.querySelector(".talk-log").insertAdjacentHTML("beforeend", '<li><div class="talk-suggest"><form method="post" action="/talk" data-starter><input type="hidden" name="text" value="What shipped this week?" /><button class="btn" type="submit">What shipped this week?</button></form></div></li>');
489 const tap = new t.window.Event("submit", { bubbles: true, cancelable: true });
490 t.doc.querySelector("form[data-starter]").dispatchEvent(tap);
491 await tick();
492 expect(tap.defaultPrevented).toBe(true);
493 expect(t.sent).toEqual(["What shipped this week?"]);
494 expect(t.box.value).toBe("");
495 expect(t.sources.length).toBeGreaterThan(0);
496 });
497
495498 test("Enter submits; Shift+Enter and an IME composition do not", async () => {
496499 const t = await boot();
497500 t.box.value = "hello";
@@ -602,20 +605,6 @@ describe("the page", () => {
602605 }
603606 });
604607
605 test("Space on a suggestion or Edit link acts like Enter", async () => {
606 const t = await boot();
607 const root = t.doc.querySelector("[data-talk]");
608 root.insertAdjacentHTML("beforeend", '<a class="btn" href="/talk?q=x" data-suggest="Show me my apps">Show me my apps</a>');
609 const a = root.querySelector("[data-suggest]");
610 const e = new t.window.KeyboardEvent("keydown", { key: " ", bubbles: true, cancelable: true });
611 a.dispatchEvent(e);
612 expect(e.defaultPrevented).toBe(true);
613 expect(t.box.value).toBe("Show me my apps");
614 const typing = new t.window.KeyboardEvent("keydown", { key: " ", bubbles: true, cancelable: true });
615 t.box.dispatchEvent(typing);
616 expect(typing.defaultPrevented).toBe(false);
617 });
618
619608 test("the jump button shows only when scrolled up, and a new message is announced", async () => {
620609 const t = await boot();
621610 const jump = t.doc.querySelector(".talk-jump");
@@ -1077,6 +1066,28 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"Heard.","t
10771066 expect(input()).toContain("and then?");
10781067 });
10791068
1069 test("a starter's post reaches the agent as one person turn, same-origin only", async () => {
1070 const who = await createUser(app.db, { origin: "seed", trusted: true, username: "starter", email: "[email protected]", password: "a-good-passphrase" });
1071 if (!who.ok) throw new Error(who.error);
1072 const plan = addSubscription(app.db, dir, { name: "starter-plan", token: "sk-ant-api-test-token" });
1073 if (!plan.ok) throw new Error(plan.error);
1074 setGrants(app.db, who.value.id, "", [plan.value.id]);
1075 const c = fresh(who.value);
1076 const doc = await (await get("/talk", who.value)).text();
1077 expect(STARTER_PROMPTS.length).toBe(3);
1078 for (const q of STARTER_PROMPTS) expect(doc).toContain(`<input type="hidden" name="text" value="${q}" />`);
1079 rmSync(join(dir, "first.json"), { force: true });
1080 expect((await post("/talk", who.value, { text: STARTER_PROMPTS[1] }, { origin: "https://elsewhere.example" })).status).toBe(403);
1081 expect(existsSync(join(dir, "first.json"))).toBe(false);
1082 expect((await post("/talk", who.value, { text: STARTER_PROMPTS[1] })).status).toBe(303);
1083 for (let i = 0; i < 400 && !existsSync(join(dir, "first.json")); i++) await Bun.sleep(50); // real-timer: the agent runs in a child process behind the HTTP post; no handle to await
1084 expect(existsSync(join(dir, "first.json"))).toBe(true);
1085 expect(input()).toContain(STARTER_PROMPTS[1]!);
1086 const turns = listTurns(app.db, who.value.id, c);
1087 if (!turns.ok) throw new Error("turns");
1088 expect(turns.value.filter((t) => t.role === "person").map((t) => t.text)).toEqual([STARTER_PROMPTS[1]!]);
1089 }, 30_000);
1090
10801091 test("a forged about naming a private repository the sender cannot read adds nothing", async () => {
10811092 const made = await createRepo(app, alice, { name: "ctx-priv", visibility: "private" });
10821093 if (!made.ok) throw new Error(String(made.error));
test/tui-talk-chats.test.ts +20
@@ -11,6 +11,7 @@ import { createApp, type App } from "../src/app.ts";
1111 import { appendTurn, archiveConversation, CONVERSATIONS_MAX, createConversation, listConversations, listTurns, renameConversation } from "../src/core/conversations.ts";
1212 import { createUser, type User } from "../src/core/users.ts";
1313 import { createRepo } from "../src/actions/repos.ts";
14 import { STARTER_PROMPTS } from "../src/actions/talk.ts";
1415 import { createForgeApp } from "../src/tui/forge.ts";
1516 import { headlessTerminal } from "../src/tui/term/terminal.ts";
1617 import { settleApp } from "./helpers/tui.ts";
@@ -100,6 +101,25 @@ describe("the terminal's conversations screen", () => {
100101 expect(turns.ok && turns.value.length).toBe(2);
101102 });
102103
104 test("an empty conversation numbers the starter prompts, and a number sends that one through talk()", async () => {
105 const carol = await createUser(app.db, { origin: "seed", trusted: true, username: "carol", email: "[email protected]", password: "a-good-passphrase" });
106 if (!carol.ok) throw new Error(carol.error);
107 const made = createConversation(app.db, carol.value.id);
108 if (!made.ok) throw new Error(made.error);
109 const text = await drive(carol.value, [...open, "\r"]);
110 STARTER_PROMPTS.forEach((p, i) => expect(text).toContain(`${String(i + 1)} ${p}`));
111 // The crew is off in this app: talk() refuses, the header says why, and nothing is stored.
112 const sent = await drive(carol.value, [...open, "\r", "2"]);
113 expect(sent).toContain("not running here");
114 const turns = listTurns(app.db, carol.value.id, made.value.id, { limit: 50 });
115 expect(turns.ok && turns.value.length).toBe(0);
116 // Once something is said the list is gone, and a number is not a send.
117 appendTurn(app.db, carol.value.id, made.value.id, { role: "person", text: "hello" });
118 const later = await drive(carol.value, [...open, "\r", "1"]);
119 expect(later).not.toContain(STARTER_PROMPTS[0]);
120 expect(later).not.toContain("not running here");
121 });
122
103123 test("d reads the conversation as the Markdown download, from the list and from the chat; another person's is not reachable", async () => {
104124 const made = createConversation(app.db, bob.id);
105125 if (!made.ok) throw new Error(made.error);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs