mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
feat(insight): add new components for insights display and enhance styling
This commit is contained in:
parent
f57e2619f1
commit
afe911d06b
7 changed files with 1008 additions and 5 deletions
|
|
@ -48,12 +48,23 @@ export class TemplateRenderer {
|
|||
}
|
||||
|
||||
private async loadScripts(): Promise<string> {
|
||||
const scriptsPath = path.join(
|
||||
this.templateDir,
|
||||
'scripts',
|
||||
'insight-app.js',
|
||||
const componentsDir = path.join(this.templateDir, 'scripts', 'components');
|
||||
|
||||
const componentFiles = [
|
||||
'utils.js',
|
||||
'Header.js',
|
||||
'Qualitative.js',
|
||||
'Charts.js',
|
||||
'App.js',
|
||||
];
|
||||
|
||||
const scripts = await Promise.all(
|
||||
componentFiles.map((file) =>
|
||||
fs.readFile(path.join(componentsDir, file), 'utf-8'),
|
||||
),
|
||||
);
|
||||
return await fs.readFile(scriptsPath, 'utf-8');
|
||||
|
||||
return scripts.join('\n\n');
|
||||
}
|
||||
|
||||
// Render the complete HTML file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue