fix(replay): align multi-line user msg under the prefix in RecordView

Same fix as EventLog ate earlier. RecordView is the read-only viewer
shared by reasonix replay and reasonix diff — multi-line transcripts
were wrapping under col 0 instead of under the body text. Continuation
indent of 6 spaces matches the 'you › ' prefix width.
This commit is contained in:
esengine committed 2026-04-25 06:44:11 -07:00
1 parent 1de2349350
commit 70e0ad1aba
1 file changed
+7 -1
+7 -1
View File
@@ -28,12 +28,18 @@ export function RecordView({ rec, compact = false }: RecordViewProps) {
const toolContentMax = compact ? 200 : 400;
if (rec.role === "user") {
// Continuation indent of 6 spaces matches the `you › ` prefix width
// so wrapped multi-line user messages align under the body text
// instead of jumping to column 0.
const content = rec.content.includes("\n")
? rec.content.split("\n").join("\n ")
: rec.content;
return (
<Box marginTop={1}>
<Text bold color="cyan">
you ›{" "}
</Text>
<Text>{rec.content}</Text>
<Text>{content}</Text>
</Box>
);
}