MCPcopy
hub / github.com/claude-code-best/claude-code / getOutputStyleConfig

Function getOutputStyleConfig

src/constants/outputStyles.ts:181–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181export async function getOutputStyleConfig(): Promise<OutputStyleConfig | null> {
182 const allStyles = await getAllOutputStyles(getCwd())
183
184 // Check for forced plugin output styles
185 const forcedStyles = Object.values(allStyles).filter(
186 (style): style is OutputStyleConfig =>
187 style !== null &&
188 style.source === 'plugin' &&
189 style.forceForPlugin === true,
190 )
191
192 const firstForcedStyle = forcedStyles[0]
193 if (firstForcedStyle) {
194 if (forcedStyles.length > 1) {
195 logForDebugging(
196 `Multiple plugins have forced output styles: ${forcedStyles.map(s => s.name).join(', ')}. Using: ${firstForcedStyle.name}`,
197 { level: 'warn' },
198 )
199 }
200 logForDebugging(
201 `Using forced plugin output style: ${firstForcedStyle.name}`,
202 )
203 return firstForcedStyle
204 }
205
206 const settings = getSettings_DEPRECATED()
207 const outputStyle = (settings?.outputStyle ||
208 DEFAULT_OUTPUT_STYLE_NAME) as string
209
210 return allStyles[outputStyle] ?? null
211}

Callers 1

getSystemPromptFunction · 0.85

Calls 2

getCwdFunction · 0.85
logForDebuggingFunction · 0.50

Tested by

no test coverage detected