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

Function fail

packages/opencode/src/plugin/tui/runtime.ts:128–137  ·  view source on GitHub ↗
(message: string, data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

126}
127
128function fail(message: string, data: Record<string, unknown>) {
129 if (!("error" in data)) {
130 console.error(`[tui.plugin] ${message}`, data)
131 return
132 }
133
134 const text = `${message}: ${errorMessage(data.error)}`
135 const next = { ...data, error: errorData(data.error) }
136 console.error(`[tui.plugin] ${text}`, next)
137}
138
139function warn(message: string, data: Record<string, unknown>) {
140 console.warn(`[tui.plugin] ${message}`, data)

Callers 7

disposeFunction · 0.70
activatePluginEntryFunction · 0.70
addPluginEntryFunction · 0.70
resolveExternalPluginsFunction · 0.70
errorFunction · 0.70
addPluginBySpecFunction · 0.70
loadFunction · 0.70

Calls 2

errorMessageFunction · 0.90
errorDataFunction · 0.90

Tested by

no test coverage detected