From b25e091404f4ae63eb980c5f11d02df854de7e8e Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Thu, 29 Jan 2026 18:54:28 +0800 Subject: [PATCH] chore: localized commit to current directory --- agentapp.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/agentapp.py b/agentapp.py index 93e15e5..cdadf58 100644 --- a/agentapp.py +++ b/agentapp.py @@ -32,14 +32,17 @@ def get_system_prompt(): if not os.path.exists('memory/global_mem.txt'): with open('memory/global_mem.txt', 'w', encoding='utf-8') as f: f.write('') if not os.path.exists('memory/global_mem_insight.txt'): - with open('memory/global_mem_insight.txt', 'w', encoding='utf-8') as f: - f.write('PATHS: ../memory/global_mem.txt (Facts), ../memory/global_mem_insight.txt (Logic), ../ (Code Root).') + with open('memory/global_mem_insight.txt', 'w', encoding='utf-8') as f: f.write('') with open('sys_prompt.txt', 'r', encoding='utf-8') as f: prompt = f.read() try: with open('memory/global_mem_insight.txt', 'r', encoding='utf-8') as f: insight = f.read() - prompt += f"\n\n[Global Memory Insight]\n{insight}" + prompt += f"\n\n[Global Memory Insight]\n" + prompt += 'IMPORTANT PATHS: ../memory/global_mem.txt (Facts), ../memory/global_mem_insight.txt (Logic), ../ (Your Code Root).\n' + prompt += 'MEM_RULE: Insight is the index of Facts. Sync Insight whenever Facts change. For details, read Facts.\n' + prompt += "EXT: ../memory/ may contain other task-specific memories.\n" + prompt += insight + "\n" except FileNotFoundError: pass return prompt