From c3616349a42d23a920b9df2ae725db50d0a3f1d5 Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Mon, 16 Jun 2025 10:12:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD=E9=98=B2?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangzezhong --- compiler/src/userIntents_parser/parseUserIntents.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/src/userIntents_parser/parseUserIntents.ts b/compiler/src/userIntents_parser/parseUserIntents.ts index b98525db1..35230d25b 100644 --- a/compiler/src/userIntents_parser/parseUserIntents.ts +++ b/compiler/src/userIntents_parser/parseUserIntents.ts @@ -1551,11 +1551,18 @@ class ParseIntent { } public writeUserIntentJsonFile(): void { + if (!projectConfig.aceProfilePath) { + return; + } + const cachePath: string = + path.join(projectConfig.cachePath, 'insight_compile_cache.json'); // Compiled cache file + if (!(fs.existsSync(cachePath) || this.intentData.length > 0)) { + return; + } this.verifyInheritanceChain(); const writeJsonData: object = this.processIntentData(); const cacheSourceMapPath: string = path.join(projectConfig.aceProfilePath, 'insight_intent.json'); // The user's intents configuration file - const cachePath: string = path.join(projectConfig.cachePath, 'insight_compile_cache.json'); // Compiled cache file try { if (this.intentData.length > 0) { fs.writeFileSync(cacheSourceMapPath, JSON.stringify(writeJsonData, null, 2), 'utf-8'); -- Gitee