MCPcopy Create free account
hub / github.com/CedarCopilot/cedar-OS / getFilePath

Function getFilePath

packages/cli/src/utils/downloadComponents/registry.ts:86–108  ·  view source on GitHub ↗
(
	type: ComponentRegistryEntry['type'],
	fileName: string
)

Source from the content-addressed store, hash-verified

84
85// Helper function to get file path based on component type
86function getFilePath(
87 type: ComponentRegistryEntry['type'],
88 fileName: string
89): string {
90 const typeMap: Record<ComponentRegistryEntry['type'], string> = {
91 chatComponents: 'chatComponents',
92 chatInput: 'chatInput',
93 chatMessages: 'chatMessages',
94 containers: 'containers',
95 inputs: 'inputs',
96 ornaments: 'ornaments',
97 structural: 'structural',
98 text: 'text',
99 ui: 'ui',
100 diffs: 'diffs',
101 spells: 'spells',
102 voice: 'voice',
103 threads: 'threads',
104 CommandBar: 'CommandBar',
105 };
106
107 return `${typeMap[type]}/${fileName}`;
108}
109
110// Convert registry entry to our ComponentInfo format
111function registryEntryToComponentInfo(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected