MCPcopy
hub / github.com/continuedev/continue / getFileContent

Function getFileContent

core/config/workspace/workspaceBlocks.ts:95–112  ·  view source on GitHub ↗
(blockType: BlockType)

Source from the content-addressed store, hash-verified

93}
94
95export function getFileContent(blockType: BlockType): string {
96 if (blockType === "rules") {
97 return createRuleMarkdown("New Rule", "Your rule content", {
98 description: "A description of your rule",
99 });
100 } else if (blockType === "prompts") {
101 return createPromptMarkdown(
102 "New prompt",
103 "Please write a thorough suite of unit tests for this code, making sure to cover all relevant edge cases",
104 {
105 description: "New prompt",
106 invokable: true,
107 },
108 );
109 } else {
110 return YAML.stringify(getContentsForNewBlock(blockType));
111 }
112}
113
114export async function findAvailableFilename(
115 baseDirUri: string,

Callers 3

createNewGlobalRuleFileFunction · 0.85

Calls 3

createRuleMarkdownFunction · 0.90
createPromptMarkdownFunction · 0.90
getContentsForNewBlockFunction · 0.85

Tested by

no test coverage detected