myagent-ai 1.23.48 → 1.23.49

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 +2 -2
  2. package/scripts/cli.py +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.23.48",
3
+ "version": "1.23.49",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {
@@ -43,4 +43,4 @@
43
43
  "python": ">=3.10",
44
44
  "node": ">=18"
45
45
  }
46
- }
46
+ }
package/scripts/cli.py CHANGED
@@ -378,9 +378,11 @@ async def cmd_ls(args):
378
378
  """列出目录内容"""
379
379
  import argparse
380
380
  # [v1.23.46] 过滤系统 ls 参数(-l, -a, -la 等)
381
+ # [v1.23.48] 过滤纯数字参数(LLM 误传如 myagent-ai ls 2)
382
+ args = [a for a in args if not a.isdigit()]
381
383
  args = _filter_unknown_args(args, allowed_prefixes={"-p", "--pattern", "-r", "--recursive", "--max"})
382
384
  p = argparse.ArgumentParser(prog="myagent-ai ls", description="列出目录内容")
383
- p.add_argument("path", help="目录路径")
385
+ p.add_argument("path", nargs="?", default=".", help="目录路径 (默认当前目录)")
384
386
  p.add_argument("-p", "--pattern", default="*", help="文件匹配模式 (如 *.py)")
385
387
  p.add_argument("-r", "--recursive", action="store_true", help="递归列出")
386
388
  p.add_argument("--max", type=int, default=500, help="最大返回条目数 (默认500)")