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

Function getPromptComponent

src/core/prompts/system.ts:29–39  ·  view source on GitHub ↗
(
	customModePrompts: CustomModePrompts | undefined,
	mode: string,
)

Source from the content-addressed store, hash-verified

27
28// Helper function to get prompt component, filtering out empty objects
29export function getPromptComponent(
30 customModePrompts: CustomModePrompts | undefined,
31 mode: string,
32): PromptComponent | undefined {
33 const component = customModePrompts?.[mode]
34 // Return undefined if component is empty
35 if (isEmpty(component)) {
36 return undefined
37 }
38 return component
39}
40
41async function generatePrompt(
42 context: vscode.ExtensionContext,

Callers 2

SYSTEM_PROMPTFunction · 0.85

Calls 1

isEmptyFunction · 0.90

Tested by

no test coverage detected