From d0a9b5de08fb5d7d85813ddd3436a5d6ad61c9cc Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Tue, 14 Apr 2026 23:38:32 +0800 Subject: [PATCH] fix: use script_dir for cwd path instead of relative path --- ga.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ga.py b/ga.py index 73300dc..d673405 100644 --- a/ga.py +++ b/ga.py @@ -522,7 +522,7 @@ def get_global_memory(): script_dir = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(script_dir, 'memory/global_mem_insight.txt'), 'r', encoding='utf-8', errors='replace') as f: insight = f.read() with open(os.path.join(script_dir, 'assets/insight_fixed_structure.txt'), 'r', encoding='utf-8') as f: structure = f.read() - prompt += f'cwd = {os.path.abspath("./temp")} (用./引用)\n' + prompt += f'cwd = {os.path.join(script_dir, "temp")} (用./引用)\n' prompt += f"\n[Memory] (../memory)\n" prompt += structure + '\n../memory/global_mem_insight.txt:\n' prompt += insight + "\n"