From f33a814e56850ce771824d1cfff4d519133e0f55 Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Sat, 9 May 2026 09:51:21 +0800 Subject: [PATCH] hub.pyw: add EXCLUDES set for goal_mode/chatapp_common/tuiapp; ga.py: fix missing summary prompt wording --- ga.py | 3 ++- hub.pyw | 5 +++-- memory/vue3_component_sop.md | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/ga.py b/ga.py index 4096c503..efea6c34 100644 --- a/ga.py +++ b/ga.py @@ -546,10 +546,11 @@ class GenericAgentHandler(BaseHandler): clean_args = {k: v for k, v in args.items() if not k.startswith('_')} summary = f"调用工具{tool_name}, args: {clean_args}" if tool_name == 'no_tool': summary = "直接回答了用户问题" - next_prompt += "\n\n\nUSER: 呢???!\n\n" + next_prompt += "\n\n\n[SYSTEM] 必须在回复文本中包含!\n\n" summary = smart_format(summary.replace('\n', ''), max_str_len=80) self.history_info.append(f'[Agent] {summary}') _plan = self._in_plan_mode() + if turn % 65 == 0 and (not _plan): next_prompt += f"\n\n[DANGER] 已连续执行第 {turn} 轮。必须总结情况进行ask_user,不允许继续重试。" elif turn % 7 == 0: diff --git a/hub.pyw b/hub.pyw index ce5a798e..303fbffb 100644 --- a/hub.pyw +++ b/hub.pyw @@ -17,10 +17,11 @@ def acquire_singleton(): def discover_services(): services = [] + EXCLUDES = {'goal_mode.py', 'chatapp_common.py', 'tuiapp.py'} reflect_dir = os.path.join(BASE_DIR, 'reflect') if os.path.isdir(reflect_dir): for f in sorted(os.listdir(reflect_dir)): - if f.endswith('.py') and not f.startswith('_'): + if f.endswith('.py') and not f.startswith('_') and f not in EXCLUDES: services.append({ 'name': 'reflect/' + f, 'cmd': [sys.executable, 'agentmain.py', '--reflect', 'reflect/' + f], @@ -28,7 +29,7 @@ def discover_services(): frontends_dir = os.path.join(BASE_DIR, 'frontends') if os.path.isdir(frontends_dir): for f in sorted(os.listdir(frontends_dir)): - if 'app' in f and f.endswith('.py') and f != 'chatapp_common.py': + if 'app' in f and f.endswith('.py') and f not in EXCLUDES: if 'stapp' in f: cmd = [sys.executable, '-m', 'streamlit', 'run', 'frontends/' + f, '--server.headless=true'] else: cmd = [sys.executable, 'frontends/' + f] services.append({'name': 'frontends/' + f, 'cmd': cmd}) diff --git a/memory/vue3_component_sop.md b/memory/vue3_component_sop.md index 7add7206..a6759e8d 100644 --- a/memory/vue3_component_sop.md +++ b/memory/vue3_component_sop.md @@ -151,13 +151,50 @@ fileInput.dispatchEvent(new Event('change', { bubbles: true })); - Composition API 组件的逻辑主要在 setupState 而非 $options.methods - 如果 proxy 上找不到方法,试试 `comp.exposed`(`