Skip to content

Commit 545a4f5

Browse files
committed
test(cli): 调整 MessageView 组件中的缩进格式
- 修改了消息渲染输出的缩进,从无空格缩进改为增加空格 - 确保多行消息内容对齐显示更美观 - 更新相关测试断言以匹配新的缩进格式
1 parent 2fa60d5 commit 545a4f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cli/src/tests/message-view.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ test("MessageView echoes submitted user prompts with live prompt wrapping width"
132132
const msg = makeSessionMessage({ role: "user", content: "abcdefg" });
133133
const output = renderToString(React.createElement(MessageView, { message: msg, width: 8 }), { columns: 8 });
134134

135-
assert.equal(stripAnsi(output), "> abcdef\n g\n");
135+
assert.equal(stripAnsi(output), " > abcdef\n g\n");
136136
});
137137

138138
test("MessageView echoes model changes with submitted prompt wrapping", () => {
@@ -143,7 +143,7 @@ test("MessageView echoes model changes with submitted prompt wrapping", () => {
143143
});
144144
const output = renderToString(React.createElement(MessageView, { message: msg, width: 8 }), { columns: 8 });
145145

146-
assert.equal(stripAnsi(output), "> abcdef\n gh\n");
146+
assert.equal(stripAnsi(output), " > abcdef\n gh\n");
147147
});
148148

149149
test("renderMessageToStdout renders assistant non-thinking messages with ✦", () => {

0 commit comments

Comments
 (0)