(commit: StreamCommit, body: RunEntryBody = entryBody(commit))
| 50 | } |
| 51 | |
| 52 | export function entryLayout(commit: StreamCommit, body: RunEntryBody = entryBody(commit)): EntryLayout { |
| 53 | if (commit.kind === "tool") { |
| 54 | if (body.type === "structured" || body.type === "markdown") { |
| 55 | return "block" |
| 56 | } |
| 57 | |
| 58 | if ( |
| 59 | commit.phase === "progress" && |
| 60 | commit.toolState === "completed" && |
| 61 | body.type === "text" && |
| 62 | body.content.includes("\n") |
| 63 | ) { |
| 64 | return "block" |
| 65 | } |
| 66 | |
| 67 | return "inline" |
| 68 | } |
| 69 | |
| 70 | if (commit.kind === "reasoning") { |
| 71 | return "block" |
| 72 | } |
| 73 | |
| 74 | if (commit.kind === "error") { |
| 75 | return "block" |
| 76 | } |
| 77 | |
| 78 | return "block" |
| 79 | } |
| 80 | |
| 81 | export function separatorRows( |
| 82 | prev: StreamCommit | undefined, |
no test coverage detected