chore(messages): update IDE labels to "Prompt Builder" across multiple languages

This commit is contained in:
Fatih Kadir Akın
2025-12-26 23:13:13 +03:00
parent 87e352f7b1
commit e371c07ec5
38 changed files with 11520 additions and 1421 deletions
+34
View File
@@ -0,0 +1,34 @@
import fs from 'fs';
import path from 'path';
const examplesDir = path.join(process.cwd(), 'src/components/ide/examples');
const outputFile = path.join(examplesDir, 'generated.ts');
const examples = [
{ file: 'video.ts', export: 'EXAMPLE_VIDEO' },
{ file: 'audio.ts', export: 'EXAMPLE_AUDIO' },
{ file: 'image.ts', export: 'EXAMPLE_IMAGE' },
{ file: 'chat.ts', export: 'EXAMPLE_CHAT' },
{ file: 'default.ts', export: 'DEFAULT_CODE' },
];
const lines: string[] = [
'// Auto-generated from example .ts files - DO NOT EDIT MANUALLY',
'// Run: npm run generate:examples to regenerate',
'',
];
for (const { file, export: exportName } of examples) {
const content = fs.readFileSync(path.join(examplesDir, file), 'utf-8');
// Escape backticks and ${} in the content
const escaped = content
.replace(/\\/g, '\\\\')
.replace(/`/g, '\\`')
.replace(/\$\{/g, '\\${');
lines.push(`export const ${exportName} = \`${escaped}\`;`);
lines.push('');
}
fs.writeFileSync(outputFile, lines.join('\n'));
console.log(`✅ Generated examples: ${outputFile}`);