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

Function getWhenToUse

src/shared/modes.ts:240–247  ·  view source on GitHub ↗
(modeSlug: string, customModes?: ModeConfig[])

Source from the content-addressed store, hash-verified

238
239// Helper function to safely get whenToUse
240export function getWhenToUse(modeSlug: string, customModes?: ModeConfig[]): string {
241 const mode = getModeBySlug(modeSlug, customModes)
242 if (!mode) {
243 console.warn(`No mode found for slug: ${modeSlug}`)
244 return ""
245 }
246 return mode.whenToUse ?? ""
247}
248
249// Helper function to safely get custom instructions
250export function getCustomInstructions(modeSlug: string, customModes?: ModeConfig[]): string {

Callers 1

ModesViewFunction · 0.90

Calls 2

getModeBySlugFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected