diff --git a/core/main_terminal.py b/core/main_terminal.py index 34cbd11..25b6db2 100644 --- a/core/main_terminal.py +++ b/core/main_terminal.py @@ -1310,7 +1310,7 @@ class MainTerminal: def define_tools(self) -> List[Dict]: """定义可用工具(添加确认工具)""" - current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") + current_time = datetime.now().strftime("%Y-%m-%d %H") tools = [ { @@ -2550,7 +2550,7 @@ class MainTerminal: project_storage=project_storage, file_tree=context["project_info"]["file_tree"], memory=context["memory"], - current_time=datetime.now().strftime("%Y-%m-%d"), + current_time=datetime.now().strftime("%Y-%m-%d %H"), model_description=prompt_replacements.get("model_description", "") ) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8ce5c1b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +flask +flask-socketio +flask-cors +werkzeug +httpx +openai +cryptography +pillow diff --git a/utils/context_manager.py b/utils/context_manager.py index 594bd01..6f236c4 100644 --- a/utils/context_manager.py +++ b/utils/context_manager.py @@ -1677,7 +1677,7 @@ class ContextManager: container_cpus=self.container_cpu_limit, container_memory=self.container_memory_limit, project_storage=self.project_storage_limit, - current_time=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), + current_time=datetime.now().strftime("%Y-%m-%d %H"), file_tree=( "(以下为工作区根目录的部分文件和文件夹)\n" + context["project_info"]["file_tree"] if context["project_info"].get("file_tree") @@ -1709,7 +1709,7 @@ class ContextManager: project_storage=project_storage, file_tree=context["project_info"]["file_tree"], memory=context["memory"], - current_time=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), + current_time=datetime.now().strftime("%Y-%m-%d %H"), model_description=prompt_replacements.get("model_description", "") )