MCPcopy Create free account
hub / github.com/anomalyco/opencode / entryColor

Function entryColor

packages/opencode/src/cli/cmd/run/scrollback.shared.ts:74–92  ·  view source on GitHub ↗
(commit: StreamCommit, theme: RunTheme)

Source from the content-addressed store, hash-verified

72}
73
74export function entryColor(commit: StreamCommit, theme: RunTheme): ColorInput {
75 if (commit.kind === "assistant") {
76 return theme.entry.assistant.body
77 }
78
79 if (commit.kind === "reasoning") {
80 return theme.entry.reasoning.body
81 }
82
83 if (entryFailed(commit)) {
84 return theme.entry.error.body
85 }
86
87 if (commit.kind === "tool") {
88 return theme.block.text
89 }
90
91 return entryLook(commit, theme.entry).fg
92}

Callers 3

RunEntryContentFunction · 0.90
setThemeMethod · 0.90
createEntryMethod · 0.90

Calls 2

entryFailedFunction · 0.85
entryLookFunction · 0.85

Tested by

no test coverage detected