travel-agent-cli 0.2.5 → 0.2.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "travel-agent-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "AI 驱动的旅行目的地推荐 Agent - 命令行工具(集成 FlyAI 旅行搜索)",
5
5
  "bin": {
6
6
  "travel-agent": "bin/cli.js",
@@ -151,7 +151,7 @@ class Settings(BaseSettings):
151
151
  }
152
152
 
153
153
  class Config:
154
- env_file = ".env"
154
+ env_file = Path.home() / ".env"
155
155
  env_file_encoding = "utf-8"
156
156
  extra = "ignore"
157
157
 
package/python/main.py CHANGED
@@ -543,13 +543,15 @@ def _init_config():
543
543
  console.print("请确保已正确安装 travel-agent-cli")
544
544
  return
545
545
 
546
- dst = Path.cwd() / ".env"
546
+ # 在用户主目录创建 .env 文件
547
+ dst = Path.home() / ".env"
547
548
  if not dst.exists():
548
549
  shutil.copy(src, dst)
549
550
  console.print("[green]已创建 .env 配置文件[/green]")
550
551
  console.print(f"[dim]位置:{dst}[/dim]")
551
552
  else:
552
553
  console.print("[yellow].env 文件已存在[/yellow]")
554
+ console.print(f"[dim]位置:{dst}[/dim]")
553
555
 
554
556
 
555
557
  def _show_config(settings):