travel-agent-cli 0.4.0 → 0.4.2

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/bin/cli.js +2 -2
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -37,11 +37,11 @@ function getVenvPython() {
37
37
 
38
38
  // 检查 Python 是否可用
39
39
  function findPython() {
40
+ const { execSync } = require('child_process');
40
41
  const candidates = ['python3', 'python'];
41
42
 
42
43
  for (const cmd of candidates) {
43
44
  try {
44
- const { execSync } = await import('child_process');
45
45
  execSync(`${cmd} --version`, { stdio: 'ignore' });
46
46
  return cmd;
47
47
  } catch (e) {
@@ -135,7 +135,7 @@ function run() {
135
135
 
136
136
  // 如果没有虚拟环境,使用系统 Python
137
137
  if (!pythonCmd) {
138
- pythonCmd = await findPython();
138
+ pythonCmd = findPython();
139
139
  }
140
140
 
141
141
  if (!pythonCmd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "travel-agent-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "AI 驱动的旅行目的地推荐 Agent - 命令行工具(集成 FlyAI 旅行搜索)",
5
5
  "type": "module",
6
6
  "bin": {