web: unify detail headers, queue follow-ups, move thinking outside bubbles
Every detail screen now owns one 44px chevron Back control beside its title. Sending appends the user's message immediately and keeps Send available beside Stop so a follow-up can be queued. Reasoning renders above the answer bubble rather than inside it.
This commit is contained in:
@@ -810,13 +810,13 @@ test("composerSendEnabled also allows a slash draft with a failed attachment", (
|
||||
assert.equal(composerSendEnabled(thread({ draft: "" })), false);
|
||||
});
|
||||
|
||||
test("composerSubmit runs an offer row, a slash draft, a send, and nothing while running", () => {
|
||||
test("composerSubmit runs an offer row, a slash draft, and a send even while running", () => {
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "hello" }), 0), { kind: "send" });
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "/" }), 1), { kind: "command", text: "/close" });
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "/ren" }), 0), { kind: "command", text: "/rename" });
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "/stop" }), 0), { kind: "command", text: "/stop" });
|
||||
// While a turn runs, Enter is inert unless the palette or a slash draft is present.
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "hello", running: true }), 0), { kind: "none" });
|
||||
// A running turn queues the follow-up rather than blocking Send.
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "hello", running: true }), 0), { kind: "send" });
|
||||
assert.deepEqual(composerSubmit(thread({ draft: "/stop extra", running: true }), 0), {
|
||||
kind: "command",
|
||||
text: "/stop extra",
|
||||
|
||||
@@ -6020,11 +6020,11 @@ try {
|
||||
send: !!document.querySelector("#chatSend"),
|
||||
draft: document.querySelector("#chatInput")?.value ?? null,
|
||||
}))()`);
|
||||
if (running.stopLabel !== "Stop" || running.stopTitle !== "Stop" || running.send) {
|
||||
throw new Error(`the Stop control: ${JSON.stringify(running)}`);
|
||||
if (running.stopLabel !== "Stop" || running.stopTitle !== "Stop" || !running.send) {
|
||||
throw new Error(`the Stop and queued-Send controls: ${JSON.stringify(running)}`);
|
||||
}
|
||||
if (running.draft !== "") throw new Error(`the sent draft was not cleared: ${JSON.stringify(running.draft)}`);
|
||||
console.log(" a real prompt to the throwaway session turned Send into the Stop control");
|
||||
console.log(" a real prompt kept Send available and added the Stop control");
|
||||
await showComposer();
|
||||
await shot("63-chat-composer-stop.png");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user