diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f2c5876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# OS & tools +.DS_Store +*.swp +*.swo +*.tmp + +# Python artifacts +__pycache__/ +*.pyc + +# Runtime data (main agent) +logs/ +data/ +project/ +users/ +webapp.pid + +# Runtime data (sub agent) +sub_agent/tasks/ +sub_agent/data/ +sub_agent/logs/ +sub_agent/project/ + +# Misc +*.pid diff --git a/core/main_terminal.py b/core/main_terminal.py index fa6d9fa..51aa4e3 100644 --- a/core/main_terminal.py +++ b/core/main_terminal.py @@ -595,16 +595,16 @@ class MainTerminal: ) # 3. 保存独立的tool消息 - for tool_result in collected_tool_results: - self.context_manager.add_conversation( - "tool", - tool_result["content"], - tool_call_id=tool_result["tool_call_id"], - name=tool_result["name"] - ) - system_message = tool_result.get("system_message") - if system_message: - self._record_sub_agent_message(system_message, tool_result.get("task_id"), inline=False) + for tool_result in collected_tool_results: + self.context_manager.add_conversation( + "tool", + tool_result["content"], + tool_call_id=tool_result["tool_call_id"], + name=tool_result["name"] + ) + system_message = tool_result.get("system_message") + if system_message: + self._record_sub_agent_message(system_message, tool_result.get("task_id"), inline=False) # 4. 在终端显示执行信息(不保存到历史) if collected_tool_calls: