Skip to content
Source
Sign inSign up
pingdotgg/t3code

Expandable File Change and Command activity boxes #3005

ClosedQuicksaver(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/3005/headopened View on GitHub

Showing 6 changed files with 45 additions and 0 deletions (loading 4).

x
0 of 6 viewed, 6 left
25 additions and 0 deletionsapps/web/src/components/chat/MessagesTimeline.logic.test.tsModified
View file
@@ -3,6 +3,8 @@
computeStableMessagesTimelineRows,
computeMessageDurationStart,
deriveMessagesTimelineRows,
+ getRenderableCommandOutputLines,
+ hasRenderableCommandOutput,
normalizeCompactToolLabel,
resolveAssistantMessageCopyState,
} from "./MessagesTimeline.logic";
@@ -204,6 +206,29 @@
});
});
​
+describe("hasRenderableCommandOutput", () => {
+ it("hides nullish and empty command output streams", () => {
+ expect(hasRenderableCommandOutput(undefined)).toBe(false);
+ expect(hasRenderableCommandOutput(null)).toBe(false);
+ expect(hasRenderableCommandOutput("")).toBe(false);
+ });
+​
+ it("renders command output streams when the provider emitted content", () => {
+ expect(hasRenderableCommandOutput("stdout\n")).toBe(true);
+ expect(hasRenderableCommandOutput(" ")).toBe(false);
+ expect(hasRenderableCommandOutput("\n\t\n")).toBe(false);
+ });
+​
+ it("preserves intentional blank command output lines", () => {
+ expect(getRenderableCommandOutputLines("\nstdout\n \n\t\nstderr\n")).toEqual([
+ "stdout",