MCPcopy Index your code
hub / github.com/stackblitz/bolt.new / fileModificationsToHTML

Function fileModificationsToHTML

app/utils/diff.ts:92–108  ·  view source on GitHub ↗
(modifications: FileModifications)

Source from the content-addressed store, hash-verified

90 * ```
91 */
92export function fileModificationsToHTML(modifications: FileModifications) {
93 const entries = Object.entries(modifications);
94
95 if (entries.length === 0) {
96 return undefined;
97 }
98
99 const result: string[] = [`<${MODIFICATIONS_TAG_NAME}>`];
100
101 for (const [filePath, { type, content }] of entries) {
102 result.push(`<${type} path=${JSON.stringify(filePath)}>`, content, `</${type}>`);
103 }
104
105 result.push(`</${MODIFICATIONS_TAG_NAME}>`);
106
107 return result.join('\n');
108}

Callers 1

sendMessageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected