From b9b19c9acc2f34785a9907ad565e0232a8e2f763 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 29 Mar 2026 08:04:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(agent):=20=E6=B7=BB=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E4=BF=A1=E6=81=AF=E5=88=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/agent/prompt/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/agent/prompt/__init__.py b/app/agent/prompt/__init__.py index 10915042..64664113 100644 --- a/app/agent/prompt/__init__.py +++ b/app/agent/prompt/__init__.py @@ -121,6 +121,13 @@ class PromptManager: # API令牌 api_token = settings.API_TOKEN or "未设置" + # 数据库信息 + db_type = settings.DB_TYPE + if db_type == "sqlite": + db_info = f"SQLite ({settings.CONFIG_PATH / 'db' / 'moviepilot.db'})" + else: + db_info = f"PostgreSQL ({settings.DB_POSTGRESQL_HOST}:{settings.DB_POSTGRESQL_PORT}/{settings.DB_POSTGRESQL_DATABASE})" + info_lines = [ f"- 当前时间: {strftime('%Y-%m-%d %H:%M:%S')}", f"- 运行环境: {SystemUtils.platform} {'docker' if SystemUtils.is_docker() else ''}", @@ -130,6 +137,8 @@ class PromptManager: f"- API路径: {api_path}", f"- API令牌: {api_token}", f"- 外网域名: {settings.APP_DOMAIN or '未设置'}", + f"- 数据库类型: {db_type}", + f"- 数据库: {db_info}", f"- 配置文件目录: {config_path}", f"- 日志文件目录: {log_path}", f"- 系统安装目录: {settings.ROOT_PATH}",