MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / getModeBySlug

Function getModeBySlug

src/shared/modes.ts:51–59  ·  view source on GitHub ↗
(slug: string, customModes?: ModeConfig[])

Source from the content-addressed store, hash-verified

49
50// Helper functions
51export function getModeBySlug(slug: string, customModes?: ModeConfig[]): ModeConfig | undefined {
52 // Check custom modes first
53 const customMode = customModes?.find((mode) => mode.slug === slug)
54 if (customMode) {
55 return customMode
56 }
57 // Then check built-in modes
58 return modes.find((mode) => mode.slug === slug)
59}
60
61export function getModeConfig(slug: string, customModes?: ModeConfig[]): ModeConfig {
62 const mode = getModeBySlug(slug, customModes)

Callers 15

executeMethod · 0.90
executeMethod · 0.90
isToolAllowedForModeFunction · 0.90
executeMethod · 0.90
toolDescriptionFunction · 0.90
generatePromptFunction · 0.90
SYSTEM_PROMPTFunction · 0.90
filterNativeToolsForModeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected