MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getOutputStyleConfig

Function getOutputStyleConfig

source code/constants/outputStyles.ts:183–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

getSystemPromptFunction · 0.85

Calls 2

getCwdFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected