MCPcopy Index your code
hub / github.com/anomalyco/opencode / entryLayout

Function entryLayout

packages/opencode/src/cli/cmd/run/scrollback.writer.tsx:52–79  ·  view source on GitHub ↗
(commit: StreamCommit, body: RunEntryBody = entryBody(commit))

Source from the content-addressed store, hash-verified

50}
51
52export 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
81export function separatorRows(
82 prev: StreamCommit | undefined,

Callers 1

separatorRowsFunction · 0.85

Calls 1

entryBodyFunction · 0.90

Tested by

no test coverage detected