travel-agent-cli 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/python/main.py +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "travel-agent-cli",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "AI 驱动的旅行目的地推荐 Agent - 命令行工具(集成 FlyAI 旅行搜索)",
5
5
  "bin": {
6
6
  "travel-agent": "bin/cli.js",
package/python/main.py CHANGED
@@ -481,6 +481,10 @@ def _update_model_config(provider: str, model_name: Optional[str]):
481
481
  if not env_path.exists():
482
482
  console.print("[yellow].env 文件不存在,正在创建...[/yellow]")
483
483
  _init_config()
484
+
485
+ # 重新读取配置(如果刚创建)
486
+ if not env_path.exists():
487
+ console.print("[red]错误:无法创建 .env 文件[/red]")
484
488
  return
485
489
 
486
490
  config_lines = []