Make init db args cleaen

This commit is contained in:
Xin Wang
2026-02-12 19:16:50 +08:00
parent da1293e39a
commit 20afc63a28

View File

@@ -421,7 +421,13 @@ if __name__ == "__main__":
args = parser.parse_args()
# 无参数时保持旧行为:重建 DB + 初始化默认数据
if not args.rebuild_db and not args.rebuild_vector_store and not args.skip_seed:
# 仅当完全未指定任何选项时才自动触发 rebuild-db
if (
not args.rebuild_db
and not args.rebuild_vector_store
and not args.skip_seed
and not args.recreate_tool_db
):
args.rebuild_db = True
ensure_db_dir()
@@ -430,6 +436,8 @@ if __name__ == "__main__":
init_db()
else:
print(" 跳过数据库结构变更(未指定 --rebuild-db")
if not args.skip_seed or args.recreate_tool_db:
print(" 当前将执行非破坏性流程(仅工具/默认数据初始化)")
if args.recreate_tool_db:
init_default_tools(recreate=True)