MCPcopy Create free account
hub / github.com/continuedev/continue / serializePromptTemplates

Function serializePromptTemplates

core/config/util.ts:199–210  ·  view source on GitHub ↗
(
  templates: Record<string, PromptTemplate> | undefined,
)

Source from the content-addressed store, hash-verified

197 * @returns
198 */
199export function serializePromptTemplates(
200 templates: Record<string, PromptTemplate> | undefined,
201): Record<string, string> | undefined {
202 if (!templates) return undefined;
203
204 return Object.fromEntries(
205 Object.entries(templates).map(([key, template]) => {
206 const serialized = typeof template === "function" ? "" : template;
207 return [key, serialized];
208 }),
209 );
210}

Callers 2

util.vitest.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected