Let the conversation use the whole width of the window
Prose stopped at 100 columns however wide the terminal was. Remove that cap. Work labels and changed files were cut to fit it too, so they now use the text's own truncation, which follows the real width. Images keep their limit of 100 columns by 12 rows.
This commit is contained in:
1 parent
1856b80f39
commit
e519b65d04
2 files changed
+15
-14
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { afterEach, describe, expect, test } from "bun:test";
|
||||
import type { OrchestrationV2ThreadProjection } from "@t3tools/contracts";
|
||||
|
||||
import { omittedCommand, withApproval, withCompletedTurn, withOmittedOutput, withQuestion, withWorking } from "./fixtures.ts";
|
||||
import { omittedCommand, withApproval, withCompletedTurn, withOmittedOutput, withQuestion, withReply, withWorking } from "./fixtures.ts";
|
||||
import { loadLayout } from "../../src/layout.ts";
|
||||
import { fakeSession, renderApp, v2Projection, v2ThreadId } from "./harness.tsx";
|
||||
|
||||
@@ -151,6 +151,13 @@ describe("palette and pickers", () => {
|
||||
});
|
||||
|
||||
describe("a finished turn", () => {
|
||||
test("the conversation uses the whole width of a wide window", async () => {
|
||||
const reply = Array.from({ length: 20 }, (_, index) => `word${index}`).join(" ");
|
||||
const app = await open({ width: 240, height: 30, session: fakeSession({ projection: withReply(reply, false) }) });
|
||||
const line = app.frame().split("\n").find((text) => text.includes("word0 "))!;
|
||||
expect(line).toContain("word19");
|
||||
});
|
||||
|
||||
test("its changed files fold out under the reply, and a file opens the turn's diff", async () => {
|
||||
const patch = "diff --git a/src/index.ts b/src/index.ts\n--- a/src/index.ts\n+++ b/src/index.ts\n@@ -1 +1 @@\n-old\n+new\n";
|
||||
const app = await open({ session: fakeSession({ projection: withCompletedTurn(), results: { turnDiff: { diff: patch } } }) });
|
||||
|
||||
Reference in new issue
Block a user