myagent-ai 1.23.10 → 1.23.11
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 +1 -1
- package/scripts/cli.py +2 -2
package/package.json
CHANGED
package/scripts/cli.py
CHANGED
|
@@ -204,13 +204,13 @@ async def cmd_search(args):
|
|
|
204
204
|
"""网络搜索"""
|
|
205
205
|
import argparse
|
|
206
206
|
p = argparse.ArgumentParser(prog="myagent-ai search", description="网络搜索 — 搜索互联网信息")
|
|
207
|
-
p.add_argument("query", help="搜索关键词")
|
|
207
|
+
p.add_argument("query", nargs="+", help="搜索关键词")
|
|
208
208
|
p.add_argument("-n", "--num", type=int, default=10, help="返回结果数量 (默认10, 最大20)")
|
|
209
209
|
a = p.parse_args(args)
|
|
210
210
|
|
|
211
211
|
from skills.search_skill import WebSearchSkill
|
|
212
212
|
skill = WebSearchSkill()
|
|
213
|
-
result = await skill.execute(query=a.query, num=a.num)
|
|
213
|
+
result = await skill.execute(query=" ".join(a.query), num=a.num)
|
|
214
214
|
_print_result({"success": result.success, "message": result.message,
|
|
215
215
|
"data": result.data, "error": result.error})
|
|
216
216
|
|